aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-12-07drivers/net: fix up function prototypes after __dev* removalsGreg Kroah-Hartman3-14/+8
The __dev* removal patches for the network drivers ended up messing up the function prototypes for a bunch of drivers. This patch fixes all of them back up to be properly aligned. Bonus is that this almost removes 100 lines of code, always a nice surprise. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-07bnx2x: Prevent link flaps when booting from SAN.Barak Witkowski5-3/+34
It is possible that the driver is configured to operate with a certain link configuration which differs from the link's configuration during boot from SAN - this would cause the driver to flap the link. Said flap may be missed by specific switches, causing dcbx convergence to be too long and boot sequence to fail. Convergence is longer because switch ignores new dcbx packets due to counters mismatch, as only host side reset the counters due to the link flap. This patch causes the driver to ignore user's initial configuration during boot from SAN, and continues with the existing link configuration. Signed-off-by: Barak Witkowski <barak@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-07cnic, bnx2x, bnx2: Simplify cnic probing.Michael Chan6-19/+17
Instead of using symbol_get(), cnic can now directly call the cnic_probe functions in struct bnx2x and struct bnx2. symbol_get() is not reliable as it fails when the module is still initializing. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-07cnic: Include bnx2x.hMichael Chan2-46/+20
by removing duplicate symbols and removing some redundant code. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-07bnx2: Add BNX2 prefix to CHIP ID and name macrosMichael Chan3-120/+120
for namespace consistency. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-07bnx2: Add BNX2 prefix to descriptor structures and macrosMichael Chan4-172/+181
for namespace consistency. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-07bnx2: Rename register read and write macrosMichael Chan2-321/+321
with BNX2_ prefix for namespace consistency. Currently, these macro names conflict with similar macros in bnx2x.h, preventing the cnic driver from including both bnx2.h and bnx2x.h. Including bnx2x.h in cnic.c will remove many redundant definitions and simplify the interface. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-05cnic: Fix rare race condition during iSCSI disconnect.Eddie Wai2-4/+13
If the initiator and target try to close the connection at about the same time, there is a race condition in the termination sequence for bnx2x. Fix the problem by waiting for the remote termination to complete before deleting the Connection ID. This will prevent the firmware assert. Update version to 2.5.15. Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-05cnic: Reset iSCSI EQ during shutdown.Michael Chan2-0/+24
Without the reset, reloading the cnic driver can cause the iSCSI Event Queue to be out of sync with the driver and cause intermittent crash. Signed-off-by: Michael Chan <mchan@broadcom.com> Acked-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-04tg3: PTP - Enable the timestamping feature in hardware and fill skb tx/rx timestampsMatt Carlson1-5/+52
This patch implements the hardware timestamping as described in Documentation/networking/timestamping.txt Update version to 3.128. Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-04tg3: PTP - Add the hardware timestamp ioctlMatt Carlson1-0/+93
This patch implements the SIOCSHWTSTAMP ioctl as described in Documentation/networking/timestamping.txt [Removed HWTSTAMP_FILTER_ALL handling by returning -ERANGE based on input from Richard Cochran.] Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-04tg3: PTP - Implement the ptp api and ethtool functionsMatt Carlson1-1/+145
This patch adds the ptp_caps structure, ptp api implementation, reference clock read and register/unregister functions. All the basic clock operations as described in Documentation/ptp/ptp.txt are supported. Frequency adjustment is performed using hardware with a 24 bit accumulator and a programmable correction value. On each clk, the correction value gets added to the accumulator and when it overflows, the time counter is incremented/decremented and the accumulator reset. So conversion from ppb to correction value is ppb * (1 << 24) / 1000000000 [Re-organized to put the ptp_clock_info struct declaration in one patch, added ptp_clock_info.name, and added locking to tg3_ptp_adjtime() based on input from Richard Cochran.] Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-04tg3: PTP - Add header definitions, initialization and hw access functions.Matt Carlson3-7/+115
This patch adds code to write the reference clock. If a chip reset is performed, the hwclock is reinitialized with the adjusted kernel time Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-04tg3: Fix inconsistent locking for tg3_netif_start().Nithin Nayak Sujir1-1/+4
Every caller holds tp->lock when calling tg3_netif_start() except tg3_io_resume(). Fix it so that it is all consistent. The subsequent PTP patches add tg3_ptp_resume() to tg3_netif_start() and the tp->lock is required. Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-03Merge tag 'dev_removal' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/net-nextDavid S. Miller9-104/+105
Networking: Remove __dev* markings from the networking drivers This is a series of patches that remove the dev* attributes for all networking drivers, with the exception of wireless drivers, those are in a different branch. Use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit are no longer needed since CONFIG_HOTPLUG is being removed as an option. Note, there are some devinit compiler section mismatch warnings due to this series, but they are fixed up when merged with my driver-next branch, which fixes the PCI device id warnings, and removes the modpost detection, as it's no longer needed. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-03bnx2x: remove __dev* attributesBill Pemberton3-35/+35
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-03net/broadcom: remove __dev* attributesBill Pemberton3-8/+8
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-03tg3: remove __dev* attributesBill Pemberton1-47/+48
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Matt Carlson <mcarlson@broadcom.com> Cc: Michael Chan <mchan@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-03bnx2: remove __dev* attributesBill Pemberton1-10/+10
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Michael Chan <mchan@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-03b44: remove __dev* attributesBill Pemberton1-4/+4
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Gary Zambrano <zambrano@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-03bnx2x: recognize fan failureYaniv Rosner2-1/+11
If fan failure is detected, MCP prevents PCI I/O registers from being mapped to the bar, causing a fatal error as driver is unaware. This patch recognizes such an event occurred and gracefully terminates the probe process. Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-02bnx2x: Correct PFC disablementBarak Witkowski1-2/+5
bnx2x driver could only have enabled pfc via usage of dcbnl; now, it can also correctly disable it. Signed-off-by: Barak Witkowski <barak@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-02bnx2x: fix 'Ethtool -A' when autonegYuval Mintz2-23/+28
When configuring pauses using 'ethtool -A', the requested values have effect when used together with autoneg (up to this point, when configured for autoneg, driver ignored requested pause configuration) Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-02bnx2x: prevent DCB if disabled in nvramBarak Witkowski2-2/+14
Signed-off-by: Barak Witkowski <barak@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-02bnx2x: Handle a rarely missed interruptYaniv Rosner2-0/+16
A rare case of no link due to a missed interrupt may occur due to a race condition between acknowledging the IGU via the BAR and restoring the NIG interrupt mask via the GRC. To solve it, we wait for the IGU ack command to finish prior to restoring the NIG interrupt mask. Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-02bnx2x: mask CPL_OF interruptYuval Mintz1-11/+10
Unmasked interrupt caused "FATAL HW block attention set2 0x20" messages to erroneously appear, as the associated interrupt is fully recoverable. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-02bnx2x: IGU parse error cause probe failureBarak Witkowski1-5/+12
If IGU parse error is encountered during the probing process, the error propagates and the probe gracefully fails (until now, such errors were ignored, later causing mischief). Signed-off-by: Barak Witkowski <barak@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-02bnx2x: Ext. config accessed only on non-E1x.Yuval Mintz1-1/+2
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-02bnx2x: nvram enables dropless flow controlYuval Mintz3-4/+31
It is now possible to enable dropless flow control via nvram. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-02bnx2x: Correct advertised speed/duplexYuval Mintz1-8/+4
If link is down due to management (and not due to actual phy link being lost), driver should still behave as if the link is down; Querying via ethtool about speed/duplex state should result in 'UNKNOWN' (same behaviour as when link is actually down). Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-02bnx2x: Filter packets on FCoE ringsDmitry Kravkov4-4/+17
Whenever bnx2x fails to transmit a packet due to a full Tx ring, if the ring size is zero (indicating an FCoE ring) driver filters the packet out and gracefully continues. Driver also gathers statistics on such filtered packets. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-02bnx2x: Management can control PFC/ETSBarak Witkowski3-6/+24
If configured for PFC/ETS by management, configure chip regardless of the presence of a remote peer which supports DCBX. Signed-off-by: Barak Witkowski <barak@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-02bnx2x: parity recovery flow enhancementBarak Witkowski1-13/+20
Parity recovery was enhanced in order to handle a few more corner cases. Signed-off-by: Barak Witkowski <barak@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-02bnx2x: revised and corrected SPIO accessYuval Mintz2-23/+30
Changed naming convention of SPIO macros, and prevented access to invalid SPIOs. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-28bnx2x: Change duplex setting in EEE functionYaniv Rosner1-2/+2
This is not a real problem, since the EEE is supported for devices where the actual_phy_selection is zero, such that the req_duplex of params will match the one of the phy struct. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-28bnx2x: Add warning message in case of non-10G SFP moduleYaniv Rosner1-2/+8
The string was split to several lines since it reached over 180 chars, which seems too much. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-28bnx2x: Cosmetic changesYaniv Rosner2-188/+127
This patch makes some cosmetic changes to the code: 1. Code alignment. 2. Merge read-modify-write into a single function (read_or_write / read_and_write). 3. Merge several write registers into a for-loop write using a static array. 4. Remove empty lines. 5. Fix comments. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-28bnx2x: Always take PHY lockYaniv Rosner6-52/+11
Taking PHY lock is not required on some older designs, but we are removing this complication and always taking it since it is always required on newer designs and does not worth the code complication on the older boards. Taking PHY lock was initially required only on specific boards which had their MDC/MDIO bus crossed, but since this lock is now always required, for example, when NCSI is present, the PHY lock will always be taken. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-28bnx2x: Add support for BCM84834Yaniv Rosner2-16/+67
Add support for the 10G-baseT PHY - BCM84834, which is the quad-port version of the dual-port BCM84833. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-28bnx2x: Fix SFP+ current leakageYaniv Rosner1-46/+45
Per measurements, the SFP+ suffered from small current leakage in two cases: - When no module was plugged and TX laser was disabled. The fix was to enable it, and when module is plugged in, check if it needs to be disabled. - When over-current event occurs due to invalid SFP+ module, the HW basically shuts down the current for this module, but the SW needs to complete this by issuing a power down via a GPIO. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-28bnx2x: Change MDIO clock settingsYaniv Rosner4-20/+66
When drivers works on top of an old bootcode, it is theoretically subjected to MDC/MDIO failures since the MDIO clock is set in the beginning of each sequence, rather than per CL45 command. On rare cases an old bootcodes may change that in the middle, so to address that, the MDIO clock is set for each CL45 access. In addition, setting the MDIO clock is now done per EMAC base, and not per port number, since a specific port can potentially use both EMACs for different PHY accesses. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-28bnx2x: Add support for 20G-KR2Yaniv Rosner4-34/+365
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-28bnx2x: Activate LFAYaniv Rosner3-1/+22
In case Link Flap Avoidance feature is supported by the MCP, bnx2x will enable it, and will pass the appropriate parameter when load request is sent to the MCP. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-25Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-4/+7
Conflicts: drivers/net/wireless/iwlwifi/pcie/tx.c Minor iwlwifi conflict in TX queue disabling between 'net', which removed a bogus warning, and 'net-next' which added some status register poking code. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-23bnx2x: remove redundant warning logAriel Elior1-4/+7
fix bug where a register which was only meant to be read in 578xx/57712 devices causes a bogus error message to be logged when read from other devices. 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>
2012-11-20bnx2x: Remove duplicate inclusion of bnx2x_hsi.hSachin Kamat1-1/+0
bnx2x_hsi.h was included twice. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-14tg3: Use tp->rxq_cnt when checking RSS tables.Michael Chan1-4/+4
irq_cnt is no longer reliable since rxq_cnt can be independently configured. Update version to 3.127. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-14tg3: Cleanup hardcoded ethtool test array indexesNithin Nayak Sujir1-29/+41
Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-14tg3: Prevent spurious tx timeout by setting carrier off before tx disable.Nithin Nayak Sujir2-42/+57
The watchdog will not trigger when the carrier is off when reconfiguring the device. Because carrier state is now off during reset, we need to introduce a link_up flag to keep track of link state during PHY setup. Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-14tg3: Set 10_100_ONLY flag for additional 10/100 Mbps devicesNithin Nayak Sujir2-27/+65
- Also refactor the conditional to use the existing tg3_pci_tbl array. - Set flags in the driver_data field of the pci_device_id structure to identify these devices. - Add PCI_DEVICE_SUB() to pci.h to declare PCI 4-part IDs to match these devices. Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>