Commit Graph

2257 Commits (86e33a296c2c9ed6eece0bfff4ac776f42040504)

Author SHA1 Message Date
James Bottomley 86e33a296c [SCSI] add shared tag map helpers
This patch adds support for sharing tag maps at the host level
(i.e. either every queue [LUN] has its own tag map or there's a single
one for the entire host).  This formulation is primarily intended to
help single issue queue hardware, like the aic7xxx

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-31 11:18:03 -04:00
Darrick J. Wong f19eaa7f53 [SCSI] aic94xx: Increase can_queue for better performance
This patch sets can_queue in the aic94xx driver's scsi_host to better
performing values than what's there currently.  It seems that
asd_ha->seq.can_queue reflects the number of requests that can be
queued per controller; so long as there's one scsi_host per
controller, it seems logical that the scsi_host ought to have the same
can_queue value.  To the best of my (still limited) knowledge, this
method provides the correct value.

The effect of leaving this value set to 1 is terrible performance in
the case of either (a) certain Maxtor SAS drives flying solo or (b)
flooding several disks with I/O simultaneously (md-raid).  There may be
more scenarios where we see similar problems that I haven't uncovered.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-30 17:30:06 -04:00
James Bottomley bc229b3663 [SCSI] aic94xx: add MODULE_FIRMWARE tag
Add a tag which shows what the firmware file we're requesting is.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-30 11:04:17 -04:00
James Bottomley 2908d778ab [SCSI] aic94xx: new driver
This is the end point of the separate aic94xx driver based on the
original driver and transport class from Luben Tuikov
<ltuikov@yahoo.com>

The log of the separate development is:

Alexis Bruemmer:
  o aic94xx: fix hotplug/unplug for expanderless systems
  o aic94xx: disable split completion timer/setting by default
  o aic94xx: wide port off expander support
  o aic94xx: remove various inline functions
  o aic94xx: use bitops
  o aic94xx: remove queue comment
  o aic94xx: remove sas_common.c
  o aic94xx: sas remove depot's
  o aic94xx: use available list_for_each_entry_safe_reverse()
  o aic94xx: sas header file merge

James Bottomley:
  o aic94xx: fix TF_TMF_NO_CTX processing
  o aic94xx: convert to request_firmware interface
  o aic94xx: fix hotplug/unplug
  o aic94xx: add link error counts to the expander phys
  o aic94xx: add transport class phy reset capability
  o aic94xx: remove local_attached flag
  o Remove README
  o Fixup Makefile variable for libsas rename
  o Rename sas->libsas
  o aic94xx: correct return code for sas_discover_event
  o aic94xx: use parent backlink port
  o aic94xx: remove channel abstraction
  o aic94xx: fix routing algorithms
  o aic94xx: add backlink port
  o aic94xx: fix cascaded expander properties
  o aic94xx: fix sleep under lock
  o aic94xx: fix panic on module removal in complex topology
  o aic94xx: make use of the new sas_port
  o rename sas_port to asd_sas_port
  o Fix for eh_strategy_handler move
  o aic94xx: move entirely over to correct transport class formulation
  o remove last vestages of sas_rphy_alloc()
  o update for eh_timed_out move
  o Preliminary expander support for aic94xx
  o sas: remove event thread
  o minor warning cleanups
  o remove last vestiges of id mapping arrays
  o Further updates
  o Convert aic94xx over entirely to the transport class end device and
  o update aic94xx/sas to use the new sas transport class end device
  o [PATCH] aic94xx: attaching to the sas transport class
  o Add missing completion removal from prior patch
  o [PATCH] aic94xx: attaching to the sas transport class
  o Build fixes from akpm

Jeff Garzik:
  o [scsi aic94xx] Remove ->owner from PCI info table

Luben Tuikov:
  o initial aic94xx driver

