History log of /drivers/scsi/bfa/bfad_attr.c
Revision Date Author Comments
22a08538dca5c0630226f1c0c58dccd12e463d22 21-Nov-2013 Vijaya Mohan Guvva <vmohan@brocade.com> [SCSI] bfa: Fix crash when symb name set for offline vport

This patch fixes a crash when tried setting symbolic name for an offline
vport through sysfs. Crash is due to uninitialized pointer lport->ns,
which gets initialized only on linkup (port online).

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
4dde506944f8ea3431bf4a250c13621c8f3939bb 13-May-2013 Vijaya Mohan Guvva <vmohan@brocade.com> [SCSI] bfa: dis-associate bfa path_tov with dev_loss_tmo

Disassoicate path_tov in the driver with the dev_loss_tmo set by the
application.

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
6dca60a387a6dd1317aa8c690cba74a5bdfde465 23-Aug-2012 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: Add new hardware model info to sysfs model description routine.

- Added new hardware model Brocade-1867 information to
sysfs model description routine.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
ee1a4a42f6198c2b6e7c9fba6a952d1f4f89d627 23-Aug-2012 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: FCS remote port enhancements.

- Introduced rport qualifier structure and modified design to
export remote ports with valid pid or valid pwwn to the user space.
- Introduced old_pid field in the rport structure and made changes to
prevent re-creating a new remote port for an already existing rport
that is transitioning to a delete state. (Happens if we receive a RSCN
on the existing remote port that is getting deleted).

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
ebfe83921bd860e0b28a1a74e90be57baf2c8255 23-Aug-2012 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: Support vport symbolic name change from sysfs.

- Implemented the FC function template set_vport_symbolic_name entry
point to modify the vport symbolic name from sysfs.
- Implemented support to send RSPN_ID to switch to register the
modified vport symbolic name.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
6192bd7cdc37e2df9391403235b72668a5bf27da 12-May-2012 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: Fix to set vport FC host sysfs entries

Made changes to set the fc_host sysfs entries supported_speeds,
supported_classes etc., during the vport creation from the
FC transport template.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
9d8ad782b9b5163351427ba0bcaa984aea474030 10-Apr-2012 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: sysfs model description fix.

Make changes to remove unsupported model numbers from the sysfs
model description routine.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
17c201b3281cfc2c7d7ecfabb33313b747e414cb 10-Apr-2012 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: Fix to defer vport delete handler invocation till firmware logo response.

Made changes to avoid queuing the vport delete work to IM driver
work queue in the bfa_fcb_lport_delete() - since at this stage we
are not completely done with using the vport structure as we are
still waiting for the LOGO response from the fw in online state or
just doing some cleanup. Since queuing up the vport delete work at
this stage will result in the FC transport layer to clean up the vport
before we get the response from firmware.
Made changes to queue the port delete work to the IM driver work queue -
from the bfa_fcs_vport_free() function since at this state we are done
with using the vport data structure and the FCS state machine is completely
cleaned up.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
ff179e0f4a4da030df52c0632b0615e9a13b5e66 14-Mar-2012 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: Fix to avoid vport delete hang on request queue full scenario.

Fixed the LPS (Logical Port Services) state machine to send a
FDISC/FLOGI to the FW from the request queue wait state, when
there is space available again on the request queue.
Made changes to free the vport on LOGO/cleanup complete instead
of free'ing it from vport_delete_handler in the module unload scenario.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
acea241510b068b0a92a0e023915aeeaf1065866 14-Mar-2012 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: Add fc host issue lip support

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
5b7db7af522d9f281ff8bf540d2b5cbea2206b27 21-Dec-2011 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: Implement LUN Masking feature using the SCSI Slave Callouts.

This patch re-implements LUN Masking feature using SCSI Slave Callouts. With
the new design in the slave_alloc entry point; for each new LUN discovered we
check with our internal LUN Masking config whether to expose or to mask this
particular LUN. We return -ENXIO (No such device or address) from slave_alloc
for the LUNs we don't want to be exposed. We also notify the SCSI mid-layer
to do a sequential LUN scan rather than REPORT_LUNS based scan if LUN masking
is enabled on our HBA port, since a -ENXIO from any LUN in REPORT_LUNS based
scan translates to a scan abort. This patch also handles the dynamic lun
masking config change from enable to disable or vice-versa by resetting
sdev_bflags of LUN 0 appropriately.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
b85daafe46eeb0a9ad32c4b2c3a4e09ffcae9599 14-Jun-2011 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: Add BSG interface to support ELS, CT and vendor commands.

- Added BSG interface support to BFA driver
- Adds support to send ELS/CT FC passthru commands and
few vendor specific BSG requests.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
75332a70a84908810ab5f525b03f230be9e31753 14-Jun-2011 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: Driver initialization and model description fix

- Moved FCS initialization, which internally does the im_port creation
as well as the scsi_host creation before bfa_init.

Once the bfa_init is complete & successful:
- Reset the FCS base port cfg params such as pwwn/nwwn and setup fc host
params - based on the values learned during the ioc getattr request.
- Change needed to support BSG commands even on bfa init failure.
- Model description fixes for Brocade adapters.

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>
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>
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>
ba816ea8e2eacbf3d198ad1859f413c2d6213434 19-Oct-2010 Jing Huang <huangj@brocade.com> [SCSI] bfa: replace endian swap macros with the ones provided by linux

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>
c54d557c3f6a7bbf833a8f9cffad88f34513a7c4 09-Jul-2010 Jing Huang <huangj@brocade.com> [SCSI] bfa: vport fixes

This patch fixes 3 bugs in vport create/delete.
1) Replace scsi_add_host() with scsi_add_host_with_dma()
2) Fix rmmod hang when there are vports configured. This is due to a race
condition between the workqueue destroy in pci remove context and the vport
delete works being handled. The fix is to use a counter to track the
vport delete work, so that workqueue destroy will not be called until all
configured vports are deleted from workqueue.
3) Fix rmmmod crash when there are PBC vport configured. PBC is not allowed
to be deleted dynamically. However, if someone try to delete it, it leaves the
vport is wrong state. The fix is to restore the vport back to original state
when the attempt to delete pbc vport delete is failed.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
d9883548a0b0afec4786e6c5cd8d03d43a30b779 09-Jul-2010 Jing Huang <huangj@brocade.com> [SCSI] bfa: PBC vport create

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>
b504293fe9dc42917a919044f2b672fb361329d0 19-Mar-2010 Jing Huang <huangj@brocade.com> [SCSI] bfa: add fc transport class based vport create/delete

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>
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking 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>
ca8b4327e405820966971236224db0e0724b5673 06-Mar-2010 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: Modified the portstats get/clear logic

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>
0a4b1fc0b24fc7adbaf8413f2992ce1395991a78 06-Mar-2010 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: Replace bfa_get_attr() with specific APIs

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>
1c8a4c37494932acd59079b4fc8d8f69fb329c2a 06-Mar-2010 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: Rename pport to fcport in BFA FCS.

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>
4c147dd81966bd4ba7f026476237ba67ea72d5d9 04-Mar-2010 Krishna Gudipati <kgudipat@brocade.com> [SCSI] bfa: Added separate MSI-X module parameters.

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>
7725ccfda59715ecf8f99e3b520a0b84cc2ea79e 24-Sep-2009 Jing Huang <huangj@brocade.com> [SCSI] bfa: Brocade BFA FC SCSI driver

Add new driver for Brocade Hardware

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>