aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx/ql4_init.c
Commit message (Collapse)AuthorAgeFilesLines
* [SCSI] qla4xxx: Added vendor specific sysfs attributesHarish Zunjarrao2011-05-241-1/+1
| | | | | | | | | | 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>
* Fix common misspellingsLucas De Marchi2011-03-311-1/+1
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* [SCSI] qla4xxx: cleanup function qla4xxx_process_ddb_changedVikas Chaudhary2011-03-231-12/+3
| | | | | | | | | 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>
* [SCSI] qla4xxx: remove unused ddb flag DF_NO_RELOGINVikas Chaudhary2011-03-231-2/+0
| | | | | | 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>
* [SCSI] qla4xxx: cleanup DDB relogin logic during initializationKaren Higgins2011-03-231-152/+31
| | | | | | | | | | | | | 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>
* [SCSI] qla4xxx: cleanup qla4xxx_initialize_ddb_list()Vikas Chaudhary2011-03-231-7/+0
| | | | | | | | | 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>
* [SCSI] qla4xxx: Updated the Copyright headerVikas Chaudhary2010-12-211-1/+1
| | | | | | 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>
* [SCSI] qla4xxx: free_irqs on failed initialize_adapterVikas Chaudhary2010-10-251-0/+6
| | | | | | | | | | | 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>
* [SCSI] qla4xxx: Trivial cleanupVikas Chaudhary2010-10-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* [SCSI] qla4xxx: Added AER support for ISP82xxLalit Chandivade2010-08-061-1/+4
| | | | | | | | | | | 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>
* [SCSI] qla4xxx: Stop firmware before doing init firmware.Lalit Chandivade2010-08-061-0/+6
| | | | | | | | | | 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>
* [SCSI] qla4xxx: set correct value in sess->recovery_tmoVikas Chaudhary2010-08-061-3/+0
| | | | | | | 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>
* Merge branch 'for-next' of ↵Linus Torvalds2010-08-041-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (48 commits) Documentation: update broken web addresses. fix comment typo "choosed" -> "chosen" hostap:hostap_hw.c Fix typo in comment Fix spelling contorller -> controller in comments Kconfig.debug: FAIL_IO_TIMEOUT: typo Faul -> Fault fs/Kconfig: Fix typo Userpace -> Userspace Removing dead MACH_U300_BS26 drivers/infiniband: Remove unnecessary casts of private_data fs/ocfs2: Remove unnecessary casts of private_data libfc: use ARRAY_SIZE scsi: bfa: use ARRAY_SIZE drm: i915: use ARRAY_SIZE drm: drm_edid: use ARRAY_SIZE synclink: use ARRAY_SIZE block: cciss: use ARRAY_SIZE comment typo fixes: charater => character fix comment typos concerning "challenge" arm: plat-spear: fix typo in kerneldoc reiserfs: typo comment fix update email address ...
| * fix typos concerning "initiali[zs]e"Uwe Kleine-König2010-06-161-1/+1
| | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | [SCSI] iscsi_transport: added new iscsi_param to display target alias in sysfsVikas Chaudhary2010-07-281-0/+3
| | | | | | | | | | | | | | 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>
* | [SCSI] qla4xxx: wait for device_ready before device discoveryKaren Higgins2010-07-281-3/+3
| | | | | | | | | | | | | | 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>
* | [SCSI] qla4xxx: replace all dev_info, dev_warn, dev_err with ql4_printkVikas Chaudhary2010-07-281-25/+25
| | | | | | | | | | | | | | 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>
* | [SCSI] qla4xxx: Added support for ISP82XXVikas Chaudhary2010-07-281-41/+95
| | | | | | | | | | | | | | 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>
* | [SCSI] qla4xxx: Fix the freeing of the buffer allocated for DMAPrasanna Mumbai2010-07-271-14/+24
| | | | | | | | | | | | | | | | | | | | | | 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>
* | [SCSI] qla4xxx: correct return status in function qla4xxx_fw_readyVikas Chaudhary2010-07-271-0/+1
| | | | | | | | | | | | | | | | | | | | 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>
* | [SCSI] qla4xxx: unblock iscsi session after setting ddb state online.Vikas Chaudhary2010-07-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | [SCSI] qla4xxx: set driver ddb state correctly in process_ddb_changedVikas Chaudhary2010-07-271-1/+4
|/ | | | | | | | | | 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>
* [SCSI] qla4xxx: do not retry login to CHAP auth failed targetsVikas Chaudhary2010-05-021-40/+90
| | | | | | | | | | | | 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>
* [SCSI] qla4xxx: Updated firmware ready timeout algorithmVikas Chaudhary2010-05-021-9/+11
| | | | | | | | | | | | 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>
* [SCSI] qla4xxx: set device state as per Link UP and LINK DOWNVikas Chaudhary2010-05-021-3/+9
| | | | | | | | | | | | | | | | | | | | | 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>
* [SCSI] qla4xxx: added IPv6 support.Vikas Chaudhary2010-05-021-40/+178
| | | | | | | | 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>
* [SCSI] qla4xxx: fix compile warning due to invalid extHwConfigMike Christie2010-02-171-8/+6
| | | | | | | | | | | 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>
* [SCSI] qla4xxx: do not reuse session when connecting to different target portMike Christie2009-01-251-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* [SCSI] qla4xxx: fix host reset dpc raceMike Christie2008-03-051-1/+1
| | | | | | | | | | | | | | | | 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>
* [SCSI] qla4xxx: directly call iscsi recovery functionsMike Christie2008-02-071-0/+1
| | | | | | | | | | | | | | | | 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>
* drivers/scsi/: Spelling fixesJoe Perches2008-02-031-1/+1
| | | | | | | | | | 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>
* [SCSI] libiscsi: fix shutdownMike Christie2008-01-111-1/+3
| | | | | | | | | | | | | 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>
* Fix misspellings of "system", "controller", "interrupt" and "necessary".Robert P. J. Day2007-10-191-1/+1
| | | | | | | | 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>
* [SCSI] qla4xxx: allow hba to be online when initiator ip address is ↵David C Somayajulu2007-06-171-12/+11
| | | | | | | | | | | | 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>
* [SCSI] qla4xxx: ql4_init.c bugfixesDavid C Somayajulu2007-05-261-29/+63
| | | | | | | | | | | | | 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>
* [SCSI] qla4xxx: possible cleanupsAdrian Bunk2007-05-061-9/+9
| | | | | | | | | | - 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>
* [SCSI] qla4xxx: bug fixesDavid C Somayajulu2007-01-271-9/+9
| | | | | | | | | | | | | | | | | 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>
* [SCSI] qla4xxx: add support for qla4032David C Somayajulu2006-11-221-35/+10
| | | | | | | | | | | | | 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>
* [PATCH] qla4xxx: bug fix: driver hardware semaphore needs to be grabbed ↵David C Somayajulu2006-11-221-1/+1
| | | | | | | | | | | | 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>
* [SCSI] Initial Commit of qla4xxxDavid Somayajulu2006-10-041-0/+1340
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>