Mike Anderson:
  o aic94xx: fix panic on module insertion
  o aic94xx: stub out SATA_DEV case
  o aic94xx: compile warning cleanups
  o aic94xx: sas_alloc_task
  o aic94xx: ref count update
  o aic94xx nexus loss time value
  o [PATCH] aic94xx: driver assertion in non-x86 BIOS env

Randy Dunlap:
  o libsas: externs not needed

Robert Tarte:
  o aic94xx: sequence patch - fixes SATA support

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-29 09:52:29 -05:00
James Bottomley f4ad7b5807 [SCSI] scsi_transport_sas: remove local_attached flag
This flag denotes local attachment of the phy.  There are two problems
with it:

1) It's actually redundant ... you can get the same information simply
by seeing whether a host is the phys parent
2) we condition a lot of phy parameters on it on the false assumption
that we can only control local phys.  I'm wiring up phy resets in the
aic94xx now, and it will be able to reset non-local phys as well.

I fixed 2) by moving the local check into the reset and stats function
of the mptsas, since that seems to be the only HBA that can't
(currently) control non-local phys.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-27 22:30:11 -05:00
James Bottomley 8ce7a9c159 Merge ../linux-2.6 2006-08-27 21:59:59 -05:00
Ingo Molnar 36e8e57832 [PATCH] lockdep: annotate idescsi_pc_intr()
idescsi_pc_intr() uses local_irq_enable() in IRQ context: annotate it.

