aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi
AgeCommit message (Collapse)AuthorFilesLines
2011-02-01scsi/scsi_tgt_lib: scsi_tgtd isn't used in memory reclaim pathTejun Heo1-1/+1
Workqueue scsi_tgtd isn't used during memory reclaim. Convert to alloc_workqueue() without WQ_MEM_RECLAIM. Signed-off-by: Tejun Heo <[email protected]> Cc: FUJITA Tomonori <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: [email protected]
2011-02-01scsi/be2iscsi,qla2xxx: convert to alloc_workqueue()Tejun Heo2-2/+2
Switch to new workqueue interface alloc_workqueue(). These are identity conversions. Signed-off-by: Tejun Heo <[email protected]> Acked-by: Madhuranath Iyengar <[email protected]> Cc: Jayamohan Kallickal <[email protected]> Cc: Andrew Vasquez <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: [email protected]
2011-01-24[SCSI] libosd: osd_req_read_sg, optimize the single entry caseBoaz Harrosh1-4/+16
Since sg-read is a bidi operation, it is a gain to convert a single sg entry into a regular read. Better do this in the generic layer then force each caller to do so. Signed-off-by: Boaz Harrosh <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] libsas: remove spurious sata control register read/writeJames Bottomley1-51/+0
Originally, libata required the illusion that it could access the sata control register. Now, however, it can run perfectly well without them, so remove the dummy routines from libsas which tried to emulate them (but only ended up causing confusion). Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] libsas: convert to standard kernel debuggingJames Bottomley5-33/+1
Instead of using a config option for debugging, just dump the messages with KERN_DEBUG. Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] libsas: fix ATAPI check condition terminationJames Bottomley1-3/+5
ATAPI check condition needs to be treated the same as a success or protocol return. The register returns from the PACKET command are all correctly positioned in the device to host register FIS and so we should collect them properly. Right at the moment this doesn't matter because libata sends a request sense always for ATAPI errors, but if it ever checked the registers, we should have the correct contents just in case. Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] scsi_dh: Use scsi_devinfo functions to do matching of device_handler ↵Peter Jones2-75/+38
tables. Previously we were using strncmp in order to avoid having to include whitespace in the devlist, but this means "HSV1000" matches a device list entry that says "HSV100", which is wrong. This patch changes scsi_dh.c to use scsi_devinfo's matching functions instead, since they handle these cases correctly. Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] Add scsi_dev_info_list_del_keyed()Peter Jones2-0/+86
For scsi_dh.c to use devinfo lists, we have to be able to remove entries before rmmod. Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] libsas: fix runaway error handler problemJames Bottomley1-0/+1
libsas makes use of scsi_schedule_eh() but forgets to clear the host_eh_scheduled flag in its error handling routine. Because of this, the error handler thread never gets to sleep; it's constantly awake and trying to run the error routine leading to console spew and inability to run anything else (at least on a UP system). The fix is to clear the flag as we splice the work queue. Cc: [email protected] Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] cxgb3i: fixed connection problem with iscsi private ip[email protected]1-4/+15
fixed the connection problem when the private iscsi ipv4 address is provisioned on the interface. Signed-off-by: Karen Xie <[email protected]> Reviewed-by: Mike Christie <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] bnx2i: Added reconnect fix connecting against Lefthand targetsEddie Wai1-0/+3
The nopout's reserved field was not being initialized to zero before being reused. Stale CDB values from previous SCSI cmds of the same BHS offset was the cause of the disconnection initiated by the Lefthand target. Signed-off-by: Eddie Wai <[email protected]> Reviewed-by: Mike Christie <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] cxgbi: get rid of gl_skb in cxgbi_ddp_info[email protected]4-63/+8
Remove gl_skb from cxgbi_ddp_info as it is only used by cxgb3i. Signed-off-by: Karen Xie <[email protected]> Reviewed-by: Mike Christie <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] cxgbi: set ulpmode only if digest is on[email protected]1-7/+10
There is no need to set ulpmode on the tx skbs if no digest is enabled. Signed-off-by: Karen Xie <[email protected]> Reviewed-by: Mike Christie <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] hpsa: avoid leaking stack contents to userlandVasiliy Kulikov1-0/+2
memset arg64 to zero in the passthrough ioctls to avoid leaking contents of kernel stack memory to userland via uninitialized padding fields inserted by the compiler for alignment reasons. Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] hpsa: Fix problem that CMD_UNABORTABLE command status was treated as ↵Stephen M. Cameron1-0/+7
unknown Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] hpsa: fix use of uninitialized variable in ↵Stephen M. Cameron1-2/+2
hpsa_add_msa2xxx_enclosure_device() Thanks to Scott Teel for noticing this. Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] hpsa: Add a per controller commands_outstanding entry in /sysStephen M. Cameron1-0/+14
Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] hpsa: use usleep_range not msleep for small sleepsStephen M. Cameron1-1/+1
Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] hpsa: allow driver to put controller in either simple or performant modeStephen M. Cameron1-0/+7
Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] hpsa: take the adapter lock in hpsa_wait_for_mode_change_ackStephen M. Cameron1-3/+8
Need to take the lock while accessing the register to check to see if config table changes have taken effect. Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] hpsa: do not reset unknown boards on reset_devicesStephen M. Cameron1-1/+5
This is to prevent hpsa from resetting older boards which the cciss driver may be controlling. Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] hpsa: limit commands allocated on reset_devicesStephen M. Cameron1-0/+5
This is to conserve memory in a memory-limited kdump scenario Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] hpsa: Use kernel provided PCI state save and restore functionsStephen M. Cameron1-66/+15
and use the doorbell reset method if available (which doesn't lock up the controller if you properly save and restore all the PCI registers that you're supposed to.) Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] hpsa: fix board status waiting codeStephen M. Cameron2-8/+40
After a reset, we should first wait for the board to become "not ready", and then wait for it to become "ready", instead of immediately waiting for it to become "ready", and do this waiting *after* restoring PCI config space registers. Also, only wait 10 secs for board to become "not ready" after a reset (it should quickly become not ready.) Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] hpsa: Remove duplicate defines of DIRECT_LOOKUP_ constantsStephen M. Cameron1-2/+0
They are defined in hpsa_cmd.h Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] hpsa: fixup DMA address before freeing.Stephen M. Cameron2-1/+2
Some low bits might have been set by the driver, causing a message like this to come out: [ 13.288062] ------------[ cut here ]------------ [ 13.293211] WARNING: at lib/dma-debug.c:803 check_unmap+0x1a1/0x654() [ 13.300387] Hardware name: ProLiant DL180 G6 [ 13.305335] hpsa 0000:06:00.0: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x000000007f81e001] [size=640 bytes] Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] hpsa: defend against zero sized buffers in passthru ioctlsStephen M. Cameron1-20/+16
Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] arcmsr: Fix the issue of system hangup after commands timeout on ARC-1200NickCheng3-78/+49
[jejb: fix up patch problems and checkpatch.pl issues] Signed-off-by: Nick Cheng <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] scsi_dh_alua: add scalable ONTAP lun to dev listMike Snitzer1-0/+1
Currently NetApp's VID/PID details in the INQUIRY response shows up as 'NETAPP' and 'LUN'. With upcoming scalable SAN ONTAP version on NetApp controllers, the PID entry alone is being modified to 'LUN C-Mode' (to distinguish current ONTAP LUNs from scalable ONTAP LUNs). 'LUN' would still suffice for matching 'LUN C-Mode' but best to explicitly add these new NetApp LUNs to the device list. Reported-by: Martin George <[email protected]> Acked-by: Mike Christie <[email protected]> Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] scsi_dh_alua: Add Promise VTrak to dev listIlgu Hong1-0/+1
Adds Promise VTrak devices to the ALUA device handler. Signed-off-by: Ilgu Hong <[email protected]> Signed-off-by: Joseph Gruher <[email protected]> Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] scsi_dh_alua: fix stpg_endio group state reportingJoseph Gruher1-3/+5
Initialize stpg_endio() 'err' to SCSI_DH_OK and only change it to SCSI_DH_IO accordingly. This allows the switching of target group state to be properly reported when no error has occurred. Signed-off-by: Joseph Gruher <[email protected]> Signed-off-by: Ilgu Hong <[email protected]> Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] scsi_dh_alua: fix deadlock in stpg_endioJoseph Gruher1-1/+2
The use of blk_execute_rq_nowait() implies __blk_put_request() is needed in stpg_endio() rather than blk_put_request() -- blk_finish_request() is called with queue lock already held. Signed-off-by: Joseph Gruher <[email protected]> Signed-off-by: Ilgu Hong <[email protected]> Signed-off-by: Mike Snitzer <[email protected]> Cc: [email protected] Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] scsi_dh_alua: fix submit_stpg returnJoseph Gruher1-2/+1
submit_stpg() will always return failure so alua_activate() will report failure via dm-multipath callback function. Even though the stpg fired successfuly dm-multipath does not know and always fails to change the valid path. By returning SCSI_DH_OK we're now skipping alua_activate()'s call to activate_complete 'fn'. But this is fine because stpg_endio() will call it via h->callback_fn(). Signed-off-by: Joseph Gruher <[email protected]> Signed-off-by: Ilgu Hong <[email protected]> Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] mpt2sas: Bump version 08.100.00.00Kashyap, Desai1-2/+2
Upgrade driver version from 7.100.00.00 to 8.100.00.00 Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] mpt2sas: Basic Code Cleanup in mpt2sas_baseKashyap, Desai2-56/+68
Basic Code Cleanup: (1) _base_get_cb_idx and mpt2sas_base_free_smid were reorganized in similar fashion so the order of obtaining the cbx and smid are scsiio, hi_priority, and internal. (2) The hi_priority and internal request queue struct was made smaller by removing the scmd and chain_tracker, thus saving memory allocation. (3) For scsiio request, a new structure was created having the same elements from the former request tracker struct. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] mpt2sas: Add support for Customer specific branding messagesKashyap, Desai2-0/+40
Add support for Customer specific branding messages when device driver loads, based on specific customer subsystem vendor and device Ids Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] mpt2sas: Revision P MPI Header UpdateKashyap, Desai5-392/+18
Revision P MPI Header Update: a) Added enable/disable SATA NCQ operations to SAS IO Unit Control Request. b) Modified Host Based Discovery Action Request message format. c) Removed Device Path bit from IO Unit Page 1 Flags field. d) Added description of ChainOffset field for Diagnostic Data Upload Tool.Chaining is not allowed. Removed mpi2_history.txt file Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] mpt2sas: fix Integrated Raid unsynced on shutdown problemKashyap, Desai1-0/+1
Issue: IR shutdown(sending) and IR shutdown(complete) messages not listed in /var/log/messages when driver is removed. The driver needs to issue a MPI2_RAID_ACTION_SYSTEM_SHUTDOWN_INITIATED request when the driver is unloaded so the IR metadata journal is updated. If this request is not sent, then the volume would need a "check consistency" issued on the next bootup if the volume was roamed from one initiator to another. The current driver supports this feature only when the system is rebooted, however this also need to be supported if the driver is unloaded Fix: To fix this issue, the driver is going to need to call the _scsih_ir_shutdown prior to reporting the volumes missing from the OS, hence the device handles are still present. Signed-off-by: Kashyap Desai <[email protected]> Cc: [email protected] Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] mpt2sas: Kernel Panic during Large Topology discovery Kashyap, Desai1-2/+11
There was a configuration page timing out during the initial port enable at driver load time. The port enable would fail, and this would result in the driver unloading itself, meanwhile the driver was accessing freed memory in another context resulting in the panic. The fix is to prevent access to freed memory once the driver had issued the diag reset which woke up the sleeping port enable process. The routine _base_reset_handler was reorganized so the last sleeping process woken up was the port_enable. Signed-off-by: Kashyap Desai <[email protected]> Cc: [email protected] Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] mpt2sas: Fix the race between broadcast asyn event and scsi command ↵Kashyap, Desai1-9/+45
completion False timeout after hard resets, there were two issues which leads to timeout. (1) Panic because of invalid memory access in the broadcast asyn event processing routine due to a race between accessing the scsi command pointer from broadcast asyn event processing thread and completing the same scsi command from the interrupt context. (2) Broadcast asyn event notifcations are not handled due to events ignored while the broadcast asyn event is activity being processed from the event process kernel thread. In addition, changed the ABRT_TASK_SET to ABORT_TASK in the broadcast async event processing routine. This is less disruptive to other request that generate Broadcast Asyn Primitives besides target reset. e.g clear reservations, microcode download,and mode select. Signed-off-by: Kashyap Desai <[email protected]> Cc: [email protected] Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] mpt2sas: Correct resizing calculation for max_queue_depthKashyap, Desai1-3/+3
The ioc->hba_queue_depth is not properly resized when the controller firmware reports that it supports more outstanding IO than what can be fit inside the reply descriptor pool depth. This is reproduced by setting the controller global credits larger than 30,000. The bug results in an incorrect sizing of the queues. The fix is to resize the queue_size by dividing queue_diff by two. Signed-off-by: Kashyap Desai <[email protected]> Cc: [email protected] Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] mpt2sas: fix internal device reset for older firmware prior to MPI Rev KKashyap, Desai1-0/+6
The "internal device reset complete" event is not supported for older firmware prior to MPI Rev K We added a check in the driver so the "internal device reset" event is ignored for older firmware. When ignored, the tm_busy flag doesn't get set nor cleared. Without this fix, IO queues would be froozen indefinetly after the "internal device reset" event, as the "complete" event never sent to clear the flag. Signed-off-by: Kashyap Desai <[email protected]> Cc: [email protected] Signed-off-by: James Bottomley <[email protected]>
2011-01-24[SCSI] mpt2sas: Fix device removal handshake for zoned devicesKashyap, Desai1-3/+0
When zoning end devices, the driver is not sending device removal handshake alogrithm to firmware. This results in controller firmware not sending sas topology add events the next time the device is added. The fix is the driver should be doing the device removal handshake even though the PHYSTATUS_VACANT bit is set in the PhyStatus of the event data. The current design is avoiding the handshake when the VACANT bit is set in the phy status. Signed-off-by: Kashyap Desai <[email protected]> Cc: [email protected] Signed-off-by: James Bottomley <[email protected]>
2011-01-19Comment typo fixes for 'descriptor'Justin P. Mattock2-2/+2
Signed-off-by: Justin P. Mattock <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2011-01-19scsi: Remove unnecessary casts of void ptr returning alloc function return ↵Jesper Juhl2-7/+5
values The [vk][cmz]alloc(_node) family of functions return void pointers which it's completely unnecessary/pointless to cast to other pointer types since that happens implicitly. This patch removes such casts from drivers/scsi/ Signed-off-by: Jesper Juhl <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2011-01-14Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-post-merge-2.6Linus Torvalds3-58/+50
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-post-merge-2.6: [SCSI] target: Add LIO target core v4.0.0-rc6 [SCSI] sd,sr: kill compat SDEV_MEDIA_CHANGE event [SCSI] sd: implement sd_check_events()
2011-01-14Merge branch 'linux-next' of ↵Linus Torvalds2-13/+2
git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: PCI/PM: Report wakeup events before resuming devices PCI/PM: Use pm_wakeup_event() directly for reporting wakeup events PCI: sysfs: Update ROM to include default owner write access x86/PCI: make Broadcom CNB20LE driver EMBEDDED and EXPERIMENTAL x86/PCI: don't use native Broadcom CNB20LE driver when ACPI is available PCI/ACPI: Request _OSC control once for each root bridge (v3) PCI: enable pci=bfsort by default on future Dell systems PCI/PCIe: Clear Root PME Status bits early during system resume PCI: pci-stub: ignore zero-length id parameters x86/PCI: irq and pci_ids patch for Intel Patsburg PCI: Skip id checking if no id is passed PCI: fix __pci_device_probe kernel-doc warning PCI: make pci_restore_state return void PCI: Disable ASPM if BIOS asks us to PCI: Add mask bit definition for MSI-X table PCI: MSI: Move MSI-X entry definition to pci_regs.h Fix up trivial conflicts in drivers/net/{skge.c,sky2.c} that had in the meantime been converted to not use legacy PCI power management, and thus no longer use pci_restore_state() at all (and that caused trivial conflicts with the "make pci_restore_state return void" patch)
2011-01-14[SCSI] sd,sr: kill compat SDEV_MEDIA_CHANGE eventTejun Heo2-9/+0
SDEV_MEDIA_CHANGE event was first added by commit a341cd0f (SCSI: add asynchronous event notification API) for SATA AN support and then extended to cover generic media change events by commit 285e9670 ([SCSI] sr,sd: send media state change modification events). This event was mapped to block device in userland with all properties stripped to simulate CHANGE event on the block device, which, in turn, was used to trigger further userspace action on media change. The recent addition of disk event framework kept this event for backward compatibility but it turns out to be unnecessary and causes erratic and inefficient behavior. The new disk event generates proper events on the block devices and the compat events are mapped to block device with all properties stripped, so the block device ends up generating multiple duplicate events for single actual event. This patch removes the compat event generation from both sr and sd as suggested by Kay Sievers. Both existing and newer versions of udev and the associated tools will behave better with the removal of these events as they from the beginning were expecting events on the block devices. Signed-off-by: Tejun Heo <[email protected]> Acked-by: Kay Sievers <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-14[SCSI] sd: implement sd_check_events()Tejun Heo2-52/+53
Replace sd_media_change() with sd_check_events(). * Move media removed logic into set_media_not_present() and media_not_present() and set sdev->changed iff an existing media is removed or the device indicates UNIT_ATTENTION. * Make sd_check_events() sets sdev->changed if previously missing media becomes present. * Event is reported only if sdev->changed is set. This makes media presence event reported if scsi_disk->media_present actually changed or the device indicated UNIT_ATTENTION. For backward compatibility, SDEV_EVT_MEDIA_CHANGE is generated each time sd_check_events() detects media change event. [jejb: fix boot failure] Signed-off-by: Tejun Heo <[email protected]> Acked-by: Jens Axboe <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-01-13Merge branch 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-blockLinus Torvalds5-99/+103
* 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block: (43 commits) block: ensure that completion error gets properly traced blktrace: add missing probe argument to block_bio_complete block cfq: don't use atomic_t for cfq_group block cfq: don't use atomic_t for cfq_queue block: trace event block fix unassigned field block: add internal hd part table references block: fix accounting bug on cross partition merges kref: add kref_test_and_get bio-integrity: mark kintegrityd_wq highpri and CPU intensive block: make kblockd_workqueue smarter Revert "sd: implement sd_check_events()" block: Clean up exit_io_context() source code. Fix compile warnings due to missing removal of a 'ret' variable fs/block: type signature of major_to_index(int) to major_to_index(unsigned) block: convert !IS_ERR(p) && p to !IS_ERR_NOR_NULL(p) cfq-iosched: don't check cfqg in choose_service_tree() fs/splice: Pull buf->ops->confirm() from splice_from_pipe actors cdrom: export cdrom_check_events() sd: implement sd_check_events() sr: implement sr_check_events() ...