Age | Commit message (Collapse) | Author |
|
Add PBC port disable handling in BFA and return the appropriate status from
BFA APIs. In bfa_fcs_lport.c, handle OFFLINE event to avoid BFA_ASSERT.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
|
|
Add a max retry limit for PRLI retries. Max retry limit (5) is same as used
in rport PLOGI. Once the retries are exhausted, invoke rport offline so that
existing logic of rport re-discovery can kick-in. Also fixed a bug in rport.c
where one less retry was happening.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
|
|
When a rport goes offline, its speed setting was not reset. Subsequently, if
the rport was not deleted due to it coming back online within rport del
timeout, previously discovered speed would continue to show up. The fix is to
reset the speed when processing rport offline transition.
In rport attributes, rport's with unknown speed were indicated as TRL
enforced. The right thing do to would be to use TRL default speed to
determine if TRL is enforced, when TRL is enabled.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
|
|
Do not update the coalesce flag of the intr_attr struct in driver config area
on config response. This is to prevent the coalesce flag being reported as on
after an ioc disable/enable even if it was set to off before disable.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
|
|
Use standards defined 2 * RA_TOV as a timeout for ELS Request retries.
And standards defined 3 * RA_TOV as a timeout for FC-CT Request retries.
Also, added a check to send RPSC2 to a Brocade Fabric only.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
|
|
- Added time stamp for fcport stats reset
- Added new fileds to the statistics data structures.
- Typo removal and minor cleanup.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
|
|
This patch fixes the APIs to obtain ioc attributes
- fix API to obtain wwpn, wwnn, and mac.
- add API to get mfg wwpn, wwnn, and mac.
- fix API to obtain wwn of boot target.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
|
|
Vport state machine does not cleanup associated lport in some states: while
waiting for fdisc response or fdisc failure state. The fixe is to cleanup lport
on vport delete in all states. In fdisc state, discard fdisc response and
delete lport and wait for lport deletecompletion. in error state, delete lport
and wait for delete completion.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
|
|
This patch enables creating PBC vport.
During fcs init, fcs will read PBC vport using bfa iocfc API and invoke fcb
callback to add the pbc vport entries into a list. The pbc vport list will be
traversed in the subsequent pci probe process and vport will be created using
fc transport provided vport create function.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
|
|
The patch includes the driver side changes to enable basic PBC (PreBoot
Configuration) feature.
- Data structure changes and new definitions for PBC.
- APIs to access PBC info.
- Remove unused code.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
|
|
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>
|
|
Change sizeof(x) / sizeof(*x) to ARRAY_SIZE(x).
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
|
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
|
|
|
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
|
The port data structure related to fc_host statistics collection is
not initialized. This causes system crash when reading the fc_host
statistics. The fix is to initialize port structure during driver
attach.
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: (182 commits)
[SCSI] aacraid: add an ifdef'd device delete case instead of taking the device offline
[SCSI] aacraid: prohibit access to array container space
[SCSI] aacraid: add support for handling ATA pass-through commands.
[SCSI] aacraid: expose physical devices for models with newer firmware
[SCSI] aacraid: respond automatically to volumes added by config tool
[SCSI] fcoe: fix fcoe module ref counting
[SCSI] libfcoe: FIP Keep-Alive messages for VPorts are sent with incorrect port_id and wwn
[SCSI] libfcoe: Fix incorrect MAC address clearing
[SCSI] fcoe: fix a circular locking issue with rtnl and sysfs mutex
[SCSI] libfc: Move the port_id into lport
[SCSI] fcoe: move link speed checking into its own routine
[SCSI] libfc: Remove extra pointer check
[SCSI] libfc: Remove unused fc_get_host_port_type
[SCSI] fcoe: fixes wrong error exit in fcoe_create
[SCSI] libfc: set seq_id for incoming sequence
[SCSI] qla2xxx: Updates to ISP82xx support.
[SCSI] qla2xxx: Optionally disable target reset.
[SCSI] qla2xxx: ensure flash operation and host reset via sg_reset are mutually exclusive
[SCSI] qla2xxx: Silence bogus warning by gcc for wrap and did.
[SCSI] qla2xxx: T10 DIF support added.
...
|
|
Fix the compilation warning in powerpc. The same change also fixes endian
issue we found in powerpc test. This patch has been tested in x86 and
powerpc platform. it is created using scsi-misc-2.6.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
|
|
|
|
sg address in IO request is not set up correctly for big endian platform.
add new macros to properly swap the address.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
|
|
idr is a global resource, protect it with global bfad_mutex.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
|
|
Use pci_iomap() and pci_iounmap() to simplify the code. Remove uncessary #ifdef
check for ia64 (it was added as a workaound for some RHEL 5.x release which
doesn't export iounmap function)
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
|
|
Currently the driver doesn't take into consideraion of possible sg chaining
when it walks through the sg list. This is fixed by using the sg_next()
which automatically handles the chaining case. Obosolete code is removed
as a result of this change.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
|
|
Use duplicate fc transport template for physical and vitual port. Add
vport create/delete/disalbe functions in the transport template of physical
port. Changes to make the vport create/delete function to work under this
framework.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
|
|
The variable bfa_itnim is initialized twice to the same (side effect-free)
expression. Drop one initialization.
A simplified version of the semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)
// <smpl>
@forall@
idexpression *x;
identifier f!=ERR_PTR;
@@
x = f(...)
... when != x
(
x = f(...,<+...x...+>,...)
|
* x = f(...)
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Jing Huang <huangj@brocade.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
|
|
implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.
2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.
3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
|
|
[Ss]ytem => [Ss]ystem
udpate => update
paramters => parameters
orginal => original
Signed-off-by: Thomas Weber <swirl@gmx.li>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
|
Upgrade the upstream driver from 2.0.0.0 to 2.1.2.1.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
|
|
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
|
|
When IO is completed with underrun and with good SCSI status, check if
the transferred bytes against scsi_cmnd->underflow, which is set to
minimum number of bytes that must be transferred for this command, if
is less than required minimum, complete the IO with DID_ERROR.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
|
|
MS module did not invoke fdmi offline in all cases,
call fdmi offline when ms module receives a port offline,
so that fdmi offline is from one place in the ms module.
Make changes to handle 10G speed in the conversion routine.
Replaced the usage of bfa_adapter_attr_s struct with specific API's.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|