22 Oct, 2010
1 commit
-
Some cards don't support changing vlan offloading settings. Make
Ethtool set_flags return -EINVAL in those cases.Reported-by: Ben Hutchings
Signed-off-by: Jesse Gross
Signed-off-by: David S. Miller
21 Oct, 2010
2 commits
-
Make the bnx2 driver use the new vlan accleration model.
Signed-off-by: Jesse Gross
CC: Michael Chan
Signed-off-by: David S. Miller -
Many (but not all) drivers check to see whether there is a vlan
group configured before using a tag stored in the skb. There's
not much point in this check since it just throws away data that
should only be present in the expected circumstances. However,
it will soon be legal and expected to get a vlan tag when no
vlan group is configured, so remove this check from all drivers
to avoid dropping the tags.Signed-off-by: Jesse Gross
Signed-off-by: David S. Miller
12 Oct, 2010
2 commits
-
To prevent unnecessary error message. pci_save_state() is also moved to
the end of ->probe() so that all PCI config, including AER state, will be
saved.Update version to 2.0.18.
Signed-off-by: Michael Chan
Reviewed-by: Benjamin Li
Signed-off-by: David S. Miller -
- Improved flow control and simplified interface
- Use hardware RSS indirection table instead of the slower firmware-
based table
- Lower latency interrupt on 5709Signed-off-by: Michael Chan
Reviewed-by: Benjamin Li
Signed-off-by: David S. Miller
28 Sep, 2010
1 commit
-
Signed-off-by: Ben Hutchings
Signed-off-by: David S. Miller
27 Sep, 2010
1 commit
-
Change "return (EXPR);" to "return EXPR;"
return is not a function, parentheses are not required.
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
03 Sep, 2010
1 commit
-
fresh skbs have ip_summed set to CHECKSUM_NONE (0)
We can avoid setting again skb->ip_summed to CHECKSUM_NONE in drivers.
Introduce skb_checksum_none_assert() helper so that we keep this
assertion documented in driver sources.Change most occurrences of :
skb->ip_summed = CHECKSUM_NONE;
by :
skb_checksum_none_assert(skb);
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
23 Aug, 2010
1 commit
-
Signed-off-by: John Feeney
Signed-off-by: Michael Chan
Signed-off-by: Benjamin Li
Signed-off-by: David S. Miller
20 Jul, 2010
4 commits
-
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
smp_mb() inside bnx2_tx_avail() is used twice in the normal
bnx2_start_xmit() path (see illustration below). The full memory
barrier is only necessary during race conditions with tx completion.
We can speed up the tx path by replacing smp_mb() in bnx2_tx_avail()
with a compiler barrier. The compiler barrier is to force the
compiler to fetch the tx_prod and tx_cons from memory.In the race condition between bnx2_start_xmit() and bnx2_tx_int(),
we have the following situation:bnx2_start_xmit() bnx2_tx_int()
if (!bnx2_tx_avail())
BUG();...
if (!bnx2_tx_avail())
netif_tx_stop_queue(); update_tx_index();
smp_mb(); smp_mb();
if (bnx2_tx_avail()) if (netif_tx_queue_stopped() &&
netif_tx_wake_queue(); bnx2_tx_avail())With smp_mb() removed from bnx2_tx_avail(), we need to add smp_mb() to
bnx2_start_xmit() as shown above to properly order netif_tx_stop_queue()
and bnx2_tx_avail() to check the ring index. If it is not strictly
ordered, the tx queue can be stopped forever.This improves performance by about 5% with 2 ports running bi-directional
64-byte packets.Reviewed-by: Benjamin Li
Reviewed-by: Matt Carlson
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
Based on original patch by Breno Leitão .
Allocate the actual number of vectors and make use of fewer vectors
if pci_enable_msix() returns > 0. We must allocate one additional
vector for the cnic driver.Cc: Breno Leitão
Reviewed-by: Benjamin Li
Reviewed-by: Matt Carlson
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
We were using the wrong tx multicast counter instead of the rx multicast
counter.Reported-by: Peter Snellman
Reviewed-by: Benjamin Li
Reviewed-by: Matt Carlson
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller
19 Jul, 2010
2 commits
-
Use DMA API as PCI equivalents will be deprecated. This change also allow
to allocate with GFP_KERNEL in some places.Signed-off-by: Stanislaw Gruszka
Acked-by: Michael Chan
Signed-off-by: David S. Miller -
Signed-off-by: Stanislaw Gruszka
Acked-by: Michael Chan
Signed-off-by: David S. Miller
09 Jul, 2010
1 commit
-
Now core network is able to handle 64 bit netdevice stats on 32 bit
arches, we can provide them for bnx2, since hardware maintains some 64
bit counters.Signed-off-by: Eric Dumazet
Acked-by: Michael Chan
Signed-off-by: David S. Miller
05 Jul, 2010
4 commits
-
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
These config register values will be useful when the memory registers
are returning 0xffffffff which has been reported.Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
Add skb->rxhash support for TCP packets only because the bnx2 RSS hash
does not hash UDP ports.Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
Minor change to use MSI-X even if there is only one CPU. This allows
the CNIC driver to always have a dedicated MSI-X vector to handle
iSCSI events, instead of sharing the MSI vector.Signed-off-by: Michael Chan
Signed-off-by: David S. Miller
24 Jun, 2010
1 commit
-
Conflicts:
net/ipv4/ip_output.c
17 Jun, 2010
1 commit
-
This removes dma_get_ops() prefetch optimization in bnx2.
bnx2 uses dma_get_ops() to see if dma_sync_single_for_cpu() is
noop. bnx2 does prefetch if it's noop.But dma_get_ops() isn't available on all the architectures (only the
architectures that uses dma_map_ops struct have it). Using
dma_get_ops() in drivers leads to compilation breakage on many
architectures.This patch removes dma_get_ops() and changes bnx2 to do prefetch on
all the architectures. This adds useless prefetch on non-coherent
architectures but this is harmless. It is also unlikely to cause the
performance drop.[ Remove now unused local variable 'pdev' -DaveM ]
Signed-off-by: FUJITA Tomonori
Acked-by: Michael Chan
Signed-off-by: David S. Miller
12 Jun, 2010
1 commit
-
drivers/net/bnx2.c: In function 'bnx2_disable_forced_2g5':
drivers/net/bnx2.c:1489: warning: 'bmcr' may be used uninitialized in this functionWe fix it by checking return values from all bnx2_read_phy() and proceeding
to do read-modify-write only if the read operation is successful.The related bnx2_enable_forced_2g5() is also fixed the same way.
Reported-by: Prarit Bhargava
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller
02 Jun, 2010
1 commit
-
The regression is caused by:
commit 4327ba435a56ada13eedf3eb332e583c7a0586a9
bnx2: Fix netpoll crash.If ->open() and ->close() are called multiple times, the same napi structs
will be added to dev->napi_list multiple times, corrupting the dev->napi_list.
This causes free_netdev() to hang during rmmod.We fix this by calling netif_napi_del() during ->close().
Also, bnx2_init_napi() must not be in the __devinit section since it is
called by ->open().Signed-off-by: Michael Chan
Signed-off-by: Benjamin Li
Signed-off-by: David S. Miller
18 May, 2010
3 commits
-
Based on original patch from Stanislaw Gruszka .
Using netif_carrier_off() is better than updating all the ->trans_start
on all the tx queues.netif_carrier_off() needs to be called after bnx2_disable_int_sync()
to guarantee no race conditions with the serdes timers that can
modify the carrier state.If the chip or phy is reset, carrier will turn back on when we get the
link interrupt. If there is no reset, we need to turn carrier back on
in bnx2_netif_start(). Again, the phy_lock prevents race conditions with
the serdes timers.Signed-off-by: Michael Chan
Signed-off-by: Matt Carlson
Signed-off-by: David S. Miller -
New firmware fixes a performance regression on small packets.
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
Dump the correct MCP registers and add EMAC_RX_STATUS register during
NETDEV_WATCHDOG for debugging.Signed-off-by: Eddie Wai
Signed-off-by: Benjamin Li
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller
07 May, 2010
2 commits
-
Add prefetches of the skb and the next rx descriptor to speed up rx path.
Use prefetchw() for the skb [suggested by Eric Dumazet].
The rx descriptor is in skb->data which is mapped for streaming mode DMA.
Eric Dumazet pointed out that we should not prefetch the data before
dma_sync. So we prefetch only if dma_sync is no_op on the system.Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
And turn on NETIF_F_GRO by default [requested by DaveM].
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller
03 May, 2010
1 commit
28 Apr, 2010
3 commits
-
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
The bonding driver calls ndo_vlan_rx_register() while holding bond->lock.
The bnx2 driver calls bnx2_netif_stop() to stop the rx handling while
changing the vlgrp. The call also stops the cnic driver which sleeps
while the bond->lock is held and cause the warning.This code path only needs to stop the NAPI rx handling while we are
changing the vlgrp. Since no reset is going to occur, there is no need
to stop cnic in this case. By adding a parameter to bnx2_netif_stop()
to skip stopping cnic, we can avoid the warning.Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
It has been reported that under certain heavy traffic conditions in MSI-X
mode, the driver can lose an MSI-X vector causing all packets in the
associated rx/tx ring pair to be dropped. The problem is caused by
the chip dropping the write to unmask the MSI-X vector by the kernel
(when migrating the IRQ for example).This can be prevented by increasing the GRC timeout value for these
register read and write operations.Thanks to Dell for helping us debug this problem.
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller
08 Apr, 2010
1 commit
-
The DMA API is preferred.
Signed-off-by: FUJITA Tomonori
Signed-off-by: David S. Miller
07 Apr, 2010
1 commit
-
Conflicts:
drivers/net/bonding/bond_main.c
drivers/net/via-velocity.c
drivers/net/wireless/iwlwifi/iwl-agn.c
04 Apr, 2010
1 commit
-
Converts the list and the core manipulating with it to be the same as uc_list.
+uses two functions for adding/removing mc address (normal and "global"
variant) instead of a function parameter.
+removes dev_mcast.c completely.
+exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for
manipulation with lists on a sandbox (used in bonding and 80211 drivers)Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
24 Mar, 2010
2 commits
-
Netpoll needs to call the proper handler depending on the IRQ mode
and the vector.Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
The bnx2 driver calls netif_napi_add() for all the NAPI structs during
->probe() time but not all of them will be used if we're not in MSI-X
mode. This creates a problem for netpoll since it will poll all the
NAPI structs in the dev_list whether or not they are scheduled, resulting
in a crash when we access structure fields not initialized for that vector.We fix it by moving the netif_napi_add() call to ->open() after the number
of IRQ vectors has been determined.Signed-off-by: Benjamin Li
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller
28 Feb, 2010
2 commits
-
Now that the VPD searching code is abstracted away, the outer loop used
to detect the read-only large resource data type section is useless.Signed-off-by: Matt Carlson
Acked-by: Jesse Barnes
Signed-off-by: David S. Miller -
This patch adds the pci_vpd_find_info_keyword() helper function to
find information field keywords within read-only and read-write large
resource data type sections.Signed-off-by: Matt Carlson
Signed-off-by: Michael Chan
Acked-by: Jesse Barnes
Signed-off-by: David S. Miller