Commit graph

117 commits

Author SHA1 Message Date
Mike Christie ff1d0319ac [SCSI] qla4xxx: check for failed conn setup
iscsi_conn_setup can fail so we must check for NULL being
returned.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-12-14 15:40:44 +04:00
Mike Christie 13483730a1 [SCSI] qla4xxx: fix flash/ddb support
With open-iscsi support, target entries persisted in the FLASH were not
login. Added support in the qla4xxx driver to do the login on probe
time to the target entries saved in the FLASH by user.
With this changes upgrade to the new kernel with open-iscsi support in
qla4xxx will ensure users original target entries login on driver load

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-12-14 15:40:43 +04:00
Mike Christie 590134fa78 [SCSI] qla4xxx: export address/port of connection (fix udev disk names)
Udev uses the connection's persistent address/port in the
/dev/disk/by-path name. qla4xxx is not exporting this value
so its iscsi disk names have been lacking the iscsi info.
In the old driver we did not have this information but
we do now and can fix this by just setting the flags to tell
libiscsi/scsi_transport_iscsi to export this info in sysfs.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-20 10:28:16 -05:00
Mike Christie 2d63673b4d [SCSI] iscsi class: fix vlan configuration
Userspace was sending the priority/id part of the vlan tag
and sysfs was displaying the id in the vlan file. This
renames the vlan sysfs file to vlan_id to reflect that it
was showing the id and to match the vlan_priority file.
This also adds a ISCSI_NET_PARAM_VLAN_TAG iscsi nl command
to relfect that we are sending down the vlan/priority
part of the tag.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-20 10:13:55 -05:00
Mike Christie 00c31889f7 [SCSI] qla4xxx: fix data alignment and use nl helpers
This has the driver use helpers for a common operation and fixes
a issue where if multiple iscsi params are sent they could be
sent at offsets that cause unaligned accesses. The nla helpers
account for the padding needed to align properly for the driver.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-20 10:12:44 -05:00
Manish Rangankar 0d5b36b8b4 [SCSI] qla4xxx: updated device id check for BFS.
JIRA Key: UPSISCSI-75

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-16 11:11:49 -05:00
Manish Rangankar 69ca216e9b [SCSI] qla4xxx: Fixed target discovery failed issue.
When sendtargets response is greater then max receive data segment length,
the passthrough IOCB failed with data overrun status. Solution is to
allocate space for iSCSI header in the IOCB response buffer.

JIRA Key: UPSISCSI-147

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-16 11:11:22 -05:00
Manish Rangankar f922da79fd [SCSI] qla4xxx: Fixed active session re-open issue.
When iscsid restarted for an existing active session, set DDB will
fail with status already logged in. In this case, we have to send
logged in event to iscsid.

JIRA Key: OPENISCSI-21

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-16 11:11:06 -05:00
Manish Rangankar 5283bfb64e [SCSI] qla4xxx: Fixed device blocked issue on link up-down.
Devices are getting blocked during continuous link up and down.
Solution is, during relogin unblock the session, using iscsi_conn_start,
before sending connection logged in event.

JIRA Key: UPSISCSI-138

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-16 11:10:45 -05:00
Manish Rangankar 98270ab45c [SCSI] qla4xxx: Fixed session destroy issue on link up-down.
During link down, iscsid tries to do re-login to failed session. In case of
link down-up-down, LLD was sending connection login failed event to iscsid,
which is destroying the session, instead we have to continue re-login by
sending connection err event.

JIRA Key: UPSISCSI-134

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-16 11:10:27 -05:00
Manish Rangankar 736cf369c9 [SCSI] qla4xxx: Clear DDB map index on the basis of AEN.
Unable to login to session if login-logout issued consecutively for
multiple sessions. Solution is to clear idx in DDB map on the basis
of no-active connection asynchronous event (AEN).

JIRA Key: UPSISCSI-135

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-16 11:10:06 -05:00
Lalit Chandivade 28deb45cea [SCSI] qla4xxx: Fix getting BIDI CHAP for boot targets
If a boot target has a BIDI CHAP enabled, then read the user/secret from
CHAP table. Do not assume BIDI chap at peer CHAP index + 1