(this has no effect on kernels with lockdep disabled.  On kernels with lockdep
enabled this means that we wont actually disable interrupts, and the warning
message will go away as well.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-08-27 11:01:32 -07:00
Greg Kroah-Hartman f834c75542 Merge gregkh@master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 2006-08-26 13:04:23 -07:00
Mike Christie 0db99e3359 [SCSI] fix scsi_send_eh_cmnd regression
The callers of scsi_send_eh_cmnd are setting the cmnd buffer,
and then scsi_send_eh_cmnd is copying that updated buffer to
the old_cmnd variable. Then after the command runs, we end up
copying that old_cmnd var which has the new cmnd to the scsi
command buffer. When this command gets recent, all types of fun
things happen like getting TUR or START_STOP commands with
data and scatterlists.

This patch made against scsi-rc-fixes, has the callers of
scsi_send_eh_cmnd pass in the command so scsi_send_eh_cmnd
can do the right thing. This should go into 2.6.18 since this
fixes a regression added when we removed some of the scsi_cmnd
fields and replaced them with local variables.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-26 10:03:14 -05:00
Andrew Vasquez 15a3758dc9 [SCSI] qla2xxx: Update version number to 8.01.07-k1.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-26 09:26:57 -05:00
Andrew Vasquez 476e8978d9 [SCSI] qla2xxx: Properly re-enable EFT support after an ISP abort.
Software must explicitely re-enable extended firmware tracing
after any ISP abort condition.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-26 09:26:41 -05:00
Andrew Vasquez 9c06938aa4 [SCSI] qla2xxx: Correct PLOGI retry logic.
Original code attempts to retry PLOGIs to fcports that are
FCP_TARGETs only.  If the driver never performed a successful
PLOGI/PRLI, the port-type would never be assigned, and the
relogin logic would silently drop the request (and thus the port
would not be recognized and registered).

The fix is relatively straightforward, drop the FCP_TARGET-only
check.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-26 09:26:27 -05:00
Douglas Gilbert b2155d0417 [SCSI] sg: fix incorrect page problem
There's a problem where sg is executing a ->nopage operation on a
compound page, it actually calls get_page() on the first page in the
compound rather than the page which is being mapped.  The fix is to
select the correct page by indexing into the compound.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-26 09:25:06 -05:00
Greg Kroah-Hartman 7bf13484d2 Merge branch 'upstream-greg' of gregkh@master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2006-08-24 01:28:14 -07:00
Tejun Heo ac2164d5e4 [PATCH] sata_via: use old SCR access pattern on vt6420
vt6420 has super-fragile SCR registers which can hang the whole
machine if accessed with the wrong timings.  This patch makes sata_via
use SCR registers only during probing and with the same timings as
before (pre new EH), which is proven to work.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-24 02:51:24 -04:00
Tejun Heo 9dd9c16465 [PATCH] ata_piix: implement force_pcs module parameter
This patch implements force_pcs module parameter for ata_piix.  If 1,
PCS is ignored, 2 honored.  As there seem to be quite a few ICHs w/
impaired PCS, this option will be useful for cases where the default
setting doesn't work.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-24 02:51:24 -04:00
Tejun Heo f3745a3f9f [PATCH] ata_piix: ignore PCS on ICH5
There have been a number of reports regarding some ICH5s failing to
detect devices since the PCS handling update.  Analysis shows that
these problems are caused by bogus PCS values from those controllers.

Before the PCS update, the driver didn't honor PCS regs exactly and
probed them in many cases PCS reports no device.  Now that PCS is
honored exactly, these hardware problems are visible.

This patch makes ICH5 ignore PCS.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-24 02:51:24 -04:00
David S. Miller 25848c4e50 [SCSI] esp: Fix build on SUN4.
Noted by Alexey Dobriyan.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-08-23 15:33:07 -07:00
Tejun Heo f1a58ecae5 [PATCH] ata_piix: fix ghost device probing by honoring PCS present bits
Move out PCS handling from piix_sata_prereset() into
piix_sata_present_mask() and use it from newly implemented
piix_sata_softreset().  Class codes for devices which are indicated to
be absent by PCS are cleared to ATA_DEV_NONE.  This fixes ghost device
problem reported on ICH6 and 7.

This patch moves PCS handling from prereset to softreset, which makes
two behavior changes.

* perform softreset even when PCS indicates no device
* PCS handling is repeated before retrying softresets due to reset
  failures.

Both behavior changes are intended and more consistent with how other
drivers behave.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-22 06:07:48 -04:00
Daniel Walker d2afb3ae04 [SCSI] BusLogic gcc 4.1 warning fixes
- Reworked all the very long lines in that block (this drivers full of
  them though)

- Returns an error in three places that it didn't before.

- Properly clean up after a scsi_add_host() failure.

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 16:18:28 -06:00
Jeff Garzik d14b50cc60 Merge branch 'master' into upstream-fixes 2006-08-19 17:27:12 -04:00
James Smart 48e2691f9c [SCSI] lpfc 8.1.9 : Change version number to 8.1.9
Change version number to 8.1.9

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 13:46:47 -07:00
James Smart a90f56847e [SCSI] lpfc 8.1.9 : Stall eh handlers if resetting while rport blocked
Stall error handler if attempting resets/aborts while an rport is blocked.
This avoids device offline scenarios due to errors in the error handler.

Background:
  Although the transport is using the scsi_timed_out functionality to
  restart the timeout if the rport is blocked, if the timeout has already
  fired before the block occurs, the eh handler still runs and can take
  the device offline. Ultimately, this window cannot be resolved without
  significant work in the error handler thread. Christoph noted the first
  level of these issues when he noted the poor error response handling
  by the error thread.

  We found, under heavy load and error testing, that time window from when
  the scsi_times_out() adds the io to the queue to when the scsi_error_handler
  gets around to servicing it, can be in the several seconds range. In most
  cases, these test conditions are highly unusual, but possible.
  As a result, we're stalling the error handler in this race window so that
  we can avoid the device_offline transitions.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 13:46:30 -07:00
James Smart 33ccf8d108 [SCSI] lpfc 8.1.9 : Misc Bug Fixes
Misc Bug Fixes:
- Cap MBX_DOWN_LINK command timeout to 60 seconds
- Fix double free of ndlp object
- Don't free mbox structures on error. The completion handlers expect to do so.
- Clear host attention work items when going offline
- Fixed discovery issues in multi-initiator environments.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 13:46:05 -07:00
Michal Piotrowski 4041b9cd87 [SCSI] megaraid_sas: pci_module_init to pci_register_driver conversion
Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Acked-by: "Patro, Sumant" <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 13:44:54 -07:00
James Smart b8d0821012 [SCSI] fc transport: add fc_host system_hostname attribute and u64_to_wwn()
This patch updates the fc transport for the following:

- Addition of a new attribute "system_hostname" which can be
  used to set the fully qualified hostname that the fc_host
  is attached to. The fc_host can then register this string
  as the FDMI-based host name attribute.
  Note: for NPIV, a fc_host could be associated with a system which
    is not the local system.

- Add the inline function u64_to_wwn(), which is the inverse of the
  existing wwn_to_u64() function.

- Slight reorg, just to keep dynamic attributes with each other, etc

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 13:43:10 -07:00
Henrik Kretzschmar f3d7271c5a [SCSI] convert to PCI_DEVICE() macro
Convert the pci_device_id-table of the megaraid_sas-driver to
the PCI_DEVICE-macro, to safe some lines.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Acked-by: "Patro, Sumant" <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 13:42:00 -07:00
Randy Dunlap 2b6ee9b529 [SCSI] aic7*: cleanup MODULE_PARM_DESC strings
Modify beginning string to be more readable.  Remove one trailing newline.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 13:41:08 -07:00
James Smart 016131b8ff [SCSI] fc transport: convert fc_host symbolic_name attribute to a dynamic attribute
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 13:40:07 -07:00
Dave Jones a2f5d4d94f [SCSI] remove unnecessary includes of linux/config.h from drivers/scsi/
kbuild includes this automatically these days.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 13:39:11 -07:00
dave wysochanski 84961f28e9 [SCSI] Don't add scsi_device for devices that return PQ=1, PDT=0x1f
Some targets may return slight variations of PQ and PDT to indicate
no LUN mapped.  USB UFI setting PDT=0x1f but having reserved bits for
PQ is one example, and NetApp targets returning PQ=1 and PDT=0x1f is
another.  Both instances seem like reasonable responses according to
SPC-3 and UFI specs.

The current scsi_probe_and_add_lun() code adds a scsi_device
for targets that return PQ=1 and PDT=0x1f.  This causes LUNs of type
"UNKNOWN" to show up in /proc/scsi/scsi when no LUNs are mapped.
In addition, subsequent rescans fail to recognize LUNs that may be
added on the target, unless preceded by a write to the delete attribute
of the "UNKNOWN" LUN.

This patch addresses this problem by skipping over the scsi_add_lun()
when PQ=1,PDT=0x1f is encountered, and just returns
SCSI_SCAN_TARGET_PRESENT.

Signed-off-by: Dave Wysochanski <davidw@netapp.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 13:37:40 -07:00
Mark Haverkamp 8c867b257d [SCSI] aacraid: Reset adapter in recovery timeout
Received from Mark Salyzyn

If the adapter is in blinkled (Firmware Assert) when error recovery
timeout actions have been triggered, perform an adapter warm reset and
restart the initialization.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 13:35:11 -07:00
Mark Haverkamp 90ee346651 [SCSI] aacraid: Check for unlikely errors
Received from Mark Salyzyn

The enclosed patch cleans up some code fragments, adds some paranoia
(unproven causes of potential driver failures).

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 13:33:45 -07:00
Mark Haverkamp 8c23cd7457 [SCSI] aacraid: Restart adapter on firmware assert (Update 2)
Received from Mark Salyzyn

If the adapter should be in a blinkled (Firmware Assert) state when the
driver loads, we will perform a warm restart of the Adapter Firmware to
see if we can rescue the adapter. Possible causes of a blinkled can
occur on some early release motherboard BIOSes, transitory PCI bus
problems on embedded systems or non-x86 based architectures, transitory
startup failures of early release drives or transitory hardware
failures; some of which can bite the adapter later at runtime. Future
enhancements will include recovery during runtime.

Fixed extra whitespace space issue.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 13:33:13 -07:00
Mark Haverkamp c8f7b073e0 [SCSI] aacraid: interruptible ioctl
Received from Mark Salyzyn

This patch allows the FSACTL_SEND_LARGE_FIB, FSACTL_SENDFIB and
FSACTL_SEND_RAW_SRB ioctl calls into the aacraid driver to be
interruptible. Only necessary if the adapter and/or the management
software has gone into some sort of misbehavior and the system is being
rebooted, thus permitting the user management software applications to
be killed relatively cleanly. The FIB queue resource is held out of the
free queue until the adapter finally, if ever, completes the command.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 13:32:57 -07:00
Andreas Herrmann 04846f2592 [SCSI] limit recursion when flushing shost->starved_list
Attached is a patch that should limit a possible recursion that can
lead to a stack overflow like follows:

Kernel stack overflow.
CPU:    3    Not tainted
Process zfcperp0.0.d819
(pid: 13897, task: 000000003e0d8cc8, ksp: 000000003499dbb8)
Krnl PSW : 0404000180000000 000000000030f8b2 (get_device+0x12/0x48)
Krnl GPRS: 00000000135a1980 000000000030f758 000000003ed6c1e8 0000000000000005
           0000000000000000 000000000044a780 000000003dbf7000 0000000034e15800
           000000003621c048 070000003499c108 000000003499c1a0 000000003ed6c000
           0000000040895000 00000000408ab630 000000003499c0a0 000000003499c0a0
Krnl Code: a7 fb ff e8 a7 19 00 00 b9 02 00 22 e3 e0 f0 98 00 24 a7 84
Call Trace:
([<000000004089edc2>] scsi_request_fn+0x13e/0x650 [scsi_mod])
 [<00000000002c5ff4>] blk_run_queue+0xd4/0x1a4
 [<000000004089ff8c>] scsi_queue_insert+0x22c/0x2a4 [scsi_mod]
 [<000000004089779a>] scsi_dispatch_cmd+0x8a/0x3d0 [scsi_mod]
 [<000000004089f1ec>] scsi_request_fn+0x568/0x650 [scsi_mod]
...
 [<000000004089f1ec>] scsi_request_fn+0x568/0x650 [scsi_mod]
 [<00000000002c5ff4>] blk_run_queue+0xd4/0x1a4
 [<000000004089ff8c>] scsi_queue_insert+0x22c/0x2a4 [scsi_mod]
 [<000000004089779a>] scsi_dispatch_cmd+0x8a/0x3d0 [scsi_mod]
 [<000000004089f1ec>] scsi_request_fn+0x568/0x650 [scsi_mod]
 [<00000000002c5ff4>] blk_run_queue+0xd4/0x1a4
 [<000000004089fa9e>] scsi_run_host_queues+0x196/0x230 [scsi_mod]
 [<00000000409eba28>] zfcp_erp_thread+0x2638/0x3080 [zfcp]
 [<0000000000107462>] kernel_thread_starter+0x6/0xc
 [<000000000010745c>] kernel_thread_starter+0x0/0xc
<0>Kernel panic - not syncing: Corrupt kernel stack, can't continue.

This stack overflow occurred during tests on s390 using zfcp.
Recursion depth for this panic was 19.

Usually recursion between blk_run_queue and a request_fn is avoided
using QUEUE_FLAG_REENTER. But this does not help if the scsi stack
tries to flush the starved_list of a scsi_host.

Limit recursion depth when flushing the starved_list
of a scsi_host.

Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 13:31:53 -07:00
Greg Kroah-Hartman f8872f4cb4 Merge gregkh@master.kernel.org:/home/rmk/linux-2.6-arm 2006-08-10 15:07:17 -07:00
Martin Hicks a34b6fc04d [PATCH] libata: PHY reset requires writing 0x4 to SControl
Hi,

Reading the Intel VSC and AHCI it seems like writing 0x302 is incorrect.
The only valid values are 4, 1 and 0.  Writing 4 disables the
PHY.

Signed-off-by: Martin Hicks <mort@bork.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-10 08:29:12 -04:00
Albert Lee 51704c609f [PATCH] libata: Use ATA_FLAG_PIO_POLLING for pdc_adma
pdc_adma was overlooked and broken by the irq-pio patch:
Only HSM_ST_LAST interrupts should be delivered to this LLDD.

Adding ATA_FLAG_PIO_POLLING to pdc_adma fixes the problem (temporarily),
before we convert the irq handler of pdc_adma to handle all interrupts.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-10 06:55:18 -04:00
Tejun Heo 22aac0896b [PATCH] libata: clear sdev->locked on door lock failure
SCSI EH locks door if sdev->locked is set.  Sometimes door lock
command fails continuously (e.g. when medium is not present) and as
libata uses EH to acquire sense data, this easily creates a loop where
a failed lock door invokes EH and EH issues lock door on completion.

This patch clears sdev->locked on door lock failure to break this
loop.  This problem has been spotted and diagnosed by Unicorn Chang
<uchang@tw.ibm.com>.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-09 01:16:27 -04:00
Keith Owens 85455dd342 [PATCH] Fix compile problem when sata debugging is on
Fix a sata debug print statement that still uses an old variable name.

Signed-off-by: Keith Owens <kaos@ocs.com.au>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-09 01:16:27 -04:00
James Bottomley 19ac0db3e2 [SCSI] fix up short inquiry printing
A recent drivers base commit:

3e95637a48

Caused the bus to be added to dev_printk, so now our SCSI inquiry short
messages print like this:

scsiscsi 2:0:0:0: Direct access     IBM-ESXS ST973401SS       B519 PQ: 0 ANSI: 5

Just remove the "scsi" from the sdev_printk to compensate.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 18:19:19 -05:00
Matthew Wilcox 4ff36718ed [SCSI] Improve inquiry printing
- Replace scsi_device_types array API with scsi_device_type function API.
   Gets rid of a lot of common code, as well as being easier to use.
 - Add the new device types in SPC4 r05a, and rename some of the older ones.
 - Reformat the printing of inquiry data; now fits on one line and
   includes PQ.

I think I've addressed all the feedback from the previous versions.  My
current test box prints:

scsi 2:0:1:0: Direct access     HP 18.2G ATLAS10K3_18_SCA HP05 PQ: 0 ANSI: 2

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 15:59:26 -05:00
Brian King 008cd5bbfb [SCSI] ipr: Bump driver version to 2.1.4
Bump the ipr driver version to 2.1.4.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 15:51:12 -05:00
Brian King 117d2ce1ce [SCSI] ipr: Auto sense handling fix
Fix up a logic error in the checking for valid sense data.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 15:50:50 -05:00
Brian King 5b7304fbfb [SCSI] ipr: Properly handle IOA recovered errors
The ipr driver currently translates adapter recovered errors
to DID_ERROR. This patch fixes this to translate these
errors to success instead.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 15:50:19 -05:00
Brian King 896bbd2140 [SCSI] ipr: Handle new SAS error codes
Add definitions for some SAS error codes that can be
logged by ipr SAS adapters.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 15:49:57 -05:00
Brian King b5145d25f0 [SCSI] ipr: Add some hardware defined types for SATA
Add some hardware defined types for SATA. This is required
by future patches to add SATA support to ipr.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 15:49:40 -05:00
Russell King 574dc0abab [ARM] Fix Acorn platform SCSI driver build failures
SCSI folk forgot to fix up all the uses of 'buffer' before deleting
this struct member.  Do it for them to rescue the resulting build
failures.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-08-06 20:55:33 +01:00
Russell King ca8c100a00 [ARM] Fix NCR5380-based SCSI card build
The NCR5380-based SCSI cards need the SCSI SPI transport selected
to build correctly.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-08-06 20:53:40 +01:00