History log of /drivers/scsi/bfa/bfa_ioc_ct.c
Revision Date Author Comments
c679b599afa5dd38d20e058aa68bc94c1c1416a1 13-May-2013 Vijaya Mohan Guvva <vmohan@brocade.com> [SCSI] bfa: kdump fix on 815 and 825 adapters

Root cause: When kernel crashes, On brocade 815/825 adapters,
bfa IOC state machine and FW doesn't get a notification and
hence are not cleanly shutdown. So registers holding driver/IOC
state information are not reset back to valid disabled/parking
values. This causes subsequent driver initialization to fail
during kdump kernel boot.

Fix description: during the initialization of first PCI function, reset
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: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
e1aaab89dee184646f7001850e1fe6d55090a728 13-May-2013 Vijaya Mohan Guvva <vmohan@brocade.com> [SCSI] bfa: Fix 1860 port initialize when ATC is enabled

On Xen kernels, if ATC (address translation cache) is enabled, the
first PCIe DMA read from the adapter fails with an error. This is due to
a bug ASIC, which leads to a failure of 1860 ports to be initialised.

This patch includes the fix to disable Invalidated Tag Match Enable
capability by setting the bit 26 of CHIP_MISC_PRG to 0, by default it is
set to 1.

Signed-off-by: Anil Gurumurthy <agurumur@brocade.com>
Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
227fab90bff260f453d9da853b09679581bafd55 22-Sep-2012 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: Flash Controller PLL initialization fixes

- Made changes to check the flash controller status before IOC initialization.
- Made changes to poll on the FLASH_STS_REG bit to check if the flash controller
initialization is completed during the PLL init.

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
7ac83b1fd027a07b159940ccc8b5d57aaad7cc5f 22-Sep-2012 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: IOCFC state machine enhancements

- Add support to handle STOP/DISABLE events in the IOCFC state machine.
- Made changes to bring the IOC down on a flash driver config read failure.
- Added logic to clean the use count and fail sync registers during IOCFC init.

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
a6b963db0de3c9aa22db2f872e38c2a12edf09a7 14-Mar-2012 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: Flash controller IOC pll init fixes.