JIRA Key: UPSISCSI-156

Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-16 11:09:32 -05:00
Lalit Chandivade 8de5b95824 [SCSI] qla4xxx: Fix exporting boot targets to sysfs
The driver failed to export primary boot target if secondary target did not
exist in the FLASH. If boot targets are not valid then driver assumed 0 and
1 as default boot targets. Since these target did not exist in flash, the
driver failed exporting all the targets.

JIRA Key: UPSISCSI-148

Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-16 11:09:14 -05:00
Lalit Chandivade 4549415af6 [SCSI] qla4xxx: Do not add duplicate CHAP entry in FLASH
QLogic applications store the CHAP information in FLASH. During login,
authentication information is provided using an index into the CHAP region.

In order to support QLogic applications along with iscsiadm, updated the
LLD to not add duplicate CHAP entries in the CHAP region and preserve the
existing CHAP info in the CHAP region in FLASH.
This allows QLogic applications to pre-write the CHAP entries in the
CHAP region.

With iscsiadm, when the CHAP authentication information is sent to the LLD, the
LLD searches for the entry in CHAP region in FLASH, if exists then do not add.
If CHAP entry does not exist then add the CHAP entry in the CHAP region.

JIRA Key: UPSISCSI-146

Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-16 11:08:41 -05:00
Mike Christie de37920b87 [SCSI] qla4xxx: export iface name
Export the name of iface session is attached to. This is needed
so tools like iscsiadm/iscsistart can match the sessions to
userspace ifaces when rebuilding iscsid's state during boot.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27 08:36:54 -06:00
Vikas Chaudhary 95d31262b3 [SCSI] qla4xxx: Added support for adapter and firmware reset
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27 08:36:49 -06:00
Vikas Chaudhary 2ada7fc5d4 [SCSI] qla4xxx: added support to update initiator iscsi port
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27 08:36:40 -06:00
Vikas Chaudhary 943c157b79 [SCSI] qla4xxx: Added support to update mtu
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27 08:36:29 -06:00
Manish Rangankar 2a991c2159 [SCSI] qla4xxx: Boot from SAN support for open-iscsi
Hook qla4xxx in fw boot sysfs interface so iscsi tools
can use the info to create boot sessions.

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27 08:36:27 -06:00
Manish Rangankar 0e7e85019c [SCSI] qla4xxx: Remove reduandant code after open-iscsi integration.
1. Remove device database entry (ddb) state.
2. Remove device database (DDB) list building.
                With open-iscsi integration the logins to the target devices are
        handled by the user space. So the information of target is now
        maintained in the iscsi_session object. This is handled at
        libiscsi level so there is no need to maintain a list of DDBs in
        the qla4xxx LLD.
3. qla4xxx: Remove add_device_dynamically.
                Since autologin in FW is disabled with open-iscsi integration,
        driver will never get an AEN for which driver has not requested
        a DDB index. So remove the add_device_dynamically function.
4. Remove qla4xxx_tgt_dscvr
        Since firmware autologin is disabled this function will not work.
        Now user has the ability to do the target discovery and login to
        each target individually. Firwmare will not do the login on its own.
5. Remove relogin related code
        All relogin is handled by userspace now. qla4xxx just need to
        notify userspace of a connection failure, this triggers the
        relogin.
6. Remove add_session and alloc_session
        Now qla4xxx uses iscsi_session_setup that would do the necessary
        allocations for session and ddb_entry.

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27 08:36:26 -06:00
Manish Rangankar b3a271a94d [SCSI] qla4xxx: support iscsiadm session mgmt
Add scsi_transport_iscsi hooks in qla4xxx to support
iSCSI session management using iscsiadm.

This patch is based on discussion here
http://groups.google.com/group/open-iscsi/browse_thread/thread/e89fd888baf656a0#

Now users can use iscsiadm to do target discovery and do login/logout to
individual targets using the qla4xxx iSCSI class interface.

This patch leaves some dead code, but to make it easier to review
we are leaving and in the next patch we will remove that old code.

