aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/bfa
AgeCommit message (Collapse)Author
2012-09-24[SCSI] bfa: Fix to process mbox interrupts only if interrupts are enabled in ↵Krishna Gudipati
INTx mode. - Made changes to process mbox and error interrupts only if interrupts are enabled, when running in INTx mode. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-09-24[SCSI] bfa: Add PowerPC support and enable PCIE AER handling.Krishna Gudipati
- Added few missing endian swap changes to support BFA on PowerPC. - Added PCIE AER support to BFA: a) Implemented the PCI error handler entry points. b) Made changes to FCS state machine to handle STOP event from the PCI error detected entry point. c) Made changes to the IO Controller state machine to handle SUSPEND event from the PCI error detected entry point. d) Made changes to restart the BFA operations on a slot_reset completion. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-09-24[SCSI] bfa: Add new hardware model info to sysfs model description routine.Krishna Gudipati
- 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>
2012-09-24[SCSI] bfa: Make changes to FCXP resource management.Krishna Gudipati
- Made changes to split FCXP resources as request and response resources. - The split will reduce the contention for FCXP resources in an open zone config. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-09-24[SCSI] bfa: FCS remote port enhancements.Krishna Gudipati
- 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>
2012-09-24[SCSI] bfa: Support vport symbolic name change from sysfs.Krishna Gudipati
- 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>
2012-09-01treewide: fix comment/printk/variable typosAnatol Pomozov
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-07-20[SCSI] bfa: Fix to set correct return error codes and misc cleanup.Krishna Gudipati
- Remove unnecessary if NULL check in function bfa_fcs_vport_free(). - Set correct return error codes in case of memory allocation failure in the BSG ELS/CT passthru command handler. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-07-20[SCSI] bfa: squelch lockdep complaint with a spin_lock_initKyle McMartin
Spotted this while looking at another issue... INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. Pid: 298, comm: udevd Not tainted 3.3.0 #1 Call Trace: [<ffffffff810cee63>] __lock_acquire+0x1363/0x1bb0 [<ffffffff816593d2>] ? __slab_alloc+0x4a0/0x4fd [<ffffffff81020063>] ? native_sched_clock+0x13/0x80 [<ffffffff810200d9>] ? sched_clock+0x9/0x10 [<ffffffff810cfd81>] lock_acquire+0xa1/0x1e0 [<ffffffffa0321b83>] ? bfa_fcs_lport_aen_post+0x43/0x160 [bfa] [<ffffffff816630e5>] _raw_spin_lock_irqsave+0x65/0xb0 [<ffffffffa0321b83>] ? bfa_fcs_lport_aen_post+0x43/0x160 [bfa] [<ffffffffa0321b83>] bfa_fcs_lport_aen_post+0x43/0x160 [bfa] [<ffffffffa032fa57>] bfa_fcs_lport_init+0x97/0x120 [bfa] [<ffffffffa031d4ff>] bfa_fcs_fabric_sm_uninit+0x1cf/0x250 [bfa] [<ffffffffa031c1da>] bfa_fcs_fabric_modinit+0x2a/0xb0 [bfa] [<ffffffffa031bef2>] ? bfa_fcs_fabric_attach+0xf2/0x170 [bfa] [<ffffffffa031e75a>] bfa_fcs_init+0x2a/0x40 [bfa] [<ffffffffa02facf7>] bfad_drv_init+0x107/0x1f0 [bfa] [<ffffffffa02fb057>] bfad_pci_probe+0x277/0x450 [bfa] [<ffffffff81354d4c>] local_pci_probe+0x5c/0xd0 [<ffffffff81354ed1>] pci_device_probe+0x111/0x120 [<ffffffff8141c0e6>] driver_probe_device+0x96/0x2f0 [<ffffffff8141c3eb>] __driver_attach+0xab/0xb0 [<ffffffff8141c340>] ? driver_probe_device+0x2f0/0x2f0 [<ffffffff8141a2e5>] bus_for_each_dev+0x55/0x90 [<ffffffffa037b000>] ? 0xffffffffa037afff [<ffffffff8141bbce>] driver_attach+0x1e/0x20 [<ffffffff8141b8d8>] bus_add_driver+0x1b8/0x2b0 [<ffffffffa037b000>] ? 0xffffffffa037afff [<ffffffff8141cbc7>] driver_register+0x77/0x160 [<ffffffffa037b000>] ? 0xffffffffa037afff [<ffffffff81353b23>] __pci_register_driver+0x73/0xf0 [<ffffffffa037b000>] ? 0xffffffffa037afff [<ffffffffa037b083>] bfad_init+0x83/0x1000 [bfa] [<ffffffff8100212a>] do_one_initcall+0x12a/0x180 [<ffffffff810df0d0>] sys_init_module+0xc0/0x220 [<ffffffff8166bbe9>] system_call_fastpath+0x16/0x1b Signed-off-by: Kyle McMartin <kmcmarti@redhat.com> Acked-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-07-20[SCSI] bfa: dereferencing freed memory in bfad_im_probe()Dan Carpenter
If bfad_thread_workq(bfad) was not BFA_STATUS_OK then we freed "im" and then dereferenced it. I did a little clean up because it seemed nicer to return directly instead of doing a superfluous goto. I looked at other functions in this file and it seems like returning directly is standard. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-07-20[SCSI] bfa: off by one in bfa_ioc_mbox_isr()Dan Carpenter
If mc == BFI_MC_MAX then we're reading past the end of the mod->mbhdlr[] array. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-05-22[SCSI] bfa: Fix to set vport FC host sysfs entriesKrishna Gudipati
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>
2012-04-25[SCSI] bfa: Fix bfa logging for Logical port state change notificationKrishna Gudipati
Made changes to have the same logging level for Logical port online and offline events, to display these events in pairs. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] bfa: sysfs model description fix.Krishna Gudipati
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>
2012-04-25[SCSI] bfa: Fix to defer vport delete handler invocation till firmware logo ↵Krishna Gudipati
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>
2012-03-28[SCSI] bfa: Update the driver version to 3.0.23.0Krishna Gudipati
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-28[SCSI] bfa: BSG and User interface fixes.Krishna Gudipati
Made changes to set the rport maxfrsize param to use a value that is equal to or less than the Buffer-to-Buffer Receive Data_Field size specified in the Common Service Parameters. Increased the diag memtest timeout for the Brocade-1860 adapters. Made changes to enable valid port speed configuration check for all adapters. Made changes to increase the max hw segments in a request, in order to support larger data transfers from user space. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-28[SCSI] bfa: Fix to avoid vport delete hang on request queue full scenario.Krishna Gudipati
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>
2012-03-28[SCSI] bfa: Move service parameter programming logic into firmware.Krishna Gudipati
Programming of the service parameters Tx credits etc., is now done in firmware. Remove the logic of sending the service parameters to firmware from driver. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-28[SCSI] bfa: Revised Fabric Assigned Address(FAA) feature implementation.Krishna Gudipati
Made changes to the Fabric Assigned Address(FAA) feature implementation. Introduced the IOCFC state machine, which now handles the FAA logic, IOC and BFA sub-modules enablement. Removed un-wanted FAA enable/disable routines; FAA is enabled by default. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-28[SCSI] bfa: Flash controller IOC pll init fixes.Krishna Gudipati
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>
2012-03-28[SCSI] bfa: Serialize the IOC hw semaphore unlock logic.Krishna Gudipati
Made changes to ensure only the function that comes first will execute the IOC hw semaphore unlock logic. Used IOC init sem register to serialize execution of the unlock logic. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-28[SCSI] bfa: Modify ISR to process pending completionsKrishna Gudipati
Made changes to the driver ISR to process any pending completions even if the RME bit is not set in the interrupt status register. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-28[SCSI] bfa: Add fc host issue lip supportKrishna Gudipati
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] bfa: Fix endian bug in bfad_iocmd_debug_fw_core().Santosh Nayak
Casting pointer from native data type to other type is endian-sensitive. "iocmd->offset" is 64 bit but we use only first 32 bit. It works in little-endian system but in big-endian system it will break. Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com> Acked-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] bfa: don't leak mem in bfad_im_bsg_els_ct_request()Jesper Juhl
If 'drv_fcxp = kzalloc(sizeof(struct bfad_fcxp), GFP_KERNEL);' fails and returns NULL, then we'll leak the memory allocated to 'bsg_fcpt' when we jump to 'out:' and the variable subsequently goes out of scope. Also remove the cast of the kzalloc() return value. kzalloc() returns a void* which is implicitly converted, so the explicit cast is pointless. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-01-10[SCSI] bfa: Implement LUN Masking feature using the SCSI Slave Callouts.Krishna Gudipati
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>
2012-01-10[SCSI] bfa: Revert back the current LUN Masking Implementation.Krishna Gudipati
This patch reverts the current LUN Masking Implementation. We re-implemented this feature using the SCSI Slave Callout's as per the review comments. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-01-10[SCSI] bfa: Fix possible NULL pointer dereference in lunmask add/delete.Krishna Gudipati
Patch fixes the possible NULL pointer dereference when we try to add or delete a rpwwn to the lunmask config which is not zoned to this port. Check if the FCS rport is not NULL before de-referencing it. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-01-10Merge tag 'scsi-misc' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 SCSI updates for post 3.2 merge window * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (67 commits) [SCSI] lpfc 8.3.28: Update driver version to 8.3.28 [SCSI] lpfc 8.3.28: Add Loopback support for SLI4 adapters [SCSI] lpfc 8.3.28: Critical Miscellaneous fixes [SCSI] Lpfc 8.3.28: FC and SCSI Discovery Fixes [SCSI] lpfc 8.3.28: Add support for ABTS failure handling [SCSI] lpfc 8.3.28: SLI fixes and added SLI4 support [SCSI] lpfc 8.3.28: Miscellaneous fixes in sysfs and mgmt interfaces [SCSI] mpt2sas: Removed redundant calling of _scsih_probe_devices() from _scsih_probe [SCSI] mac_scsi: Remove obsolete IRQ_FLG_* users [SCSI] qla4xxx: Update driver version to 5.02.00-k10 [SCSI] qla4xxx: check for FW alive before calling chip_reset [SCSI] qla4xxx: Fix qla4xxx_dump_buffer to dump buffer correctly [SCSI] qla4xxx: Fix the IDC locking mechanism [SCSI] qla4xxx: Wait for disable_acb before doing set_acb [SCSI] qla4xxx: Don't recover adapter if device state is FAILED [SCSI] qla4xxx: fix call trace on rmmod with ql4xdontresethba=1 [SCSI] qla4xxx: Fix CPU lockups when ql4xdontresethba set [SCSI] qla4xxx: Perform context resets in case of context failures. [SCSI] iscsi class: export pid of process that created [SCSI] mpt2sas: Remove unused duplicate diag_buffer_enable param ...
2012-01-03switch debugfs to umode_tAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-12-15[SCSI] bfa: fix endian and bit field check bugJing Huang
Fix some endian issue. __BIGENDIAN is not defined and it needs to be replaced with __BIG_ENDIAN. Also fixed a bug in bit field access. These two issues were reported by Dan Carpenter. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-12-15[SCSI] bfa: fix formating and checkpatch issuesJing Huang
Fixed code indentation and alignment issues. Fixed all checkpatch warnings. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-31scsi: Add export.h for EXPORT_SYMBOL/THIS_MODULE as requiredPaul Gortmaker
For the basic SCSI infrastructure files that are exporting symbols but not modules themselves, add in the basic export.h header file to allow the exports. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-09-15Merge branch 'master' into for-nextJiri Kosina
Fast-forward merge with Linus to be able to merge patches based on more recent version of the tree.
2011-09-15Remove unneeded version.h includes from drivers/scsi/Jesper Juhl
It was pointed out by 'make versioncheck' that some includes of linux/version.h are not needed in drivers/scsi/. This patch removes them. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-07-27[SCSI] bfa: Update the driver version to 3.0.2.2Krishna Gudipati
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Added support to configure lunmaskingKrishna Gudipati
- Added support to enable / disable lunmasking on Brocade adapter ports. - Added support to query / clear lunmasking configuration. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Introduced initiator based lun masking feature.Krishna Gudipati
- Added support to enable initiator based lun masking. - Initiator based Lun masking works similar to zoning where initiator port is allowed to see only those LUNs which are configured to be seen. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Add support to store driver configuration in flash.Krishna Gudipati
- Added dconf (Driver Config) BFA sub-module. - The dconf sub-module provides interfaces and manages flash writes to the flash DRV parition. - dconf sub-module also ensures that the whole 64K DRV partition is updated on a flash write. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Add support to collect / reset fabric stats.Krishna Gudipati
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Added support to configure QOS and collect stats.Krishna Gudipati
- Added support to configure QOS on Brocade adapter ports. - Added support to collect / reset QOS statistics. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Add support to configure trunking on Brocade adapter ports.Krishna Gudipati
- Added logic to enable / disable trunking on Brocade adapter ports. - Added logic to query trunking info. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Add support to configure and query flash boot partitionKrishna Gudipati
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Added support to collect and reset fcport statsKrishna Gudipati
- Added support to collect and reset fcport stats. - Modified design to allow multiple requests for fcport stats. - fcport will remember the stats request in its stats_pending queue and service each of the queued requests after receiving a firmware response for the prior request. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Add support for IO profiling.Krishna Gudipati
- Made changes to support IO profiling. - Added support to configure and query IO profiling info. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Extend BSG to support more user commandsKrishna Gudipati
Extended BSG to support stats, port log and trace reset and to support adapter, port SET operations. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Check supported speed based on port modeKrishna Gudipati
Added logic to check the loopback test input speed based on port mode. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Update RME interrupt handling.Krishna Gudipati
- Made changes to always acknowledge RME interrupt and update consumer index (CI) when RME interrupt is generated. - Made changes to have ASIC specific hw_rspq_ack() handler. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: use negative error return values in all functionsKrishna Gudipati
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>