08 Mar, 2015

7 commits

  • Jeff Kirsher says:

    ====================
    Intel Wired LAN Driver Updates 2015-03-07

    This series contains updates to i40e and i40evf only.

    Most notably, Greg provides the patch to remove the dreaded configfs
    changes in the driver.

    Shannon cleans up a sparse warning by simply straighting out the code
    so it is less convoluted. Fixes an issue where the vector allocation
    was trying too hard to save vectors for VMDq, to the point of not giving
    the PF enough when in a tight situation, such as an NPAR partition.
    Changed the driver to make sure that the PF will get all the queues and
    vectors it wants to fill out its destiny. Cleans up reporting to only
    print the port and VEB stats if it is the first partition of a
    multiplexed port.

    Catherine cleans up some duplicated code by simply removing the duplicate
    code.

    Kamil cleans up the driver by removing an un-needed endian conversion
    because it is already done by a register read function.

    Jesse fixes a variable width of a datatype, where a u16 should have been
    a u32. Also cleans up debug_read_register() to resolve some sparse
    warnings. Updates the driver to use prefetch() to get the next Tx
    descriptor, like in ixgbe, to improve performance.

    Akeem moves around code to enable/disable loopback so that other non-SRIOV
    supported driver functions can take advantage of the changes.

    Anjali cleans up the logging for adding/deleting FD-SB filters, since
    ethtool shows all the filters on an interface. Updates the driver to
    use l4_tunnel type generically to keep code flow simple. Simplifies
    the RSS code since the driver initializes the rss_size_max in sw_init.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Enable EEE support for MV88E6352.

    Signed-off-by: Guenter Roeck
    Signed-off-by: David S. Miller

    Guenter Roeck
     
  • EEE configuration is similar for the various MV88E6xxx chips.
    Add generic support for it.

    Signed-off-by: Guenter Roeck
    Reviewed-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Guenter Roeck
     
  • In preparation for supporting multiple Rx queues:
    1. Move the initialization of priv->num_rx_bds, priv->rx_bds, and
    priv->rx_cbs from bcmgenet_init_rx_ring() to bcmgenet_init_dma()
    since they are not specific to a single Rx queue. Mimics the Tx
    init model where priv->num_tx_bds, priv->tx_bds, and priv->tx_cbs
    are initialized in bcmgenet_init_dma().
    2. Program DMA_MBUF_DONE_THRESH = 1 so that future Rx queues Q0-Q15
    will get per-packet Rx interrupt.
    3. Group DMA_START_ADDR, RDMA_READ_PTR, RDMA_WRITE_PTR, and DMA_END_ADDR
    initialization together. Mimics the Tx init model.
    4. There is 1-to-1 mapping between RxCBs and RxBDs.
    Precalculate RxCB->bd_addr so that it can be used in the future.

    Signed-off-by: Petri Gynther
    Reviewed-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Petri Gynther
     
  • macb and at91_ether drivers can be compiled as modules, but the at91_ether
    driver use some functions and variables defined in the macb one, thus
    creating a dependency on the macb driver.

    Since these drivers are sharing the same logic we can easily merge
    at91_ether into macb.

    In order to factorize common probing logic we've added an ->init() function
    to struct macb_config (the structure associated with the compatible
    string), and moved macb specific init code from macb_probe to macb_init.

    Signed-off-by: Cyrille Pitchen
    Signed-off-by: Boris Brezillon
    Tested-by: Alexandre Belloni
    Signed-off-by: David S. Miller

    Cyrille Pitchen
     
  • Most of the functions from the Common Clk Framework handle NULL pointer as
    input argument.

    Since the TX clock is optional, we now set tx_clk to NULL value
    instead of ERR_PTR(-ENOENT) when this clock is not available. This simplifies
    the clock management and avoid the need to test tx_clk value.

    Signed-off-by: Cyrille Pitchen
    Acked-by: Boris Brezillon
    Acked-by: Alexandre Belloni
    Signed-off-by: David S. Miller

    Cyrille Pitchen
     
  • With multi platform support those sections could lead to unexpected
    behavior if both ARCH_AT91 and another ARM SoC using the MACB IP are
    selected.
    Add two new capabilities to encode the default MII mode and the presence
    of a CLKEN bit in USRIO register.
    Then define the appropriate config for IPs embedded in at91 SoCs.

    Signed-off-by: Boris Brezillon
    Reviewed-by: Alexandre Belloni
    Signed-off-by: David S. Miller

    Boris BREZILLON
     

