aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi
AgeCommit message (Collapse)Author
2008-07-12[SCSI] iscsi_tcp: convert iscsi_tcp to support merged tasksMike Christie
Convert iscsi_tcp to support merged tasks. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-12[SCSI] libiscsi: merge iscsi_mgmt_task and iscsi_cmd_taskMike Christie
There is no need to have the mgmt and cmd tasks separate structs. It used to save a lot of memory when we overprealocated memory for tasks, but the next patches will set up the driver so in the future they can use a mempool or some other common scsi command allocator and common tagging. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-12[SCSI] libiscsi: modify libiscsi so it supports offloaded data pathsMike Christie
This patch modifies libiscsi, so drivers like bnx2i and iser can execute a command from queuecommand/send_pdu instead of having to be queued to be run in a workq. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-12[SCSI] libiscsi, iscsi_tcp, iser: add session cmds array accessorMike Christie
Currently to get a ctask from the session cmd array, you have to know to use the itt modifier. To make this easier on LLDs and so in the future we can easilly kill the session array and use the host shared map instead, this patch adds a nice wrapper to strip the itt into a session->cmds index and return a ctask. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-12[SCSI] iser: fix handling of scsi cmnds during recovery.Mike Christie
After the stop_conn callback has returned the LLD should not touch the scsi cmds. iscsi_tcp and libiscsi use the conn->recv_lock and suspend_rx field to halt recv path processing, but iser does not have any protection. This patch modifies iser so that userspace can just call the ep_disconnect callback, which will halt all recv IO, before calling the stop_conn callback so we do not have to worry about the conn->recv_lock and suspend rx field. iser just needs to stop the send side from accessing the ib conn. Fixup to handle when the ep poll fails and ep disconnect is called from Erez. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-12[SCSI] iscsi: remove session/conn_data_size from iscsi_transportMike Christie
This removes the session and conn data_size fields from the iscsi_transport. Just pass in the value like with host allocation. This patch also makes it so the LLD iscsi_conn data is allocated with the iscsi_cls_conn. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-12[SCSI] iscsi: add iscsi host helpersMike Christie
This finishes the host/session unbinding, by adding some helpers to add and remove hosts and the session they manage. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-12[SCSI] iscsi: remove session and host binding in libiscsiMike Christie
bnx2i allocates a host per netdevice but will use libiscsi, so this unbinds the session from the host in that code. This will also be useful for the iser parent device dma settings fixes. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-12[SCSI] iscsi class: rename iscsi_host to iscsi_cls_hostMike Christie
This renames the iscsi_host to iscsi_cls_host to match the other structs, because libiscsi wants to use the iscsi_host name in the future. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-12[SCSI] iscsi class, iscsi drivers: remove unused iscsi_transport attrsMike Christie
max_cmd_len and max_conn are not really used. max_cmd_len is always 16 and can be set by the LLD. max_conn is always one since we do not support MCS. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-12[SCSI] iscsi class, iscsi_tcp/iser: add host arg to session creationMike Christie
iscsi offload (bnx2i and qla4xx) allocate a scsi host per hba, so the session creation path needs a shost/host_no argument. Software iscsi/iser will follow the same behabior as before where it allcoates a host per session, but in the future iser will probably look more like bnx2i where the host's parent is the hardware (rnic for iser and for bnx2i it is the nic), because it does not use a socket layer like how iscsi_tcp does. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-11[SCSI] ipr: Fix HDIO_GET_IDENTITY oops for SATA devicesBrian King
Currently, ipr does not support HDIO_GET_IDENTITY to SATA devices. An oops occurs if userspace attempts to send the command. Since hald issues the command, ensure we fail the ioctl in ipr. This is a temporary solution to the oops. Once the ipr libata EH conversion is upstream, ipr will fully support HDIO_GET_IDENTITY. Tested-by: Milton Miller <miltonm@bga.com> Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-10Merge branches 'at91', 'dyntick', 'ep93xx', 'iop', 'ixp', 'misc', 'orion', ↵Russell King
'omap-reviewed', 'rpc', 'rtc' and 's3c' into devel
2008-07-10aic94xx: treat firmware data as constDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-06[SCSI] erase invalid data returned by deviceAlan Stern
This patch (as1108) fixes a problem that can occur with certain USB mass-storage devices: They return invalid data together with a residue indicating that the data should be ignored. Rather than leave the invalid data in a transfer buffer, where it can get misinterpreted, the patch clears the invalid portion of the buffer. This solves a problem (wrong write-protect setting detected) reported by Maciej Rutecki and Peter Teoh. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Peter Teoh <htmldeveloper@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-04scsi: sr avoids useless buffer allocationFUJITA Tomonori
blk_rq_map_kern can handle the stack buffers correctly (avoid DMA from/to the stack buffers by using the bounce buffer) so we don't need to complicate the code by allocating just 8 bytes. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Cc: Tejun Heo <htejun@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-07-03[ARM] rpc: acornscsi: update to new style ecard driverRussell King
Update acornscsi as per all the other ecard drivers to use MMIO accessors rather than the obsolete 'pc io' style inb/outb accessors. Use ecard_request_resources()/ecard_release_resources() for easier resource handling, rather than requesting 5 separate regions individually. Acked-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-07-03[ARM] rpc: acornscsi: stop using private __stringify()Russell King
The kernel has its own, so let's use that instead. Acked-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-07-03[ARM] rpc: acornscsi: convert hardware accessors to take 'AS_Host *'Russell King
Acked-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-07-03[ARM] rpc: acornscsi: fixup abort/reset methods, fix build errorsRussell King
Revive the AcornSCSI driver, update it for the replacement command abort and host reset methods, and fix the build errors in acornscsi-io.S. Acked-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-07-03[ARM] rpc: acornscsi: remove unused 'ADDR' macroRussell King
Acked-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-07-03cmdfilter: extend default read filterAdel Gadllah
This patch adds the commands that the former sg filter allowed for read access to the cmdfilter to keep userspace apps that rely on them working. Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-07-03sg: fix odd style (extra parenthesis) introduced by cmd filter patchJens Axboe
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-07-03allow userspace to modify scsi command filter on per device basisAdel Gadllah
This patch exports the per-gendisk command filter to user space through sysfs, so it can be changed by the system administrator. All users of the old cmd filter have been converted to use the new one. Original patch from Peter Jones. Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com> Signed-off-by: Peter Jones <pjones@redhat.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-07-02scsi-tgt: BKL pushdownArnd Bergmann
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2008-06-25[SCSI] esp: tidy up target reference countingJames Bottomley
The esp driver currently does hand rolled reference counting of its target. It's much easier to do what it needs to do if it's plugged into the mid-layer callbacks (target_alloc and target_destroy) which were designed for this case, so do it this way and get rid of the internal target reference count. Acked-by: David S. Miller <davem@davemloft.net> Cc: Stable Tree <stable@kernel.org> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-24[SCSI] esp: Fix OOPS in esp_reset_cleanup().David S. Miller
OOPS reported by Friedrich Oslage <bluebird@porno-bullen.de> The problem here is that tp->starget is set every time a lun is allocated for a particular target so we can catch the sdev_target parent value. The reset handler uses the NULL'ness of this value to determine which targets are active. But esp_slave_destroy() does not NULL out this value when appropriate. So for every target that doesn't respond, the SCSI bus scan causes a stale pointer to be left here, with ensuing crashes like you're seeing. Signed-off-by: David S. Miller <davem@davemloft.net> Cc: Stable Tree <stable@kernel.org> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-24[SCSI] ses: Fix timeoutMatthew Wilcox
Timeouts are measured in jiffies, not in seconds. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Stable Tree <stable@kernel.org> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-20megaraid: BKL pushdownArnd Bergmann
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2008-06-20Add a bunch of cycle_kernel_lock() callsJonathan Corbet
All of the open() functions which don't need the BKL on their face may still depend on its acquisition to serialize opens against driver initialization. So make those functions acquire then release the BKL to be on the safe side. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-06-20changer: BKL pushdownJonathan Corbet
Add lock_kernel() calls to ch_open(), though the existing locking looks adequate. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-06-20dpt_i20: BKL pushdownJonathan Corbet
Add lock_kernel() calls to adpt_open() Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-06-20Add "no BKL needed" comments to several driversJonathan Corbet
This documents the fact that somebody looked at the relevant open() functions and concluded that, due to their trivial nature, no locking was needed. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-06-20gdth: cdev lock_kernel() pushdownJonathan Corbet
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-06-20st: cdev lock_kernel() pushdownJonathan Corbet
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-06-20aacraid: cdev lock_kernel() pushdownJonathan Corbet
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-06-20osst: cdev lock_kernel() pushdown.Jonathan Corbet
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-06-20sg: cdev lock_kernel() pushdownJonathan Corbet
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-06-15[SCSI] dpt_i2o: Add PROC_IA64 defineJeff Mahoney
This fixes the following compile failure: drivers/scsi/dpt_i2o.c:83: error: 'PROC_IA64' undeclared here (not in a function) Mark Salyzyn <Mark_Salyzyn@adaptec.com> indicated that IA64 must report itself as PROC_INTEL, so I've changed the comment for PROC_INTEL. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Acked-by: Mark Salyzyn <Mark_Salyzyn@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-15[SCSI] scsi_host regression: fix scsi host leakMike Christie
commit 9c7701088a61cc0cf8a6e1c68d1e74e3cc2ee0b7 Author: Dave Young <hidave.darkstar@gmail.com> Date: Tue Jan 22 14:01:34 2008 +0800 scsi: use class iteration api Isn't a correct replacement for the original hand rolled host lookup. The problem is that class_find_child would get a reference to the host's class device which is never released. Since the host class device holds a reference to the host gendev, the host can never be freed. In 2.6.26 we started using class_find_device, and this function also gets a reference to the device, so we end up with an extra ref and the host will not get released. This patch adds a put_device to balance the class_find_device() get. I kept the scsi_host_get in scsi_host_lookup, because the target layer is using scsi_host_lookup and it looks like it needs the SHOST_DEL check. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-10[SCSI] sr: fix corrupt CD data after media change and delayJames Bottomley
Reported-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> If you delay 30s or more before mounting a CD after inserting it then the kernel has the wrong value for the CD size. http://marc.info/?t=121276133000001 The problem is in sr_test_unit_ready(): the function eats unit attentions without adjusting the sdev->changed status. This means that when the CD signals changed media via unit attention, we can ignore it. Fix by making sr_test_unit_ready() adjust the changed status. Tested-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: Stable Tree <stable@kernel.org> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-05[SCSI] make use of the residue valueJames Bottomley
USB sometimes doesn't return an error but instead returns a residue value indicating part (or all) of the command wasn't completed. So if the driver _done() error processing indicates the command was fully processed, subtract off the residue so that this USB error gets propagated. Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-05[SCSI] SCSI: remove dev->power.power_state from mesh driverAlan Stern
power.power_state is scheduled for removal. This patch (as1055) removes all uses of that field from the SCSI mesh driver. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Paul Mackerras <paulus@au.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-05[SCSI] aacraid: linit.c make aac_show_serial_number staticHarvey Harrison
drivers/scsi/aacraid/linit.c:865:9: warning: symbol 'aac_show_serial_number' was not declared. Should it be static? Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Acked-by: Mark Salyzyn <Mark_Salyzyn@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-05[SCSI] scsi_dh: add EMC Clariion device handlerChandra Seetharaman
This adds support for EMC Clariions. This patch has the features that currently exists in mainline and advanced features from Ed's patches. Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-05[SCSI] scsi_dh: add hp sw device handlerMike Christie
This patch provides the device handler to support the older hp boxes which cannot be upgraded. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-05[SCSI] scsi_dh: add lsi rdac device handlerChandra Seetharaman
This patch provides the device handler to support the LSI RDAC SCSI based storage devices. Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-05[SCSI] scsi_dh: add infrastructure for SCSI Device HandlersChandra Seetharaman
Some of the storage devices (that can be accessed through multiple paths), do need some special handling for 1. Activating the passive path of the storage access. 2. Decode and handle the special sense codes returned by the devices. 3. Handle the I/Os being sent to the passive path, especially during the device probe time. when accessed through multiple paths. As of today this special device handling is done at the dm-multipath layer using dm-handlers. That works well for (1); for (2) to be handled at dm layer, scsi sense information need to be exported from SCSI to dm-layer, which is not very attractive; (3) cannot be done at all at the dm layer. Device handler has been moved to SCSI mainly to handle (2) and (3) properly. Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> Signed-off-by: Mike Anderson <andmike@linux.vnet.ibm.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-04Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: [SCSI] qla2xxx: Update version number to 8.02.01-k4. [SCSI] qla2xxx: Correct handling of AENs postings for vports. [SCSI] qla2xxx: Revert "qla2xxx: Use proper HA during asynchronous event handling." [SCSI] ibmvscsi: Non SCSI error status fixup [SCSI] fusion mpt: fix target missing after resetting external raid [SCSI] fix intermittent oops in scsi_bus_uevent [SCSI] qla2xxx: Update version number to 8.02.01-k3. [SCSI] qla2xxx: Revert "qla2xxx: Validate mid-layer 'underflow' during check-condition handling." [SCSI] qla2xxx: Disable local-interrupts while polling for RISC status. [SCSI] qla2xxx: Extend the 'fw_dump' SYSFS node the ability to initiate a firmware dump. [SCSI] qla2xxx: Don't depend on mailbox return values while enabling FCE tracing. [SCSI] qla2xxx: Convert vport_sem to a mutex [SCSI] qla2xxx: firmware semaphore to mutex [SCSI] qla2xxx: Correct locking within MSI-X interrupt handlers. [SCSI] qla2xxx: Display driver version at module init-time. [SCSI] qla2xxx: Return correct port_type to FC-transport for Vports.
2008-05-30[SCSI] qla2xxx: Update version number to 8.02.01-k4.Andrew Vasquez
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>