Commit graph

2551 commits

Author SHA1 Message Date
Randy Dunlap
46ddab7b1c [SCSI] qla2xxx: use NULL instead of 0
Use NULL instead of 0 for pointers (sparse warning):
drivers/scsi/qla2xxx/qla_attr.c:393:4: warning: Using plain integer as NULL pointer

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-12-03 09:24:01 -06:00
FUJITA Tomonori
0d2db302f9 [SCSI] scsi-ml: Makefile and Kconfig changes for tgt
Makefile and Kconfig for tgt.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-25 13:17:52 -06:00
FUJITA Tomonori
97f78759ea [SCSI] scsi tgt: scsi target user and kernel communication interface
The user-space daemon and tgt kernel module need bi-directional
kernel/user high-performance interface, however, mainline provides no
standard interface like that.

This patch adds shared memory interface between kernel and user spaces
like some other drivers do by using own character device. The
user-space daemon and tgt kernel module creates shared memory via mmap
and use it like ring buffer. poll (kernel to user) and write (user to
kernel) system calls are used for notification.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-25 13:17:38 -06:00
FUJITA Tomonori
5a55c2596f [SCSI] scsi tgt: scsi target lib functionality
The core scsi target lib functions.

TODO:
- mv md/dm-bio-list.h to linux/bio-list.h so md and us do not have to
do that weird include.
- convert scsi_tgt_cmd's work struct to James's execute code. And try
to kill our scsi_tgt_cmd.
- add host state checking. We do refcouting so hotplug is partially
supported, but we need to add state checking to make it easier on
the LLD.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-25 13:17:18 -06:00
FUJITA Tomonori
b58d91547f [SCSI] export scsi-ml functions needed by tgt_scsi_lib and its LLDs
This patch contains the needed changes to the scsi-ml for the target
mode support.

Note, per the last review we moved almost all the fields we added
to the scsi_cmnd to our internal data structure which we are going
to try and kill off when we can replace it with support from other
parts of the kernel.

The one field we left on was the offset variable. This is needed to handle
the case where the target gets request that is so large that it cannot
execute it in one dma operation. So max_secotors or a segment limit may
limit the size of the transfer. In this case our tgt core code will
break up the command into managable transfers and send them to the
LLD one at a time. The offset is then used to tell the LLD where in
the command we are at. Is there another field on the scsi_cmd for
that?

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-25 13:08:56 -06:00
Randy Dunlap
84ad58e4ef [SCSI] initio: fix section mismatches with HOTPLUG=n
WARNING: drivers/scsi/initio.o - Section mismatch: reference to .init.data: from .text between 'i91u_detect' (at offset 0x26e8) and 'i91uSCBPost'
WARNING: drivers/scsi/initio.o - Section mismatch: reference to .init.data:i91u_pci_devices from .text between 'i91u_detect' (at offset 0x26ef) and 'i91uSCBPost'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-25 09:26:56 -06:00
Andrew Vasquez
1e99e33ad9 [SCSI] qla2xxx: add asynchronous scsi scanning support.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 16:43:28 -06:00
Andrew Vasquez
d19044c32b [SCSI] qla2xxx: defer topology discovery to DPC thread during initialization.
Modify intialization semantics:

- perform basic hardware configuration only (as usual)
  - allocate resources
  - load and execute firmware

- defer link (transport) negotiations to the DPC thread
  - again the code in qla2x00_initialize_adapter() to stall probe()
    completion was needed for legacy-style scanning.
  - DPC thread stalls until probe() complete.

