Dan Carpenter [Thu, 15 Jul 2010 08:20:19 +0000 (10:20 +0200)]
[SCSI] dpt_i2o: move range check forward
The check to test that "bus_no" was valid came after we had already used
it as an array offset. This patch moves it forward.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
James Smart [Wed, 14 Jul 2010 19:32:40 +0000 (15:32 -0400)]
[SCSI] lpfc 8.3.15: Update driver version 8.3.15
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
James Smart [Wed, 14 Jul 2010 19:32:10 +0000 (15:32 -0400)]
[SCSI] lpfc 8.3.15: Add target queue depth throttling
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
James Smart [Wed, 14 Jul 2010 19:31:37 +0000 (15:31 -0400)]
[SCSI] lpfc 8.3.15: FCoE Related Fixes
FCoE Related Fixes
- Correct find-next-FCF routine so that it searches at next FCF rather
than current one.
- Enhanced round-robin FCF failover algorithm to re-start on "New FCF"
async event
- Update the manner in which we look at FCFs while they may be in
their discovery state.
- Use LPFC_FCOE_NULL_VID macro when checkinf for valid vlan_id for FCF
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
James Smart [Wed, 14 Jul 2010 19:30:54 +0000 (15:30 -0400)]
[SCSI] lpfc 8.3.15: BSG, Discovery, and Misc fixes
- BSG interface related:
- Fix node reference count if node is active
- Warn if we're overwriting an active CT context
- Discovery related:
- Clear "Ignore Reg Login" flag when purging mailbox queue
- Pay attention to return code for fc_block_scsi_eh()
- Stall device loss code if we're almost done when it fires
(we're logged in, but PRLI is outstanding)
- Bugs
- Correct DIF code for endianness issues
- Correct where we had missed points to check txq on i/o
completion/cleanup
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Wayne Boyer [Wed, 14 Jul 2010 17:50:14 +0000 (10:50 -0700)]
[SCSI] ipr: fix resource type update and add sdev and shost attributes
Setting the resource type in the ipr_update_res_entry function was incorrect in
that the top 4 bits were masked off. The assignment has been updated to no
longer mask those bits.
Then, two new attributes were added to allow the user space utilities to more
easily get information. The resource_type sdev attribute is set for all devices
in the adapter's configuration table and indicates the type of device. The
fw_type shost attribute indicates the firmware type supported by the adapter.
Finally, the resource_path attribute was changed to be mode S_IRUGO.
Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Wayne Boyer [Wed, 14 Jul 2010 17:49:43 +0000 (10:49 -0700)]
[SCSI] ipr: fix transition to operational for new adapters
The method of transitioning to operational for new adapters includes using
initialization stages. The current stage is indicated via a register read.
The final good stage in the sequence is "operational" but does not necessarily
indicate that the driver can proceed. There is another bit that gets set in the
adapter->host interrupt register when the adapter has completed enough of its
bringup such that it can accept commands. The driver was not checking that
bit before proceeding which led to intermittent errors and adapter resets.
The fix is to check the "transition to operational" bit in the interrupt
register after detecting that the initialization stage is "operational" and
only proceed if both are set.
Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Randy Dunlap [Tue, 4 May 2010 17:29:52 +0000 (10:29 -0700)]
[SCSI] scsi: add Kconfig dependency on NET
be2iscsi driver should #include linux/if_ether.h since it uses
sysfs_format_mac().
It should also depend on NET since it selects SCSI_ISCSI_ATTRS,
which depends on NET.
These changes fix a build error when CONFIG_NET is not enabled:
ERROR: "sysfs_format_mac" [drivers/scsi/be2iscsi/be2iscsi.ko] undefined!
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jayamohan Kallickal [Wed, 21 Jul 2010 22:58:13 +0000 (04:28 +0530)]
[SCSI] be2iscsi: The extended shift must be 16
Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jayamohan Kallickal [Wed, 21 Jul 2010 22:57:47 +0000 (04:27 +0530)]
[SCSI] be2iscsi: Fix for premature buffer free
This patch fixes a bug where the buffer was being freed as soon as
submission to HW is done.
Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jayamohan Kallickal [Wed, 21 Jul 2010 22:57:16 +0000 (04:27 +0530)]
[SCSI] be2iscsi: Remove debug print in IO path
This patch removes a Debug Print in the IO path
Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jayamohan Kallickal [Wed, 21 Jul 2010 22:56:45 +0000 (04:26 +0530)]
[SCSI] be2iscsi: Limit max_xmit_length
This patch limits max_xmit_length to 64K incase older
utilities are used
Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jayamohan Kallickal [Wed, 21 Jul 2010 22:55:40 +0000 (04:25 +0530)]
[SCSI] be2iscsi: Maintain same ITT across login
This patch ensures that the same ITT is maintained across
all login pdu's
Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jayamohan Kallickal [Wed, 21 Jul 2010 22:54:53 +0000 (04:24 +0530)]
[SCSI] be2iscsi: Adding crashdump support
These changes allow the driver to support crashdump. We need to reset the
chip incase of a crashdump
Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jayamohan Kallickal [Wed, 21 Jul 2010 22:54:22 +0000 (04:24 +0530)]
[SCSI] be2iscsi: Free tags allocated
This patch frees tags that are already allocated in case of
failure
Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jayamohan Kallickal [Wed, 21 Jul 2010 22:53:55 +0000 (04:23 +0530)]
[SCSI] be2iscsi: Fix to handle request_irq failure
This patch handles request_irq failures by properly cleaning up
Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jayamohan Kallickal [Wed, 21 Jul 2010 22:53:22 +0000 (04:23 +0530)]
[SCSI] be2iscsi: No return value for hwi_enable_intr
hwi_enable_intr need not return any value. This patch fixes the
that and removes code designed to handle a failure return value
Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jayamohan Kallickal [Wed, 21 Jul 2010 22:52:27 +0000 (04:22 +0530)]
[SCSI] be2iscsi: Fix for freeing cid
This patch frees up the allocated cid and returns error if allocation
of tag fails.
Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jayamohan Kallickal [Wed, 21 Jul 2010 22:48:01 +0000 (04:18 +0530)]
[SCSI] be2iscsi: pass the return from beiscsi_open_conn
This patch passes on the value returned by
beiscsi_open_conn
Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jayamohan Kallickal [Wed, 21 Jul 2010 22:47:16 +0000 (04:17 +0530)]
[SCSI] be2iscsi: Fixing the return type of functions
Fixing some functions return values that did not match with
the possible return values
Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jayamohan Kallickal [Wed, 21 Jul 2010 22:46:38 +0000 (04:16 +0530)]
[SCSI] be2iscsi: Fixing return values
This patch fixes the return values as per comment from Mike Christie
Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jayamohan Kallickal [Wed, 21 Jul 2010 22:46:00 +0000 (04:16 +0530)]
[SCSI] be2iscsi: Fix warnings from new checkpatch.pl
The latest checkpatch.pl throws some new warnings. Fixing it
to get rid of a bunch of warnings
Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
James Bottomley [Tue, 27 Jul 2010 17:30:24 +0000 (12:30 -0500)]
[SCSI] arcmsr: fix up bin_attr functions
Commit
commit
2c3c8bea608866d8bd9dcf92657d57fdcac011c5
Author: Chris Wright <chrisw@sous-sol.org>
Date: Wed May 12 18:28:57 2010 -0700
sysfs: add struct file* to bin_attr callbacks
Added an extra struct file * parameter at the beginning, which the
arcmsr binary attribute additions didn't have. Fix this to prevent
nasty crashes.
Cc: Nick Cheng <nick.cheng@areca.com.tw>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Pekka Enberg [Wed, 14 Jul 2010 10:12:57 +0000 (13:12 +0300)]
[SCSI] aic7xxx: Remove OS utility wrappers
This patch removes malloc(), free(), and printf() wrappers from the aic7xxx
SCSI driver. I didn't use pr_debug for printf because of some 'clever' uses of
printf don't compile with the pr_debug. I didn't fix the overeager uses of
GFP_ATOMIC either because I wanted to keep this patch as simple as possible.
[jejb:fixed up checkpatch errors and fixed up missed conversion]
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Cyril Jayaprakash [Sun, 11 Jul 2010 19:12:00 +0000 (00:42 +0530)]
[SCSI] pmcraid : Remove unnecessary casts for void * pointers
Signed-off-by: Cyril Jayaprakash <cyril.jayaprakash@gmail.com>
Acked-by: Anil Ravindranath <anil_ravindranath@pmc-sierra.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Vikas Chaudhary [Sat, 10 Jul 2010 09:21:47 +0000 (14:51 +0530)]
[SCSI] qla4xxx: Update driver version to 5.02.00-k2
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Vikas Chaudhary [Sat, 10 Jul 2010 09:21:30 +0000 (14:51 +0530)]
[SCSI] iscsi_transport: added new iscsi_param to display target alias in sysfs
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Karen Higgins [Sat, 10 Jul 2010 09:21:17 +0000 (14:51 +0530)]
[SCSI] qla4xxx: wait for device_ready before device discovery
Signed-off-by: Karen Higgins <karen.higgins@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Vikas Chaudhary [Sat, 10 Jul 2010 09:21:02 +0000 (14:51 +0530)]
[SCSI] qla4xxx: replace all dev_info, dev_warn, dev_err with ql4_printk
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Vikas Chaudhary [Wed, 28 Jul 2010 10:23:44 +0000 (15:53 +0530)]
[SCSI] qla4xxx: Added support for ISP82XX
Signed-off-by: Vikas Chaudhary <Vikas Chaudhary@qlogic.com>
Signed-off-by: Karen Higgins <karen.higgins@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Ravi Anand [Sat, 10 Jul 2010 09:20:32 +0000 (14:50 +0530)]
[SCSI] qla4xxx: Handle one H/W Interrupt at a time
Handle one H/W Interrupt at a time to prevent holding off H/W lock
for longer period of time.
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Prasanna Mumbai [Sat, 10 Jul 2010 09:19:38 +0000 (14:49 +0530)]
[SCSI] qla4xxx: Fix the freeing of the buffer allocated for DMA
Fixed the DMA allocated memory freeing which wasn't taken care
in many cases.
Signed-off-by: Prasanna Mumbai <prasanna.mumbai@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Vikas Chaudhary [Sat, 10 Jul 2010 09:19:19 +0000 (14:49 +0530)]
[SCSI] qla4xxx: correct return status in function qla4xxx_fw_ready
Handle fw_state "auto discovery in progress" correctly
to avoid marking adapter as offline.
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Vikas Chaudhary [Sat, 10 Jul 2010 09:19:01 +0000 (14:49 +0530)]
[SCSI] qla4xxx: unblock iscsi session after setting ddb state online.
Once the device goes *missing*, driver blocks the session
ie iscsi_block_session() to stall the I/O. So after device
comes back *online*, driver needs to unblock the session ie
iscsi_unblock_session(), else I/Os will fail even if
ddb_state is ONLINE.
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Vikas Chaudhary [Sat, 10 Jul 2010 09:18:36 +0000 (14:48 +0530)]
[SCSI] qla4xxx: set driver ddb state correctly in process_ddb_changed
If fw ddb state is ACTIVE mark driver ddb stat as ONLINE and
unblock iscsi session.
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jing Huang [Fri, 9 Jul 2010 03:02:55 +0000 (20:02 -0700)]
[SCSI] bfa: add debugfs support
- Add debugfs support to obtain firmware trace, driver trace
and read/write to registers.
- debugfs hierarchy:
/sys/kernel/debug/bfa/host#
where the host number corresponds to the one under /sys/class/scsi_host/host#
- Following are the new debugfs entries added:
drvtrc: collect current driver trace
fwtrc: collect current firmware trace.
fwsave: collect last saved fw trace as a result of firmware crash.
regwr: write one word to chip register
regrd: read one or more words from chip register.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jing Huang [Fri, 9 Jul 2010 03:02:31 +0000 (20:02 -0700)]
[SCSI] bfa: update driver version string
Update driver version to 2.2.2.1
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jing Huang [Fri, 9 Jul 2010 03:01:49 +0000 (20:01 -0700)]
[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>
Jing Huang [Fri, 9 Jul 2010 03:01:07 +0000 (20:01 -0700)]
[SCSI] bfa: fix wrong arg to callback
This patch fixes the issue of passing wrong argument to callback function.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jing Huang [Fri, 9 Jul 2010 03:00:24 +0000 (20:00 -0700)]
[SCSI] bfa: add ioc state checking
This patch adds ioc state checking while enabling a port.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jing Huang [Fri, 9 Jul 2010 02:59:49 +0000 (19:59 -0700)]
[SCSI] bfa: add description for module parameters
Add description for bfa driver module parameters.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jing Huang [Fri, 9 Jul 2010 02:59:24 +0000 (19:59 -0700)]
[SCSI] bfa: update to support BOFM
Update bfa driver API and data structure to support BOFM (IBM BladeCenter
Open Fabric Manager).
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jing Huang [Fri, 9 Jul 2010 02:58:45 +0000 (19:58 -0700)]
[SCSI] bfa: fix possible IO double completion
While processing the ioim in callback functions, the ioim is still in io_q.
During this time, if the itnim goes offline, the ioim is requeued from
itnim->io_q into itnim->delay_comp_q although the request is already completed.
This results in requeing the ioim into the callback queue if the ioim is not
freed by the time the ioim is requeued. This results in double completion of
the ioim. To fix this, whenever a response is received from firmware for an
ioim, deque it from io_q and enque to fcpim->comp_q. This will eliminate any
possibility of itnim picking any ioim for which the response is already
received.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jing Huang [Fri, 9 Jul 2010 02:58:01 +0000 (19:58 -0700)]
[SCSI] bfa: fix link state structure
When the FCoE Linkup event is sent to the host, the link_state
(struct bfa_pport_link_s) structure is copied to the RME buf to be sent to
the host. But the size of this structure(164 bytes) is larger than the
reserved RME buffer size(128 byes). The following changes reduce the size
of the structure to be less than RME buffer size(128 bytes):
- Remove the trunk and loop info from link_state structure, because both trunk
and loop are not supported.
- Combine qos_vc_attr and fcf into an union.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jing Huang [Fri, 9 Jul 2010 02:57:33 +0000 (19:57 -0700)]
[SCSI] bfa: add dynamic queue selection
Add new bfa functionality to support dynamic queue selection (IO redirection).
IO redirection can only be enabled when QoS is disabled.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jing Huang [Fri, 9 Jul 2010 02:55:41 +0000 (19:55 -0700)]
[SCSI] bfa: fix uf post and rport fcpim state machine
BFA UF module did not hold lock when seding uf post buffer message to firmware
causing CPE-Q corruption. Fix is to check present of FCS and if FCS present
hold lock while posting UF buffers.
Handle PRLO with sending acc to it and relogin with rport. Discard fcxp
before any state change.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jing Huang [Fri, 9 Jul 2010 02:54:39 +0000 (19:54 -0700)]
[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>
Jing Huang [Fri, 9 Jul 2010 02:53:40 +0000 (19:53 -0700)]
[SCSI] bfa: update to support firmware configuation
Update related data structures to support firmeare configuration.
Add AEN events related to firmware configuation.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jing Huang [Fri, 9 Jul 2010 02:52:46 +0000 (19:52 -0700)]
[SCSI] bfa: add PBC port disable handling
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>
Jing Huang [Fri, 9 Jul 2010 02:52:00 +0000 (19:52 -0700)]
[SCSI] bfa: fix prli retry issues
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>
Jing Huang [Fri, 9 Jul 2010 02:51:28 +0000 (19:51 -0700)]
[SCSI] bfa: fix rport speed setting
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>
Jing Huang [Fri, 9 Jul 2010 02:50:38 +0000 (19:50 -0700)]
[SCSI] bfa: fix interrupt coalescing setting
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>
Jing Huang [Fri, 9 Jul 2010 02:50:15 +0000 (19:50 -0700)]
[SCSI] bfa: use standards defined timeout for ELS/CT
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>
Jing Huang [Fri, 9 Jul 2010 02:48:49 +0000 (19:48 -0700)]
[SCSI] bfa: statistics and typo fix
- 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>
Jing Huang [Fri, 9 Jul 2010 02:48:12 +0000 (19:48 -0700)]
[SCSI] bfa: ioc attributes fix
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>
Jing Huang [Fri, 9 Jul 2010 02:47:08 +0000 (19:47 -0700)]
[SCSI] bfa: vport state machine fix
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>
Jing Huang [Fri, 9 Jul 2010 02:46:26 +0000 (19:46 -0700)]
[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>
Jing Huang [Fri, 9 Jul 2010 02:45:56 +0000 (19:45 -0700)]
[SCSI] bfa: enable basic PBC support
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>
Jing Huang [Fri, 9 Jul 2010 02:45:20 +0000 (19:45 -0700)]
[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>
Eric Moore [Thu, 8 Jul 2010 20:44:34 +0000 (14:44 -0600)]
[SCSI] mpt2sas: driver fails to recover from injected PCIe bus errors
fixes surrounding PCIe enhanced error handling:
(1) We need to reject all request generated internaly inside the driver as well
as request arriving from the scsi mid layer when PCIe EEH is active. The fix is
to add a per adapter flag called pci_error_recovery which is checked thru out
the driver when request are generated.
(2) We don't need to call the pci_driver->remove directly from the PCIe
callbacks becuase its already called from the PCIe EEH code. In its place we are
shutting down the watchdog timer, and flushing back all pending IO.
(3) We need to save and restore the pci state across PCIe EEH handling.
Signed-off-by: Eric Moore <eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Eddie Wai [Thu, 1 Jul 2010 22:34:56 +0000 (15:34 -0700)]
[SCSI] bnx2i: Updated version from 2.1.1 to 2.1.2
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Michael Chan [Thu, 1 Jul 2010 22:34:55 +0000 (15:34 -0700)]
[SCSI] bnx2i: Added host param ISCSI_HOST_PARAM_IPADDRESS
This sysfs attribute is proven to be useful during pivot_root.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Acked-by: Anil Veerabhadrappa <anilgv@broadcom.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Eddie Wai [Thu, 1 Jul 2010 22:34:54 +0000 (15:34 -0700)]
[SCSI] bnx2i: Fixed the TCP graceful termination initiation
In compliance to RFC793, a TCP graceful termination will be used
instead of an abortive termination for the case where the remote
has initiated the close of the connection.
Additionally, a TCP abortive termination will be used to close the
connection when a logout response is not received in time after a
logout request has been initiated.
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Acked-by: Anil Veerabhadrappa <anilgv@broadcom.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Eddie Wai [Thu, 1 Jul 2010 22:34:53 +0000 (15:34 -0700)]
[SCSI] bnx2i: Fine tuned conn destroy and context destroy timeout values
Added variables to separate the fine tuned timeout values for
connection destroy and context destroy for both 1g and 10g devices.
v2: Extended the 5771X disconnect timeout from 10s to 20s as the firmware
has a retransmission timeout of 16s. This fixes one of the iscsi_endpoint
leak issues when the target is slow or non-responsive to our TCP FIN.
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Acked-by: Anil Veerabhadrappa <anilgv@broadcom.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Eddie Wai [Thu, 1 Jul 2010 22:34:52 +0000 (15:34 -0700)]
[SCSI] bnx2i: Optimized the bnx2i_stop connection clean up procedure
For cases where the iSCSI disconnection procedure times out due to
the iSCSI daemon being slow or unresponsive, the bnx2i_stop routine
will now perform hardware cleanup via bnx2i_hw_ep_disconnect on all
active endpoints so that subsequent operations will perform properly.
Also moved the mutex locks inside ep_connect and ep_disconnect so
that proper exclusivity can resolve simultaneous calls to the
ep_disconnect routine.
v2: Removed the unnecessary read lock in the bnx2i_stop
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Acked-by: Anil Veerabhadrappa <anilgv@broadcom.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Eddie Wai [Thu, 1 Jul 2010 22:34:51 +0000 (15:34 -0700)]
[SCSI] bnx2i: Created an active linklist which holds bnx2i endpoints
This introduces a new active linklist which would link up all active
bnx2i_endpoints. This will be used by subsequent patches that
follows.
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Acked-by: Anil Veerabhadrappa <anilgv@broadcom.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Eddie Wai [Thu, 1 Jul 2010 22:34:50 +0000 (15:34 -0700)]
[SCSI] bnx2i: Separated the hardware's cleanup procedure from ep_disconnect
This patch introduces a new bnx2i_hw_ep_disconnect routine which
contains all chip related disconnect and clean up procedure of
iSCSI offload connections. This separation is intended as a
preparation for the subsequent bnx2i_stop patch.
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: Anil Veerabhadrappa <anilgv@broadcom.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
FUJITA Tomonori [Sun, 27 Jun 2010 16:04:45 +0000 (01:04 +0900)]
[SCSI] scsi_debug: fix map_region and unmap_region oops
map_region and unmap_region could access to invalid memory area since
they don't check the size boundary.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Wayne Boyer [Fri, 25 Jun 2010 00:00:59 +0000 (17:00 -0700)]
[SCSI] ipr: change endian swap key to match hardware spec change
The value used to change the endian representation on the new adapters has
changed. This patch updates that value.
Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Wayne Boyer [Thu, 24 Jun 2010 20:34:14 +0000 (13:34 -0700)]
[SCSI] ipr: add support for new Obsidian-E embedded adapter
This patch allows the driver to recognize a new Obsidian-E based adapter that
uses a new subsystem ID.
This patch also fixes a few tab/space problems.
Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Jiri Slaby [Tue, 22 Jun 2010 11:42:02 +0000 (13:42 +0200)]
[SCSI] mvsas: fix potential NULL dereference
Stanse found that in mvs_abort_task, mvi_dev is dereferenced earlier
than tested for being NULL. Move the assignment below the test.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Kei Tokunaga [Tue, 22 Jun 2010 10:01:51 +0000 (19:01 +0900)]
[SCSI] mptfusion: print Doorbell register in a case of hard reset and timeout
Printing Doorbell register in a case of hard reset and timeout
should be useful for figuring out the state of the system.
Signed-off-by: Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Acked-by: "Desai, Kashyap" <Kashyap.Desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Justin P. Mattock [Fri, 18 Jun 2010 20:16:07 +0000 (13:16 -0700)]
[SCSI] scsi:hosts.c Fix warning: variable 'rval' set but not used
The below patch fixes a warning message generated by gcc 4.6.0
CC drivers/scsi/hosts.o
drivers/scsi/hosts.c: In function 'scsi_host_alloc':
drivers/scsi/hosts.c:328:6: warning: variable 'rval' set but not used
Fix this by removing the rval but placing a printk warning where it
would have been set.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Mike Christie [Sun, 25 Apr 2010 12:03:57 +0000 (07:03 -0500)]
[SCSI] Log msg when getting Unit Attention
If the user accidentally changes LUN mappings or it occurs
due to a bug, then it can cause data corruption that can take
months and months to track down. This patch adds a log
message when getting REPORT_LUNS_DATA_CHANGED and it adds
a generic message for other Unit Attentions with asc == 0x3f.
We are working on adding support for handling of these errors,
but I think until then we should at least log a message so
tracking down problems as a result of one of these changes
is a little easier.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Kei Tokunaga [Wed, 7 Apr 2010 10:17:24 +0000 (19:17 +0900)]
[SCSI] mptsas: fixed hot-removal processing
This patch fixes mptsas disk hot-removal processing. The
hot-removal processing doesn't complete because of this condition.
drivers/message/fusion/mptsas.c:
mptsas_taskmgmt_complete()
if ((mptsas_find_vtarget(ioc, channel, id)) && !ioc->fw_events_off)
mptsas_queue_device_delete(...);
mptsas_queue_device_delete(), which must be called for
hot-removal, never gets called because mptsas_find_vtarget()
always returns 0 here. At that time, the vtarget has already
been freed in mptsas_target_destroy(), and also the scsi_device
has been marked as SDEV_DEL.
As a result of the issue, port deletion functions won't get
called and the device ends up being in an incomplete state.
(Some data structures and sysfs entries, which should be
removed in hot-removal, remain.) One side effect of this is
that a hot-addition of the device (bringing the device back
on) fails.
This patch just removes mptsas_find_vtarget() from the if-state
condition.
Signed-off-by: Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Acked-by: "Desai, Kashyap" <Kashyap.Desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Wayne Boyer [Thu, 17 Jun 2010 18:51:40 +0000 (11:51 -0700)]
[SCSI] ipr: add MMIO write to perform BIST for 64 bit adapters
The 64 bit chip used in new adapters does not properly support the BIST register
in PCI config space. This patch implements an alternative MMIO write reset
method.
Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Nick Cheng [Tue, 13 Jul 2010 12:03:04 +0000 (20:03 +0800)]
[SCSI] SCSI: Support Type C RAID controller
1. To support Type C RAID controller, ACB_ADAPTER_TYPE_C, i.e. PCI device
ID: 0x1880.
Signed-off-by: Nick Cheng< nick.cheng@areca.com.tw >
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
James Bottomley [Fri, 12 Mar 2010 22:14:42 +0000 (16:14 -0600)]
[SCSI] enclosure: fix error path - actually return ERR_PTR() on error
we also need to clean up and free the cdev.
Reported-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Brian King [Thu, 17 Jun 2010 18:56:04 +0000 (13:56 -0500)]
[SCSI] ibmvscsi: Driver version 1.5.9
Bump driver version
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Brian King [Thu, 17 Jun 2010 18:56:03 +0000 (13:56 -0500)]
[SCSI] ibmvscsi: Fix possible request_limit issue
If we encounter an error when sending a management datagram (i.e. non
SCSI command, such as virtual adapter initialization command), we
end up incrementing the request_limit, even though we don't decrement
it for these commands. Fix this up by doing this increment in
the error path for SRP commands only.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Brian King [Thu, 17 Jun 2010 18:56:02 +0000 (13:56 -0500)]
[SCSI] ibmvscsi: Fix error path deadlock
Fixes a deadlock that can occur if we hit a command timeout
during the virtual adapter initialization. The event done
functions are written with the assumption that no locks are held,
however, when purging requests this is not true. Fix up the
purge function to drop the lock so that the done function
is not called with the lock held, which can cause a deadlock.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Brian King [Thu, 17 Jun 2010 18:56:00 +0000 (13:56 -0500)]
[SCSI] ibmvscsi: Fix softlockup on resume
This fixes a softlockup seen on resume. During resume, the CRQ
must be reenabled. However, the H_ENABLE_CRQ hcall used to do
this may return H_BUSY or H_LONG_BUSY. When this happens, the
caller is expected to retry later. This patch changes a simple
loop, which was causing the softlockup, to a loop at task level
which sleeps between retries rather than simply spinning.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Brian King [Thu, 17 Jun 2010 18:55:16 +0000 (13:55 -0500)]
[SCSI] ibmvfc: Driver version 1.0.8
Bump driver version.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Brian King [Thu, 17 Jun 2010 18:55:15 +0000 (13:55 -0500)]
[SCSI] ibmvfc: Add support for fc_block_scsi_eh
Adds support for fc_block_scsi_eh to block the EH handlers if
the target device is in the blocked state to ensure we don't
take devices offline.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Brian King [Thu, 17 Jun 2010 18:55:13 +0000 (13:55 -0500)]
[SCSI] ibmvfc: Fix soft lockup on resume
This fixes a softlockup seen on resume. During resume, the CRQ
must be reenabled. However, the H_ENABLE_CRQ hcall used to do
this may return H_BUSY or H_LONG_BUSY. When this happens, the
caller is expected to retry later. Normally the H_ENABLE_CRQ
succeeds relatively soon. However, we have seen cases where
this can take long enough to see softlockup warnings.
This patch changes a simple loop, which was causing the
softlockup, to a loop at task level which sleeps between
retries rather than simply spinning.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Bandan Das [Wed, 16 Jun 2010 17:39:42 +0000 (13:39 -0400)]
[SCSI] mpt fusion: Cleanup some duplicate calls in mptbase.c
In mpt_detach, call to pci_set_drvdata is redundant because it
has already been called in mpt_adapter_disable. In mpt_attach,
ioc->pcidev is set to pdev two times.
Signed-off-by: Bandan Das <bandan.das@stratus.com>
Acked-by: "Desai, Kashyap" <Kashyap.Desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Kashyap, Desai [Thu, 17 Jun 2010 09:14:00 +0000 (14:44 +0530)]
[SCSI] mptfusion: Bump version 03.04.16
Upgrade driver version to 3.4.16
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Kashyap, Desai [Thu, 17 Jun 2010 09:12:39 +0000 (14:42 +0530)]
[SCSI] mptfusion: Added missing reset for ioc_reset_in_progress in SoftReset
Added missing part which will reset ioc_reset_in_progress before returning from SoftResetHandler.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Kashyap, Desai [Thu, 17 Jun 2010 09:11:48 +0000 (14:41 +0530)]
[SCSI] mptfusion: Added code for occationally SATA hotplug failure.
Issue: SATA hotplug does not work sometimes.
At the time of ADD device/ADD phys disk, drive may fail to add SATA device
due to temporary SAS Address for SATA device generated by firmware. Final
SAS address for SATA driver will be generated only after disk spinup is
done. This may take some times for slow spining SATA drives.
At phy link up driver gets attached device sas address and stores into
phyinfo. At the time of ADD event driver will read sas device page0 using
channel and FW ID provided in ADD Device event. Here in case of SATA drives,
driver will see miss match in phyinfo->sas_address and latest sas address
read from SAS DEVICE PAGE0 and eventually device won't be added to OS.
Fix:
When Driver read SAS DEVICE PAGE0, it can identify Device type looking at
device_info. If device is SATA drive and sas address mismatch happens,
Driver will do same stuffs which happened at the time of LINK UP to get
correct piece of information from Pages. ( Find parent device and refresh
parent device phys either HBA refresh/Exp refresh)
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Kashyap, Desai [Thu, 17 Jun 2010 09:10:56 +0000 (14:40 +0530)]
[SCSI] mptfusion: schedule_target_reset from all Reset context
Issue:
target reset will be queued to driver's internal queue to get schedule
later. When driver add target into internal target_reset queue we will block IOs
on those target using scsi midlayer API. Now due to some cause driver is not
executing those target_reset list and it is always in block state.
Changes:
now we are clearing target_reset queue from all other Callback context
instead of only DeviceReset context.Now wherever driver is clearing
taskmgmt_in_progress flag it is considering target_reset queue cleanup
also.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Kashyap, Desai [Thu, 17 Jun 2010 09:10:10 +0000 (14:40 +0530)]
[SCSI] mptfusion: Added sanity to check B_T mapping for device before adding to OS
Added sanity check before treating any device is a valid device.
It is possible that firmware can have device page0 in its table, but that
devicemay not be available in topology. Device will be available in topology
only if there is Bus Target mapping is done in firmware. Driver will always
check B_T mapping of firmware before reporting device to upper layer.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Kashyap, Desai [Thu, 17 Jun 2010 09:09:25 +0000 (14:39 +0530)]
[SCSI] mptfusion: Corrected declaration of device_missing_delay
device missing delay is 8 bit value in io unit pg1. Making correct variable
declaration for device_missing_delay.
The driver is storing the calculated device missing delay in IOC structure
as a u8 instead of a u16. It needs to be a u16 if the delay is > 255.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Kashyap, Desai [Thu, 17 Jun 2010 09:07:25 +0000 (14:37 +0530)]
[SCSI] mptfusion: Use DID_TRANSPORT_DISRUPTED instead of DID_BUS_BUSY
Changed the return value for Nexus Loss IOs to be DID_TRANSPORT_DISRUPTED.
What this will allow is the multi-path driver to delay the fail over
process. They would like the path to keep up as long as the nexus loss
Loginfo is return from firmware. With DID_BUS_BUSY the path fails over
immediately.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Kashyap, Desai [Thu, 17 Jun 2010 09:05:46 +0000 (14:35 +0530)]
[SCSI] mptfusion: Set fw_events_off to 1 at driver load time.
fw_events_off is flag checking for driver to do Event handling or not.
Normally it should be OFF at the time of initialization. Only enable it at
the time of INTR enable of device first time. This will always occur only
after resource allocation.
ioc->fw_events_off = 1 is set in mpt_attach()
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Kashyap, Desai [Thu, 17 Jun 2010 08:20:57 +0000 (13:50 +0530)]
[SCSI] mpt2sas: Bump version 06.100.00.00
Version upgrade patch
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Kashyap, Desai [Thu, 17 Jun 2010 08:20:11 +0000 (13:50 +0530)]
[SCSI] mpt2sas: Copy message frame before releasing to free pool to have a local reference.
Current driver is not clearing the per device tm_busy flag
following the Task Mangement request completion from the IOCTL path.
When this flag is set, the IO queues are frozen. The reason the flag
didn't get cleared is becuase the driver is referencing
memory associated to the mpi request following the completion, when
the memory had been reallocated for a new request. When the memory
was reallocated, the driver didn't clear the flag becuase it was
expecting a task managment reqeust, and the reallocated request was
for SCSI_IO. To fix the problem the driver needs to have a cached
backup copy of the original reqeust.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Kashyap, Desai [Thu, 17 Jun 2010 08:19:28 +0000 (13:49 +0530)]
[SCSI] mpt2sas: Copy sense buffer instead of working on direct memory location
(1) driver was not setting the sense data size prior to sending SCSI_IO,
resulting in the 0x31190000 loginfo
(2) The driver needs to copy the sense data to local buffer prior
to releasing the request message frame. If not, the sense buffer gets
overwritten by the next SCSI_IO request.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Kashyap, Desai [Thu, 17 Jun 2010 08:18:46 +0000 (13:48 +0530)]
[SCSI] mpt2sas: Adding additional message to error escalation callback
Adding additional messages to the error escallation callbacks which
displays the wwid, sas address, handle, phy number, enclosure logical id,
and slot. In the same eh callbacks, routines, the printks were converted
to sdev_printks, which displays the bus target mapping. These additional
modifications help better identify the device which is in recovery.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Kashyap, Desai [Thu, 17 Jun 2010 08:18:10 +0000 (13:48 +0530)]
[SCSI] mpt2sas: Add additional check for responding volumes after Host Reset
ISSUE DESCRIPTION:
This test case involves creating two RAID1 volumes, then
simultaneiously issue host reset and pull all the drives associated to
the 1st raid volume. The observed behavour is the physical drives are
removed, however the volume remains. The expected behavour is the
volume as well as physical drives should be removed from OS.
FIX:
Add support in the post host reset device scan logic for raid volumes
where the driver will have an additional check for responding raid
volume where the status should be either online, optimal, or degraded.
So for voluemes that have a status of missing or failed, the driver
will mark them for deletion.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Kashyap, Desai [Thu, 17 Jun 2010 08:17:29 +0000 (13:47 +0530)]
[SCSI] mpt2sas: Added -ENOMEM return type when allocation fails
In the driver mpt2sas_base_attach subroutine, we need to add
support to return the proper error code when there are memory allocation
failures, e.g. returning -ENOMEM.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>