Modified the portstats get/clear logic for port physical/FCoE/QoS stats.
Added more stats to FC
Fixed some issues with FCoE stats collection.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
bfa_ioc_attr_s is a big structure and some times could cause
stack overflow if defined locally, so add specific APIs that
are needed to replace the use of ioc_attr local var.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Rename pport structures to fcport in BFA FCS, to resolve confusion
about the port structures in the firmware, and make sure the SG page
is setup correctly.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Currently BFA was not checking for IOC down condition when issuing
getstats/clearstats
Add check to see if IOC is operational, before issuing
getstats/clearstats.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
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>
Fixed the issue of not acknowledging the command queue
full-to-non-full interrupt. Implemented separate acknowledging
functions for different ASIC and interrupt mode.
Fixed the case of missing CPE interrupt by always processing the
pending requests in the completion path.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
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>
Replace enum types with int and rearrange the fields to fix some
alignment issue.
Local var ioc_attr is causing the stack to overflow, so removed the
usage of the local ioc_attr var and now invoking an API to return the
ioc_type.
Fix some AEN issues.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Introduce a link notification state machine to handle next incoming
link events while the current event is being delivered to the driver.
When the event has been processed by the driver, the link notification
state machine will queue the next event (if there is any) to the
driver.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Made FCS authentication related changes to state machines and header
files.
Made changes in FCS state machines to handle the case when secret
string is NULL.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Changed PCI VPD to incorporate specific OEM vendors.
Added FCoE specific interrupt latency and delay params.
Added some variables needed by FIP 2.0.
Added some new logging and tracing definitions.
Added reserved members to make the structures (IOC, IOCFC) 64bit aligned.
Changed the module identifiers, as some files were moved.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Copy fpma MAC when requested by user space application. Added FPMA
mac address to the lport attributes structure.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Make sure that in direct attach mode, we do not query the name server
after a target is marked offline.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Replace bfa_assert() with bfa_sm_fault() to get unhandled events for
debugging.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
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>
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>
bfad.c & bfad_drv.h:
* Created a kernel thread from pci_probe that does the bfad start
operations after BFA init done on a firmware mismatch.
* The kernel thread on a fw mismatch waits for an event from IOC
call back and is woken up from bfa_cb_init() on BFA init success.
* In normal cases of no firmware mismatch this thread is terminated
in pci_probe.
bfa_fcs_lport.c, fabric.c, fcs_lport.h & vport.c:
* Split the lport init to attach time and init time code, so that
proper config attributes are set after firmware mismatch.
bfa_iocfc.c:
* Handle an IOC timer issue, where the IOC timer would expire before
the init completion and send Init fail event to the driver,
however IOC init continues and completes successfully at the later
stage. The bfa and driver were not handling this kind of deferred
init completion.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Brocade CNA currently supports only 190 vports (instead of 191),
since there are only 192 unicast cam entries reserved for FCoE.
Brocade CNA has a total of 256 unicast cam entries (192 FCoE + 64 LL)
192 cam entries = 1 burned in mac + 1 baseport FPMA mac + 190 vport
FPMA macs.
Made changes to the code to support only 190 vports.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Split bfa_fcs_init() into bfa_fcs_attach() and bfa_fcs_init().
Removed empty function definitions in FCS modules
Modified driver to call bfa_fcs_attach() and bfa_fcs_init() as needed.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Added a FCS function to be called during driver init, to set the FDMI
Driver parameter.
fdmi.c: Created a disabled state when fdmi is disabled.
bfad.c:
* Added fdmi_enable driver parameter.
* Added support to call bfa_fcs_set_fdmi_param() to initialize fcs
fdmi setting.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
bfa_intr.c: Enable new halt interrupt in BFA.
bfi_ctreg.h: Expose new halt interrupt bit definition to host.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
bfa_ioc.c:
- Enable IOC auto-recovery by default.
- When CNA is in FC mode, return IOC type as FC (not FCoE)
bfa_iocfc.c:
- Set fcmode before pci initialization/setup.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Clear virtual links was not propagated upwards to bfa from fw.
This resulted in HBA and switch being in an inconsistent state.
So defined a new LPS event for clear virtual link on a vport,
and also now clear virtual link on a baseport, is sent as a
link down event from the fw.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Added separate MSI-X module parameters to selectively
enable / disable MSI-X interrupts for both Brocade HBA and CNA's.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (222 commits)
[SCSI] zfcp: Remove flag ZFCP_STATUS_FSFREQ_TMFUNCNOTSUPP
[SCSI] zfcp: Activate fc4s attributes for zfcp in FC transport class
[SCSI] zfcp: Block scsi_eh thread for rport state BLOCKED
[SCSI] zfcp: Update FSF error reporting
[SCSI] zfcp: Improve ELS ADISC handling
[SCSI] zfcp: Simplify handling of ct and els requests
[SCSI] zfcp: Remove ZFCP_DID_MASK
[SCSI] zfcp: Move WKA port to zfcp FC code
[SCSI] zfcp: Use common code definitions for FC CT structs
[SCSI] zfcp: Use common code definitions for FC ELS structs
[SCSI] zfcp: Update FCP protocol related code
[SCSI] zfcp: Dont fail SCSI commands when transitioning to blocked fc_rport
[SCSI] zfcp: Assign scheduled work to driver queue
[SCSI] zfcp: Remove STATUS_COMMON_REMOVE flag as it is not required anymore
[SCSI] zfcp: Implement module unloading
[SCSI] zfcp: Merge trace code for fsf requests in one function
[SCSI] zfcp: Access ports and units with container_of in sysfs code
[SCSI] zfcp: Remove suspend callback
[SCSI] zfcp: Remove global config_mutex
[SCSI] zfcp: Replace local reference counting with common kref
...
"Definition" is misspelled "defintion" in several comments; this
patch fixes them. No code changes.
Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
BFA_PORT_ROLE_FCP_IPFC is 0x04 so this always evaluates to true
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Jing Huang <huangj@Brocade.COM>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>