- before probe() completes, set DPC flags to perform loop-resync logic
  (similar to what's done during cable-insertion/removal).

Benefits: user does not have to wait 20+ seconds in case the FC cable
is unplugged during driver load, code consolidation (removal of
redundant link negotiation logic during initialize_adaoter()), and
finilly, the driver no longer needs to defer the fc_remote_port_add()
calls to hold off lun-scanning prior to returning from the probe()
function.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 16:43:16 -06:00
Matthew Wilcox
1aa8fab2ac [SCSI] Make scsi_scan_host work for drivers which find their own targets
If a driver can find its own targets, it can now fill in scan_finished and
(optionally) scan_start in the scsi_host_template.  Then, when it calls
scsi_scan_host(), it will be called back (from a thread if asynchronous
discovery is enabled), first to start the scan, and then at intervals to
check if the scan is completed.

Also make scsi_prep_async_scan and scsi_finish_async_scan static.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 16:42:42 -06:00
Matthew Wilcox
93b45af5c6 [SCSI] fix missing check for no scanning
Drivers that called scsi_scan_target() instead of scsi_scan_host() were
still adding devices; this needs to be under the control of userspace,
not the driver.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 16:41:52 -06:00
Matthew Wilcox
21db1882f7 [SCSI] Add Kconfig option for asynchronous SCSI scanning
Without this patch, the user has to add a kernel command line parameter
to get asynchronous SCSI scanning.  Now they can select the default at
compile time and still override it at boot time if they need to.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 16:41:09 -06:00
Mark Haverkamp
902762831c [SCSI] aacraid: Driver version update
Received from Mark Salyzyn:

Version patch, update to reflect a rough estimate of the Adaptec build
(2423) that coincides with the sources on kernel.org.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 12:29:53 -06:00
Mark Haverkamp
d18b448fc2 [SCSI] aacraid: Abort management FIBs
Received from Mark Salyzyn:

Add code to abort outstanding management ioctl fibs when the blinkLED recovery
is performed. This code is 'clunky' and does not have any real feedback in that
the reset could progress before the user application has gotten it's
notification of command completion. We put a schedule() call to delay just the
right amount for most cases, because we tried a spin and still managed to find
cases where we would spin forever waiting for the management application to
acknowledge the impending doom surrounding the cause of the BlinkLED. Will
cause an oops in the context of the management application if we proceed too
quickly. I view this as the lesser of many evils since currently if there are
outstanding management ioctls during a need to reset/recover the adapter, the
management application just locks up and waits forever. The best practices fix
for this problem not going to be simple or easy (at least the fixes I imagine
today); and we found a balance between the needs of the driver to proceed, and
the applications that locked or confused that would hold back the driver. I
just do not like the idea of a kernel oops in an application to deal with low
priority, sluggish or misbehaving applications.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 12:29:17 -06:00
Mark Haverkamp
33524b70e8 [SCSI] aacraid: Detect Blinkled at startup
Received from Mark Salyzyn:

Blinkled at startup is useful for catching Adapters in a lot of pain, in a
BlinkLED assert, quickly; rather than waiting several minutes for commands to
timeout.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 12:28:22 -06:00
Brian King
51d23da95c [SCSI] ipr: Driver version 2.3.0
Bump driver version.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 12:22:29 -06:00
Adrian Bunk
bd705f2d43 [SCSI] ipr: Make ipr_ioctl static
This patch makes ipr_ioctl static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 12:22:17 -06:00
Brian King
ac719abab0 [SCSI] ipr: Reduce default error log size
Since the default error log size has increased on SAS adapters,
prevent ipr from logging this additional data unless requested
to do so by the user set log level in order to prevent flooding
the logs.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 12:22:01 -06:00
Brian King
49dc6a1818 [SCSI] ipr: Add support for logging SAS fabric errors
Adds support for logging SAS fabric errors logged by
the ipr firmware.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 12:21:44 -06:00
Brian King
9d66bdf81f [SCSI] ipr: Remove debug trace points from dump code
Remove some debug trace points that clutter up the log
when ipr debugging is turned on.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 12:21:26 -06:00
Brian King
7402ecef94 [SCSI] ipr: Remove ipr_scsi_timed_out
Remove ipr's usage of the scsi transport eh_timed_out for
handling SATA timeouts. This was only needed in order to set
some flags on the qc prior to calling ata_do_eh.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 12:21:03 -06:00
Brian King
efbbdd846d [SCSI] ipr: Set default ipr Kconfig values
Both SCSI_IPR_TRACE and SCSI_IPR_DUMP should be defaulted to
yes when SCSI_IPR is enabled.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 12:20:46 -06:00
Brian King
60e7486b19 [SCSI] ipr: PCI IDs for new SAS adapters
Adds PCI IDs for some new ipr SAS adapters.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 12:20:25 -06:00
Brian King
04d9768ff8 [SCSI] ipr: Stop issuing cancel all to disk arrays
The ipr disk array devices do not support a cancel all
requests primitive, so change the ipr driver to never
send it.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 12:20:08 -06:00
Brian King
73d98ff0fa [SCSI] ipr: SATA reset - wait for host reset completion
If an ipr adapter hits a fatal microcode error requiring a reset
while a SATA device is going through EH, it can result in a command
getting issued to the ipr adapter while it is getting reset, which
can cause PCI bus errors. Wait for any outstanding adapter reset
to finish prior to issuing a SATA device reset.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 12:17:55 -06:00
David C Somayajulu
7feb6b3fbb [SCSI] qla4xxx: fix for timing issue for nvram accesses.
This patch fixes a timing issue related to nvram accesses in qla4xxx
driver for some cpu/slot speed combination.

Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 12:17:10 -06:00
Adrian Bunk
b448de4731 [SCSI] megaraid_sas: make 2 functions static
This patch makes two needlessly global functions static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: "Patro, Sumant" <Sumant.Patro@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 12:15:47 -06:00
David C Somayajulu
d915058f48 [SCSI] qla4xxx: add support for qla4032
This patch provides the following:

1. adds support for the next version of Qlogic's iSCSI HBA, qla4032
   (PCI Device ID 4032).

2. removes dead code related to topcat chip and renames
   qla4010_soft_reset to qla4xxx_soft_reset (minor changes).

Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 12:14:04 -06:00
James Bottomley
0bd2af4683 Merge ../scsi-rc-fixes-2.6 2006-11-22 12:06:44 -06:00
James Bottomley
e138a5d235 [SCSI] aic94xx: fix pointer to integer conversion warning
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 11:54:15 -06:00
David C Somayajulu
f26b90440c [PATCH] qla4xxx: bug fix: driver hardware semaphore needs to be grabbed before soft reset
On qla4xxx, the driver needs to grab the drvr semaphore provided by
the hardware, prior to issuing a reset. This patches takes care of a
couple of places where it was not being done. In addition there is
minor clean up.

Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 11:21:13 -06:00
Darrick J. Wong
7b4feee973 [PATCH] aic94xx: delete ascb timers when freeing queues
When the aic94xx driver creates ascbs, each ascb is initialized with a
timeout timer.  If there are any ascbs left over when the driver is being
torn down, these timers need to be deleted.  In particular, we seem to
hit this case when ascbs are issued yet never end up on the done list.
Right now there's a sequencer bug that results in this happening every
so often.

CONTROL PHY commands are typically sent when things are really messed
up with the sequencer; however, any other leftover ascb should produce
loud warnings.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 11:10:02 -06:00
Darrick J. Wong
dea2221479 [PATCH] aic94xx: handle REQ_DEVICE_RESET
This patch implements a REQ_DEVICE_RESET handler for the aic94xx
driver.  Like the earlier REQ_TASK_ABORT patch, this patch defers the
device reset to the Scsi_Host's workqueue, which has the added benefit
of ensuring that the device reset does not happen at the same time
that the abort tmfs are being processed.  After the phy reset, the
busted drive should go away and be re-detected later, which is indeed
what I've seen on both a x260 and a x206m.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 11:05:59 -06:00
Linus Torvalds
d0cac32fa5 Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] psi240i.c: fix an array overrun
  [SCSI] gdth: Fix && typos
  [SCSI] iscsi class: update version
  [SCSI] iscsi_tcp: fix xmittask oops
  [SCSI] iscsi: add newlines to debug messages
  [SCSI] iscsi: always release crypto
  [SCSI] sg: fix incorrect last scatg length
  [SCSI] 3ware 9000 add support for 9650SE
  [SCSI] aic94xx SCSI timeout fix: SMP retry fix.
  [SCSI] aic94xx SCSI timeout fix
