aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi
AgeCommit message (Collapse)AuthorFilesLines
2012-09-14[SCSI] lpfc 8.3.34: Add LOGO support after ABTS complianceJames Smart7-80/+296
Make compliant with FC specs by sending LOGO after ABTS timeouts Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] scsi_lib: Set the device state from transport-offline to runningVikas Chaudhary1-1/+2
FC and iSCSI class set SCSI devices to transport-offline state after fast_io_fail/replacement_timeout has fired, but after relogin, function scsi_internal_device_unblock() is not setting scsi device state to running. Due to this the devices even after being relogged in remain offline. Signed-off-by: Vikas Chaudhary <[email protected]> Reviewed-by: Mike Christie <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] qla4xxx: Update driver version to 5.02.00-k19Vikas Chaudhary1-1/+1
Signed-off-by: Vikas Chaudhary <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] qla4xxx: Properly handle SCSI underrun while processing status IOCBs.Lalit Chandivade1-43/+59
The current code would incorrectly return a DID_OK for a CHECK CONDITION with Recovered error sense key causing incorrect completion of a command when there is a dropped frame. Signed-off-by: Lalit Chandivade <[email protected]> Signed-off-by: Tej Parkash <[email protected]> Signed-off-by: Vikas Chaudhary <[email protected]> Reviewed-by: Mike Christie <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] qla4xxx: Fix multiple conn login event issue during session recovery.Manish Rangankar1-4/+14
During iscsid session recovery driver sends multiple ISCSI_CONN_STATE_LOGGED_IN event from qla4xxx_conn_start() and qla4xxx_ddb_change(), which causes iscsid to crash. Signed-off-by: Manish Rangankar <[email protected]> Signed-off-by: Vikas Chaudhary <[email protected]> Reviewed-by: Mike Christie <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] qla4xxx: Fix gcc warning for x86 systemVikas Chaudhary1-1/+1
Fix warning:- drivers/scsi/qla4xxx/ql4_nx.c:1867:2: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint32_t’ [-Wformat] Signed-off-by: Vikas Chaudhary <[email protected]> Reviewed-by: Mike Christie <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] qla4xxx: Fix memory corruption issue in qla4xxx_ep_connect.Manish Rangankar3-3/+3
In qla4xxx_ep_connect(), qla_ep->dst_addr and dst_addr are type struct sockaddr. We are copying sizeof(struct sockaddr_in6) bytes from dst_addr to qla_ep->dst_addr which is 12 bytes larger. This will cause memory corruption. So we change qla_ep->dst_addr to struct sockaddr_storage which is of 128 byte, large enough to hold sizeof(struct sockaddr_in6). Signed-off-by: Manish Rangankar <[email protected]> Signed-off-by: Vikas Chaudhary <[email protected]> Reviewed-by: Mike Christie <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] scsi: virtio-scsi: Fix address translation failure of HighMem pages ↵Wang Sen1-1/+1
used by sg list When using the commands below to write some data to a virtio-scsi LUN of the QEMU guest(32-bit) with 1G physical memory(qemu -m 1024), the qemu will crash. # sudo mkfs.ext4 /dev/sdb (/dev/sdb is the virtio-scsi LUN.) # sudo mount /dev/sdb /mnt # dd if=/dev/zero of=/mnt/file bs=1M count=1024 In current implementation, sg_set_buf is called to add buffers to sg list which is put into the virtqueue eventually. But if there are some HighMem pages in table->sgl you can not get virtual address by sg_virt. So, sg_virt(sg_elem) may return NULL value. This will cause QEMU exit when virtqueue_map_sg is called in QEMU because an invalid GPA is passed by virtqueue. Two solutions are discussed here: http://lkml.indiana.edu/hypermail/linux/kernel/1207.3/00675.html Finally, value assignment approach was adopted because: Value assignment creates a well-formed scatterlist, because the termination marker in source sg_list has been set in blk_rq_map_sg(). The last entry of the source sg_list is just copied to the the last entry in destination list. Note that, for now, virtio_ring does not care about the form of the scatterlist and simply processes the first out_num + in_num consecutive elements of the sg[] array. I have tested the patch on my workstation. QEMU would not crash any more. Cc: <[email protected]> # 3.4: 4fe74b1: [SCSI] virtio-scsi: SCSI driver Signed-off-by: Wang Sen <[email protected]> Acked-by: Paolo Bonzini <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] mvsas: Fix oops when ata commond timeout.Jianpeng Ma1-1/+1
Kernel message follows: [ 511.712011] sd 11:0:0:0: [sdf] command ffff8800a4e81400 timed out [ 511.712022] sas: Enter sas_scsi_recover_host busy: 1 failed: 1 [ 511.712024] sas: trying to find task 0xffff8800a4d24c80 [ 511.712026] sas: sas_scsi_find_task: aborting task 0xffff8800a4d24c80 [ 511.712029] drivers/scsi/mvsas/mv_sas.c 1631:mvs_abort_task() mvi=ffff8800b5300000 task=ffff8800a4d24c80 slot=ffff8800b5325038 slot_idx=x0 [ 511.712035] BUG: unable to handle kernel NULL pointer dereference at 0000000000000058 [ 511.712040] IP: [<ffffffff815f8c0c>] _raw_spin_lock_irqsave+0xc/0x30 [ 511.712047] PGD 0 [ 511.712049] Oops: 0002 [#1] SMP [ 511.712052] Modules linked in: mvsas libsas scsi_transport_sas raid456 async_pq async_xor xor async_memcpy async_raid6_recov raid6_pq async_tx [last unloaded: mvsas] [ 511.712062] CPU 3 [ 511.712066] Pid: 7322, comm: scsi_eh_11 Not tainted 3.5.0+ #106 To Be Filled By O.E.M. To Be Filled By O.E.M./To be filled by O.E.M. [ 511.712068] RIP: 0010:[<ffffffff815f8c0c>] [<ffffffff815f8c0c>] _raw_spin_lock_irqsave+0xc/0x30 [ 511.712073] RSP: 0018:ffff880098d3bcb0 EFLAGS: 00010086 [ 511.712074] RAX: 0000000000000286 RBX: 0000000000000058 RCX: 00000000000000c3 [ 511.712076] RDX: 0000000000000100 RSI: 0000000000000046 RDI: 0000000000000058 [ 511.712078] RBP: ffff880098d3bcb0 R08: 000000000000000a R09: 0000000000000000 [ 511.712080] R10: 00000000000004e8 R11: 00000000000004e7 R12: ffff8800a4d24c80 [ 511.712082] R13: 0000000000000050 R14: ffff8800b5325038 R15: ffff8800a4eafe00 [ 511.712084] FS: 0000000000000000(0000) GS:ffff8800bdb80000(0000) knlGS:0000000000000000 [ 511.712086] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [ 511.712088] CR2: 0000000000000058 CR3: 00000000a4ce6000 CR4: 00000000000407e0 [ 511.712090] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 511.712091] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 511.712093] Process scsi_eh_11 (pid: 7322, threadinfo ffff880098d3a000, task ffff8800a61dde40) [ 511.712095] Stack: [ 511.712096] ffff880098d3bce0 ffffffff81060683 ffff880000000000 0000000000000000 [ 511.712099] ffff8800a4d24c80 ffff8800b5300000 ffff880098d3bcf0 ffffffffa0076a88 [ 511.712102] ffff880098d3bd50 ffffffffa0079bb5 ffff880000000000 ffff880000000018 [ 511.712106] Call Trace: [ 511.712110] [<ffffffff81060683>] complete+0x23/0x60 [ 511.712115] [<ffffffffa0076a88>] mvs_tmf_timedout+0x18/0x20 [mvsas] [ 511.712119] [<ffffffffa0079bb5>] mvs_slot_complete+0x765/0x7d0 [mvsas] [ 511.712125] [<ffffffffa005a17d>] sas_scsi_recover_host+0x55d/0xdb0 [libsas] [ 511.712128] [<ffffffff8106d600>] ? idle_balance+0xe0/0x130 [ 511.712133] [<ffffffff813b150c>] scsi_error_handler+0xcc/0x470 [ 511.712136] [<ffffffff815f7ad0>] ? __schedule+0x370/0x730 [ 511.712139] [<ffffffff8105f728>] ? __wake_up_common+0x58/0x90 [ 511.712142] [<ffffffff813b1440>] ? scsi_eh_get_sense+0x110/0x110 [ 511.712146] [<ffffffff810571be>] kthread+0x8e/0xa0 [ 511.712150] [<ffffffff816015f4>] kernel_thread_helper+0x4/0x10 [ 511.712153] [<ffffffff81057130>] ? flush_kthread_work+0x120/0x120 [ 511.712156] [<ffffffff816015f0>] ? gs_change+0xb/0xb [ 511.712157] Code: 8a 00 01 00 00 89 d0 f0 66 0f b1 0f 66 39 d0 0f 94 c0 0f b6 c0 5d c3 0f 1f 84 00 00 00 00 00 55 48 89 e5 9c 58 fa ba 00 01 00 00 <f0> 66 0f c1 17 0f b6 ce 38 d1 74 11 0f 1f 84 00 00 00 00 00 f3 [ 511.712191] RIP [<ffffffff815f8c0c>] _raw_spin_lock_irqsave+0xc/0x30 [ 511.712194] RSP <ffff880098d3bcb0> [ 511.712196] CR2: 0000000000000058 [ 511.712198] ---[ end trace a781c7b1e65db92c ]--- Signed-off-by: Jianpeng Ma <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] lpfc 8.3.33: Update lpfc version for 8.3.33 driver releaseJames Smart1-1/+1
Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] lpfc 8.3.33: Fixed incomplete list of SLI4 commands with extended ↵James Smart4-1/+18
timeout value Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] lpfc 8.3.33: Fixed debugfs queInfo to include queue statsJames Smart1-157/+259
Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] lpfc 8.3.33: Add lpfc_fcp_look_ahead module parameterJames Smart6-4/+102
Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] lpfc 8.3.33: Make I/O to hw queue distribution algorithm a module ↵James Smart4-1/+22
parameter Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] lpfc 8.3.33: Change Naming convention for SLI4 Interrupt vectorJames Smart3-1/+13
Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] lpfc 8.3.33: Allow per-hba interrupt rate tuningJames Smart4-12/+28
Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] lpfc 8.3.33: Tie parallel I/O queues into separate MSIX vectorsJames Smart8-687/+454
Add fcp_io_channel module attribute to control amount of parallel I/O queues Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] lpfc 8.3.33: Add Interrupts per second stats via debugfsJames Smart2-1/+19
Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] lpfc 8.3.33: Parallelize SLI-4 Q distributionJames Smart6-36/+77
Commonize SLI-3/4 Ring/Queue framework, to keep SLI-3 compatibility Parallelize SLI-4 Q distribution - to use multiple posting/completion queues Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] lpfc 8.3.33: Misc changes to optimize critical pathJames Smart2-14/+29
Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] lpfc 8.3.33: Formally separate lpfc_sli_ring SLI-3 and SLI-4 variantionsJames Smart5-105/+150
Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] lpfc 8.3.33: Convert to no SCSI host lock in queuecommandJames Smart1-7/+2
Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] lpfc 8.3.33: Add debugfs interface to display SLI queue informationJames Smart3-1/+66
Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] lpfc 8.3.33: Fix error when remote port switches addressJames Smart2-8/+59
Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] lpfc 8.3.33: Fix scsi_eh escalation panic by checking the proper ↵James Smart1-4/+4
return status Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] lpfc 8.3.33: Check data transfer amount on write commandsJames Smart1-3/+3
Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] lpfc 8.3.33: Fix error of not reiniting mbx cmd before reissueJames Smart1-2/+3
Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] lpfc 8.3.33: Fix bug with rrq_pool not being destroyed during driver ↵James Smart1-1/+5
removal. Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] lpfc 8.3.33: Enable attachment to OCe14000 adaptersJames Smart2-0/+11
Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] lpfc 8.3.33: When doing loopback testing, set the diag valid bitJames Smart2-0/+7
Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] ipr: remove an unneeded checkDan Carpenter1-7/+5
"rc" is always zero here, so there is no need to check. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Brian King <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] ipr: missing unlock before a returnDan Carpenter1-2/+5
We recently changed the locking in this function, but this return was missed. It needs an unlock and the IRQs need to be restored. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Brian King <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] add DID_TARGET_FAILURE and DID_NEXUS_FAILURE to hostbyte_table in ↵Moger, Babu1-1/+2
constants.c Without this patch, scsi_show_result prints hostbyte as invalid for statuses that are not defined in hostbyte_table (when scsi logging is enabled). Signed-off-by: Babu Moger <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] hpsa: use ioremap_nocache instead of ioremapStephen M. Cameron1-1/+2
I think ioremap() ends up being equivalent to ioremap_nocache by default, but we should signal our intent that these mappings should be non-cacheable. Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] hpsa: fix incorrect abort diagnostic messageStephen M. Cameron1-1/+1
In the abort handler, when asked to abort a command which is not known to the driver, SUCCESS is returned, but the diagnostic message incorrectly indicates the abort failed. Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-14[SCSI] hpsa: Use LUN reset instead of target resetStephen M. Cameron1-1/+1
It turns out Smart Array logical drives do not support target reset and when the target reset fails, the logical drive will be taken off line. Symptoms look like this: hpsa 0000:03:00.0: Abort request on C1:B0:T0:L0 hpsa 0000:03:00.0: resetting device 1:0:0:0 hpsa 0000:03:00.0: cp ffff880037c56000 is reported invalid (probably means target device no longer present) hpsa 0000:03:00.0: resetting device failed. sd 1:0:0:0: Device offlined - not ready after error recovery sd 1:0:0:0: rejecting I/O to offline device EXT3-fs error (device sdb1): read_block_bitmap: LUN reset is supported though, and is what we should be using. Target reset is also disruptive in shared SAS situations, for example, an external MSA1210m which does support target reset attached to Smart Arrays in multiple hosts -- a target reset from one host is disruptive to other hosts as all LUNs on the target will be reset and will abort all outstanding i/os back to all the attached hosts. So we should use LUN reset, not target reset. Tested this with Smart Array logical drives and with tape drives. Not sure how this bug survived since 2009, except it must be very rare for a Smart Array to require more than 30s to complete a request. Signed-off-by: Stephen M. Cameron <[email protected]> Cc: [email protected] Signed-off-by: James Bottomley <[email protected]>
2012-09-13scsi_netlink: Remove dead and buggy codeEric W. Biederman1-540/+15
The scsi netlink code confuses the netlink port id with a process id, going so far as to read NETLINK_CREDS(skb)->pid instead of the correct NETLINK_CB(skb).pid. Fortunately it does not matter because nothing registers to respond to scsi netlink requests. The only interesting use of the scsi_netlink interface is fc_host_post_vendor_event which sends a netlink multicast message. Since nothing registers to handle scsi netlink messages kill all of the registration logic, while retaining the same error handling behavior preserving the userspace visible behavior and removing all of the confused code that thought a netlink port id was a process id. This was tested with a kernel allyesconfig build which had no problems. Cc: James Bottomley <[email protected]> Cc: James Smart <[email protected]> Signed-off-by: "Eric W. Biederman" <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-09-13Merge tag 'isci-for-3.6' into for-nextJames Bottomley5-5/+5
isci update for 3.6 1/ Fix the workaround for drives that have a slow response to COMSAS. Drives with this problem intermittently take a long time to be identified, or fail to be identified altogether. 2/ A minor fix for the efi variable code failure path 3/ A handful of smatch fixups from Dan Carpenter
2012-09-12Merge branch 'pci/stephen-const' into nextBjorn Helgaas6-6/+6
* pci/stephen-const: make drivers with pci error handlers const scsi: make pci error handlers const netdev: make pci_error_handlers const PCI: Make pci_error_handlers const
2012-09-10netlink: Rename pid to portid to avoid confusionEric W. Biederman1-2/+2
It is a frequent mistake to confuse the netlink port identifier with a process identifier. Try to reduce this confusion by renaming fields that hold port identifiers portid instead of pid. I have carefully avoided changing the structures exported to userspace to avoid changing the userspace API. I have successfully built an allyesconfig kernel with this change. Signed-off-by: "Eric W. Biederman" <[email protected]> Acked-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-09-08netlink: hide struct module parameter in netlink_kernel_createPablo Neira Ayuso2-3/+2
This patch defines netlink_kernel_create as a wrapper function of __netlink_kernel_create to hide the struct module *me parameter (which seems to be THIS_MODULE in all existing netlink subsystems). Suggested by David S. Miller. Signed-off-by: Pablo Neira Ayuso <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-09-07scsi: make pci error handlers constStephen Hemminger6-6/+6
Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-09-05powerpc: Rename 64-bit PVR constants to PVR_fooMichael Ellerman1-9/+9
We have an old FIXME in reg.h which points out that we should standardise on PVR_foo for our PVR #defines. Currently we use PVR_ on 32-bit and PV_ on 64-bit. So do that rename and remove the FIXME. Seeing as we're touching all but one usage of __is_processor(), rename it to something less ugly and more indicative of what it does, which is simply to check the PVR version. Signed-off-by: Michael Ellerman <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2012-09-01treewide: fix comment/printk/variable typosAnatol Pomozov7-8/+8
Signed-off-by: Anatol Pomozov <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-01ipr: fix small coding style issuesKleber Sacilotto de Souza1-33/+33
Fixing small trivial coding style issues. Signed-off-by: Kleber Sacilotto de Souza <[email protected]> Acked-by: Brian King <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-01gdt: remove unnecessary #definesJon Mason1-9/+0
Remove PCI vendor IDs, as they are already defined in pci_ids.h. Signed-off-by: Jon Mason <[email protected]> Cc: Achim Leubner <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-01megaraid: remove unnecessary #definesJon Mason2-38/+2
Remove PCI vendor and subvendor IDs, as they are already defined in pci_ids.h. Signed-off-by: Jon Mason <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-01scsi: fix various printk and comment typosMasanari Iida7-13/+13
Correct spelling typo within drivers/scsi Signed-off-by: Masanari Iida <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-08-24[SCSI] megaraid_sas: Version and Changelog updateadam radford2-4/+4
Signed-off-by: Adam Radford <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-08-24[SCSI] megaraid_sas: Add resetwaittime module parameteradam radford2-3/+9
This allows a user to adjust the wait time in seconds after I/O timeout before resetting the adapter. Signed-off-by: Adam Radford <[email protected]> Signed-off-by: James Bottomley <[email protected]>