aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x_main.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-12-25bnx2x: Initialize cnic status block during chip resetMichael Chan1-0/+2
When the device is reset during MTU change, ring size change, or self test, etc, the cnic status block needs to be properly initialized if cnic is registered. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-18bnx2x: Don't set netdev->trans_startVladislav Zolotarov1-3/+0
Setting dev->trans_start caused spurious watchdog warnings. 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>
2009-11-17bnx2x: Handle Rx and Tx together in NAPIVladislav Zolotarov1-216/+151
Put Tx and Rx DPC to be handled in the NAPI: - Saves status blocks. - Moves the Tx work from hardIRQ to NAPI. 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>
2009-11-10bnx2x: version 1.52.1-4Eilon Greenstein1-2/+2
Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-10bnx2x: Change coalescing granularity to 4usEilon Greenstein1-6/+7
Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-10bnx2x: Remove misleading error printEilon Greenstein1-5/+0
Failing to allocate MSI-X vectors is not an error and should not be printed as such Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-10bnx2x: GSO implies CSUM offloadEilon Greenstein1-2/+2
Making sure that whenever the FW/HW is configured for GSO, it is also configured to CSUM offload Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-10bnx2x: declare MODULE_FIRMWAREBen Hutchings1-13/+14
Replace run-time string formatting with preprocessor string manipulation. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-05bnx2x: version 1.52.1-3Yaniv Rosner1-2/+2
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>
2009-11-05bnx2x: Fix CL73 autoneg issuesYaniv Rosner1-11/+5
- Advertise 1G KX4 in CL73 when 1G speed capability is enabled - Add flow-control negotiation over CL73 - External loopback test on Serdes should be done in FORCE mode, since in CL73 it is unable to link up with the same core using AUTONEG - Fix bnx2x_set_led function to support CL73 link leds 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>
2009-10-15bnx2x: Update to version 1.52.1-1Eilon Greenstein1-2/+2
Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-15bnx2x: Report the maximal available BW as link speedEilon Greenstein1-1/+13
The device is limited to the maximal BW allocation, so it should be displayed as the link speed to notify the user. Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-15bnx2x: Do not call load/unload functionality from DCCEilon Greenstein1-14/+5
There is really no need to clear the MAC or the FW filtering rules - it was added for completion, but caused race conditions with load/unload. Removing this redundant code Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-15bnx2x: Adding FW mailbox mutexEilon Greenstein1-2/+5
DCC commands are not protected with the RTNL lock, so a mutex should be added Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-15bnx2x: Changing the Disabled state to a flagEilon Greenstein1-15/+19
When working with DCC, a function can be disabled or enabled (virtual link down or up). Using the function state introduced some race conditions with the load/unload flow. Using a separate flag to indicate that the function is disabled. Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-15bnx2x: Allowing 0 as initial fairness valueEilon Greenstein1-28/+28
Value of zero was used to disable the fairness mechanism. Though the code (driver and FW) allowed changing the value at run time, it did not allow to do that if the mechanism was disabled to begin with. Fixed the FW to allow turning on and off the mechanism at run time. Fixed the code to read the value from the chip at the right sequence. Without this fix, if the initial value was set to zero, traffic could not run on the interface. Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11bnx2x: Add main CNIC interface functions.Michael Chan1-0/+388
Add the main CNIC registration, callback, MAC addr. setup functions. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11bnx2x: Add hw init code to support iSCSI.Michael Chan1-58/+152
Add code to initialize hardware blocks used for iSCSI. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11bnx2x: Refactor MAC address setup code.Michael Chan1-50/+112
For iSCSI MAC address setup in later patches. Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11bnx2x: Refactor bnx2x_sp_post().Michael Chan1-24/+38
Some of the SPQ (slow-path queue) operations will be used by the cnic code in later patches. Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-05net: Convert ethtool {get_stats, self_test}_count() ops to get_sset_count()Ben Hutchings1-29/+31
These string query operations were supposed to be replaced by the generic get_sset_count() starting in 2007. Convert the remaining implementations. Also remove calls to these operations to initialise drvinfo->n_stats. The ethtool core code already does that. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-02netdev: drivers should make ethtool_ops constStephen Hemminger1-1/+1
No need to put ethtool_ops in data, they should be const. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-01netdev: convert bulk of drivers to netdev_tx_tStephen Hemminger1-1/+1
In a couple of cases collapse some extra code like: int retval = NETDEV_TX_OK; ... return retval; into return NETDEV_TX_OK; Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12bnx2x: update version to 1.52.1Eilon Greenstein1-2/+2
Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12bnx2x: Whitespaces and commentsEilon Greenstein1-39/+41
Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12bnx2x: Re-factor the initialization codeEilon Greenstein1-20/+59
Moving the code to a more logical place and beautifying it. No real change in behavior. 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>
2009-08-12bnx2x: Using PCI_DEVICE macroEilon Greenstein1-6/+3
Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12bnx2x: Adding explicit castingEilon Greenstein1-3/+3
Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12bnx2x: Using macro for phy addressEilon Greenstein1-6/+2
Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12bnx2x: Missing smp_wmb for statistics state machineEilon Greenstein1-0/+3
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>
2009-08-12bnx2x: Check unzip return codeEilon Greenstein1-1/+3
Without this check, when running out of memory, we will see PSOD's in bnx2x_init_fill() when doing a memset(). This is because at that time, bp->gunzip_buf is not pointing to a valid allocated space. Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12bnx2x: Remove the init_dmae field from bpEilon Greenstein1-47/+47
Moved the dmae_command from the heap to the stack. This will save 56 bytes per bnx2x structure. As a side benefit, we can also reduce the time the dmae_mutex is held. This is because do we not need to hold this mutex when setting up the dmae command. The memory where is dmae command is stored is not a shared resource and doesn not need to be protected. Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12bnx2x: Updating regdump_len at drvinfoEilon Greenstein1-36/+33
Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12bnx2x: Move printing of version from probe to the initEilon Greenstein1-4/+2
Move printing of version from probe to the init function Rather then checking if this is the first module probe call to print the version of the driver only once, the statement is moved to the init function of the module where init is only called once Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12bnx2x: Combine get_pcie_width and get_pcie_speedEilon Greenstein1-18/+16
The functions bnx2x_get_pcie_width() and bnx2x_get_pcie_speed() were combined into bnx2x_get_pcie_width_speed() so that there is only 1 PCI read to PCICFG_OFFSET + PCICFG_LINK_CONTROL rather then 2 reads. Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12bnx2x: Stop loading if error condition detectedEilon Greenstein1-0/+8
Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12bnx2x: Calling pci_set_drvdata earlierEilon Greenstein1-2/+2
In case of error, bnx2x_init_dev calls pci_set_drvdata(pdev, NULL) Signed-off-by: Yitchak Gertner <gertner@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12bnx2x: Configurable pause schemeEilon Greenstein1-4/+10
When a given ring is running out of space, the FW can send pause towards the network. When working with multi-queues, when one queue is getting out of space it can block all other queues. The preferred scheme is to send pause frames only when running out of the shared internal chip buffers and if a given queue cannot place a packet on the host, it will drop it. Since some users might want to work in drop-less mode, allowing changing the behavior as a module parameter. Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12bnx2x: Adding Likely directiveEilon Greenstein1-1/+2
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>
2009-08-12bnx2x: Prefetch the page containing the BD descriptorEilon Greenstein1-0/+7
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>
2009-08-12bnx2x: Reporting host statistics to management FWEilon Greenstein1-53/+175
This is required for NCSI statistics Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12bnx2x: Supporting PHY FW upgradeEilon Greenstein1-18/+54
There are 3 operations that the driver needs to support to allow applications to access the PHY FW (on top of the MDC/MDIO access). Since those are essentially nvram access commands, adding them to the ethtool -E interface. Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12bnx2x: MDC/MDIO CL45 IOCTLsEilon Greenstein1-37/+84
As suggested by Ben Hutchings <bhutchings@solarflare.com>, using the MDC/MDIO IOCTL Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12bnx2x: Advertize flow control normally in MF modeEilon Greenstein1-3/+1
Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12bnx2x: Supporting Device Control ChannelEilon Greenstein1-93/+232
In multi-function mode, the FW can receive special management control commands to set the Min/Max BW and the the function link state Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12bnx2x: Using the new FWEilon Greenstein1-407/+481
The new FW improves the packets per second rate. It required a lot of change in the FW which implies many changes in the driver to support it. It is now also possible for the driver to use a separate MSI-X vector for Rx and Tx - this also add some to the complicity of this change. All things said - after this patch, practically all performance matrixes show improvement. Though Vladislav Zolotarov is not signed on this patch, he did most of the job and deserves credit for that. Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-3/+4
Conflicts: arch/microblaze/include/asm/socket.h
2009-08-01bnx2x: return PCI_ERS_RESULT_DISCONNECT on permanent failureDean Nelson1-0/+5
PCI drivers that implement the struct pci_error_handlers' error_detected callback should return PCI_ERS_RESULT_DISCONNECT if the state passed in is pci_channel_io_perm_failure. This patch fixes the issue for bnx2x. Signed-off-by: Dean Nelson <dnelson@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-30bnx2x: Version 1.48.114-1Eilon Greenstein1-2/+2
Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-30bnx2x: WoL only with current MAC addressEilon Greenstein1-4/+4
In some cases with 57711E, depending on the functions unload sequence, other functions MAC address could have been used to wake the system as well. Make sure to block all but the current function if WoL is required by changing the mode to single function WoL. Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>