Commit Graph

24 Commits (3a2fd4a14112452eb5c1a079ac8b3f4842762afe)

Author SHA1 Message Date
Krishna Gudipati 7826f304b1 [SCSI] bfa: Add FC-transport based Asynchronous Event Notification support.
- Added support to post vendor unique events on fc_host.
- Supports adapter, port, ioc, flash and remote port based AEN events.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27 14:41:24 +04:00
Krishna Gudipati 3350d98d6d [SCSI] bfa: Added support to query PHY.
- Added PHY sub-module.
- Implemented interface to obtain stats and to
  read/update the fw from the PHY module.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29 17:27:20 -05:00
Krishna Gudipati 3d7fc66dcd [SCSI] bfa: Added HBA diagnostics support.
- Added diagnostics sub-module to BFA.
- Implemented interface to perform memtest/loopback test
  and some other diagnostics tests.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29 17:25:44 -05:00
Krishna Gudipati 5a54b1d576 [SCSI] bfa: Added support for flash configuration
- Added flash sub-module.
- Implemented the interface to read/erase/update flash partition.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29 17:23:29 -05:00
Krishna Gudipati 51e569aa1f [SCSI] bfa: Added support to obtain SFP info.
- Added SFP sub-module to BFA.
- Added interface to collect sfp media info and sfp speed.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29 17:22:26 -05:00
Krishna Gudipati 148d61039c [SCSI] bfa: Added support for CEE info and stats query.
- Added CEE sub-module.
- Added support to collect stats/cee module info
  using BSG interface.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29 17:21:23 -05:00
Krishna Gudipati 4507025d01 [SCSI] bfa: DMA memory allocation enhancement.
- Modified the design such that each BFA sub-module will provide
  the amount of DMA and KVA memory needed by it and queues the
  same request to the global dma and kva info queues.
- During the memory allocation we iterate over this queue to allocate
  the dma and kva memory requested by sub-modules.
- The change is needed to avoid requesting the aggregate amount of memory
  needed by all the BFA sub-modules as one contiguous chunk.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29 17:11:09 -05:00
Krishna Gudipati 3fd459804f [SCSI] bfa: Brocade-1860 Fabric Adapter vHBA support.
- Introduced partitioning of the BFA resources.
- Added h/w queue ID in CPE messages, firmware uses h/w queue ID
  from messages to pick a matching RME queue.
- Added message header to bfa_reqq_produce(). h/w queue ID is set
  in the message header and firmware modules use h/w queue ID from
  message header instead of from cpqe event.
- Made changes to allow using all 256 queues of Brocade-1860 asic.
  Previously only a single queue per queue group was used.
- Added function tag to BFI message header. Only used by FC BFI
  messages.  Used to translate host tag to firmware tag. bfa_lpuid()
  is changed to bfa_fn_lpu() that encodes both PCI function and port
  ID in BFI message header.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29 17:02:28 -05:00
Krishna Gudipati 10a0737924 [SCSI] bfa: Brocade-1860 Fabric Adapter PLL init fixes.
- If flash controller is halted unconditionally, this results in
  illegal write access to flash controller register domain. Since
  flash controller registers are only accessible once s_clk is started
  - added logic to check for WGN status and halt flash controller only
  if it is already running.
- Added check to wait for flash controller halt to be completed before
  proceeding with s_clk/l_clk initializations.
- Removed unnecessary reset logic for PMM 1T memory and moved memory
  initialization after flash access enable.
- Disable Brocade-1860 asic MBOX interrupt before PLL initialization.
- Remove reset enable for S_CLK/L_CLK after both PLL initializations
  are complete.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29 16:59:59 -05:00
Krishna Gudipati a714134a85 [SCSI] bfa: Added Fabric Assigned Address(FAA) support
- Updated/added data structures and definitions to support FAA protocol.
- Modified the IOC state machine to support FAA.
- Introduced FAA feature configuration - enable/disable/query.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29 16:59:01 -05:00
Krishna Gudipati 5a0adaedff [SCSI] bfa: IOC bug fixes.
- Add logic to handle the case where PCI mapping goes away when
  IOCPF state machine is waiting for semaphore.
- Added logic to unlock hw semaphore if the previos FW boot was
  from flash based and the current FW initialization attempt is from OS.
- Added fix to update hbfails and hb_count stats during hwerror event.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29 16:57:52 -05:00
Krishna Gudipati 1a4d8e1bd8 [SCSI] bfa: Enable ASIC block configuration and query.
- Added ASIC block configuration APIs:
	- to create/delete/update the physical functions
	- to do adapter/port mode configuration
	- to query the current ASIC block configuration.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29 16:56:05 -05:00
