1. 26 Jun, 2014 24 commits
    • Anjali Singhai Jain's avatar
      i40e: Add debugfs hooks to print current total FD filter count · e17ff05c
      Anjali Singhai Jain authored
      "fd current cnt" can be used to print the total filters consumed
      by this interface, this includes guaranteed and best effort filters.
      
      Change-ID: I2c417810c4999ce1388d2ea26f8e69679ba33966
      Signed-off-by: default avatarAnjali Singhai Jain <anjali.singhai@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      e17ff05c
    • Anjali Singhai Jain's avatar
      i40e: Fix the FD sideband logic to detect a FD table full condition · 12957388
      Anjali Singhai Jain authored
      Hardware does not have a way of telling a PF how much of the global
      shared FD table space is still available or is consumed.
      Previously, every PF but PF0 would think there was still space available
      when there wasn't. The PFs would continue to try to add filters and fail.
      With this new logic if a filter programming error is detected we just
      check if we are close to the guaranteed space full and that can be used
      as a hint to say, there might not be space and we should turn off the
      features. This way we can turn off the feature in SW for all PFs in
      time.
      
      Change-ID: I725cb2fab16c033f883056362b4542c1400503c5
      Signed-off-by: default avatarAnjali Singhai Jain <anjali.singhai@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      12957388
    • Anjali Singhai Jain's avatar
      i40e: Avoid adding the TCP-IPv4 filter twice · 12be846d
      Anjali Singhai Jain authored
      There wasn't a need to play the logic twice, it seems
      like a left over from when we had to add two PTYPEs for
      one filter. There should be no change in the number of
      filters that actually got added to the hardware.
      
      Change-ID: I5071d02eafd020b60e30eb96219f110f334eec85
      Signed-off-by: default avatarAnjali Singhai Jain <anjali.singhai@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      12be846d
    • Jacob Keller's avatar
      i40e: only create PTP device node once · fbd5e2df
      Jacob Keller authored
      Currently every time we run through the i40e_ptp_init routine, we create
      a new device node. This function is called by i40e_reset_and_rebuild
      which is used to handle reset of the device. Even though the 1588
      registers only get cleared on a GLOBAL reset, this function is still
      called to handle a CORE reset.
      
      This causes a leak of PTP device nodes at every reset. To fix this,
      break PTP device clock node creation out of i40e_ptp_init, and only call
      this if we don't already have a device created. Further invocation of
      i40e_ptp_init will not generate new PTP devices. Instead, only the
      necessary work required to reconfigure 1588 will be done.
      
      This change also fixes an issue where a reset can cause the
      device to forget it's timestamp configuration, and revert to the default
      mode.
      
      Change-ID: I741d01c61d9fe1d24887859d1316e1a8a892909e
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      fbd5e2df
    • Jacob Keller's avatar
      i40e: don't store user requested mode until we've validated it · d19af2af
      Jacob Keller authored
      This patch prevents the SIOCGHWTSTAMP ioctl from possibly returning bad
      data, by not permanently storing the setting into the private
      structure until after we've finished validating that we can support it.
      
      Change-ID: Ib59f9b4f73f451d5a2e76fb8efa5d4271b218433
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      d19af2af
    • Jacob Keller's avatar
      i40e: break PTP hardware control from ioctl command for timestamp mode · 18946455
      Jacob Keller authored
      This patch facilitates future work by breaking the PTP hardware control
      bits out of the i40e_set_ts_config function. By doing this, we can
      maintain state about the 1588 timestamping mode and properly re-enable
      to the last known mode during a re-initialize of 1588 bits.
      
      This patch also modifies i40e_ptp_init to call the
      i40e_ptp_set_timestamp_mode during the reconfiguration process. A
      future patch will ensure that the hwtstamp_config structure is not reset
      during this process, so that timestamp mode will be maintained across a
      reset.
      
      Change-ID: Ic20832c96c5c512ac203b6c7534e10d891c560f0
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      18946455
    • Jacob Keller's avatar
      i40e: rename i40e_ptp_enable to i40e_ptp_feature_enable · 69d1a70c
      Jacob Keller authored
      Reduces possible confusion and ambiguity in purpose of the ancillary
      feature control entry point function.
      
      Change-ID: I21d773c1a86878f6d061505185b596c788d1b7cc
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      69d1a70c
    • Mitch Williams's avatar
      i40evf: resend FW request if no response · 56f9920a
      Mitch Williams authored
      Sometimes the firmware will not indicate an error but fail to pass a
      message between the VF and the PF driver. If this happens, just resend
      the request.
      
      This fixes an initialization failure if many VFs are instantiated at the
      same time and the VF module is autoloaded.
      
      Change-ID: Idd1ad8da2fd5137859244685c355941427d317d7
      Signed-off-by: default avatarMitch Williams <mitch.a.williams@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      56f9920a
    • Mitch Williams's avatar
      i40evf: fix typo · 3f2ab172
      Mitch Williams authored
      Correct a missing word in a log message.
      
      Change-ID: Id94da7d9f842382d073b3947e0b616503e2f8e91
      Signed-off-by: default avatarMitch Williams <mitch.a.williams@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      3f2ab172
    • Mitch Williams's avatar
      i40evf: return more useful error information · 6a8e93db
      Mitch Williams authored
      When verifying the API version (which is the first time the driver
      communicates with the firmware and thus the PF driver), there are many
      ways in which a failure can occur. There may be an error from the
      firmware, there may be unresponsive firmware, there may be an error from
      the PF driver, etc, etc.
      
      Make this function return more useful information, instead of just -EIO.
      Propagate FW errors back to the caller, and log a message if the PF
      sends an invalid reply.
      
      Change-ID: I3e9135a2b80f7acdb855f62f12b2b2668c9a8951
      Signed-off-by: default avatarMitch Williams <mitch.a.williams@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      6a8e93db
    • Mitch Williams's avatar
      i40evf: don't stop watchdog if it hasn't started · e5d17c3e
      Mitch Williams authored
      If the VF driver fails to complete early init, then rmmod can cause a
      softlock when the driver tries to stop a watchdog timer that never even
      got initialized.
      
      Add a check to see if the timer is actually initialized before stopping
      it.
      
      Change-ID: Id9d550aa8838e07f4b02afe7bc017ef983779efc
      Signed-off-by: default avatarMitch Williams <mitch.a.williams@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      e5d17c3e
    • Paul M Stillwell Jr's avatar
      i40e/i40evf: Big endian fixes for handling HMC · 3ba3faeb
      Paul M Stillwell Jr authored
      Fix HMC handling for big endian architectures.
      
      Change-ID: Id8c46fc341815d47bfe0af8b819f0ab9a1e9e515
      Signed-off-by: default avatarPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      3ba3faeb
    • Kamil Krawczyk's avatar
      i40e: do not take NVM ownership for SR read · 7a208e83
      Kamil Krawczyk authored
      We do not need to acquire NVM for Shadow RAM XSUM calculation, as we only
      read from SR through SRCTL register for which having the ownership is not
      required.
      
      Change-ID: Ie238a8f09917d1d25f24cc7cec271951ac7b98f2
      Signed-off-by: default avatarKamil Krawczyk <kamil.krawczyk@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      7a208e83
    • David S. Miller's avatar
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 · d7933ab7
      Linus Torvalds authored
      Pull CIFS fixes from Steve French:
       "Small set of misc cifs/smb3 fixes"
      
      * 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
        [CIFS] fix mount failure with broken pathnames when smb3 mount with mapchars option
        cifs: revalidate mapping prior to satisfying read_iter request with cache=loose
        fs/cifs: fix regression in cifs_create_mf_symlink()
      d7933ab7
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging · 2a80ff86
      Linus Torvalds authored
      Pull hwmon fixes from Guenter Roeck:
       "Various minor fixes"
      
      * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (gpio-fan) Change name used in hwmon_device_register_with_groups
        hwmon: (emc1403) Fix missing 'select REGMAP_I2C' in Kconfig
        hwmon: (ntc_thermistor) Use the manufacturer name properly
        devicetree: bindings: Document murata vendor prefix
        hwmon: (w83l786ng) Report correct minimum fan speed
      2a80ff86
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · f40ede39
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix crash in ipvs tot_stats estimator, from Julian Anastasov.
      
       2) Fix OOPS in nf_nat on netns removal, from Florian Westphal.
      
       3) Really really really fix locking issues in slip and slcan tty write
          wakeups, from Tyler Hall.
      
       4) Fix checksum offloading in fec driver, from Fugang Duan.
      
       5) Off by one in BPF instruction limit test, from Kees Cook.
      
       6) Need to clear all TSO capability flags when doing software TSO in
          tg3 driver, from Prashant Sreedharan.
      
       7) Fix memory leak in vlan_reorder_header() error path, from Li
          RongQing.
      
       8) Fix various bugs in xen-netfront and xen-netback multiqueue support,
          from David Vrabel and Wei Liu.
      
       9) Fix deadlock in cxgb4 driver, from Li RongQing.
      
      10) Prevent double free of no-cache DST entries, from Eric Dumazet.
      
      11) Bad csum_start handling in skb_segment() leads to crashes when
          forwarding, from Tom Herbert.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (76 commits)
        net: fix setting csum_start in skb_segment()
        ipv4: fix dst race in sk_dst_get()
        net: filter: Use kcalloc/kmalloc_array to allocate arrays
        trivial: net: filter: Change kerneldoc parameter order
        trivial: net: filter: Fix typo in comment
        net: allwinner: emac: Add missing free_irq
        cxgb4: use dev_port to identify ports
        xen-netback: bookkeep number of active queues in our own module
        tg3: Change nvram command timeout value to 50ms
        cxgb4: Not need to hold the adap_rcu_lock lock when read adap_rcu_list
        be2net: fix qnq mode detection on VFs
        of: mdio: fixup of_phy_register_fixed_link parsing of new bindings
        at86rf230: fix irq setup
        net: phy: at803x: fix coccinelle warnings
        net/mlx4_core: Fix the error flow when probing with invalid VF configuration
        tulip: Poll link status more frequently for Comet chips
        net: huawei_cdc_ncm: increase command buffer size
        drivers: net: cpsw: fix dual EMAC stall when connected to same switch
        xen-netfront: recreate queues correctly when reconnecting
        xen-netfront: fix oops when disconnected from backend
        ...
      f40ede39
    • Tom Herbert's avatar
      net: fix setting csum_start in skb_segment() · de843723
      Tom Herbert authored
      Dave Jones reported that a crash is occurring in
      
      csum_partial
      tcp_gso_segment
      inet_gso_segment
      ? update_dl_migration
      skb_mac_gso_segment
      __skb_gso_segment
      dev_hard_start_xmit
      sch_direct_xmit
      __dev_queue_xmit
      ? dev_hard_start_xmit
      dev_queue_xmit
      ip_finish_output
      ? ip_output
      ip_output
      ip_forward_finish
      ip_forward
      ip_rcv_finish
      ip_rcv
      __netif_receive_skb_core
      ? __netif_receive_skb_core
      ? trace_hardirqs_on
      __netif_receive_skb
      netif_receive_skb_internal
      napi_gro_complete
      ? napi_gro_complete
      dev_gro_receive
      ? dev_gro_receive
      napi_gro_receive
      
      It looks like a likely culprit is that SKB_GSO_CB()->csum_start is
      not set correctly when doing non-scatter gather. We are using
      offset as opposed to doffset.
      Reported-by: default avatarDave Jones <davej@redhat.com>
      Tested-by: default avatarDave Jones <davej@redhat.com>
      Signed-off-by: default avatarTom Herbert <therbert@google.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Fixes: 7e2b10c1 ("net: Support for multiple checksums with gso")
      Acked-by: default avatarTom Herbert <therbert@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      de843723
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-3.16-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · ec71feae
      Linus Torvalds authored
      Pull NFS client fixes from Trond Myklebust:
       "Highlights include:
      
         - Stable fix for a data corruption case due to incorrect cache
           validation
         - Fix a couple of false positive cache invalidations
         - Fix NFSv4 security negotiation issues"
      
      * tag 'nfs-for-3.16-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFSv4: test SECINFO RPC_AUTH_GSS pseudoflavors for support
        NFS Return -EPERM if no supported or matching SECINFO flavor
        NFS check the return of nfs4_negotiate_security in nfs4_submount
        NFS: Don't mark the data cache as invalid if it has been flushed
        NFS: Clear NFS_INO_REVAL_PAGECACHE when we update the file size
        nfs: Fix cache_validity check in nfs_write_pageuptodate()
      ec71feae
    • Geert Uytterhoeven's avatar
      enic: Make dummy rfs functions inline to fix !CONFIG_RFS_ACCEL build · 644a918d
      Geert Uytterhoeven authored
      If CONFIG_RFS_ACCEL=n:
      
      drivers/net/ethernet/cisco/enic/enic_main.c: In function 'enic_open':
      drivers/net/ethernet/cisco/enic/enic_main.c:1603:2: error: implicit declaration of function 'enic_rfs_flw_tbl_init' [-Werror=implicit-function-declaration]
      drivers/net/ethernet/cisco/enic/enic_main.c: In function 'enic_stop':
      drivers/net/ethernet/cisco/enic/enic_main.c:1630:2: error: implicit declaration of function 'enic_rfs_flw_tbl_free' [-Werror=implicit-function-declaration]
      
      Introduced in commit a145df23 ("enic: Add
      Accelerated RFS support").
      
      Dummy functions are provided, but their prototypes are missing, causing the
      build failure.  Provide dummy static inline functions instead to fix this.
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      644a918d
    • Erik Hugne's avatar
      tipc: bump max configurable window size · a6eacef7
      Erik Hugne authored
      The maximum window size is limited by the sequence gap field, which
      was expanded with bd784533
      ("tipc: Expand link sequence gap field to 13 bits")
      We remove the artificial limit that prevents the link window to be
      set larger than 150.
      Signed-off-by: default avatarErik Hugne <erik.hugne@ericsson.com>
      Reviewed-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a6eacef7
    • David S. Miller's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next · 0b2fda89
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates 2014-06-24
      
      This series contains updates to i40e and i40evf.
      
      Greg provides a patch to stop the VF device after setting its MAC address.
      This is due to if the host VMM administrator has changed the VF device's MAC
      address then the i40e driver needs to halt the VF device so that the
      administrator will be forced to reload the VF driver so that the VF driver
      will start using the newly assigned MAC address.
      
      Shannon provides several patches for i40e, first makes prep_for_test() a
      void function since the return value was being ignored for the most part
      by all its callers.  Adds a log warning when the firmware's API minor/major
      number is not what we expect to assist the user by informing them they
      may need to update their NVM or SW.  Cleans up a stray print message
      so that it is similar to other print messages.  Ensures to set the
      WoL flag when setting LAA and allow the user to set LAA again.  So do
      not short-circuit the LAA assignment when the driver thinks it has
      already been done as it is possible that the user might want to force
      the address setting again.  Provides a couple more LAA fixes to ensure
      the LAA gets restored after resets.
      
      Neerav provides a patch for i40e to add a PF reset when a malicious driver
      event for the PF occurs.  As per the specification when the PF driver
      receives a malicious driver event the queue that caused the event is
      already stopped and it is expected that the function that owns the queue
      will reset the queue, but in some cases it may not be possible to determine
      the queue, so it is suggested to reset the whole function.
      
      Carolyn fixes ethtool coalesce settings to allow 0 as a disable value and
      adds message to user about invalid values.
      
      Jesse removes a reserved type which was not removed from the code.
      
      Catherine provides a patch to add the ability to enable/disable link from
      set_link)restart_an() which will make it easy to toggle link without
      calling set_phy_config() when no other link settings need to change.
      
      Anjali provides a patch to ensure we do a PF reset on Tx hang and that
      way we avoid any Malicious Driver Detect (MDD) events because of a Tx
      queue disable failure.
      
      v2:
       - fixed the un-needed return in patch 2 based on feedback from Sergei Shtylyov
       - added punctuation to print statements and code comment based on
         feedback from Sergei Shtylyov
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0b2fda89
    • Joe Perches's avatar
      mac_pton: Use bool not int return · a69f5edb
      Joe Perches authored
      Use bool instead of int as the return type.
      
      All uses are tested with !.
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a69f5edb
    • Eric Dumazet's avatar
      ipv4: fix dst race in sk_dst_get() · f8864972
      Eric Dumazet authored
      When IP route cache had been removed in linux-3.6, we broke assumption
      that dst entries were all freed after rcu grace period. DST_NOCACHE
      dst were supposed to be freed from dst_release(). But it appears
      we want to keep such dst around, either in UDP sockets or tunnels.
      
      In sk_dst_get() we need to make sure dst refcount is not 0
      before incrementing it, or else we might end up freeing a dst
      twice.
      
      DST_NOCACHE set on a dst does not mean this dst can not be attached
      to a socket or a tunnel.
      
      Then, before actual freeing, we need to observe a rcu grace period
      to make sure all other cpus can catch the fact the dst is no longer
      usable.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarDormando <dormando@rydia.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f8864972
  2. 25 Jun, 2014 16 commits