2006-11-16 11:48:01 -08:00
Tejun Heo
097b8457da [PATCH] scsi: clear garbage after CDBs on SG_IO
ATAPI devices transfer fixed number of bytes for CDBs (12 or 16).  Some
ATAPI devices choke when shorter CDB is used and the left bytes contain
garbage.  Block SG_IO cleared left bytes but SCSI SG_IO didn't.  This patch
makes SCSI SG_IO clear it and simplify CDB clearing in block SG_IO.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Mathieu Fluhr <mfluhr@nero.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Douglas Gilbert <dougg@torque.net>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Cc: <stable@kernel.org>
Acked-by: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-16 11:43:38 -08:00
Ingo Molnar
504fb37a08 [SCSI] fix module unload induced compile warning
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-15 17:59:37 -06:00
Henne
667c667f86 [SCSI] scsi: t128 scsi_cmnd convertion
Changes the obsolete Scsi_Cmnd to struct scsi_cmnd and remove the trailing
whitespaces.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-15 16:43:50 -06:00
Andrew Morton
297295ae66 [SCSI] ips: fix soft lockup during reset initialization
Resetting the adapter causes the ServeRAID driver to exceed the max time
  allowed by the softlock watchdog.  Resetting the hardware can easily require
  30 or more seconds.  To avoid the

	"BUG: soft lockup detected on CPU#0!"

  result, this patch adds a touch_nmi_watchdog() to the driver's MDELAY macro.

