summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
Commit message (Collapse)AuthorAgeFilesLines
* fix typos concerning "hierarchy"Uwe Kleine-König2010-06-163-5/+5
| | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6Linus Torvalds2010-05-216-30/+47
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (38 commits) net: Expose all network devices in a namespaces in sysfs hotplug: netns aware uevent_helper kobj: Send hotplug events in the proper namespace. netlink: Implment netlink_broadcast_filtered net/sysfs: Fix the bitrot in network device kobject namespace support netns: Teach network device kobjects which namespace they are in. kobject: Send hotplug events in all network namespaces driver-core: fix Typo in drivers/base/core.c for CONFIG_MODULE pci: check caps from sysfs file open to read device dependent config space sysfs: add struct file* to bin_attr callbacks sysfs: Remove usage of S_BIAS to avoid merge conflict with the vfs tree sysfs: Don't use enums in inline function declaration. sysfs-namespaces: add a high-level Documentation file sysfs: Comment sysfs directory tagging logic driver core: Implement ns directory support for device classes. sysfs: Implement sysfs_delete_link sysfs: Add support for tagged directories with untagged members. sysfs: Implement sysfs tagged directory support. kobj: Add basic infrastructure for dealing with namespaces. sysfs: Remove double free sysfs_get_sb ...
| * sysfs: add struct file* to bin_attr callbacksChris Wright2010-05-216-30/+47
| | | | | | | | | | | | | | | | | | This allows bin_attr->read,write,mmap callbacks to check file specific data (such as inode owner) as part of any privilege validation. Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | Fix networking tree iscsi_tcp.c mis-mergeLinus Torvalds2010-05-211-1/+1
|/ | | | | | | | | | | | | | | The removal of the 'waitqueue_active()' test in commit d7d05548a6 ("[SCSI] iscsi_tcp: fix relogin/shutdown hang") got incorrectly resolved by David when he back-merged the main git tree into the networking tree in commit 278554bd65 ("Merge branch 'master' of master.kernel.org:..."). There was a content conflict due to 'sock->sk->sk_sleep' being changed into 'sk_sleep(sock->sk)' in the networking tree, but David didn't pick up the iscsi change from the main tree. Reported-by: James Bottomley <James.Bottomley@suse.de> Cc: David Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds2010-05-21131-3752/+14235
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (182 commits) [SCSI] aacraid: add an ifdef'd device delete case instead of taking the device offline [SCSI] aacraid: prohibit access to array container space [SCSI] aacraid: add support for handling ATA pass-through commands. [SCSI] aacraid: expose physical devices for models with newer firmware [SCSI] aacraid: respond automatically to volumes added by config tool [SCSI] fcoe: fix fcoe module ref counting [SCSI] libfcoe: FIP Keep-Alive messages for VPorts are sent with incorrect port_id and wwn [SCSI] libfcoe: Fix incorrect MAC address clearing [SCSI] fcoe: fix a circular locking issue with rtnl and sysfs mutex [SCSI] libfc: Move the port_id into lport [SCSI] fcoe: move link speed checking into its own routine [SCSI] libfc: Remove extra pointer check [SCSI] libfc: Remove unused fc_get_host_port_type [SCSI] fcoe: fixes wrong error exit in fcoe_create [SCSI] libfc: set seq_id for incoming sequence [SCSI] qla2xxx: Updates to ISP82xx support. [SCSI] qla2xxx: Optionally disable target reset. [SCSI] qla2xxx: ensure flash operation and host reset via sg_reset are mutually exclusive [SCSI] qla2xxx: Silence bogus warning by gcc for wrap and did. [SCSI] qla2xxx: T10 DIF support added. ...
| * [SCSI] Merge scsi-misc-2.6 into scsi-rc-fixes-2.6James Bottomley2010-05-18129-3742/+14224
| |\ | | | | | | | | | Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] aacraid: add an ifdef'd device delete case instead of taking the ↵Rajashekhara, Mahesh2010-05-162-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | device offline Problem description: -------------------- The problem reported by one of the customer was when a logical array is deleted(from the SDK, from the GUI, from arcconf) then the corresponding physical device (/dev/sdb, for example) is not removed from the Linux namespace. So you end up with a "dead" device entry. And some of the linux tools go slightly wonky. Solution: --------- Based on the notification from FW, the driver calls "scsi_remove_device" for the DELETED drive. This call not only informs the scsi device status to the SCSI mid layer and also it will remove corresponding scsi device entries from the Linux sysfs. Signed-off-by: Mahesh Rajashekhara <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] aacraid: prohibit access to array container spaceRajashekhara, Mahesh2010-05-161-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem description: -------------------- The issue reported by one of the customer was able to read LBA beyond the array reported size with "sg_read" utility. If N is the last block address reported, then should not be able to read past N, i.e. N+1. But in their case, reported last LBA=143134719. So should not have been able to read with LBA=143134720, but it is read without failure, which means reported size to the OS is not correct and is less than the actual last block address. Solution: --------- Firmware layer exposes lesser container capacity than the actual one. It exposes [Actual size - Spitfire space(10MB)] to the OS, IO's to the 10MB should be prohibited from the Linux driver. Driver checks LBA boundary, if its greater than the array reported size then sets sensekey to HARDWARE_ERROR and sends the notification to the MID layer. Signed-off-by: Mahesh Rajashekhara <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] aacraid: add support for handling ATA pass-through commands.Rajashekhara, Mahesh2010-05-161-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two conditions for ATA pass thru command that falls into 'SRB_STATUS_ERROR' condition. 1. When the "CC" bit is set by the host in ATA pass-through CDB - Even for the successful completion, SCSI target shall generate check condition. - Driver returns a result code of SAM_STAT_CHECK_CONDITION, with a driver byte of DID_OK to the mid layer. Below is the snippet of existing code which fills a result code of SAM_STAT_CHECK_CONDITION: *********************************** if (le32_to_cpu(srbreply->scsi_status) == SAM_STAT_CHECK_CONDITION) { int len; scsicmd->result |= SAM_STAT_CHECK_CONDITION; .......... ************************************ 2. When the "CC" bit is reset by the host and if SCSI target generates a check condition when an error occurs. - Driver returns a result code of SAM_STAT_CHECK_CONDITION, with a driver byte of DID_ERROR to the mid layer. Signed-off-by: Mahesh Rajashekhara <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] aacraid: expose physical devices for models with newer firmwareRajashekhara, Mahesh2010-05-161-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default driver setting is "expose_physicals=0", which means raw physical drives are not exposed to OS. If the user wants to expose connected physical drives, enable "expose_physicals" module parameter. With the new JBOD firmware, physical drives are not available for "expose_physicals>0". In function "aac_expose_phy_device", modified to reset the appropriate bit in the first byte of inquiry data. This fix exposes the connected physical drives. Signed-off-by: Mahesh Rajashekhara <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] aacraid: respond automatically to volumes added by config toolRajashekhara, Mahesh2010-05-162-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem description: -------------------- When the JBOD is created from the OS using Adaptec Storage Manager utility device is not available under FDISK until a system restart is done. Solution: --------- AIF handling: If there is a JBOD drive added to the system, identify the old one with scsi_device_lookup() and remove it to enable a fresh scsi_add_device(); else the new JBOD is not available until reboot. Signed-off-by: Mahesh Rajashekhara <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] fcoe: fix fcoe module ref countingVasu Dev2010-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently fcoe module ref count is used for tracking active fcoe instances, it means each fcoe instance create increments the count while destroy dec the count. The dec is done only if fcoe instance is destroyed from /sysfs but not if destroyed due to NETDEV_UNREGISTER event. So this patch moves only module_put doing dec to common fcoe_if_destroy function, so that dec would occur on ever fcoe instance destroy. Signed-off-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] libfcoe: FIP Keep-Alive messages for VPorts are sent with incorrect ↵Kaladhar Musunuru2010-05-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | port_id and wwn All VNports are sending FIP Keep-Alive messages with port_id and wwpn of the parent host instead of it's own port_id and wwpn. Standard FIP descriptor type 11 indicates to send own port_id and port_name. Signed-off-by: Kaladhar Musunuru <kmusunuru@juniper.net> Acked-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] libfcoe: Fix incorrect MAC address clearingKaladhar Musunuru2010-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix typo in memset. Incorrect length parameter to memset resulting non-zero MAC address in FPMA messages. Signed-off-by: Kaladhar Musunuru <kmusunuru@juniper.net> Acked-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] fcoe: fix a circular locking issue with rtnl and sysfs mutexVasu Dev2010-05-161-7/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently rtnl mutex is grabbed during fcoe create, destroy, enable and disable operations while sysfs s_active read mutex is already held, but simultaneously other networking events could try grabbing write s_active mutex while rtnl is already held and that is causing circular lock warning, its detailed log pasted at end. In this log, the rtnl was held before write s_active during device renaming but there are more such cases as Joe reported another instance with tg3 open at:- http://www.open-fcoe.org/pipermail/devel/2010-February/008263.html This patch fixes this issue by not waiting for rtnl mutex during fcoe ops, that means if rtnl mutex is not immediately available then restart_syscall() to allow others waiting in line to grab s_active along with rtnl mutex to finish their work first under these mutex. Currently rtnl mutex was grabbed twice during fcoe_destroy call flow, second grab was from fcoe_if_destroy called from fcoe_destroy after dropping rtnl mutex before calling fcoe_if_destroy, so instead made fcoe_if_destroy always called with rtnl mutex held to have this mutex grabbed only once in this code path. However left matching rtnl_unlock as-is in its original place as it was dropped there for good reason since very next call causes synchronous fip worker flush and if rtnl mutex is still held before flush then that would cause new circular warning between fip->recv_work and rtnl mutex, I've added detailed comment for this on fcoe_if_destroy calling and rtnl muxtes unlocking. ======================================================= [ INFO: possible circular locking dependency detected ] 2.6.33.1linux-stable-2.6.33 #1 ------------------------------------------------------- fcoemon/18823 is trying to acquire lock: (fcoe_config_mutex){+.+.+.}, at: [<ffffffffa02ba5fc>] fcoe_create+0x27/0x4f7 [fcoe] but task is already holding lock: (s_active){++++.+}, at: [<ffffffff8115ef93>] sysfs_get_active_two+0x31/0x48 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (s_active){++++.+}: [<ffffffff81077bdb>] __lock_acquire+0xb73/0xd2b [<ffffffff81077e60>] lock_acquire+0xcd/0xf1 [<ffffffff8115e5df>] sysfs_deactivate+0x8b/0xe0 [<ffffffff8115edfb>] sysfs_addrm_finish+0x36/0x55 [<ffffffff8115d0cc>] sysfs_hash_and_remove+0x53/0x6a [<ffffffff8115f353>] sysfs_remove_link+0x21/0x23 [<ffffffff812b6c93>] device_rename+0x99/0xcb [<ffffffff8138dbf0>] dev_change_name+0xd5/0x1d2 [<ffffffff8138deee>] dev_ifsioc+0x201/0x2ac [<ffffffff8138e4ba>] dev_ioctl+0x521/0x632 [<ffffffff81379e43>] sock_do_ioctl+0x3d/0x47 [<ffffffff8137a254>] sock_ioctl+0x213/0x222 [<ffffffff81114614>] vfs_ioctl+0x32/0xa6 [<ffffffff81114b94>] do_vfs_ioctl+0x490/0x4d6 [<ffffffff81114c30>] sys_ioctl+0x56/0x79 [<ffffffff81009b42>] system_call_fastpath+0x16/0x1b -> #1 (rtnl_mutex){+.+.+.}: [<ffffffff81077bdb>] __lock_acquire+0xb73/0xd2b [<ffffffff81077e60>] lock_acquire+0xcd/0xf1 [<ffffffff8142f343>] __mutex_lock_common+0x4b/0x383 [<ffffffff8142f73f>] mutex_lock_nested+0x3e/0x43 [<ffffffff813959f9>] rtnl_lock+0x17/0x19 [<ffffffff8138ccae>] register_netdevice_notifier+0x1e/0x19b [<ffffffffa02580c1>] 0xffffffffa02580c1 [<ffffffff81002069>] do_one_initcall+0x5e/0x15e [<ffffffff81084094>] sys_init_module+0xd8/0x23a [<ffffffff81009b42>] system_call_fastpath+0x16/0x1b -> #0 (fcoe_config_mutex){+.+.+.}: [<ffffffff81077a85>] __lock_acquire+0xa1d/0xd2b [<ffffffff81077e60>] lock_acquire+0xcd/0xf1 [<ffffffff8142f343>] __mutex_lock_common+0x4b/0x383 [<ffffffff8142f73f>] mutex_lock_nested+0x3e/0x43 [<ffffffffa02ba5fc>] fcoe_create+0x27/0x4f7 [fcoe] [<ffffffff810635b1>] param_attr_store+0x27/0x35 [<ffffffff81063619>] module_attr_store+0x26/0x2a [<ffffffff8115dae3>] sysfs_write_file+0x108/0x144 [<ffffffff81107bd1>] vfs_write+0xae/0x10b [<ffffffff81107cee>] sys_write+0x4a/0x6e [<ffffffff81009b42>] system_call_fastpath+0x16/0x1b other info that might help us debug this: 3 locks held by fcoemon/18823: #0: (&buffer->mutex){+.+.+.}, at: [<ffffffff8115da17>] sysfs_write_file+0x3c/0x144 #1: (s_active){++++.+}, at: [<ffffffff8115ef86>] sysfs_get_active_two+0x24/0x48 #2: (s_active){++++.+}, at: [<ffffffff8115ef93>] sysfs_get_active_two+0x31/0x48 stack backtrace: Pid: 18823, comm: fcoemon Tainted: G W 2.6.33.1linux-stable-2.6.33 #1 Call Trace: [<ffffffff81076c38>] print_circular_bug+0xa8/0xb6 [<ffffffff81077a85>] __lock_acquire+0xa1d/0xd2b [<ffffffffa02ba5fc>] ? fcoe_create+0x27/0x4f7 [fcoe] [<ffffffff81077e60>] lock_acquire+0xcd/0xf1 [<ffffffffa02ba5fc>] ? fcoe_create+0x27/0x4f7 [fcoe] [<ffffffffa02ba5fc>] ? fcoe_create+0x27/0x4f7 [fcoe] [<ffffffff8142f343>] __mutex_lock_common+0x4b/0x383 [<ffffffffa02ba5fc>] ? fcoe_create+0x27/0x4f7 [fcoe] [<ffffffff8106ac70>] ? cpu_clock+0x43/0x5e [<ffffffff81074e12>] ? lockstat_clock+0x11/0x13 [<ffffffff81074e40>] ? lock_release_holdtime+0x2c/0x127 [<ffffffff8115ef93>] ? sysfs_get_active_two+0x31/0x48 [<ffffffff8142f73f>] mutex_lock_nested+0x3e/0x43 [<ffffffffa02ba5fc>] fcoe_create+0x27/0x4f7 [fcoe] [<ffffffff810635b1>] param_attr_store+0x27/0x35 [<ffffffff81063619>] module_attr_store+0x26/0x2a [<ffffffff8115dae3>] sysfs_write_file+0x108/0x144 [<ffffffff81107bd1>] vfs_write+0xae/0x10b [<ffffffff81076596>] ? trace_hardirqs_on_caller+0x125/0x150 [<ffffffff81107cee>] sys_write+0x4a/0x6e [<ffffffff81009b42>] system_call_fastpath+0x16/0x1b Signed-off-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] libfc: Move the port_id into lportRobert Love2010-05-168-24/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch creates a port_id member in struct fc_lport. This allows libfc to just deal with fc_lport instances instead of calling into the fc_host to get the port_id. This change helps in only using symbols necessary for operation from the libfc structures. libfc still needs to change the fc_host_port_id() if the port_id changes so the presentation layer (scsi_transport_fc) can provide the user with the correct value, but libfc shouldn't rely on the presentation layer for operational values. Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] fcoe: move link speed checking into its own routineRobert Love2010-05-161-13/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't make sense to update the link speed in the is_link_ok() routine. Move it to it's own routine and acquire the device speed when we're configuring the device initially as well as if there are any netdev events received. Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] libfc: Remove extra pointer checkRobert Love2010-05-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | The fcf pointer is checked again after this verification making the first check redundant. Remote the first check. Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] libfc: Remove unused fc_get_host_port_typeRobert Love2010-05-161-11/+0
| | | | | | | | | | | | | | | | | | | | | Remove this unused routine. Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] fcoe: fixes wrong error exit in fcoe_createVasu Dev2010-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fcoe_create exits using out_nodev label when module is not yet LIVE but this exit path unlocks the rtnl_lock though rtnl lock was not held in this case. So this patch replaces out_nodev with out_nomod to exit w/o unlocking rtnl_lock. Signed-off-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] libfc: set seq_id for incoming sequenceJoe Eykholt2010-05-161-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the recent patch "fixes unnecessary seq id jump" the SCST module fcst stopped working because multi-sequence write data wasn't finding the sequence after the first frame. Add back the setting of the seq_id when the first frame arrives. Also fix indentation on two lines. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] qla2xxx: Updates to ISP82xx support.Giridhar Malavali2010-05-164-144/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Allow transition to NEED RESET state only from READY state for ISP82xx. 2) Avoid infinite ISP aborts when chip reset fails. 3) Code cleanup to remove some of the unused debug code. Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com> Signed-off-by: Santosh Vernekar <santosh.vernekar@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] qla2xxx: Optionally disable target reset.Giridhar Malavali2010-05-162-1/+8
| | | | | | | | | | | | | | | Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] qla2xxx: ensure flash operation and host reset via sg_reset are ↵Lalit Chandivade2010-05-162-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mutually exclusive The problem occurring is a hw-race where there's an outstanding read-flash operation occurring while the chip is being reset (done via an sg_reset script). After the chip is paused, the read-flash operation never completes and the DPC thread, while trying to complete the reset, is never able to recover, as the HW appears to be hung... The fix is to wait for outstanding flash operation prior to doing a sg_reset -h. And to wait for reset to complete before any flash operations. Note, during the wait, if any of the operation (reset/flash) does not complete, failure is returned to the upper layer. The upper layer either need to fail or retry. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] qla2xxx: Silence bogus warning by gcc for wrap and did.Mike Waychison2010-05-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The qla2xxx driver uses a port_id_t to mark the start of its enumerations. gcc is complaining that wrap.b24 may be used uninitialized, but this doesn't look to be possible. Silence it. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] qla2xxx: T10 DIF support added.Arun Easi2010-05-1610-12/+1053
| | | | | | | | | | | | | | | | | | Signed-off-by: Duane Grigsby <duane.grigsby@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] qla2xxx: Support for asynchronous TM and Marker IOCBs.Madhuranath Iyengar2010-05-168-4/+366
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we can only issue the task management (TM) commands via the mailbox mechanism. This is a limitation, since only one mailbox command can be issued at a time. The purpose of this effort is to provide support for issuing and processing the respose to TM and Marker IOCBs asynchronously. Towards achieving this, the consolidated srb architecture that is currently used for BSG and IOCB/Logio commands has been enhanced and used. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] qla2xxx: Provide common framework for BSG and IOCB commands.Madhuranath Iyengar2010-05-167-142/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, BSG and IOCB/Logio commands have a different framework (srb structs). The purpose of this effort is to consolidate them into a generalized framework for these as well as other asynchronous operations in the future. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] qla2xxx: Cleanup FCP-command-status processing debug statements.Andrew Vasquez2010-05-161-129/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrate to a consistent set of debug entries during status-IOCB handling: * group CS_TIMEOUT handling with CS_PORT_UNAVAILABLE and the like (more regrouping of common behaviour). * drop CS_DATA_OVERRUN handling as it now falls into the 'default' case (still returns DID_ERROR). * consolidate CS_RESET and CS_ABORTED handling, as we the only functional difference was a printk() (still returns DID_RESET). * dropped all the earlier inconsistent [qla_]printk()s sprinkled throught the needlessly large case-statement. Failure case I/Os are now logged with a 'standard' format: <command failure details> <command generic details> so, for example a dropped-frame is logged as: qla2xxx 0000:13:00.0: scsi(16:0:0) Dropped frame(s) detected (4000 of 4000 bytes). qla2xxx 0000:13:00.0: scsi(16:0:0) FCP command status: 0x15-0x18 (70018) \ oxid=78 ser=76 cdb=280000 len=4000 rsp_info=0 resid=0 fw_resid=4000 which should now convey all relevant information. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] qla2xxx: Limit mailbox command contention for ADISC requests.Andrew Vasquez2010-05-166-28/+178
| | | | | | | | | | | | | | | Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] qla2xxx: Further generalization of SRB CTX infrastructure.Andrew Vasquez2010-05-163-69/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | Prepare CTX infrastructure for additional asynchronous executions, add generic done() operator, pull CMD definitions. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] qla2xxx: Add char device to increase driver use countHarish Zunjarrao2010-05-162-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver should not be unloaded if any application is using it. To disallow driver unload, driver use count must be incremented. Application uses this char device as handle and increases driver use count to avoid possible driver unload. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] qla2xxx: Clear error status after uncorrectable non-fatal errors.Lalit Chandivade2010-05-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently error status is cleared only after the uncorrectable fatal errors in the qla2xxx_pci_slot_reset. This fix is added to clear the error status in qla2xxx_pci_resume. This way for both fatal and non-fatal errors the error status gets cleared properly. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=572258 Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] qla2xxx: Display proper link state for disconnected ports.Andrew Vasquez2010-05-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | With qla2xxx using mid-layer async-scsi-scanning, the link state for disconnected port is displayed wrong. Additional check for cable presence is considered to display proper link state. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] qla2xxx: Check for ISP84xx before processing to get 84xx firmware ↵Andrew Vasquez2010-05-161-3/+5
| | | | | | | | | | | | | | | | | | | | | version. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] a2091: Kill ugly DMA() macroGeert Uytterhoeven2010-05-021-22/+26
| | | | | | | | | | | | | | | Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] a3000: Use shost_priv() and kill ugly HDATA() macroGeert Uytterhoeven2010-05-021-25/+28
| | | | | | | | | | | | | | | Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] mvme147: Use shost_priv() and kill ugly HDATA() macroGeert Uytterhoeven2010-05-021-6/+7
| | | | | | | | | | | | | | | Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] gvp11: Use shost_priv() and kill ugly HDATA() macroGeert Uytterhoeven2010-05-021-47/+46
| | | | | | | | | | | | | | | Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] a2091: Use shost_priv() and kill ugly HDATA() macroGeert Uytterhoeven2010-05-021-27/+29
| | | | | | | | | | | | | | | Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] a3000: ReindentationGeert Uytterhoeven2010-05-022-163/+163
| | | | | | | | | | | | | | | Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] mvme147: ReindentationGeert Uytterhoeven2010-05-022-83/+87
| | | | | | | | | | | | | | | Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] gvp11: ReindentationGeert Uytterhoeven2010-05-022-297/+301
| | | | | | | | | | | | | | | Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] a2091: ReindentationGeert Uytterhoeven2010-05-022-170/+171
| | | | | | | | | | | | | | | Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] wd33c93: Kill empty wd33c93_release()Geert Uytterhoeven2010-05-026-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wd33c93_release() has been empty since ages, and sgiwd93.c no longer calls it since its conversion to a proper platform driver 2 years ago. Also remove the callers in the m68k wd33c93 shims. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| | * [SCSI] qla4xxx: Update driver version to 5.02.00-k1Vikas Chaudhary2010-05-021-2/+1
| | | | | | | | | | | | | | | | | | | | | 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 abort task management commandVikas Chaudhary2010-05-026-9/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Handles SCSI command aborts. * Serialization srb between error handler and command completion path. 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 use of cmd->host_scribbleVikas Chaudhary2010-05-023-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | used cmd->host_scribble to store iocb command handle. 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-023-43/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
OpenPOWER on IntegriCloud