V2 - NOTE: Added code to avoid waiting for AEN during login/logout
in the driver, instead added a kernel to user event
to notify iscsid about login status. Because of this
iscsid will not get blocked.

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27 08:36:24 -06:00
Vikas Chaudhary a355943ca8 [SCSI] qla4xxx: add bsg support
This patch adds bsg support to qla4xxx.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27 08:36:22 -06:00
Vikas Chaudhary 6ac73e8cb0 [SCSI] qla4xxx: Add VLAN support
Add support to set VLAN and show vlan settings in sysfs

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
[Patch updated to new defines]
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27 08:36:20 -06:00
Mike Christie f27fb2ef7b [SCSI] iscsi class: sysfs group is_visible callout for iscsi host attrs
The iscsi class currently does not support writable sysfs
attrs for LLD sysfs settings. This patch converts the
iscsi class and driver's host attrs to use the attribute
container sysfs group and the sysfs group's is_visible callout
to be able to support readable or writable sysfs attrs.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27 08:36:14 -06:00
Mike Christie b78dbba005 [SCSI] iscsi class: remove iface param mask
We can replace the iface param mask with the
attr_is_visible callback.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27 08:36:12 -06:00
Mike Christie 1d063c1729 [SCSI] iscsi class: sysfs group is_visible callout for session attrs
The iscsi class currently does not support writable sysfs
attrs for LLD sysfs settings. This patch converts the
iscsi class and driver's session attrs to use the attribute
container sysfs group and the sysfs group's is_visible callout
to be able to support readable or writable sysfs attrs.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27 08:36:06 -06:00
Mike Christie 3128c6c73c [SCSI] iscsi cls: sysfs group is_visible callout for conn attrs
The iscsi class currently does not support writable sysfs
attrs for LLD sysfs settings. This patch converts the
iscsi class and drivers to use the attribute container
sysfs group and the sysfs group's is_visible callout
to be able to support readable or writable sysfs attrs.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27 08:36:03 -06:00
Vikas Chaudhary ed1086e041 [SCSI] qla4xxx: added support to show multiple iface in sysfs
Add support for default ipv4 and ipv6 ifaces in qla4xxx.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Reviewed-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
[make iface creation dynamic]
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27 08:36:02 -06:00
Vikas Chaudhary 2bab08fc77 [SCSI] qla4xxx: Added new "struct ipaddress_config"
- Move all ipaddress related param to "struct ipaddress_config"
  from "struct scsi_qla_host"
- update function - qla4xxx_update_local_ip()
- Rename IPOPT_IPv4_PROTOCOL_ENABLE to IPOPT_IPV4_PROTOCOL_ENABLE

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
[update for new ISCSI_IFACE values]
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27 08:35:59 -06:00
Mike Christie d00efe3fa8 [SCSI] qla4xxx: add support for set_net_config
Allows user space (iscsiadm) to send down network configuration
parameters for LLD to set private network configuration on the iSCSI
adapters.

