Commit Graph

19 Commits (874aeea5d01cac55c160a4e503e3ddb4db030de7)

Author SHA1 Message Date
Rasesh Mody a960249083 bna: Consolidated HW Registers for Supported HWs
Change details:
 - Introducing new file bfi_reg.h for consolidating all supported hardware
   registers. This file completely replaces bfi_ctreg.h.
 - Updated ioc code as per register definition change.

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-03 03:24:39 -07:00
Rasesh Mody 9b08a4fce2 bna: HW Error Counter Fix
Change details:
 - Heartbeat failure counter is not incrementing under some scenarios.
   Update hbfails and hb_count stats during hwerror event.

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-22 17:01:14 -07:00
Rasesh Mody d4e16d4285 bna: Add HW Semaphore Unlock Logic
Change details:
 - Added logic to unlock hw semaphore if the previos FW boot was from boot
   code (flash based) and the current FW initialization attempt is from OS
   driver.

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-22 17:01:13 -07:00
Rasesh Mody f374b36103 bna: IOC Event Name Change
Change details:
 - Changed event name IOC_E_PFAILED to IOC_E_PFFAILED

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-22 17:01:13 -07:00
Rasesh Mody fdad400f16 bna: Mboxq Flush When IOC Disabled
Change details:
 - If there is a command pending in the mailbox, bfa_ioc_mbox_queue() enqueues
   the mailbox command to a pending command queue. Entries in this queue are
   not flushed when IOC is disabled. As a result, when IOC is re-enabled again,
   the stale entries in the pending command queue are posted to the mailbox.
   When these mailbox commands are processed by the FW and responses are sent,
   unexpected  events are received by other modules' FSMs (f.e. bfa_msgq) which
   have not posted any mailbox commands after IOC was enabled.
 - Flush the pending mailbox command queue when IOC is disabled. Rename
   bfa_ioc_mbox_hbfail to bfa_ioc_mbox_flush. Call bfa_ioc_mbox_flush
   from bfa_iocpf_sm_disabled_entry()

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-22 17:01:13 -07:00
Rasesh Mody ac51f60f50 bna: State Machine Fault Handling Cleanup
Chnage details:
 - The module name is not used in case of state machine fault, hence no longer
   passing the module name to the fault handler.

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-22 17:01:13 -07:00
Rasesh Mody bd5a92e9a0 bna: IOC Event Notification Enhancement
Change details:
 - Replace IOC HB failure event notification with a more generic mechanism
   that is capable of sending enble, disable, and failed events to registered
   modules. As a result, cee  module event handling callback bfa_cee_hbfail()
   is replaced with bfa_cee_notify() so that it can receive and handle
   different events from IOC.

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-22 17:01:13 -07:00
Rasesh Mody 0120b99c8d bna: CheckPatch Cleanup
Change details:
 - Driver cleanup as per new checkpatch v0.31

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-22 17:01:13 -07:00
Shan Wei ce45ee955f net:bna: fix compile warning of ‘bfa_ioc_smem_pgoff’ defined but not used
Fix the below compile warning:

drivers/net/bna/bfa_ioc.c:1922: warning: ‘bfa_ioc_smem_pgoff’ defined but not used

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-19 20:11:42 -07:00
David S. Miller e1943424e4 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/bnx2x/bnx2x_ethtool.c
2011-04-19 00:21:33 -07:00
David S. Miller 5859854290 bna: Fix set-but-unused variables.
The variable 'pgoff' is set but unused in bfa_nw_ioc_fwver_get()
and bfa_ioc_download_fw().

Similarly for 'cmd_h' in bna_mbox_flush_q and the entirety of
bna_rit_mod_uninit() is unused since variables are purely set but no
action is made using them.

Same for 'bna' in bna_rit_create() and 'ret' in bna_rx_create().

Just kill them off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 16:54:08 -07:00
Rasesh Mody 79ea6c8966 bna: fix for clean fw re-initialization
During a kernel crash, bna control path state machine and firmware do not
get a notification and hence are not cleanly shutdown. The registers
holding driver/IOC state information are not reset back to valid
disabled/parking values. This causes subsequent driver initialization
to hang during kdump kernel boot. This patch, during the initialization
of first PCI function, resets corresponding register when unclean shutown
is detect by reading chip registers. This will make sure that ioc/fw
gets clean re-initialization.

Signed-off-by: Debashis Dutt <ddutt@brocade.com>
Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-14 13:39:44 -07:00
Rasesh Mody 1e58148670 bna: Fix for handling firmware heartbeat failure
This patch contains a fix for gracefully handling firmware heartbeat
failure instead of forcing panic.

Signed-off-by: Debashis Dutt <ddutt@brocade.com>
Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-06 12:39:07 -07:00
Rasesh Mody 1d32f76962 bna: IOC failure auto recovery fix
Change Details:
	- Made IOC auto_recovery synchronized and not timer based.
	- Only one PCI function will attempt to recover and reinitialize
	the ASIC on a failure, that too after all the active PCI
	functions acknowledge the IOC failure.

Signed-off-by: Debashis Dutt <ddutt@brocade.com>
Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-25 19:16:03 -08:00
Rasesh Mody 2c7d38210f bna: IOC uninit check and misc cleanup
Change Details:
	- Added a check in ioc firmware lock function to see if IOC is
	in BFI_IOC_UNINIT state or not. If it is not in UNINIT state
	and the last IOC boot was not done by OS driver, force IOC state
	to BFI_IOC_UNINIT
	- Unused macro and API cleanup

Signed-off-by: Debashis Dutt <ddutt@brocade.com>
Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-25 19:16:01 -08:00
Rasesh Mody b7ee31c5af bna: scope and dead code cleanup
As suggested by Stephen Hemminger:
1) Made functions and data structures static wherever possible.
2) Removed unused code.

Signed-off-by: Debashis Dutt <ddutt@brocade.com>
Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-05 20:39:39 -07:00
Dan Carpenter 0746556bea bna: off by one
The mod->mbhdlr[] array has BFI_MC_MAX elements.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-19 11:25:54 -07:00
Rasesh Mody 8a891429d1 bna: Fixed build break for allyesconfig
This is the patch to fix the build break caused by multiple
definitions of symbols between Brocade's FC/FCOE driver(BFA)
and 10G Networking Driver(BNA).

Changes are:

1. locally used functions are made static 

2. unused functions are removed

3. using unique namespaces for the function names that must be
globally visible

Signed-off-by: Debashis Dutt <ddutt@brocade.com>
Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25 23:00:27 -07:00
Rasesh Mody 8b230ed8ec bna: Brocade 10Gb Ethernet device driver
This is patch 1/6 which contains linux driver source for
Brocade's BR1010/BR1020 10Gb CEE capable ethernet adapter.

Signed-off-by: Debashis Dutt <ddutt@brocade.com>
Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-23 20:24:12 -07:00