Commit Graph

281 Commits

Author SHA1 Message Date
Dmitry Kravkov 7712b64496 bnx2x: disable dcb on 578xx since not supported yet
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-08-11 07:14:53 -07:00
Dmitry Kravkov 9f0096a157 bnx2x: properly clean indirect addresses
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-08-11 07:14:53 -07:00
Dmitry Kravkov 2031bd3a8a bnx2x: prevent race between undi_unload and load flows
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-08-11 07:14:53 -07:00
Vladislav Zolotarov cdb9d6ae8d bnx2x: fix select_queue when FCoE is disabled
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-08-11 07:14:53 -07:00
Vladislav Zolotarov 45d3539a23 bnx2x: init FCOE FP only once
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-08-11 07:14:53 -07:00
Yaniv Rosner 28f4881cbf bnx2x: Clear MDIO access warning during first driver load
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>
2011-08-03 03:22:18 -07:00
Yaniv Rosner afad009ad7 bnx2x: Fix BCM578xx MAC test
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>
2011-08-03 03:22:18 -07:00
Yaniv Rosner d2059a0611 bnx2x: Fix BCM54618se invalid link indication
After resetting BCM54618se, link partner would still see link since the PHY wasn't put into low-power state.

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>
2011-08-03 03:22:18 -07:00
Yaniv Rosner fd38f73eb9 bnx2x: Fix BCM84833 link
BCM84833 fail to link due to incorrect auto-negotiation setting.

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>
2011-08-03 03:22:18 -07:00
Yaniv Rosner 19af03a3c8 bnx2x: Fix link issue with DAC over 578xx
Fix no-link issue on BCM578xx when direct attached cable is connected since Warpcore microcode restart was missing to re-read the new mode.

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>
2011-08-03 03:22:17 -07:00
Yaniv Rosner 793bd45037 bnx2x: Fix LED behavior
This fix resolve two problems seen regarding LED:
1. LED doesn't flash during port identification.
2. Traffic LED sometimes do not blink.

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>
2011-08-03 03:22:17 -07:00
Yaniv Rosner 157fa283a7 bnx2x: Fix BCM578xx-B0 MDIO access
Fix MDIO access to Warpcore on new chip version of 578xx.

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>
2011-08-03 03:22:17 -07:00
Yaniv Rosner de6f3377d2 bnx2x: Fix remote fault handling
Fix couple of issues of remote fault detection and handling:
Link may go down due to remote fault indications during link establishment.
Possible link down after primary function migration.
Remote fault was not detected on 578xx.

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>
2011-08-03 03:22:17 -07:00
Yaniv Rosner b507766205 bnx2x: Fix chip hanging due to TX pipe stall.
Fix a problem in which the 578xx chip hangs after running traffic, and then pulling the network cable.
This occurs since TX pipe is stalled due to missing XON indication towards the NIG.

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>
2011-08-03 03:22:17 -07:00
Yaniv Rosner 9d5b36be64 bnx2x: Fix missing pause on for 578xx
When link speed is 1G and below, pause weren't sent due to missing pause setting in the UMAC.

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>
2011-08-03 03:22:17 -07:00
Vladislav Zolotarov 87b7ba3d24 bnx2x: Prevent restarting Tx during bnx2x_nic_unload
Tx queues were stopped before  bp->state was changed to a value different 
from BNX2X_STATE_OPEN, which allowed the bnx2x_tx_int() called from the 
NAPI context to re-enable it. This then allowed the netdev->ndo_start_xmit() 
to be called in the middle of the function reset and rings freeing. 

