1. 31 May, 2017 15 commits
    • Emil Tantilov's avatar
      ixgbe: add missing configuration for rate select 1 · 3ce5cb75
      Emil Tantilov authored
      Add RS1 configuration to ixgbe_set_soft_rate_select_speed()
      Signed-off-by: default avatarEmil Tantilov <emil.s.tantilov@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      3ce5cb75
    • Emil Tantilov's avatar
      ixgbe: always call setup_mac_link for multispeed fiber · 08ed48e1
      Emil Tantilov authored
      Remove the logic which would previously skip the link configuration
      in the case where we are already at the requested speed in
      ixgbe_setup_mac_link_multispeed_fiber().
      
      By exiting early we are skipping the link configuration and as such
      the driver may not always configure the PHY correctly for SFP+.
      Signed-off-by: default avatarEmil Tantilov <emil.s.tantilov@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      08ed48e1
    • Emil Tantilov's avatar
      ixgbe: add write flush when configuring CS4223/7 · 410a4949
      Emil Tantilov authored
      Make sure the writes are processed immediately. Without the flush it
      is possible for operations on one port to spill over the other as the
      resource is shared.
      Signed-off-by: default avatarEmil Tantilov <emil.s.tantilov@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      410a4949
    • Emil Tantilov's avatar
      ixgbe: correct CS4223/7 PHY identification · cc1de78c
      Emil Tantilov authored
      Previous method was unreliable. Use a different register to
      differentiate between the SKUs.
      Signed-off-by: default avatarEmil Tantilov <emil.s.tantilov@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      cc1de78c
    • Tony Nguyen's avatar
      ixgbevf: Resolve warnings for -Wimplicit-fallthrough · 80666035
      Tony Nguyen authored
      Additions to gcc 7 now warn whenever a switch statement falls through
      implicitly.  This patch adds explicit fall through comments to address the
      following warnings:
      
      drivers/net/ethernet/intel/ixgbevf/vf.c: In function ‘ixgbevf_get_reta_locked’:
      drivers/net/ethernet/intel/ixgbevf/vf.c:336:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if (hw->mac.type < ixgbe_mac_X550_vf)
            ^
      drivers/net/ethernet/intel/ixgbevf/vf.c:338:2: note: here
        default:
        ^~~~~~~
      drivers/net/ethernet/intel/ixgbevf/vf.c: In function ‘ixgbevf_get_rss_key_locked’:
      drivers/net/ethernet/intel/ixgbevf/vf.c:402:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if (hw->mac.type < ixgbe_mac_X550_vf)
            ^
      drivers/net/ethernet/intel/ixgbevf/vf.c:404:2: note: here
        default:
        ^~~~~~~
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      80666035
    • Tony Nguyen's avatar
      ixgbevf: Resolve truncation warning for q_vector->name · 31f5d9b1
      Tony Nguyen authored
      The following warning is now shown as a result of new checks added for
      gcc 7:
      
      drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c: In function ‘ixgbevf_open’:
      drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:1363:13: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size between 3 and 18 [-Wformat-truncation=]
            "%s-%s-%d", netdev->name, "TxRx", ri++);
                   ^~
      drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:1363:6: note: directive argument in the range [0, 2147483647]
            "%s-%s-%d", netdev->name, "TxRx", ri++);
            ^~~~~~~~~~
      drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:1362:4: note: ‘snprintf’ output between 8 and 32 bytes into a destination of size 24
          snprintf(q_vector->name, sizeof(q_vector->name) - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            "%s-%s-%d", netdev->name, "TxRx", ri++);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Resolve this warning by making a couple of changes.
       - Don't reserve space for the null terminator.  Since snprintf adds the
         null terminator automatically, there is no need for us to reserve a byte
         for it.
      
       - Change a couple variables that can never be negative from int to
         unsigned int.
      
      While we're making changes to the format string, move the constant strings
      into the format string instead of providing them as specifiers.
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      31f5d9b1
    • Tony Nguyen's avatar
      ixgbe: Resolve warnings for -Wimplicit-fallthrough · 93df9465
      Tony Nguyen authored
      This patch adds/changes fall through comments to address new warnings
      produced by gcc 7.
      
      Fixed formatting on a couple of comments in the function.
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      93df9465
    • Tony Nguyen's avatar
      ixgbe: Resolve truncation warning for q_vector->name · e61e4c8b
      Tony Nguyen authored
      The following warning is now shown as a result of new checks added for
      gcc 7:
      
      drivers/net/ethernet/intel/ixgbe/ixgbe_main.c: In function ‘ixgbe_open’:
      drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:3118:13: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size between 3 and 18 [-Wformat-truncation=]
            "%s-%s-%d", netdev->name, "TxRx", ri++);
                   ^~
      drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:3118:6: note: directive argument in the range [0, 2147483647]
            "%s-%s-%d", netdev->name, "TxRx", ri++);
            ^~~~~~~~~~
      drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:3117:4: note: ‘snprintf’ output between 8 and 32 bytes into a destination of size 24
          snprintf(q_vector->name, sizeof(q_vector->name) - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            "%s-%s-%d", netdev->name, "TxRx", ri++);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Resolve this warning by making a couple of changes.
       - Don't reserve space for the null terminator.  Since snprintf adds the
         null terminator automatically, there is no need for us to reserve a byte
         for it.
      
       - Change a couple variables that can never be negative from int to
         unsigned int.
      
      While we're making changes to the format string, move the constant strings
      into the format string instead of providing them as specifiers.
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      e61e4c8b
    • Tony Nguyen's avatar
      ixgbe: Add error checking to setting VF MAC · 6af3d0fa
      Tony Nguyen authored
      Currently, when setting a VF MAC address there are no error checks to
      ensure that the MAC filter was successfully added.  This patch adds
      additional error checks, reporting, and propagation of errors.  It also
      will not set the MAC address unless adding the MAC filter was successful.
      
      With these changes, setting the mac address to zeros can no longer call
      ixgbe_set_vf_mac() as adding a zero MAC address filter is not valid.
      Instead directly delete the filter and, if successful, clear the MAC
      address.
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      6af3d0fa
    • Mark Rustad's avatar
      ixgbe: Correct thermal sensor event check · 22cb4fff
      Mark Rustad authored
      The thermal sensor event logic is messed up, because it can execute
      the code when there is no thermal event. The current logic is that
      it will exit when !capable && !event whereas it really should exit
      when !capable || !event. For one thing, it means that the service
      task is doing too much work. It probably has some other symptoms as
      well. So, correct the logic, simplifying to only execute when there
      is a thermal event. The capable check is redundant.
      Signed-off-by: default avatarMark Rustad <mark.d.rustad@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      22cb4fff
    • Emil Tantilov's avatar
      ixgbe: enable L3/L4 filtering for Tx switched packets · e6b41c88
      Emil Tantilov authored
      This will ensure that VF-to-VF traffic on the same PF
      is filtered to allow RSS operation.
      Signed-off-by: default avatarEmil Tantilov <emil.s.tantilov@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      e6b41c88
    • Paul Greenwalt's avatar
      ixgbe: Remove MAC X550EM_X 1Gbase-t led_[on|off] support · 5e999fb4
      Paul Greenwalt authored
      Since FW configures the PHY and MAC X550EM_X has no
      PHY access, led_[on|off] is not supported with the 1Gbase-t design.
      
      Removed MAC X550EM_X 1Gbase-t led_[on|off] support by setting
      function pointers to NULL and added NULL pointer checks. Also set
      init_led_link_act to NULL and added NULL pointer check.
      Signed-off-by: default avatarPaul Greenwalt <paul.greenwalt@intel.com>
      Tested-by: default avatarKrishneil Singh <krishneil.k.singh@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      5e999fb4
    • Liwei Song's avatar
      ixgbe: initialize u64_stats_sync structures early at ixgbe_probe · b09457e7
      Liwei Song authored
      Fix the following CallTrace:
      INFO: trying to register non-static key.
      the code is fine but needs lockdep annotation.
      turning off the locking correctness validator.
      CPU: 71 PID: 1 Comm: swapper/0 Not tainted 4.8.8-WR9.0.0.1_standard #11
      Hardware name: Intel Corporation S2600WTT/S2600WTT,
      BIOS GRNDSDP1.86B.0036.R05.1407140519 07/14/2014
       00200086 00200086 eb5e1ab8 c144dd70 00000000 00000000 eb5e1af8 c10af89a
       c1d23de4 eb5e1af8 00000009 eb5d8600 eb5d8638 eb5e1af8 c10b14d8 00000009
       0000000a c1d32911 00000000 00000000 e44c826c eb5d8000 eb5e1b74 c10b214e
      Call Trace:
       [<c144dd70>] dump_stack+0x5f/0x8f
       [<c10af89a>] register_lock_class+0x25a/0x4c0
       [<c10b14d8>] ? check_irq_usage+0x88/0xc0
       [<c10b214e>] __lock_acquire+0x5e/0x17a0
       [<c1abdb9b>] ? _raw_spin_unlock_irqrestore+0x3b/0x70
       [<c10cf14a>] ? rcu_read_lock_sched_held+0x8a/0x90
       [<c10b3c5f>] lock_acquire+0x9f/0x1f0
       [<c1922dcf>] ? dev_get_stats+0x5f/0x110
       [<c176e6b3>] ixgbe_get_stats64+0x113/0x320
       [<c1922dcf>] ? dev_get_stats+0x5f/0x110
       [<c1922dcf>] dev_get_stats+0x5f/0x110
       [<c1ab5415>] rtnl_fill_stats+0x40/0x105
       [<c193dd45>] rtnl_fill_ifinfo+0x4c5/0xd20
       [<c11c5115>] ? __kmalloc_node_track_caller+0x1a5/0x410
       [<c1917487>] ? __kmalloc_reserve.isra.42+0x27/0x80
       [<c191754f>] ? __alloc_skb+0x6f/0x270
       [<c1942291>] rtmsg_ifinfo_build_skb+0x71/0xd0
       [<c194230a>] rtmsg_ifinfo.part.23+0x1a/0x50
       [<c1923dad>] ? call_netdevice_notifiers_info+0x2d/0x60
       [<c194236b>] rtmsg_ifinfo+0x2b/0x40
       [<c192f997>] register_netdevice+0x3d7/0x4d0
       [<c192faa7>] register_netdev+0x17/0x30
       [<c177b83d>] ixgbe_probe+0x118d/0x1610
       [<c1498202>] local_pci_probe+0x32/0x80
       [<c1498172>] ? pci_match_device+0xd2/0x100
       [<c14991e0>] pci_device_probe+0xc0/0x110
       [<c1652cc5>] driver_probe_device+0x1c5/0x280
       [<c1498172>] ? pci_match_device+0xd2/0x100
       [<c1652e09>] __driver_attach+0x89/0x90
       [<c1652d80>] ? driver_probe_device+0x280/0x280
       [<c165114f>] bus_for_each_dev+0x4f/0x80
       [<c165269e>] driver_attach+0x1e/0x20
       [<c1652d80>] ? driver_probe_device+0x280/0x280
       [<c1652317>] bus_add_driver+0x1a7/0x220
       [<c1653a79>] driver_register+0x59/0xe0
       [<c1f897b8>] ? igb_init_module+0x49/0x49
       [<c1497b2a>] __pci_register_driver+0x4a/0x50
       [<c1f8985d>] ixgbe_init_module+0xa5/0xc4
       [<c1000485>] do_one_initcall+0x35/0x150
       [<c107e818>] ? parameq+0x18/0x70
       [<c1f395d8>] ? repair_env_string+0x12/0x51
       [<c107ead0>] ? parse_args+0x260/0x3b0
       [<c1074f73>] ? __usermodehelper_set_disable_depth+0x43/0x50
       [<c1f39e90>] kernel_init_freeable+0x19b/0x267
       [<c1f395c6>] ? set_debug_rodata+0xf/0xf
       [<c10b1e7b>] ? trace_hardirqs_on+0xb/0x10
       [<c1abdc02>] ? _raw_spin_unlock_irq+0x32/0x50
       [<c1085f0b>] ? finish_task_switch+0xab/0x1f0
       [<c1085ec9>] ? finish_task_switch+0x69/0x1f0
       [<c1ab6a30>] kernel_init+0x10/0x110
       [<c108bd65>] ? schedule_tail+0x25/0x80
       [<c1abe422>] ret_from_kernel_thread+0xe/0x24
       [<c1ab6a20>] ? rest_init+0x130/0x130
      
      This CallTrace occurred on 32-bit kernel with CONFIG_PROVE_LOCKING
      enabled.
      
      This happens at ixgbe driver probe hardware stage, when comes to
      ixgbe_get_stats64, the seqcount/seqlock still not initialize, although
      this was initialize in TX/RX resources setup routin, but it was too late,
      then lockdep give this Warning.
      
      To fix this, move the u64_stats_init function to driver probe stage,
      which before we get the status of seqcount and after the RX/TX ring
      was finished init.
      Signed-off-by: default avatarLiwei Song <liwei.song@windriver.com>
      Tested-by: default avatarKrishneil Singh  <krishneil.k.singh@intel.com>
      b09457e7
    • Scott Peterson's avatar
      ixgbe/ixgbevf: Enables TSO for MPLS encapsulated packets · 2a20525b
      Scott Peterson authored
      This patch advertises TSO & GSO features in netdev->mpls_features.
      In ixgbe(vf)_tso() where we set up segmentation offload, the IP
      header will be the inner network header when eth_p_mpls() indicates
      the Ethernet protocol is MPLS (UC or MC).
      Suggested-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: default avatarScott Peterson <scott.d.peterson@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      2a20525b
    • Michael Chan's avatar
      bnxt_en: Fix xmit_more with BQL. · ffe40645
      Michael Chan authored
      We need to write the doorbell if BQL has stopped the queue and
      skb->xmit_more is set.  Otherwise it is possible for the tx queue to
      rot and cause tx timeout.
      
      Fixes: 4d172f21 ("bnxt_en: Implement xmit_more.")
      Suggested-by: default avatarYuval Mintz <yuval.mintz@cavium.com>
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ffe40645
  2. 30 May, 2017 25 commits