History log of /drivers/scsi/qla4xxx/ql4_init.c
Revision Date Author Comments
c0b9d3f750520ad3005b99144260e486ef01b5d9 13-Feb-2012 Vikas Chaudhary <vikas.chaudhary@qlogic.com> [SCSI] qla4xxx: Added ping support

Added ping support for network connection diagnostics.

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>
787649993230eb1d6fc326f13be285a840092538 11-Jan-2012 Sarang Radke <sarang.radke@qlogic.com> [SCSI] qla4xxx: Clear the RISC interrupt bit during FW init

This patch fix kernel panic during kdump.

Signed-off-by: Sarang Radke <sarang.radke@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>
e1cd89c507b41e4021ce6fb0d19d230f6a932ccd 02-Dec-2011 Tomas Henzl <thenzl@redhat.com> [SCSI] qla4xxx: a small loop fix

When the qla4xxx_get_fwddb_entry returns QLA_ERROR
the nex_idx is not updated,
for (idx = 0; idx < max_ddbs; idx = next_idx) {
ret = qla4xxx_get_fwddb_entry(ha, idx, NULL, 0, NULL,
&next_idx, &state, &conn_err,
NULL, NULL);
if (ret == QLA_ERROR)
continue;

This means there is a risk that the 'idx < max_ddbs' condition will never
met and the loop will loop forever.
Fix this by explicitly increasing the next_idx in the error condition.

Maybe a break instead of continue is more appropriate, leaving the decision
on the qlogic maintainer.

Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13483730a13bef372894aefcf73760f5c6c297be 02-Dec-2011 Mike Christie <michaelc@cs.wisc.edu> [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>
5283bfb64e403d971bcb0718521a4ffe6cc24f5b 08-Oct-2011 Manish Rangankar <manish.rangankar@qlogic.com> [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>
98270ab45c0a5e533f253f04e0b617c98b5a6259 08-Oct-2011 Manish Rangankar <manish.rangankar@qlogic.com> [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>
736cf369c9a514a9ed596e97375c49ef1fdf920a 08-Oct-2011 Manish Rangankar <manish.rangankar@qlogic.com> [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>
166dd20d794e7885b23c8d5fc533949ed82cc337 08-Oct-2011 Lalit Chandivade <lalit.chandivade@qlogic.com> [SCSI] qla4xxx: Free Device Database (DDB) reserved by FW

Firmware reserves DDBs if there are entries in the FLASH.
So there are no free DDBs left when a iSCSI login is initiated
by user space tool like iscsiadm.
Since now login is not controlled by firmware, LLD need to free
up the DDBs after firmware init. This will ensure free DDBs are
available for iSCSI logins using iscsiadm.

JIRA Key: UPSISCSI-151

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>
91ec7cec4acf0d6b7de34009fc49c8c3353b8035 01-Aug-2011 Vikas Chaudhary <vikas.chaudhary@qlogic.com> [SCSI] qla4xxx: Added vendor specific sysfs attributes

Added board_id, fw_state, phy_port_cnt, phy_port_num,
iscsi_func_cnt, hba_model

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>
0e7e85019c2709131b10c5f34b602cc6b94fe782 25-Jul-2011 Manish Rangankar <manish.rangankar@qlogic.com> [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>
b3a271a94d0034dd3bab10b8d8cd432843be629e 25-Jul-2011 Manish Rangankar <manish.rangankar@qlogic.com> [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>
2bab08fc770ccd6c56859371356a4a905e8c0bd4 25-Jul-2011 Vikas Chaudhary <vikas.chaudhary@qlogic.com> [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>
7ad633c06b6f1498cf26922b165837b121f27519 18-May-2011 Harish Zunjarrao <harish.zunjarrao@qlogic.com> [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>
25985edcedea6396277003854657b5f3cb31a628 31-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi> Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
fc7657c9d98c250c9fd212348e6e156c73885cc4 21-Mar-2011 Vikas Chaudhary <vikas.chaudhary@qlogic.com> [SCSI] qla4xxx: cleanup function qla4xxx_process_ddb_changed

We don't need to check ddb old state we can take action
based on ddb new state.

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>
58da51dcfc13b2222ce8565e308852aef001f5d2 21-Mar-2011 Vikas Chaudhary <vikas.chaudhary@qlogic.com> [SCSI] qla4xxx: remove unused ddb flag DF_NO_RELOGIN

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>
7edd9a7b28f57d8a5bcdb1a0def2aa09d1dd49d4 21-Mar-2011 Karen Higgins <karen.higgins@qlogic.com> [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>
9640de2099a3c7936b65bf3a45e67a324de950c8 21-Mar-2011 Vikas Chaudhary <vikas.chaudhary@qlogic.com> [SCSI] qla4xxx: cleanup qla4xxx_initialize_ddb_list()

Remove process all aen code from qla4xxx_initialize_ddb_list()
as DPC activities should be done in DPC only.

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>
7d01d0698f450ed8cc9fd4557f88a3309c868d44 03-Dec-2010 Vikas Chaudhary <vikas.chaudhary@qlogic.com> [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>
3710c60c09f555df69d12b0232702d062fe3bcd6 07-Oct-2010 Vikas Chaudhary <vikas.chaudhary@qlogic.com> [SCSI] qla4xxx: free_irqs on failed initialize_adapter

Since interrupts are registered in start_firmware(load_risc) for 82xx,
free them if init_firmware fails.

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>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
f581a3f79cc7c00c1a416356011c2e274dbf6571 07-Oct-2010 Vikas Chaudhary <vikas.chaudhary@qlogic.com> [SCSI] qla4xxx: Trivial cleanup

* cleanup function qla4xxx_recovery_timeout
- No need to wakeup dpc thread from function
qla4xxx_recovery_timeout() as we are not doing anything
in do_dpc() thread when wakeup from
qla4xxx_recovery_timeout()

* cleanup function qla4xxx_wait_for_hba_online
- Remove hard coded value from qla4xxx_wait_for_hba_online().

* cleanup function qla4xxx_start_firmware_from_flash
- display seconds

* cleanup function qla4_8xxx_load_risc
- Remove redundant code.

* cleanup function qla4xxx_get_firmware_status
- update debug statement

* cleanup function qla4_8xxx_try_start_fw
- update return status

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>
2232be0d5707cd331b92027c0fd7ea5e843c2121 30-Jul-2010 Lalit Chandivade <lalit.chandivade@qlogic.com> [SCSI] qla4xxx: Added AER support for ISP82xx

Added support for PCI error handling

Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Poornima Vonti <poornima.vonti@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>
9d4946f89fc050cadf66d08c47379ab62848a5b7 30-Jul-2010 Lalit Chandivade <lalit.chandivade@qlogic.com> [SCSI] qla4xxx: Stop firmware before doing init firmware.

If BIOS is enabled then drivers init firmware fails since
BIOS has done the init once.

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>
3013cea83ef3532e49b973a0bc9b3562f56871c6 30-Jul-2010 Vikas Chaudhary <vikas.chaudhary@qlogic.com> [SCSI] qla4xxx: set correct value in sess->recovery_tmo

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>
3b2bef1fc85f127a99ad6b90a94b033fdc57341c 10-Jul-2010 Vikas Chaudhary <vikas.chaudhary@qlogic.com> [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>
bb6f7d5b71356be560ea84dd5a721f083d3a9e8e 10-Jul-2010 Karen Higgins <karen.higgins@qlogic.com> [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>
c2660df310a3c445194748b54f51b7224639e742 10-Jul-2010 Vikas Chaudhary <vikas.chaudhary@qlogic.com> [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>
f4f5df23bf72208d0c2f1d8be629839924c2f4c2 28-Jul-2010 Vikas Chaudhary <vikas.chaudhary@qlogic.com> [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>
beabe7c18338a5112fbca9a6dbcc921f9cce6325 10-Jul-2010 Prasanna Mumbai <prasanna.mumbai@qlogic.com> [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>
b966346c344f592c8e6a84c9c274a7dedbc057ad 10-Jul-2010 Vikas Chaudhary <vikas.chaudhary@qlogic.com> [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>
363863256a711819130ea4ac210ee001bc80c3b2 10-Jul-2010 Vikas Chaudhary <vikas.chaudhary@qlogic.com> [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>
e349fa35363fa96f11addecb67e0f8a6edfb0e3a 10-Jul-2010 Vikas Chaudhary <vikas.chaudhary@qlogic.com> [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>
421f91d21ad6f799dc7b489bb33cc560ccc56f98 11-Jun-2010 Uwe Kleine-König <u.kleine-koenig@pengutronix.de> fix typos concerning "initiali[zs]e"

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
821d6e5413481a57bbe1c2722dbe1fee4ff675c4 28-Apr-2010 Vikas Chaudhary <vikas.chaudhary@qlogic.com> [SCSI] qla4xxx: do not retry login to CHAP auth failed targets

Per RFC 3720, Login Response Status Code 0x02 should not be retried.
Condensed connection error checking code to a single routine, and
added check for status class 0x02.

Signed-off-by: Karen Higgins <karen.higgins@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>
c301b0266c65c8781361ca152981cff4fac05498 28-Apr-2010 Vikas Chaudhary <vikas.chaudhary@qlogic.com> [SCSI] qla4xxx: Updated firmware ready timeout algorithm

Updated firmware ready timeout algorithm to prevent
long delays and use jiffies to time out instead of
counter. Also use msleep_interruptible instead of msleep.

Signed-off-by: Karen Higgins <karen.higgins@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>
065aa1b4db63c7fa68a3e889510c4e63404a1ac7 28-Apr-2010 Vikas Chaudhary <vikas.chaudhary@qlogic.com> [SCSI] qla4xxx: set device state as per Link UP and LINK DOWN

Link Down -> Mark all devices missing
Previously, the driver took no action on a Link Down,
and waited for the I/O on a dead connection to timeout
in the firmware before marking the DDB missing.

Link Up -> Mark all devices online
F/W will do auto login to all the devices only once.
After that its the responsibility of the driver to
relogin to devices whenever there is :
* Any sort of connection failure or
* KATO expires indicating target has logged out or
* I/O times out etc.

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>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2a49a78ed3c8d7c8319595270110c69f99c61a74 28-Apr-2010 Vikas Chaudhary <vikas.chaudhary@qlogic.com> [SCSI] qla4xxx: added IPv6 support.

Signed-off-by: Karen Higgins <karen.higgins@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>
b3925514f6f6878e3f671fb6990874e731a26d02 10-Feb-2010 Mike Christie <michaelc@cs.wisc.edu> [SCSI] qla4xxx: fix compile warning due to invalid extHwConfig

If the nvram is invalid qla4xxx tries to set Asuint32_t
based on the card type. If the card type is not listed
then Asuint32_t is going to be gargabe. This just fixes
that if/elseif by adding a else to catch the case for
new hardware that might not be listed yet.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
41bbdbebbbe7e06871d25f51c2eb1d6466bb9e5f 16-Jan-2009 Mike Christie <michaelc@cs.wisc.edu> [SCSI] qla4xxx: do not reuse session when connecting to different target port

qla4xxx does not check the I_T nexus values correctly
so it ends up creating one session to the target. If
a portal should disappear or they should be reported
in different order the driver will think it is already
logged in when it could now be speaking to a different
target portal or accessing it through a different
initiator port (iscsi initiator port is not tied to
hardware and is just the initiator name plus isid
so you could end up with multiple ports through one
host).

This patch has the driver check the iscsi scsi port
values when matching sessions (we do not check
the initiator name because that is static). It results
in a portal from each target portal group getting
logged into instead of just one per target. In the future
the firmware should hopefully send us notification of other
sessions that are created to other portals within the
same tpgt and the sessions should have different isids.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
50a29aec9c47d26e869df83ef1d69e3b63c83bf4 04-Mar-2008 Mike Christie <michaelc@cs.wisc.edu> [SCSI] qla4xxx: fix host reset dpc race

The host reset callout could be starting to reset the hba at the same
time the dpc thread is. This creates lots of problems because they both
want to do wierd things with the firmware and interrupts, etc.

This patch just has the host reset function fully shutdown the dpc
thread before resetting the hba.

This patch also moves the setting of the session online bit to fix
a potential race with the dpc thread and iscsi recovery thread.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: David C Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
b635930de91be0a217292e3fe381af273e5ffaf7 31-Jan-2008 Mike Christie <michaelc@cs.wisc.edu> [SCSI] qla4xxx: directly call iscsi recovery functions

Qla4xxx can just call the iscsi recovery functions directly.
There is no need for userspace to do this for qla4xxx, because
we do not use the mutex to iterate over devices anymore and iscsi_block
/unblock_session can be called from interrupt context or the dpc thread.
And having userspace do this just creates uneeded headaches for qla4xxx root
situations where the session may experience problems. For example
during the kernel shutdown the scsi layer wants to send sync caches, but at
this time userspace is not up (iscsid is not running), so we cannot
recover from the problem.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Cc: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
b1c118121ae37285ddc0a7a908999196bb35fb0b 03-Feb-2008 Joe Perches <joe@perches.com> drivers/scsi/: Spelling fixes

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Acked-by: James Smart <james.smart@emulex.com>
Acked-by: Darrick J. Wong <djwong@us.ibm.com>
Acked-by: David Somayajulu <david.somayajulu@qlogic.com>
Acked-by: Mark Salyzyn <mark_salyzyn@adaptec.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2697478903d0ad8bdbf868b1346ae4b891662bb1 13-Dec-2007 Mike Christie <michaelc@cs.wisc.edu> [SCSI] libiscsi: fix shutdown

We were using the device delete sysfs file to remove each device
then logout. Now in 2.6.21 this will not work because
the sysfs delete file returns immediately and does not wait for
the device removal to complete. This causes a hang if a cache sync
is needed during shutdown. Before .21, that approach had other
problems, so this patch fixes the shutdown code so that we remove the target
and unbind the session before logging out and shut down the session

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
3a4fa0a25da81600ea0bcd75692ae8ca6050d165 19-Oct-2007 Robert P. J. Day <rpjday@mindspring.com> Fix misspellings of "system", "controller", "interrupt" and "necessary".

Fix the various misspellings of "system", controller", "interrupt" and
"[un]necessary".

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
46235e600acfb6d13ee164c5539ad4309e848eab 09-Jun-2007 David C Somayajulu <david.somayajulu@qlogic.com> [SCSI] qla4xxx: allow hba to be online when initiator ip address is uninitialized
This patch provides the following:

1. remove warning ignoring the return value of pci_set_mwi()
2. allows HBA to be online when the initiator ip address is uninitialized.

Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
92b7273608da2c681f54fd36d182a582673ed260 24-May-2007 David C Somayajulu <david.somayajulu@qlogic.com> [SCSI] qla4xxx: ql4_init.c bugfixes

In qla4xxx_get_ddb_entry() and qla4xxx_add_device_dynamically()
differentiate between a target which has been newly added vs a target
which went offline temporarily and is online again. In
qla4xxx_build_ddb_list() firmware ddb state needs to be updated by
calling qla4xxx_get_ddb_entry(). Fix qla4x00_pci_config() and clean up
code.

Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
4797547778fd51e6ee929c5dd67ab3807898eb82 26-Apr-2007 Adrian Bunk <bunk@stusta.de> [SCSI] qla4xxx: possible cleanups

- make needlessly global code static
- #if 0 unused functions

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
477ffb9d8732f30e7ab2d20f6ed0c22bad37a4a5 22-Jan-2007 David C Somayajulu <david.somayajulu@qlogic.com> [SCSI] qla4xxx: bug fixes

The included patch fixes the following issues:

1. qla3xxx/qla4xxx co-existence issue which can result in a lockup
when qla3xxx driver is unloaded, or when ifdown; ifup is performed on
one of the interfaces correponding to qla3xxx. This is because qla4xxx
HBA supports one ethernet and iscsi interfaces per port. Both iscsi
and ethernet interfaces share the same state machine. The problem has
to do with synchronizing access to the state machine in the event of a
reset

2. mutex_lock() is sometimes not followed by mutex_unlock() prior to
invoking a msleep() in qla4xxx_mailbox_command()

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
d915058f48745c0d5c4582566e5aa63867264f81 16-Nov-2006 David C Somayajulu <david.somayajulu@qlogic.com> [SCSI] qla4xxx: add support for qla4032

This patch provides the following:

1. adds support for the next version of Qlogic's iSCSI HBA, qla4032
(PCI Device ID 4032).

2. removes dead code related to topcat chip and renames
qla4010_soft_reset to qla4xxx_soft_reset (minor changes).

Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
f26b90440cd74c78fe10c9bd5160809704a9627c 16-Nov-2006 David C Somayajulu <david.somayajulu@qlogic.com> [PATCH] qla4xxx: bug fix: driver hardware semaphore needs to be grabbed before soft reset

On qla4xxx, the driver needs to grab the drvr semaphore provided by
the hardware, prior to issuing a reset. This patches takes care of a
couple of places where it was not being done. In addition there is
minor clean up.

Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
afaf5a2d341d33b66b47c2716a263ce593460a08 19-Sep-2006 David Somayajulu <david.somayajulu@qlogic.com> [SCSI] Initial Commit of qla4xxx

open-iSCSI driver for Qlogic Corporation's iSCSI HBAs

Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: Doug Maxey <dwm@bubba.enoyolf.org>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>