This patch changes bp->state to a value different 
from BNX2X_STATE_OPEN BEFORE disabling the Tx queues in order to restore the
broken protection against the above race in the bnx2x_tx_int().

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-08-02 01:35:43 -07:00
Vladislav Zolotarov b6c2f86e63 bnx2x: use pci_pcie_cap()
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
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-24 13:11:40 -07:00
Vladislav Zolotarov b1fb8740a2 bnx2x: fix bnx2x_stop_on_error flow in bnx2x_sp_rtnl_task
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
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-24 13:11:40 -07:00
Shmulik Ravid 2189400b3c bnx2x: enable internal target-read for 57712 and up only
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Shmulik Ravid <shmulikr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-24 13:11:40 -07:00
Vladislav Zolotarov d6cae2385f bnx2x: count statistic ramrods on EQ to prevent MC assert
This patch includes:
 - Counting statistics ramrods as EQ ramrods the way they should be. This
   accounting is meant to prevent MC asserts in case of software bugs.
 - Fixes in debug facilities which were added while working on one of such
   bugs.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
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-24 13:11:40 -07:00
Yaniv Rosner 1cb0c788e0 bnx2x: fix loopback for non 10G link
Also fixes minor formatting in that function.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
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>
2011-07-24 13:11:40 -07:00
Dmitry Kravkov 09b775e7ec bnx2x: dcb - send all unmapped priorities to same COS as L2
As a result of DCBX negotiation some priorities maybe untouched and still
unmapped to any COS; instead of sending them to COS0 we assign them
to the same COS as L2 traffic - to avoid collisions with storage class of
service.

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-24 13:11:40 -07:00
Vladislav Zolotarov 7961689586 bnx2x: Broken self-test in SF mode on 578xx
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-21 12:33:56 -07:00
Vladislav Zolotarov 8736c82650 bnx2x: Parity errors recovery for 578xx
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-21 12:33:56 -07:00
Vladislav Zolotarov c03bd39c56 bnx2x: Read FIP mac from SHMEM in single function mode
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-21 12:33:56 -07:00
Vladislav Zolotarov 0fea29c129 bnx2x: Fixed ethtool -d for 578xx
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-21 12:33:56 -07:00
Vladislav Zolotarov bf61ee1467 bnx2x: Implementation for netdev->ndo_fcoe_get_wwn
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-21 12:33:56 -07:00
Dmitry Kravkov 928ad22a3b bnx2x: disable FCoE for 578xx devices since not yet supported
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-19 09:57:49 -07:00
Vladislav Zolotarov 53e51e2f48 bnx2x: fix memory barriers
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-19 09:57:49 -07:00
Vladislav Zolotarov f5219d8eb8 bnx2x: use BNX2X_Q_FLG_TPA_IPV6 for TPA queue configuration
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-19 09:57:49 -07:00
Vladislav Zolotarov 019dbb4c01 bnx2x: disable loacal BH when scheduling FCOE napi
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-19 09:57:49 -07:00
Dmitry Kravkov d1c228d9b9 bnx2x: fix MB index for 4-port devices
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-19 09:57:49 -07:00
Dmitry Kravkov 6debea870a bnx2x: DCB rework
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-19 09:57:48 -07:00
Vladislav Zolotarov f13ac41f51 bnx2x: remove unnecessary dma_sync
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-19 09:57:48 -07:00
Vladislav Zolotarov 9505ee3767 bnx2x: stop tx before CNIC_STOP
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-19 09:57:48 -07:00
Dmitry Kravkov c636322b24 bnx2x: add missing command in error handling flow
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-19 09:57:47 -07:00
Vladislav Zolotarov 9924cafc40 bnx2x: use correct dma_sync function
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-19 09:57:46 -07:00
Dmitry Kravkov faa2831445 bnx2x: Fix compilation when CNIC is not selected in config
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-16 13:35:51 -07:00
Ariel Elior 6383c0b35b bnx2x: Multiple concurrent l2 traffic classes
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-14 16:02:29 -07:00
Ariel Elior 7be08a7222 bnx2x: Renaming the "reset_task" to "sp_rtnl_task"
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-14 16:02:29 -07:00
Shmulik Ravid 3c878d4746 bnx2x: Add dcbnl notification
This patch adds a dcbnl notification to the bnx2x. The notification is
sent to user mode clients following a change in the dcb negotiated
parameters as resolved by the embedded DCBX stack. 

Signed-off-by: Shmulik Ravid <shmulikr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-07 05:11:30 -07:00
Shan Wei fa917ff739 net: fix warning of versioncheck
net-next-2.6/drivers/net/bnx2x/bnx2x_sp.c: 19 linux/version.h not needed.
net-next-2.6/drivers/net/caif/caif_hsi.c: 9 linux/version.h not needed.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-07 00:26:31 -07:00
David S. Miller e12fe68ce3 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2011-07-05 23:23:37 -07:00
Yaniv Rosner 7d09926d1d bnx2x: Fix warning message during 57712/8727 initialization
Clear warning message "MDC/MDIO access timeout" during first driver load by setting MDIO clock.
This warning has no significant meaning, since it occurs prior to the first PHY initialization.

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>
2011-07-05 04:21:40 -07:00
Yaniv Rosner a89a1d4a73 bnx2x: Add autogrEEEn support
Add autogrEEEn support on BCM84833 and 54618se, which allows to reduce power consumption.

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>
2011-07-05 04:21:40 -07:00
Yaniv Rosner 0520e63acb bnx2x: Fix BCM84833 initialization
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>
2011-07-05 04:21:40 -07:00
Yaniv Rosner 85242eea68 bnx2x: Fix false link indication at link partner when DAC is used
When driver is unloaded, disable PMD in addition to TX laser, provided that the management firmware will be able to enable it back.

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>
2011-07-05 04:21:40 -07:00
Yaniv Rosner 985848f80f bnx2x: Reset PHY due to fan failure for 578xx
Add hardware PHY reset action for BCM578xx when fan failure occur.
The new bnx2x_warpcore_hw_reset warps bnx2x_warpcore_power_module to fit the .hw_reset function template of the phy structure.

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>
2011-07-05 04:21:40 -07:00
Yaniv Rosner a34bc969a1 bnx2x: Add CL37 BAM for Warpcore
Add CL37 BAM support according to configuration.

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>
2011-07-05 04:21:40 -07:00
Yaniv Rosner 52c4d6c4b5 bnx2x: Change BCM54616S to BCM54618SE
Change 1G copper PHY BCM54616S to BCM54618SE since we only have HW with latter one of the two.

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>
2011-07-05 04:21:40 -07:00