07 Mar, 2015

29 commits

  • The use of configfs is not allowed in network drivers. Strip the code that
    uses it.

    Signed-off-by: Greg Rose
    Tested-by: Jim Young
    Signed-off-by: Jeff Kirsher

    Greg Rose
     
  • Bump i40e to 1.2.12 and i40evf to 1.2.6.

    Change-ID: I641871da3a9abd396b28eda5744a4d68493c1400
    Signed-off-by: Sravanthi Tangeda
    Signed-off-by: Jeff Kirsher

    Sravanthi Tangeda
     
  • Performance can be improved a bit by imitating ixgbe and using
    prefetch to get us the next Tx descriptor.

    Change-ID: Ice7ffd4cd0ce87c35295059bdb7972a7f53723aa
    Signed-off-by: Jesse Brandeburg
    Signed-off-by: Jeff Kirsher

    Jesse Brandeburg
     
  • We initialize the pf->rss_size_max in sw_init now
    and hence this code can be simplified.

    Change-ID: I1a7abc837604a40bc65e6c6b21190b909ed6bb21
    Signed-off-by: Anjali Singhai Jain
    Signed-off-by: Jeff Kirsher

    Anjali Singhai Jain
     
  • Use l4_tunnel type generically to keep code flow simple.

    Change-ID: Ic52287e3b1ca4204e6b6e13431890c1a6ae9c422
    Signed-off-by: Anjali Singhai Jain
    Signed-off-by: Jeff Kirsher

    Anjali Singhai Jain
     
  • Since GLQF_FDCNT_0 register now has the right offset, use it to simplify our
    FD flush flow.
    If the filter add error happens to be for SB we just auto disable SB.

    If filter error happens to be for ATR, auto disable ATR and mark
    the state to FD_FLUSH_REQUESTED. Which gets cleared when flush completes.

    If we are entering flush too quickly (< 30 seconds) and we have quite
    a few SB rules, its time to disable ATR for good. Since SB + ATR rules
    is most likely making the FD table unstable.

    ATR can be re-enabled by turning ntuple off (ethtool -K ntuple off)
    and will remain off after turning ntuple on till it gets unstable again.

    Change-ID: I2154a2e0a5d44851a2f0eb8731e2f1d4a4d1acbc
    Signed-off-by: Anjali Singhai Jain
    Signed-off-by: Jeff Kirsher

    Anjali Singhai Jain
     
  • It is not necessary to print FD filter add/delete log with
    normal debug settings because ethtool -n ethx shows all the FD-SB
    filters on an interface. The log can still be turned on through higher
    debug levels and it will continue to print a log if there was an error
    in the add/delete process.

    Change-ID: I67db2baf49e2075d2f537de40f7895e5b02cd610
    Signed-off-by: Anjali Singhai Jain
    Signed-off-by: Jeff Kirsher

    Anjali Singhai Jain
     
  • Only print the port and veb stats if this is the first partition
    of a multiplexed port.

    Change-ID: I7ce0c323cdee5cfd2e54d8bea5b0b9102987e671
    Signed-off-by: Shannon Nelson
    Signed-off-by: Jeff Kirsher

    Shannon Nelson
     
  • Since changes made to enable or disable loopback for all VSIs, not only SR-IOV
    or PCIOV, then it became necessary to move the associated functions to main
    file - so that other non-SRIOV supported driver can take advantage of the
    changes.

    Change-ID: I59a49fd23a6136acda5e16f8d1e5ac7fd9c5fc05
    Signed-off-by: Akeem G Abodunrin
    Signed-off-by: Jesse Brandeburg
    Signed-off-by: Jeff Kirsher

    Akeem G Abodunrin
     
  • The initial problem solved here is that the vector allocation was trying
    too hard to save vectors for VMDq, to the point of not giving the PF enough
    when in a tight situation such as an NPAR partition. This change makes
    sure that the PF will get all the queues and vectors it wants to fill
    out its destiny. Essentially, nothing is specially reserved for VMDq,
    it simply gets whatever is left after the PF, FCoE, and FD sideband get
    what they want.

    Additionally, the calculations for the reservations were harder to follow
    than necessary, so I've made it more straight forward.

    Change-ID: I99b384f104535b686c690b8ef0a787559485c8d4
    Signed-off-by: Shannon Nelson
    Signed-off-by: Jeff Kirsher

    Shannon Nelson
     
  • There were some additional spaces and strange (double swapping) logic
    in this function that I started looking at because sparse was warning.

    This fixes the sparse warning and fixes up the other issues.

    Change-ID: I72a91a4197cd45921602649040e6bd25e5f17c0a
    Signed-off-by: Jesse Brandeburg
    Signed-off-by: Jeff Kirsher

    Jesse Brandeburg
     
  • The kernel returns a u32 for netif_msg_init, and we were storing
    it in a u16. Fix the width of the datatype.

    Change-ID: I4b23326e5707c91cd59325c5a1ccb2ba7a3974fc
    Signed-off-by: Jesse Brandeburg
    Signed-off-by: Jeff Kirsher

    Jesse Brandeburg
     
  • Remove LE16 to CPU endianes conversion from i40e_read_nvm_word_srctl
    function, as it's already done by register read function.

    Change-ID: I739f0f20a9b8e18223e54c0ca5443e63d75da878
    Signed-off-by: Kamil Krawczyk
    Signed-off-by: Jeff Kirsher

    Kamil Krawczyk
     
  • This series of code was repeated twice, remove one of them.

    Signed-off-by: Catherine Sullivan
    Signed-off-by: Jeff Kirsher

    Catherine Sullivan
     
  • A sparse complaint in i40e_debug_aq in a funky buffer write goes away by
    straightening out the code out to something less convoluted.

    Also fix some other sparse warnings while we are at it, making some
    functions static and using NULL instead of 0.

    Change-ID: I93907534fe1f1f675830774b3d14ecf1c6ffc9a0
    Signed-off-by: Shannon Nelson
    Signed-off-by: Jeff Kirsher

    Shannon Nelson
     
  • Signed-off-by: Scott Feldman
    Signed-off-by: David S. Miller

    Scott Feldman
     
  • Signed-off-by: Scott Feldman
    Reviewed-by: Jonathan Toppins
    Signed-off-by: David S. Miller

    Scott Feldman
     
  • We get a static checker warning here on devel kernels:

    drivers/net/hamradio/mkiss.c:560 ax_xmit()
    warn: variable dereferenced before check 'skb' (see line 532)

    It turns out that the NULL check can be deleted.

    Signed-off-by: Dan Carpenter
    Signed-off-by: David S. Miller

    Dan Carpenter
     
  • Implement the IEEE DCB handlers for set/get QCN parameters and
    statistics reading per TC.

    Signed-off-by: Shani Michaeli
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Shani Michaeli
     
  • Add device capability, firmware command opcode and etc prior elements
    needed for QCN suppprt. Disable SRIOV VF view/access for QCN is disabled.

    While here, remove a redundant offset definition into the
    QUERY_DEV_CAP mailbox.

    Signed-off-by: Shani Michaeli
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Shani Michaeli
     
  • ZynqMP soc has single interrupt for all the queue events. So,
    passing the IRQF_SHARED flag for interrupt registration call.

    Signed-off-by: Punnaiah Choudary Kalluri
    Signed-off-by: Michal Simek
    Acked-by: Nicolas Ferre
    Signed-off-by: David S. Miller

    Punnaiah Choudary Kalluri
     
  • Include multi queue support for the ethernet IP version in xilinx ZynqMP
    SoC.

    Signed-off-by: Punnaiah Choudary Kalluri
    Signed-off-by: Michal Simek
    Acked-by: Nicolas Ferre
    Signed-off-by: David S. Miller

    Punnaiah Choudary Kalluri
     
  • …ub/scm/linux/kernel/git/kvalo/wireless-drivers-next

    Major changes:

    brcmfmac:

    * sdio improvements
    * add a debugfs file so users can provide us all the revinfo we could
    ask for

    iwlwifi:

    * add triggers for firmware dump collection
    * remove support for -9.ucode
    * new statitics API
    * rate control improvements

    ath9k:

    * add per-vif TX power capability
    * BT coexistance fixes

    ath10k:

    * qca6174: enable STA transmit beamforming (TxBF) support
    * disable multi-vif power save by default

    bcma:

    * enable support for PCIe Gen 2 host devices

    Signed-off-by: David S. Miller <davem@davemloft.net>

    David S. Miller
     
  • In preparation for supporting multiple Rx queues, add GENET_Q16_RX_BD_CNT
    and hw_params->rx_bds_per_q.

    Signed-off-by: Petri Gynther
    Signed-off-by: David S. Miller

    Petri Gynther
     
  • In preparation for supporting multiple Rx queues, adjust the call to
    alloc_etherdev_mqs() to allow max GENET_MAX_MQ_CNT + 1 Rx queues.

    The actual number of Rx queues in use is correctly adjusted with:
    netif_set_real_num_rx_queues(priv->dev, priv->hw_params->rx_queues + 1);

    Signed-off-by: Petri Gynther
    Signed-off-by: David S. Miller

    Petri Gynther
     
  • bcmgenet driver doesn't yet support multiple Rx queues.
    Set hw_params->rx_queues = 0 accordingly.
    The default Rx queue (Q16) is still created and operational.

    Signed-off-by: Petri Gynther
    Signed-off-by: David S. Miller

    Petri Gynther
     
  • Jeff Kirsher says:

    ====================
    Intel Wired LAN Driver Updates 2015-03-06

    This series contains updates to e1000, e1000e and igb.

    Yanir provides updates to e1000e based on the patches provided by John
    Linville. First updates the code comment to better describe the changes
    and the impact on the driver. Second removed calls to ioremap/unmap for
    i219 since this is only relevant to older hardware only. Starting with
    i219, the NVM will not be mapped to its one BAR but to a address region
    in another bar.

    Alex Duyck provides two fixes for igb, first fixes a compile warning
    where a variable may be used uninitialized, so Alex initializes it.
    Second fixes an issue where all of the pin register values were having
    to be pushed onto the stack each time the function was called, so to
    avoid this, Alex made them static const so that they should only need
    to be allocated once and we can avoid all the instructions to get them
    onto the stack.

    Eliezer found an issue in e1000 where we needed to be calling
    netif_carrier_off earlier in the down() to prevent the stack from
    queuing more packets to the interface.

    Sabrina Dubroca resolved a potential race condition by adding a
    dummy allocator. There was a race condition between e1000_change_mtu()
    cleanups and netpoll, when changing the MTU across jumbo sizes.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This patches implements the poll_controller support for all
    bonding driver. If the slaves have poll_controller net_op defined,
    this implementation calls them. This is mode agnostic implementation
    and iterates through all slaves (based on mode) and calls respective
    handler.

    Signed-off-by: Mahesh Bandewar
    Signed-off-by: David S. Miller

    Mahesh Bandewar
     
  • Signed-off-by: Scott Feldman
    Acked-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Scott Feldman
     

