aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/broadcom/bnx2.c
AgeCommit message (Collapse)AuthorFilesLines
2011-11-23net: treewide use of RCU_INIT_POINTEREric Dumazet1-1/+1
rcu_assign_pointer(ptr, NULL) can be safely replaced by RCU_INIT_POINTER(ptr, NULL) (old rcu_assign_pointer() macro was testing the NULL value and could omit the smp_wmb(), but this had to be removed because of compiler warnings) Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-11-21net: Change mii to ethtool advertisement function namesMatt Carlson1-10/+10
This patch implements advice by Ben Hutchings to change the mii side of the function names to look more like the register whose values they convert. New LPA translation functions have been added as well. Signed-off-by: Matt Carlson <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-11-18bnx2: switch to build_skb() infrastructureEric Dumazet1-67/+70
This is very similar to bnx2x conversion, but bnx2 only requires 16bytes alignement at start of the received frame to store its l2_fhdr, so goal was not to reduce skb truesize (in fact it should not change after this patch) Using build_skb() reduces cache line misses in the driver, since we use cache hot skb instead of cold ones. Number of in-flight sk_buff structures is lower, they are more likely recycled in SLUB caches while still hot. Signed-off-by: Eric Dumazet <[email protected]> CC: Michael Chan <[email protected]> CC: Eilon Greenstein <[email protected]> Reviewed-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-11-16net: Add ethtool to mii advertisment conversion helpersMatt Carlson1-12/+3
Translating between ethtool advertisement settings and MII advertisements are common operations for ethernet drivers. This patch adds a set of helper functions that implements the conversion. The patch then modifies a couple of the drivers to use the new functions. Signed-off-by: Matt Carlson <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-11-16net: introduce and use netdev_features_t for device features setsMichał Mirosław1-3/+3
v2: add couple missing conversions in drivers split unexporting netdev_fix_features() implemented %pNF convert sock::sk_route_(no?)caps Signed-off-by: Michał Mirosław <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-11-08sweep the floors and convert some .get_drvinfo routines to strlcpyRick Jones1-4/+4
Per the mention made by Ben Hutchings that strlcpy is now the preferred string copy routine for a .get_drvinfo routine, do a bit of floor sweeping and convert some of the as-yet unconverted ethernet drivers to it. Signed-off-by: Rick Jones <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-19net: add skb frag size accessorsEric Dumazet1-6/+6
To ease skb->truesize sanitization, its better to be able to localize all references to skb frags size. Define accessors : skb_frag_size() to fetch frag size, and skb_frag_size_{set|add|sub}() to manipulate it. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-13bnx2: fix skb truesize underestimationEric Dumazet1-2/+1
bnx2 allocates a full page per fragment. We must account PAGE_SIZE increments on skb->truesize, not the actual frag length. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-07net: Remove unnecessary driver assignments of ethtool_ringparam fields to zeroRick Jones1-2/+0
Per comments from Ben Hutchings on a previous patch, sweep the floors a little removing unnecessary assignments of zero to fields of struct ethtool_ringparam in driver code supporting ethtool -g. Signed-off-by: Rick Jones <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-06net: use DMA_x_DEVICE and dma_mapping_error with skb_frag_dma_mapIan Campbell1-1/+1
When I converted some drivers from pci_map_page to skb_frag_dma_map I neglected to convert PCI_DMA_xDEVICE into DMA_x_DEVICE and pci_dma_mapping_error into dma_mapping_error. Signed-off-by: Ian Campbell <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-03bnx2: don't request firmware when there's no userspace.françois romieu1-26/+41
The firmware is cached during the first successful call to open() and released once the network device is unregistered. The driver uses the cached firmware between open() and unregister_netdev(). It's similar to 953a12cc2889d1be92e80a2d0bab5ffef4942300 but the firmware is mandatory. Signed-off-by: Francois Romieu <[email protected]> Reviewed-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-08-26bnx2: convert to SKB paged frag API.Ian Campbell1-4/+4
Signed-off-by: Ian Campbell <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]> Cc: Michael Chan <[email protected]> Cc: [email protected] Signed-off-by: David S. Miller <[email protected]>
2011-08-17net: introduce IFF_UNICAST_FLT private flagJiri Pirko1-0/+2
Use IFF_UNICAST_FTL to find out if driver handles unicast address filtering. In case it does not, promisc mode is entered. Patch also fixes following drivers: stmmac, niu: support uc filtering and yet it propagated ndo_set_multicast_list bna, benet, pxa168_eth, ks8851, ks8851_mll, ksz884x : has set ndo_set_rx_mode but do not support uc filtering Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-08-10broadcom: Move the Broadcom driversJeff Kirsher1-0/+8607
Moves the drivers for Broadcom devices into drivers/net/ethernet/broadcom/ and the necessary Kconfig and Makefile changes. CC: Eilon Greenstein <[email protected]> CC: Michael Chan <[email protected]> CC: Matt Carlson <[email protected]> CC: Gary Zambrano <[email protected]> CC: "Maciej W. Rozycki" <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>