aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet
AgeCommit message (Collapse)AuthorFilesLines
2012-03-06sfc: Raise self-test timeoutsBen Hutchings1-19/+46
IRQ latency can be ridiculously high for various reasons, so our current timeouts of 100 ms or 10 ms are too short. Change the IRQ and event tests to use polling loops starting with a delay of 1 tick and doubling that if necessary up to a maximum total delay of approximately 1 second. Raise the loopback packet RX timeout to 1 second. Signed-off-by: Ben Hutchings <[email protected]>
2012-03-06sfc: Remove TX completions from adaptive IRQ scoringBen Hutchings2-3/+2
RX and TX completions on the same event queue are generally not associated with the same flows. The inclusion of TX completions in the adaptive IRQ score is more of a source of noise rather than useful feedback. Therefore, do not include them in the score, and adjust the default threshold scores down. Signed-off-by: Ben Hutchings <[email protected]>
2012-03-06sfc: Update comments on efx_rx_packet_gro()Ben Hutchings1-5/+2
The in-tree driver has never supported Driverlink. The rest of the comments are rather redundant, but we can usefully state what the requirements are on the buffer state. Signed-off-by: Ben Hutchings <[email protected]>
2012-03-06sfc: Remove redundant function efx_nic_has_mc()Ben Hutchings2-6/+1
This function is now used in only one place, where it always returns true. Signed-off-by: Ben Hutchings <[email protected]>
2012-03-06sfc: Fix calculation of vf_i in map_vi_index()Robert Stonehouse1-1/+1
This was broken during refactoring to use efx_vf_size(). [bwh: Keep using efx_vf_size()] Signed-off-by: Ben Hutchings <[email protected]>
2012-03-06tg3: Fix to use multi queue BQL interfacesTom Herbert1-3/+3
Fix tg3 to use BQL multi queue related netdev interfaces since the device supports multi queue. Signed-off-by: Tom Herbert <[email protected]> Reported-by: Christoph Lameter <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-068139too: Add 64bit statisticsJunchang Wang1-8/+38
Switch to use ndo_get_stats64 to get 64bit statistics. Two sync entries are used (one for Rx and one for Tx). Signed-off-by: Junchang Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-05Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller3-3/+11
Conflicts: drivers/net/vmxnet3/vmxnet3_drv.c Small vmxnet3 conflict with header size bug fix in 'net'. Signed-off-by: David S. Miller <[email protected]>
2012-03-06r8169: add byte queue limit support.Igor Maravic1-5/+22
Nothing fancy: - sent bytes count is notified in the start_xmit path right before updating the owner bit in the hardware Tx descriptor (E. Dumazet) - avoid useless tp->dev dereferencing in start_xmit (E. Dumazet) Use of netdev_reset_queue is favored over proper accounting in rtl8169_tx_clear_range since the latter would need more work for the same result (nb: said accounting degenerates to nothing in xmit_frags). Signed-off-by: Igor Maravic <[email protected]> Signed-off-by: Francois Romieu <[email protected]> Acked-by: Eric Dumazet <[email protected]>
2012-03-06r8169: add 64bit statistics.Junchang Wang1-14/+45
Switch to use ndo_get_stats64 to get 64bit statistics. Two sync entries are used (one for Rx and one for Tx). Signed-off-by: Junchang Wang <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Signed-off-by: Francois Romieu <[email protected]>
2012-03-05qla3xxx: ethernet: Fix bogus interrupt state flag.Santosh Nayak1-3/+2
In 'ql_adapter_initialize' the first call for 'spin_unlock_irqrestore()' is with hw_flags = 0, which is as good as 'spin_unlock_irq()' (unconditional interrupt enabling). If this is intended, then for better performance 'spin_unlock_irqrestore()' can be replaced with 'spin_unlock_irq()' and 'spin_lock_irqsave()' can be replaced by 'spin_lock_irq() Signed-off-by: Santosh Nayak <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-05mlx4_en: remove sparse errorsEric Dumazet1-2/+2
Fix new sparse errors introduced in commit 6221217199 (mlx4_en: dont change mac_header on xmit) Reported-by: Or Gerlitz <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Cc: Yevgeny Petrilin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-04tg3: Recode PCI MRRS adjustment as a PCI quirkMatt Carlson1-6/+0
This patch recodes the MRRS cap for 5719 A0 devices as a PCI quirk. Signed-off-by: Matt Carlson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-04ucc_geth: separate out rx/tx ring alloc and free operationsPaul Gortmaker1-196/+257
Factor out the the existing allocation and free operations so that they can be used individually. This is to improve code readability, and also to prepare for possible future changes like better error recovery and more dynamic configuration (e.g on-the-fly resizing of the rings). This change represents a straight up relocation of the existing code into separate routines without changing any of the contained code itself. Local variables are relocated as necessary. Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-04tg3: Fix poor tx performance on 57766 after MTU changeMichael Chan1-2/+8
GRC reset causes the read DMA engine to go into a mode that breaks up requests into 256 bytes. A PHY reset is required to bring it back to the normal mode. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-04tg3: Add memory barriers to sync BD dataMichael Chan1-0/+9
for weak memory model architectures to ensure that the chip will DMA valid BD data. Signed-off-by: Michael Chan <[email protected]> Reviewed-by: Benjamin Li <[email protected]> Reviewed-by: Matt Carlson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-04tg3: Fix jumbo loopback test on 5719Michael Chan1-3/+11
Loopback on 9K packet fails because the chip has a DMA limit of 4K. The loopback test logic uses a single BD for simplicity. Fix it by reducing the jumbo packet size to the DMA limit. Signed-off-by: Michael Chan <[email protected]> Reviewed-by: Benjamin Li <[email protected]> Reviewed-by: Matt Carlson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-02net: dcb: getnumtcs()/setnumtcs() should return an intJohn Fastabend2-4/+4
{g|s}etnumtcs() today returns a u8 that is only used by the DCB code to verify no error occurred. Today the driver implementations return negative error codes which end up being non-zero so the logic works out but triggers some sparse warnings. To fix the sparse warnings convert the return value to an int. CC: Eilon Greenstein <[email protected]> Reported-by: Dan Carpenter <[email protected]> Signed-off-by: John Fastabend <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-02ixgbe: dcb: check setup_tc return codesJohn Fastabend1-8/+18
dcb netlink code calls setup_tc to init hardware traffic classes to use for DCB. At some call sites the return values are not checked for errors and in one case may return -EINVAL back to the net/dcbnl.c caller which is expecting a u8. This fixes some smatch hits and although failures are never seen in practive its best to check return codes. Reported-by: Dan Carenter <[email protected]> Signed-off-by: John Fastabend <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-02e100: Show short v/s long rx length errors in ethtool stats.Ben Greear1-0/+3
Signed-off-by: Ben Greear <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-02e100: Fix rx-over-length statistics.Ben Greear1-1/+4
The old code would += the total errors every time stats were gathered. Instead, keep a count of short-pkt and long-pkt counters and then simply add them together for the rx-over-length stat. Signed-off-by: Ben Greear <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-02r8169: corrupted IP fragments fix for large mtu.françois romieu1-0/+8
Noticed with the 8168d (-vb-gr, aka RTL_GIGA_MAC_VER_26). ConfigX registers should only be written while the Config9346 lock is held. Signed-off-by: Francois Romieu <[email protected]> Reported-by: Nick Bowler <[email protected]> Cc: Hayes Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-02packetengines: fix config defaultstephen hemminger1-0/+1
As part of the big network driver reorg, each vendor directory defaults to yes, so that older config's can migrate correctly. Looks like this one got missed. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-01Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller4-30/+32
Conflicts: drivers/net/ethernet/broadcom/tg3.c Conflicts in the statistics regression bug fix from 'net', but happily Matt Carlson originally posted the fix against 'net-next' so I used that to resolve this. Signed-off-by: David S. Miller <[email protected]>
2012-03-01enic: fix an endian bug in enic_probe()Dan Carpenter2-2/+2
"num_vfs" is a u32 but we only use the high 16 bits and the low 16bits are left as zero. That isn't a problem for little endian systems but it will break on big endian ones. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-01pch_gbe: memory corruption calling pch_gbe_validate_option()Dan Carpenter1-7/+8
pch_gbe_validate_option() modifies 32 bits of memory but we pass &hw->phy.autoneg_advertised which only has 16 bits and &hw->mac.fc which only has 8 bits. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-01be2net: Remove unused OFFSET_IN_PAGE() macroRoland Dreier1-4/+0
Signed-off-by: Roland Dreier <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-02-29ixgbe: Fix comments that are out of date or formatted incorrectlyAlexander Duyck1-4/+9
This patch corrects several comments that are either incorrect or formatted incorrectly for multiline comments. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Phil Schmitt <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-29ixgbe: fix spelling errorsDon Skidmore1-1/+1
Correct spelling error caught with codespell.py. Signed-off-by: Don Skidmore <[email protected]> Tested-by: Phil Schmitt <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-29ixgbe: Minor formatting and comment corrections for ixgbe_xmit_frame_ringAlexander Duyck1-6/+11
This patch is meant to address several minor issues in ixgbe_xmit_frame_ring. Specifically it adds a comment explaining the TXSW flag, and correctly wraps a line over 80 characters. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Phil Schmitt <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-29e1000e: use msleep instead of mdelayBruce Allan1-3/+1
The e1000_link_stall_workaround_lv() function is always called in non- atomic context so it should use msleep instead of mdelay. Also, remove unnecessary #include <linux/delay.h>. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-29e1000e: cleanup whitespace and indentationBruce Allan5-57/+38
Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-29e1000e: cleanup incorrect filename in commentBruce Allan1-1/+1
Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-29e100: Support RXALL feature flag.Ben Greear1-2/+20
This allows the NIC to receive packets with bad FCS and other errors. Good for sniffing packets on flakey networks. v4: Only flax rx-over-length errors if pkt is beyond maximum expected packet size, not just beyond the MTU. This matches the existing logic for this counter. Signed-off-by: Ben Greear <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-29e100: Support sending custom Ethernet CRCBen Greear1-0/+16
This can aid with testing the RX logic for bad CRCs. Signed-off-by: Ben Greear <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-29e100: Support RXFCS feature flag.Ben Greear1-5/+30
This allows e100 to be configured to append the Ethernet FCS to the skb. Useful for sniffing networks. Signed-off-by: Ben Greear <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-29tg3: Fix tg3_get_stats64 for 5700 / 5701 devsMatt Carlson1-22/+23
tg3_get_stats64() takes tp->lock when dealing with non-serdes bcm5700 and bcm5701 devices. However, functions that call tg3_halt() have already acquired tp->lock. When tg3_get_stats64() is called in tg3_halt(), deadlock will occur. This patch fixes the problem by separating the stat gathering code into a new tg3_get_nstats() function. tg3_get_stats64() is recoded to call this function and take tp->lock. The code that takes tp->lock in tg3_calc_crc_errors() has been removed. Function signatures have been cleaned up too. Signed-off-by: Matt Carlson <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-02-28mac89x0: Fix build error.David S. Miller1-3/+3
Need to use the new 'saddr' variable not the void 'addr' in set_mac_address(). Reported-by: Geert Uytterhoeven <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-02-28Merge branch 'imx/driver' of git://git.linaro.org/people/shawnguo/linux-2.6 ↵Arnd Bergmann2-7/+7
into next/drivers * 'imx/driver' of git://git.linaro.org/people/shawnguo/linux-2.6: (3 commits) ARM: imx6q: add cko1 clock ARM: mxc: make imx_dma_is_general_purpose more generic for sdma ARM: imx6: Rename DEBUG_IMX6Q_UART to UART4
2012-02-27Merge branch 'features/cs89x0' of git://git.pengutronix.de/git/imx/linux-2.6 ↵Arnd Bergmann2-34/+133
into next/drivers * 'features/cs89x0' of git://git.pengutronix.de/git/imx/linux-2.6: CS89x0 : add CS89x0 platform device to the iMX31ADS board CS89x0 : remove QQ2440 board support from the CS89x0 driver CS89x0 : add CS89x0 platform device to the iMX21ADS board CS89x0 : add platform driver support
2012-02-26Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller15-39/+35
Conflicts: drivers/net/ethernet/sfc/rx.c Overlapping changes in drivers/net/ethernet/sfc/rx.c, one to change the rx_buf->is_page boolean into a set of u16 flags, and another to adjust how ->ip_summed is initialized. Signed-off-by: David S. Miller <[email protected]>
2012-02-26Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds13-32/+28
1) ICMP sockets leave err uninitialized but we try to return it for the unsupported MSG_OOB case, reported by Dave Jones. 2) Add new Zaurus device ID entries, from Dave Jones. 3) Pointer calculation in hso driver memset is wrong, from Dan Carpenter. 4) ks8851_probe() checks unsigned value as negative, fix also from Dan Carpenter. 5) Fix crashes in atl1c driver due to TX queue handling, from Eric Dumazet. I anticipate some TX side locking fixes coming in the near future for this driver as well. 6) The inline directive fix in Bluetooth which was breaking the build only with very new versions of GCC, from Johan Hedberg. 7) Fix crashes in the ATP CLIP code due to ARP cleanups this merge window, reported by Meelis Roos and fixed by Eric Dumazet. 8) JME driver doesn't flush RX FIFO correctly, from Guo-Fu Tseng. 9) Some ip6_route_output() callers test the return value for NULL, but this never happens as the convention is to return a dst entry with dst->error set. Fixes from RonQing Li. 10) Logitech Harmony 900 should be handled by zaurus driver not cdc_ether, update white lists and black lists accordingly. From Scott Talbert. 11) Receiving from certain kinds of devices there won't be a MAC header, so there is no MAC header to fixup in the IPSEC code, and if we try to do it we'll crash. Fix from Eric Dumazet. 12) Port type array indexing off-by-one in mlx4 driver, fix from Yevgeny Petrilin. 13) Fix regression in link-down handling in davinci_emac which causes all RX descriptors to be freed up and therefore RX to wedge completely, from Christian Riesch. 14) It took two attempts, but ctnetlink soft lockups seem to be cured now, from Pablo Neira Ayuso. 15) Endianness bug fix in ENIC driver, from Santosh Nayak. 16) The long ago conversion of the PPP fragmentation code over to abstracted SKB list handling wasn't perfect, once we get an out of sequence SKB we don't flush the rest of them like we should. From Ben McKeegan. 17) Fix regression of ->ip_summed initialization in sfc driver. From Ben Hutchings. 18) Bluetooth timeout mistakenly using msecs instead of jiffies, from Andrzej Kaczmarek. 19) Using _sync variant of work cancellation results in deadlocks, use the non _sync variants instead. From Andre Guedes. 20) Bluetooth rfcomm code had reference counting problems leading to crashes, fix from Octavian Purdila. 21) The conversion of netem over to classful qdisc handling added two bugs to netem_dequeue(), fixes from Eric Dumazet. 22) Missing pci_iounmap() in ATM Solos driver. Fix from Julia Lawall. 23) b44_pci_exit() should not have __exit tag since it's invoked from non-__exit code. From Nikola Pajkovsky. 24) The conversion of the neighbour hash tables over to RCU added a race, fixed here by adding the necessary reread of tbl->nht, fix from Michel Machado. 25) When we added VF (virtual function) attributes for network device dumps, this potentially bloats up the size of the dump of one network device such that the dump size is too large for the buffer allocated by properly written netlink applications. In particular, if you add 255 VFs to a network device, parts of GLIBC stop working. To fix this, we add an attribute that is used to turn on these extended portions of the network device dump. Sophisticaed applications like 'ip' that want to see this stuff will be changed to set the attribute, whereas things like GLIBC that don't care about VFs simply will not, and therefore won't be busted by the mere presence of VFs on a network device. Thanks to the tireless work of Greg Rose on this fix. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (53 commits) sfc: Fix assignment of ip_summed for pre-allocated skbs ppp: fix 'ppp_mp_reconstruct bad seq' errors enic: Fix endianness bug. gre: fix spelling in comments netfilter: ctnetlink: fix soft lockup when netlink adds new entries (v2) Revert "netfilter: ctnetlink: fix soft lockup when netlink adds new entries" davinci_emac: Do not free all rx dma descriptors during init mlx4_core: Fixing array indexes when setting port types phy: IC+101G and PHY_HAS_INTERRUPT flag netdev/phy/icplus: Correct broken phy_init code ipsec: be careful of non existing mac headers Move Logitech Harmony 900 from cdc_ether to zaurus hso: memsetting wrong data in hso_get_count() netfilter: ip6_route_output() never returns NULL. ethernet/broadcom: ip6_route_output() never returns NULL. ipv6: ip6_route_output() never returns NULL. jme: Fix FIFO flush issue atm: clip: remove clip_tbl ipv4: ping: Fix recvmsg MSG_OOB error handling. rtnetlink: Fix problem with buffer allocation ...
2012-02-26mlx4_en: dont change mac_header on xmitEric Dumazet1-12/+3
A driver xmit function is not allowed to change skb without special care. mlx4_en_xmit() should not call skb_reset_mac_header() and instead should use skb->data to access ethernet header. This removes a dumb test : if (ethh && ethh->h_dest) Also remove this slow mlx4_en_mac_to_u64() call, we can use get_unaligned() to get faster code. Signed-off-by: Eric Dumazet <[email protected]> Cc: Yevgeny Petrilin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-02-26mlx4: Enforce device max FMR maps in FMR allocEli Cohen2-0/+5
ConnectX devices have a limit on the number of mappings that can be done on an FMR before having to call sync_tpt. The current mlx4_ib driver reports the limit correctly in max_map_per_fmr in .query_device(), but mlx4_core doesn't check it when actually allocating FMRs. Add a max_fmr_maps field to struct mlx4_caps and enforce this maximum value on FMR allocations. Signed-off-by: Eli Cohen <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
2012-02-24e1000e: rename e1000e_reload_nvm() and call as function pointerBruce Allan6-4/+8
Rename e1000e_reload_nvm() to e1000e_reload_nvm_generic() to signify the function is used for more than one MAC-family type, and set and use it as a MAC ops function pointer to be consistent with the driver design. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-24e1000e: cleanup - remove unnecessary variableBruce Allan1-2/+1
Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-24e1000e: use true/false for boolean send_xon, do not assume always trueBruce Allan2-2/+4
Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-24e1000e: cleanup comment in e1000_hash_mc_addr()Bruce Allan1-2/+1
Remove reference to non-existant function. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-24e1000e: rename e1000e_config_collision_dist() and call as function pointerBruce Allan8-11/+14
Rename e1000e_config_collision_dist() to e1000e_config_collision_dist_generic() to signify the function is used for more than one MAC-family type, and set and use it as a MAC ops function pointer to be consistent with the driver design. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-24e1000e: comment correction in e1000e_set_kmrn_lock_loss_workaround_ich8lanBruce Allan1-1/+1
Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>