Krishna Gudipati 8b070b4a02 [SCSI] bfa: Brocade-1860 Fabric Adapter 16Gbs support and flash controller fixes.
- Added support for 16Gbps.
- Added logic to flush pending mailbox command queue when IOC is disabled.
- Fix to Halt the flash controller during fw initialization - since
  when asic blck is programmed flash controller's continuous access
  blocks f/w access to flash.
- Added new asic based card types and modified IOC get card model routine.
- Added PLL init fix to do LPU reset every time we do a memory
  initialization, since not doing so will cause LPU to be
  uninitialized during driver load.
- Added fix to Halt flash controller before PLL initialization.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29 15:50:50 -05:00
Krishna Gudipati 775c7742ad [SCSI] bfa: IOC and PLL init changes for Brocade-1860 Fabric Adapter.
- Introduced IOC poll mechanism which replaces current interrupt
  based FW READY method.
- The timer based poll routine in IOC will query the ioc_fwstate
  register to see if there is a state change in FW, and sends the READY event.
- Bug fixes in the new asic PLL initialization.
- Added logic to handle CPE/RME queue interrupts before iocfc config done.
  1. Use the queue_process flag to see if iocfc configuration is done
     in INTX mode.
  2. Split the MSIX handler installation in two - one for IOC intr
     handler and the other for cpe/rme queue handler - and delay
     assigning queue handlers until iocfc config is done in MSIX mode.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29 15:46:19 -05:00
Krishna Gudipati dd5aaf4536 [SCSI] bfa: Changes to support vport disable and enable operations.
Made changes to FCS lport, vport state machines to support vport
enable / disable operations.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29 15:37:48 -05:00
Krishna Gudipati 111892082e [SCSI] bfa: Brocade-1860 Fabric Adapter Hardware Enablement
- Added support for Brocade-1860 Fabric Adapter.
- Made changes to support single firmware image per asic type.
- Combined bfi_cbreg.h and bfi_ctreg.h defines into bfi_reg.h with
  only minimal defines used by host.
- Added changes to setup CPE/RME Queue register offsets based on
  firmware response.
- Removed queue register offset initializations and added register offsets
  to BFI config response message.
- Added Brocade-1860 asic specific interrupt status definitions and
  mailbox interfaces.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29 15:31:31 -05:00
Krishna Gudipati 43ffdf4dfb [SCSI] bfa: Add pbc port disable check and fix LPS message name
- Add PBC port Disabled condition check.
- Rename incorrectly named LPS I2H messages.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29 15:27:46 -05:00
Krishna Gudipati d37779f8d9 [SCSI] bfa: Introduce IOC event notification mechanism.
Introduced a generic event notification callback function that
receives IOC_ENABLED, IOC_DISABLED, IOC_FAILED events and notifies the
modules registered for these events.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29 15:25:57 -05:00
Krishna Gudipati 85ce928dbb [SCSI] bfa: Introduced generic address len pair to represent DMA memory chunk.
- Avoid the use of hardware defined structure bfi_sge_s for DMA
  requests in host.

- Defined a generic address len pair to represent a DMA memory chunk
  (bfi_alen_s).

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29 15:24:46 -05:00
Maggie Zhang f16a17507b [SCSI] bfa: remove all OS wrappers
Remove OS wrapper functions/macros, and as a result remove bfa_os_inc.h.

Signed-off-by: Maggie Zhang <xmzhang@brocade.com>
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21 12:32:56 -06:00
Maggie Zhang f314878ab9 [SCSI] bfa: remove all SCSI IO callbacks
Remove SCSI IO callbacks, and as a result remove bfa_cb_ioim.h.

Signed-off-by: Maggie Zhang <xmzhang@brocade.com>
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21 12:32:47 -06:00
Maggie 50444a3400 [SCSI] bfa: fix endianess sparse check warnings
First round of fix for the endianess check warnings from make C=2 CF="-D__CHECK_ENDIAN__".

Signed-off-by: Maggie <xmzhang@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21 12:24:17 -06:00
Jing Huang acdc79a60c [SCSI] bfa: fix comments for header files
This patch addresses the comments from Randy Dunlap (Randy.Dunlap@oracle.com)
regarding comment blocks that begining with "/**". bfa driver comments
currently do not follow kernel-doc convention, we hence replace all
/** with /* and **/ with */.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-10-25 16:26:57 -05:00
Krishna Gudipati a36c61f902 [SCSI] bfa: cleanup driver
We have flattened the BFA hierarchy and also reduced the number of
source and header files we used to have earlier.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-09-16 22:54:24 -04:00