Made changes to resume the flash controller if it is halted before going
ahead with flash controller pause/resume logic.
Made changes to avoid clearing off the interrupts during the initial
pll initialization.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
3fd459804ff8e002db2671900debd0fc6dc6c443 25-Jun-2011 Krishna Gudipati <kgudipat@brocade.com> [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>
10a07379247078448c076690657a076076bf89aa 25-Jun-2011 Krishna Gudipati <kgudipat@brocade.com> [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>
5a0adaedffce91100d03fc1036dde024c8589295 25-Jun-2011 Krishna Gudipati <kgudipat@brocade.com> [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>
8b070b4a022f86dd5098308e36426ce29b6b8960 14-Jun-2011 Krishna Gudipati <kgudipat@brocade.com> [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>
775c7742adfd7726f05914198bf33eaa3b9f64bb 14-Jun-2011 Krishna Gudipati <kgudipat@brocade.com> [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>
111892082ed7a3214bc7a7ec6b8b20e8f847501a 14-Jun-2011 Krishna Gudipati <kgudipat@brocade.com> [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>
45d7f0cc58183062adea0a1de3d8cba768134138 13-Apr-2011 Jing Huang <huangj@brocade.com> [SCSI] bfa: kdump fix

Root cause: When kernel crashes, bfa IOC state machine and FW doesn't get
a notification and hence are not cleanly shutdown. So 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.

Fix description: during the initialization of first PCI function, reset
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: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <jbottomley@parallels.com>
8f4bfadd200477acb6dcf41a45919dd37d01a6db 27-Dec-2010 Jing Huang <huangj@brocade.com> [SCSI] bfa: remove unused defintions and misc cleanups

This patch removes unused functions, data strucutres, and definitions. It
also includes misc comment and formatting cleanups.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
d4b671c58ebeb56dfc8fe8bcca25e0a06bc9359a 27-Dec-2010 Jing Huang <huangj@brocade.com> [SCSI] bfa: replace bfa_assert with WARN_ON

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
f1d584d70f31f54e0a559049906f42db89e2746d 14-Dec-2010 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: IOC auto recovery fix.

- Made IOC auto_recovery synchronized and not timer based.
- Only one PCI function will attempt to recover and reinitialize
the ASIC on a failure, after all the active PCI fns
acknowledge the IOC failure.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
f16a17507b09e10e0cccc4d675ccbfe030d51ef1 10-Dec-2010 Maggie Zhang <xmzhang@brocade.com> [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>
f7f73812e95077c19a2801bbf4f483fcdab5232f 10-Dec-2010 Maggie Zhang <xmzhang@brocade.com> [SCSI] bfa: clean up one line functions

Cleaned up one line functions.

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>
52f94b6fd0d1ff9d935c52f8a6360834ed871d92 30-Nov-2010 Maggie <xmzhang@brocade.com> [SCSI] bfa: fix regular sparse check warnings.

Fix all sparse check warnings from make C=2.

Signed-off-by: Maggie <xmzhang@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
5fbe25c7a664601666895e8f95eaa59bd9741392 19-Oct-2010 Jing Huang <huangj@brocade.com> [SCSI] bfa: fix comments for c 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>
5344026065f79b102fcc44bc6332f856a111962a 19-Oct-2010 Jing Huang <huangj@brocade.com> [SCSI] bfa: remove os wrapper functions and macros

This patch replaces register access functions and macros with the the ones
provided by linux.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
6a18b1675fdf08a6dc861e39c3f94309a03e7f16 19-Oct-2010 Jing Huang <huangj@brocade.com> [SCSI] bfa: remove os wrapper and unused functions

This patch removes os wrapper and unused functions.
bfa_os_assign(), bfa_os_memset(), bfa_os_memcpy(), bfa_os_udelay()
bfa_os_vsprintf(), bfa_os_snprintf(), and bfa_os_get_clock() are replaced with
direct assignment or native linux functions. Some unused functions related to VF
(Vitual fabric) are also removed.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
a36c61f9025b8924f99f54d518763bee7aa84085 15-Sep-2010 Krishna Gudipati <kgudipat@brocade.com> [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>
df2a52a6c8c4995e0bec0b739ddb2f51664837dd 09-Jul-2010 Jing Huang <huangj@brocade.com> [SCSI] bfa: fix chip and memory initialization

Clear PSS memory reset that is set as part of power-on-reset (pci reset).
Complete PMM memory reset before BISTR start. Clear EDRAM BISTR start bit
after fixed delay. BISTR DONE bit status is not getting set. Use a fixed
1ms delay for BISTR now. Expose PMM IT memory definitions to host.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
293f82d59ed8b6d61d242e40ee7a6a146fae5eaa 09-Jul-2010 Jing Huang <huangj@brocade.com> [SCSI] bfa: enable new hardware

This patch enables support of new mezzanine cards for HP and IBM blade server.

- Add new pciids for HP and IBM mezzanine card.
- Add a new firmware image for HP mezzanine card, which is running in
FC only mode. Rename firmware image to reflect the difference. Change the
firmware download code accordingly for the above changes.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
d1c61f8ef582055569de76a86fa1984f9b6698cf 06-Mar-2010 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: Remove unused header files and did some cleanup.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
78f915f7b095dda76970c8c9568489fa779ef73f 06-Mar-2010 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: In MSIX mode, ignore spurious RME interrupts when FCoE ports are in FW mismatch state.

Use dummy interrupt handlers till chip initialization is complete.
Install real interrupt handlers after chip initialization.

Also removed msix installation code in bfa_iocfc_init().

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
816e49b8ed209e5e08d4c43359635cbca17e7196 06-Mar-2010 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: IOC recovery fix in fcmode.

ioc_recover failed to work in fcmode.

Fixed the code to initialize the ioc_regs.err_set during the
notify_hbfail.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
8b651b4294e67789028982d18779a9ebe75c2b8a 06-Mar-2010 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: Clear LL_HALT and PSS_ERR bit when IOC crashes.

Clear LL_HALT and PSS_ERR bit in the interrupt status register on an IOC crash.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
0a20de446c76529028cb239bf2a13cb0f05b263a 06-Mar-2010 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: IOC changes: Support faster recovery and split bfa_ioc.c into ASIC specific code.

Add support for faster IOC recovery after failure.

Split bfa_ioc.c into three files:
bfa_ioc.c: Common code shared between crossbow and catapult ASIC's.

bfa_ioc_cb.c: Code specific to the crossbow, reg mapping and
interrupt related routines.

bfa_ioc_ct.c: Code specific to the catapult, reg mapping and
interrupt related routines.

Fix to make sure IOC reinitialize's properly on enable request -
update the ioc_fwstate reg with BFI_IOC_FAIL on ioc disable mbox cmd
timeout.

Makefile changes to support the 2 newly added files bfa_ioc_cb.c and
bfa_ioc_ct.c.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>