summaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)Author
2011-07-21bnx2: Fix endian swapping on firmware version stringMichael Chan
so that ethtool -i will display it correctly on big endian systems. Signed-off-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-21cnic: Add VLAN ID as a parameter during netevent upcallMichael Chan
The bnx2fc driver needs to handle netdev events on VLAN devices. Signed-off-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-21cnic: Wait for all Context IDs to be deleted before sending FCOE_DESTROY_FUNCMichael Chan
Otherwise, the firmware will not respond and we'll have to wait for timeout. Refactor the wait loop we already have into a separate function for this purpose. Signed-off-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-21cnic: Fix Context ID space calculationMichael Chan
Include FCoE CID space only for E2_PLUS devices. Remove old CID offset adjustments that are no longer needed. Signed-off-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-21tg3: Fix NVRAM selftest failures for 5720 devsMatt Carlson
This patch fixes NVRAM selftest failures for 5720 devices by fixing the checksum area size. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-21tg3: Return size from tg3_vpd_readblock()Matt Carlson
Newer VPD datablocks can exceed the size the tg3 driver is traditionally used to. This can cause some of the routines that operate on the VPD data to fail when in-fact they could have succeeded had they known the correct size. This patch fixes the problem. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-21tg3: Fix int selftest for recent devices.Matt Carlson
This patch fixes interrupt selftest failures for recent devices (57765, 5717, 5718. 5719, 5720) by disabling MSI one-shot mode and applying the status tag workaround to the selftest code. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-21tg3: Fix RSS indirection table distributionMatt Carlson
The current RSS indirection table is populated such that more traffic will hit the first RSS ring. This patch adjusts the indirection table so that the load is more evenly distributed. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-21tg3: Add 5719 and 5720 to EEE_CAP listMatt Carlson
This patch adds the 5719 and the 5720 to the list of devices that are EEE capable. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-21tg3: Fix link down notify failure when EEE disabledMatt Carlson
Occasionally, when the network cable is removed after a successful autonegotiation, the device will not send a link down interrupt to the driver. This happens because of a bad interaction of an EEE workaround. The fix is to adjust the code so that the root cause condition does not happen. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-21tg3: Fix link flap at 100Mbps with EEE enabledMatt Carlson
This patch increases the scope of the EEE interoperability workaround to include more asic revisions. The workarond value is tuned to workaround a link flap issue at 100Mbps. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-21tg3: Fix io failures after chip resetMatt Carlson
Commit f2096f94b514d88593355995d5dd276961e88af1, entitled "tg3: Add 5720 H2BMC support", needed to add code to preserve some bits set by firmware. Unfortunately the new code causes throughput to stop after a chip reset because it enables state machines before they are ready. This patch undoes the problematic code. The bits will be restored later in the init sequence. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-21bnx2x: Broken self-test in SF mode on 578xxVladislav Zolotarov
This patch fixes both the failure in the self-test on 578xx and a hole in a parity recovery flow that this failure has discovered: - internal 'pending' state in a VLAN_MAC object wasn't been cleared when the object state change was called with DRV_ONLY flag, which in particular happens when a parity error happens during the self-test. - bp->sp_state wasn't cleared in the similar circumstances as described above. Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-21bnx2x: Parity errors recovery for 578xxVladislav Zolotarov
Fix the parity errors recovery flow for 578xx: - Add a separate column for the 578xx in the parity mask registers DB. - Fix the bnx2x_process_kill_chip_reset() to handle the blocks newly introduced in the 578xx. Cover ATC and PGLUE_B blocks for 57712 and 578xx. Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-21bnx2x: Read FIP mac from SHMEM in single function modeVladislav Zolotarov
Read FIP MAC address from SHMEM's "port" section similar to what we do in a MF mode when we read it from a "func" section of SHMEM. Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-21bnx2x: Fixed ethtool -d for 578xxVladislav Zolotarov
Registers dump code erroneously treated 578xx as 57712. This patch fixes the above and also removes unused data structures. Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-21bnx2x: Implementation for netdev->ndo_fcoe_get_wwnVladislav Zolotarov
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-19slcan: remove unused 'leased', 'line' and 'pid' fields from the 'slcan' ↵Matvejchikov Ilya
structure Signed-off-by: Matvejchikov Ilya <matvejchikov@gmail.com> Acked-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-19slip: remove unused 'line' field from the 'slip' structureMatvejchikov Ilya
Signed-off-by: Matvejchikov Ilya <matvejchikov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-19Merge branch 'davem-next.r8169' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev-2.6
2011-07-19bnx2x: disable FCoE for 578xx devices since not yet supportedDmitry Kravkov
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-19bnx2x: fix memory barriersVladislav Zolotarov
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-19bnx2x: use BNX2X_Q_FLG_TPA_IPV6 for TPA queue configurationVladislav Zolotarov
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-19bnx2x: disable loacal BH when scheduling FCOE napiVladislav Zolotarov
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-19bnx2x: fix MB index for 4-port devicesDmitry Kravkov
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-19bnx2x: DCB reworkDmitry Kravkov
create DCB related states in function state-machine allow handling of DCB errors from FW allow disablement of DCB in FW, when peer disappears or error clean up unused functions/variables as pointed by David Binderman <dcb314@hotmail.com> Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-19bnx2x: remove unnecessary dma_syncVladislav Zolotarov
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-19bnx2x: stop tx before CNIC_STOPVladislav Zolotarov
It may take some time to cnic to respond, this prevents tx_timeout when it happens. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-19bnx2x: add missing command in error handling flowDmitry Kravkov
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-19bnx2x: use correct dma_sync functionVladislav Zolotarov
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-19r8169: fix sticky accepts packet bits in RxConfig.Francois Romieu
e542a2269f232d61270ceddd42b73a4348dee2bb (r8169: adjust the RxConfig settings) broke the return from promiscuous mode to physical address match mode. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Signed-off-by: Hayes Wang <hayeswang@realtek.com>
2011-07-18net: can: remove custom hex_to_bin()Andy Shevchenko
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-18stmmac: Allow SOCs to use Store forward mode eventhough tx_coe is 0. (V2)Srinivas Kandagatla
This patch adds new field 'force_sf_dma_mode' to plat_stmmacenet_data struct to allow users to specify if they want to use force store forward eventhough tx_coe is not available in hw. without this flag stmmac driver will use cut-thru mode not use store-forward mode. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-18stmmac: add memory barriers at appropriate placesShiraz Hashim
This patch, provided by ST SPEAr developers, has fixed a problem raised on ARM CA9 where happened that the dma_transmission was enabled before the dma descriptors were properly filled. To guarantee this data memory barriers have been explicity used in the driver. Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-17net: Abstract dst->neighbour accesses behind helpers.David S. Miller
dst_{get,set}_neighbour() Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-17net: vlan, qlcnic: make vlan_find_dev privateDavid Lamparter
there is only one user of vlan_find_dev outside of the actual vlan code: qlcnic uses it to iterate over some VLANs it knows. let's just make vlan_find_dev private to the VLAN code and have the iteration in qlcnic be a bit more direct. (a few rcu dereferences less too) Signed-off-by: David Lamparter <equinox@diac24.net> Cc: Patrick McHardy <kaber@trash.net> Cc: Amit Kumar Salecha <amit.salecha@qlogic.com> Cc: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Cc: linux-driver@qlogic.com Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-16bnx2x: Fix compilation when CNIC is not selected in configDmitry Kravkov
Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-1668360enet: Remove Kconfig/Makefile referencesJeff Kirsher
68360enet.c no longer exists, and from the research, it appears that 68360enet.c became fec.c back in 2004. The Kconfig and Makefile references were never cleaned up. This patch removes this "dead" references. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-16bnx2: Close device if tx_timeout reset failsMichael Chan
Based on original patch and description from Flavio Leitner <fbl@redhat.com> When bnx2_reset_task() is called, it will stop, (re)initialize and start the interface to restore the working condition. The bnx2_init_nic() calls bnx2_reset_nic() which will reset the chip and then calls bnx2_free_skbs() to free all the skbs. The problem happens when bnx2_init_chip() fails because bnx2_reset_nic() will just return skipping the ring initializations at bnx2_init_all_rings(). Later, the reset task starts the interface again and the system crashes due a NULL pointer access (no skb in the ring). To fix it, we call dev_close() if bnx2_init_nic() fails. One minor wrinkle to deal with is the cancel_work_sync() call in bnx2_close() to cancel bnx2_reset_task(). The call will wait forever because it is trying to cancel itself and the workqueue will be stuck. Since bnx2_reset_task() holds the rtnl_lock() and checks for netif_running() before proceeding, there is no need to cancel bnx2_reset_task() in bnx2_close() even if bnx2_close() and bnx2_reset_task() are running concurrently. The rtnl_lock() serializes the 2 calls. We need to move the cancel_work_sync() call to bnx2_remove_one() to make sure it is canceled before freeing the netdev struct. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Cc: Flavio Leitner <fbl@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-15Merge branch 'for-davem' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
2011-07-158139cp: convert to new VLAN model.françois romieu
The registers and descriptors bits are identical to the pre-8168 8169 chipsets : {RxDesc / TxDesc}.opts2 can only contain VLAN information. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Reviewed-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-15slcan: remove obsolete code in slcan initialisationOliver Hartkopp
This patch removes obsolete code in the initialisation/creation of slcan devices. It follows the suggested cleanups from Ilya Matvejchikov in drivers/net/slip.c that where recently applied to net-next-2.6: - slip: remove dead code within the slip initialization - slip: remove redundant check slip_devs for NULL Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-15Separate handling of irq type flags variable from the irq_flags request_irq ↵Shyam Iyer
variable Commit 5f77898de17ff983ff0e2988b73a6bdf4b6f9f8b does not completely fix the problem of handling allocations with irqs disabled.. The below patch on top of it fixes the problem completely. Based on review by "Ivan Vecera" <ivecera@redhat.com>.. " Small note, the root of the problem was that non-atomic allocation was requested with IRQs disabled. Your patch description does not contain wwhy were the IRQs disabled. The function bnad_mbox_irq_alloc incorrectly uses 'flags' var for two different things, 1) to save current CPU flags and 2) for request_irq call. First the spin_lock_irqsave disables the IRQs and saves _all_ CPU flags (including one that enables/disables interrupts) to 'flags'. Then the 'flags' is overwritten by 0 or 0x80 (IRQF_SHARED). Finally the spin_unlock_irqrestore should restore saved flags, but these flags are now either 0x00 or 0x80. The interrupt bit value in flags register on x86 arch is 0x100. This means that the interrupt bit is zero (IRQs disabled) after spin_unlock_irqrestore so the request_irq function is called with disabled interrupts. " Signed-off-by: Shyam Iyer <shyam_iyer@dell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-15Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem Conflicts: net/bluetooth/l2cap_core.c
2011-07-14net/ps3: Fix gelic RX DMA restartGeoff Levand
Fix the condition where PS3 network RX hangs when no network TX is occurring by calling gelic_card_enable_rxdmac() during RX_DMA_CHAIN_END event processing. The gelic hardware automatically clears its RX_DMA_EN flag when it detects an RX_DMA_CHAIN_END event. In its processing of RX_DMA_CHAIN_END the gelic driver is required to set RX_DMA_EN (with a call to gelic_card_enable_rxdmac()) to restart RX DMA transfers. The existing gelic driver code does not set RX_DMA_EN directly in its processing of the RX_DMA_CHAIN_END event, but uses a flag variable card->rx_dma_restart_required to schedule the setting of RX_DMA_EN until next inside the interrupt handler. It seems this delayed setting of RX_DMA_EN causes the hang since the next RX interrupt after the RX_DMA_CHAIN_END event where RX_DMA_EN is scheduled to be set will not occur since RX_DMA_EN was not set. In the case were network TX is occuring, RX_DMA_EN is set in the next TX interrupt and RX processing continues. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-14bnx2x: Multiple concurrent l2 traffic classesAriel Elior
Overview: Support mapping of priorities to traffic classes and traffic classes to transmission queues ranges in the net device. The queue ranges are (count, offset) pairs relating to the txq array. This can be done via DCBX negotiation or by kernel. As a result Enhanced Transmission Selection (ETS) and Priority Flow Control (PFC) are supported between L2 network traffic classes. Mapping: This patch uses the netdev_set_num_tc, netdev_set_prio_tc_map and netdev_set_tc_queue functions to map priorities to traffic classes and traffic classes to transmission queue ranges. This mapping is performed by bnx2x_setup_tc function which is connected to the ndo_setup_tc. This function is always called at nic load where by default it maps all priorities to tc 0, and it may also be called by the kernel or by the bnx2x upon DCBX negotiation to modify the mapping. rtnl lock: When the ndo_setup_tc is called at nic load or by kernel the rtnl lock is already taken. However, when DCBX negotiation takes place the lock is not taken. The work is therefore scheduled to be handled by the sp_rtnl task. Fastpath: The fastpath structure of the bnx2x which was previously used to hold the information of one tx queue and one rx queue was redesigned to represent multiple tx queues, one for each traffic class. The transmission queue supplied in the skb by the kernel can no longer be interpreted as a straightforward index into the fastpath structure array, but it must rather be decoded to the appropriate fastpath index and the tc within that fastpath. Slowpath: The bnx2x's queue object was redesigned to accommodate multiple transmission queues. The queue object's state machine was enhanced to allow opening multiple transmission-only connections on top of the regular tx-rx connection. Firmware: This feature relies on the tx-only queue feature introduced in the bnx2x 7.0.23 firmware and the FW likewise must have the bnx2x multi cos support. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-14bnx2x: Renaming the "reset_task" to "sp_rtnl_task"Ariel Elior
Renaming the "reset_task" to a more general purpose name, "sp_rtnl_task", as it is already used for another purpose other than reset which is parity recovery, and since I plan to add a third operation for this task, updating the priority to traffic class and traffic class to transmission queues mappings after dcbx negotiation takes place. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-14Merge branch 'davem-next.r8169' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev-2.6
2011-07-14r8169: adjust the RxConfig settings.Hayes Wang
Set the init value before reset in probe function. And then just modify the relative bits and keep the init settings. For 8110S, 8110SB, and 8110SC series, the initial value of RxConfig needs to be set after the tx/rx is enabled. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Acked-by: Francois Romieu <romieu@fr.zoreil.com>
2011-07-14r8169: don't enable rx when shutdown.Hayes Wang
Only 8111b needs to enable rx when shutdowning with WoL. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Acked-by: Francois Romieu <romieu@fr.zoreil.com>