Based on patches from Vikas Chaudhary.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-27 08:35:58 -06:00
Harish Zunjarrao 7ad633c06b [SCSI] qla4xxx: Added vendor specific sysfs attributes
Added fw_version, serial_num, iscsi version and boot loader version
sysfs attributes.

Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <jbottomley@parallels.com>
2011-05-24 12:40:23 -04:00
Vikas Chaudhary 8f0722cae6 [SCSI] qla4xxx: Remove host_lock in queuecommand function
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <jbottomley@parallels.com>
2011-05-24 12:40:12 -04:00
Lalit Chandivade 1b46807e0b [SCSI] qla4xxx: Remove AF_DPC_SCHEDULED flag from ha.
Since queue_work does not requeue, there is no need to check
if a work is in progress using the AF_DPC_SCHEDULED flag.
queue_work would return if work is pending without adding the
work, do_dpc would again get invoked from qla4xxx_timer if
there is still DPC flags set.

Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <jbottomley@parallels.com>
2011-05-24 12:40:02 -04:00
Vikas Chaudhary 977f46a4bb [SCSI] qla4xxx: Don't check FW alive if ISP82XX reset is in progress
Corrected logic to don't check for F/W is alive if reset is already
in progress for ISP82XX

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <jbottomley@parallels.com>
2011-05-24 12:39:52 -04:00
Vikas Chaudhary 68d92ebf59 [SCSI] qla4xxx: Dump HW/FW reg to figure out what caused FW to be hung for ISP82XX
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <jbottomley@parallels.com>
2011-05-24 12:39:20 -04:00
Christoph Hellwig 5cd049a599 [SCSI] remove cmd->serial_number litter
Stop using cmd->serial_number in printks.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01 10:22:40 -05:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Vikas Chaudhary 2d7924e6be [SCSI] qla4xxx: added new function qla4xxx_relogin_all_devices
Move relogin to all devices code from do_dpc to new
fuction qla4xxx_relogin_all_devices()

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>
2011-03-23 12:53:04 -05:00
Vikas Chaudhary 3038727c83 [SCSI] qla4xxx: add support for ql4xsess_recovery_tmo cmd line param
Target Session Recovery Timeout

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>
2011-03-23 12:53:03 -05:00
Vikas Chaudhary 8bb4033d2b [SCSI] qla4xxx: Add support for ql4xmaxqdepth command line parameter
This provides the flexibility to modify the qdepth based on different
target devices to make the best use of system resources.

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>
2011-03-23 12:53:02 -05:00
Karen Higgins 7eece5a084 [SCSI] qla4xxx: Prevent other port reinitialization during remove_adapter
remove ha flag AF_HBA_GOING_AWAY and added flag AF_HA_REMOVAL
to mark the other ISP-4xxx port to indicate that the driver is
being removed, so that the other port will not re-initialize
while in the process of removing the ha due to driver unload
or hba hotplug.

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>
2011-03-23 12:53:01 -05:00
Karen Higgins 7edd9a7b28 [SCSI] qla4xxx: cleanup DDB relogin logic during initialization
Driver has capability to add device dynamically and present
them to OS, driver no longer need to wait for DDBs to come
online during driver initialization.
Driver still issues a relogin for DDBs that are not online,
but no longer wait for DDB to come online.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Karen Higgins <karen.higgins@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-03-23 12:52:59 -05:00
Prasanna Mumbai f9880e76fd [SCSI] qla4xxx: Do not retry ISP82XX initialization if H/W state is failed
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Prasanna Mumbai <prasanna.mumbai@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-03-23 12:48:33 -05:00
Justin P. Mattock cd09b2c3d0 drivers:scsi Change printk typo initate -> initiate
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-02-17 17:42:17 +01:00
Vikas Chaudhary 7d01d0698f [SCSI] qla4xxx: Updated the Copyright header
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>
2010-12-21 12:24:43 -06:00
Vikas Chaudhary 3930b8c1f3 [SCSI] qla4xxx: do not reset hba if ql4xdontresethba is set
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>
2010-12-21 12:24:43 -06:00
Lalit Chandivade d56a1f7b39 [SCSI] qla4xxx: do not check for fw hung if reset retry is in progress
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21 12:24:42 -06:00
Lalit Chandivade fe998527e3 [SCSI] qla4xxx: put device in FAILED state for 82XX initialization failure
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21 12:24:40 -06:00
Jeff Garzik f281233d3e SCSI host lock push-down
Move the mid-layer's ->queuecommand() invocation from being locked
with the host lock to being unlocked to facilitate speeding up the
critical path for drivers who don't need this lock taken anyway.

The patch below presents a simple SCSI host lock push-down as an
equivalent transformation.  No locking or other behavior should change
with this patch.  All existing bugs and locking orders are preserved.

Additionally, add one parameter to queuecommand,
	struct Scsi_Host *
and remove one parameter from queuecommand,
	void (*done)(struct scsi_cmnd *)

Scsi_Host* is a convenient pointer that most host drivers need anyway,
and 'done' is redundant to struct scsi_cmnd->scsi_done.

Minimal code disturbance was attempted with this change.  Most drivers
needed only two one-line modifications for their host lock push-down.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Acked-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-16 13:33:23 -08:00
Mike Christie a1e0063d0c [SCSI] qla4xxx: Fix cmd check in qla4xxx_cmd_wait
If the command has timedout then the block layer has called
blk_mark_rq_complete. If qla4xxx_cmd_wait is then called
from qla4xxx_eh_host_reset, we will always fail, because if
the driver calls scsi_done then the the block layer will fail
at blk_complete_request's blk_mark_rq_complete call instead of
calling the normal completion path including the function,
blk_queue_end_tag, which releases the tag.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-10-26 11:16:56 -05:00