06 Mar, 2015

4 commits

  • There is a race condition between e1000_change_mtu's cleanups and
    netpoll, when we change the MTU across jumbo size:

    Changing MTU frees all the rx buffers:
    e1000_change_mtu -> e1000_down -> e1000_clean_all_rx_rings ->
    e1000_clean_rx_ring

    Then, close to the end of e1000_change_mtu:
    pr_info -> ... -> netpoll_poll_dev -> e1000_clean ->
    e1000_clean_rx_irq -> e1000_alloc_rx_buffers -> e1000_alloc_frag

    And when we come back to do the rest of the MTU change:
    e1000_up -> e1000_configure -> e1000_configure_rx ->
    e1000_alloc_jumbo_rx_buffers

    alloc_jumbo finds the buffers already != NULL, since data (shared with
    page in e1000_rx_buffer->rxbuf) has been re-alloc'd, but it's garbage,
    or at least not what is expected when in jumbo state.

    This results in an unusable adapter (packets don't get through), and a
    NULL pointer dereference on the next call to e1000_clean_rx_ring
    (other mtu change, link down, shutdown):

    BUG: unable to handle kernel NULL pointer dereference at (null)
    IP: [] put_compound_page+0x7e/0x330

    [...]

    Call Trace:
    [] put_page+0x55/0x60
    [] e1000_clean_rx_ring+0x134/0x200
    [] e1000_clean_all_rx_rings+0x45/0x60
    [] e1000_down+0x1c0/0x1d0
    [] ? deactivate_slab+0x7f0/0x840
    [] e1000_change_mtu+0xdc/0x170
    [] dev_set_mtu+0xa0/0x140
    [] do_setlink+0x218/0xac0
    [] ? nla_parse+0xb9/0x120
    [] rtnl_newlink+0x6d0/0x890
    [] ? kvm_clock_read+0x20/0x40
    [] ? sched_clock_cpu+0xa8/0x100
    [] rtnetlink_rcv_msg+0x92/0x260

    By setting the allocator to a dummy version, netpoll can't mess up our
    rx buffers. The allocator is set back to a sane value in
    e1000_configure_rx.

    Fixes: edbbb3ca1077 ("e1000: implement jumbo receive with partial descriptors")
    Signed-off-by: Sabrina Dubroca
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Sabrina Dubroca
     
  • When bringing down an interface netif_carrier_off() should be
    one the first things we do, since this will prevent the stack
    from queuing more packets to this interface.
    This operation is very fast, and should make the device behave
    much nicer when trying to bring down an interface under load.

    Also, this would Do The Right Thing (TM) if this device has some
    sort of fail-over teaming and redirect traffic to the other IF.

    Move netif_carrier_off as early as possible.

    Signed-off-by: Eliezer Tamir
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Eliezer Tamir
     
  • While addressing the pin problem I noticed that all of the pin register
    values where having to be pushed onto the stack each time the function was
    called. To avoid that I am making them static const so that they should
    only need to be allocated once and we can avoid all the instructions to get
    them onto the stack..

    size before:
    text data bss dec hex filename
    161477 10512 8 171997 29fdd drivers/net/ethernet/intel/igb/igb.ko

    size after:
    text data bss dec hex filename
    161205 10512 8 171725 29ecd drivers/net/ethernet/intel/igb/igb.ko

    Signed-off-by: Alexander Duyck
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Alexander Duyck
     
  • When building the kernel using the gcc 4.8.3 compiler included in Fedora 20
    I was repeatedly seeing the warning:

    drivers/net/ethernet/intel/igb/igb_ptp.c: In function ‘igb_ptp_feature_enable_i210’:
    drivers/net/ethernet/intel/igb/igb_ptp.c:395:21: warning: ‘pin’ may be used uninitialized in this function
    [-Wmaybe-uninitialized]
    tssdp &= ~ts_sdp_en[pin];
    ^
    drivers/net/ethernet/intel/igb/igb_ptp.c:471:6: note: ‘pin’ was declared here
    int pin;
    ^

    To resolve it I am assigning the pin a value of -1 when it is instantiated.

    Signed-off-by: Alexander Duyck
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Alexander Duyck