Cc: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Acked-by: Jack Hammer <jack_hammer@adaptec.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-15 16:43:30 -06:00
Adrian Bunk
e5f82ab834 [SCSI] qla2xxx: make some functions static
This patch makes some needlessly global functions static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-15 16:42:35 -06:00
Jeff Garzik
db3a8815fb [SCSI] minor bug fixes and cleanups
BusLogic: use kzalloc(), remove cast to/from void*

aic7xxx_old: fix typo in cast

NCR53c406a: ifdef out static built code

fd_mcs: ifdef out static built code

ncr53c8xx: ifdef out static built code

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-15 16:41:27 -06:00
Andrew Morton
bf4713418b [SCSI] revert "[SCSI] ips soft lockup during reset/initialization"
Revert 15084a4a63 - it caused a
scheduling-inside-spinlock bug.

Cc: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Jack Hammer <jack_hammer@adaptec.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-15 16:40:50 -06:00
Jeff Garzik
08157cd078 [SCSI] SCSI/aha1740: handle SCSI API errors
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-15 16:38:58 -06:00
Kai Makisara
4225285401 [SCSI] st: log message changes
Printk -> sdev_printk change originally from Luben Tuikov
<ltuikov@yahoo.com>. Loglevel changes prompted by Matthew Wilcox
<matthew@wil.cx>.

Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-15 16:37:04 -06:00
Luben Tuikov
fd44bab5c7 [SCSI] sd: clearer output of disk cache state
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-15 15:58:52 -06:00
Christoph Hellwig
4f777ed260 [SCSI] kill scsi_assign_lock
scsi_assign_lock has been unused for a long time and is a bad idea
in general, so kill it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-15 14:14:46 -06:00
Christoph Hellwig
3b00315799 [SCSI] untangle scsi_prep_fn
I wanted to add some BUG checks to scsi_prep_fn to make sure no one
sends us a non-sg command, but this function is a horrible mess.

So I decided to detangle the function and document what the valid
cases are.  While doing that I found that REQ_TYPE_SPECIAL commands
aren't used by the SCSI layer anymore and we can get rid of the code
handling them.

The new structure of scsi_prep_fn is:

 (1) check if we're allowed to send this command
 (2) big switch on cmd_type.  For the two valid types call into
     a function to set the command up, else error
 (3) code to handle error cases

Because FS and BLOCK_PC commands are handled entirely separate after
the patch this introduces a tiny amount of code duplication.  This
improves readabiulity though and will help to avoid the bidi command
overhead for FS commands so it's a good thing.

I've tested this on both sata and mptsas.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-15 14:14:20 -06:00
Christoph Hellwig
2dc611de5a [SCSI] use one-element sg list in scsi_send_eh_cmnd
scsi_send_eh_cmnd is the last user of non-sg commands currently.
This patch switches it to a one-element SG list.  Also updates the
kerneldoc comment for scsi_send_eh_cmnd to reflect reality while we're
at it.

Test on my mptsas card, but this should get testing with as many
drivers as possible.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-15 12:55:52 -06:00
Darrick J. Wong
fe4a36cf65 [SCSI] aic94xx: handle REQ_TASK_ABORT
This patch straightens out the code that distinguishes the various escb
opcodes in escb_tasklet_complete so that they can be handled correctly.
It also provides all the necessary code to create a workqueue item that
tells libsas to abort a sas_task.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-15 12:31:27 -06:00
Darrick J. Wong
79a5eb609b [SCSI] libsas: add sas_abort_task
This patch adds an external function, sas_abort_task, to enable LLDDs
to abort sas_tasks.  It also adds a work_struct so that the actual
work of aborting a task can be shifted from tasklet context (in the
LLDD) onto the scsi_host's workqueue.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-15 12:27:50 -06:00
Darrick J. Wong
f456393e19 [SCSI] libsas: modify error handler to use scsi_eh_* functions
This patch adds an EH done queue to sas_ha, converts the error handling
strategy function and the sas_scsi_task_done functions in libsas to use
the scsi_eh_* commands for error'd commands, and adds checks for the
INITIATOR_ABORTED flag so that we do the right thing if a sas_task has
been aborted by the initiator.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-15 12:14:16 -06:00
Alan Stern
b4d38e38e6 [SCSI] Reduce polling in sd.c
If a drive reports that no media is present, there's no point in
continuing to ask it about media status.  This patch (as696) cuts the
TUR polling short as soon as the drive reports no media instead of
going a full 3 iterations.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-15 12:11:36 -06:00