Commit graph

799 commits

Author SHA1 Message Date
Christoph Hellwig
0a04137e75 [SCSI] remove Scsi_Pointer typedef
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-09 15:46:55 -05:00
Christoph Hellwig
d0be4a7d29 [SCSI] remove Scsi_Host_Template typedef
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-09 15:44:09 -05:00
James Bottomley
c0ed79a331 [SCSI] sd: fix issue_flush
sd_issue_flush() is called from atomic context so we can't use the
semaphore based routines to get a reference to the scsi_disk.  Assume
something else already got the reference so we can safely use it.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-09 09:31:46 -05:00
Alan Stern
2ef8919830 [SCSI] Fix refcount leak in scsi_report_lun_scan
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-08 16:13:34 -05:00
goggin, edward
34ea80ec6a [SCSI] fix usb storage oops
The problem is that scsi_run_queue is called from scsi_next_command()
after doing a scsi_put_command.  If the command was the only thing
holding the reference on the scsi_device then the resulting device put
will tear down the block queue.  Fix this by taking a reference to the
device and holding it around scsi_run_queue()

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-08 16:09:53 -05:00
James Bottomley
383f974950 Merge by hand (conflicts between pending drivers and kfree cleanups)
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-08 12:50:26 -05:00
Jesper Juhl
c9475cb0c3 [PATCH] kfree cleanup: drivers/scsi
This is the drivers/scsi/ part of the big kfree cleanup patch.

Remove pointless checks for NULL prior to calling kfree() in drivers/scsi/.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Acked-by: Kai Makisara <kai.makisara@kolumbus.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:54:01 -08:00
Nishanth Aravamudan
a9a3047dd8 [PATCH] drivers/scsi: fix-up schedule_timeout() usage
Use schedule_timeout_uninterruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:59 -08:00
Tim Schmielau
8c65b4a604 [PATCH] fix remaining missing includes
Fix more include file problems that surfaced since I submitted the previous
fix-missing-includes.patch.  This should now allow not to include sched.h
from module.h, which is done by a followup patch.

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:41 -08:00
brking@us.ibm.com
13bf50d1f2 [SCSI] ipr: Driver version 2.1.0
Bump the driver version.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:13:11 -06:00
brking@us.ibm.com
dfed823eab [SCSI] ipr: Better handle failure of adapter bringup commands
Some new ipr adapters do not support some of the initialization
commands currently sent to it from the driver. Handle these
commands failing and continue on with the adapter initialization.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:12:56 -06:00
brking@us.ibm.com
d71a8b0cba [SCSI] ipr: Increase ipr device scanning limits
Increase device scanning limits so that all devices are found.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:12:32 -06:00
brking@us.ibm.com
86f51436dd [SCSI] ipr: New PCI Ids
Adds support for some new ipr adapters

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:12:10 -06:00
brking@us.ibm.com
eeb88307aa [SCSI] ipr: Support device reset to RAID disks
Support now exists in some ipr adapters to issue a device reset
to an Advanced Function disk.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:11:14 -06:00
brking@us.ibm.com
ee0a90fa3e [SCSI] ipr: Support new device queueing model
New ipr adapters support a new device queueing model in the
adapter firmware. The queueing model is the NACA queueing model,
but it does not mean use of NACA is required. The new model removes
some of the adapter firmware queue state that made handling QERR=0
almost impossible. The queueing model on older adapters included the
concept of a queue frozen state, which would freeze the response
queue in the adapter when a check condition occurred, requiring a
a primitive to resume the queue. The new queueing model removes this
complexity.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:09:47 -06:00
brking@us.ibm.com
ee0f05b863 [SCSI] ipr: New adapter error types
Handle some new types of ipr errors that can be returned by the adapter.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:09:22 -06:00
brking@us.ibm.com
c8f7489251 [SCSI] ipr: Handle device autosense
Some newer ipr adapters are capable of returning autosense from
devices that support it. This patch adds the data structures for
the autosense buffer.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:09:06 -06:00
brking@us.ibm.com
32d29776f8 [SCSI] ipr: Module parm to disable RAID 0 auto create
Some ipr adapters will automatically create single device
RAID 0 arrays for all unconfigured RAID capable devices found
at adapter initialization time. This patch adds a module parameter
to disable this behavior.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:08:49 -06:00
brking@us.ibm.com
3d1d0da675 [SCSI] ipr: Runtime reset
Some IPR RAID adapter will automatically create single device RAID arrays
for all attached devices when the card is initialized. Setting the
RUNTIME_RESET doorbell bit will prevent this from occurring, since we
only want this behavior the first time the card is initialized and not
each time the card happens to get reset.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:05:42 -06:00
brking@us.ibm.com
b0df54bb4c [SCSI] ipr: handle new adapter errors
Add support for handling some new errors that may be returned
by ipr adapters.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:05:27 -06:00
brking@us.ibm.com
f37eb54b48 [SCSI] ipr: Provide reset_adapter retry method for offlined adapters
If an ipr adapter repeatedly fails its initialization
the ipr driver will take the adapter offline and never talk
to it again. This provides a method for the user to manually
try the initialization again through sysfs.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:05:07 -06:00
brking@us.ibm.com
d3c74871bd [SCSI] ipr: Runtime debugging options
Make some compile time debugging options runtime module options.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:04:41 -06:00
brking@us.ibm.com
12baa4202d [SCSI] ipr: Fix adapter microcode update DMA mapping leak
If the write buffer command that is issued to the ipr adapter
to update its microcode fails for some reason, the DMA buffer
will never get unmapped. Move the pci_map/unmap out of the
IOA reset job so that the buffer is always clearly mapped
and unmapped.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:04:18 -06:00
brking@us.ibm.com
0bc42e35c7 [SCSI] ipr: Convert to use kzalloc
Convert appropriate kmalloc/memset calls to use kzalloc.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:03:45 -06:00
brking@us.ibm.com
622750406a [SCSI] ipr: Write caching state host attribute
Adds a scsi_host sysfs attribute and module parm to enable/disable
the write cache on an ipr adapter.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:03:24 -06:00
brking@us.ibm.com
692aebfc69 [SCSI] ipr: slave_alloc optimization
Optimize ipr's slave_alloc to return -ENXIO for devices that
do not exist.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:02:46 -06:00
brking@us.ibm.com
0726ce2610 [SCSI] ipr: Prevent upper layer driver binding
Set the no_uld_attach for devices ipr does not want
upper layer drivers to attach to. These devices are
only reported for RAID management and only sg should
be used to talk to them.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:02:20 -06:00
brking@us.ibm.com
d0ad6f5039 [SCSI] ipr: Include all disks in supported list
Fix ipr to include all disks in the supported device list,
not just disks formatted to advanced function format.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:01:55 -06:00
brking@us.ibm.com
cf8520376c [SCSI] ipr: Error logging cleanup
Simplify error logging path, sanitize error length returned
by the adapter.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:01:24 -06:00
brking@us.ibm.com
a9cfca9622 [SCSI] ipr: Handle unknown errors
Better handle errors received which are not known to the device driver.
Just dump the hex data so that we have a hope of figuring out what
went wrong.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:01:17 -06:00
brking@us.ibm.com
6837c2bfda [SCSI] ipr: Generic adapter error cleaup
The generic ipr adapter error log currently logs 2 lines of useless
data. Delete these lines.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:00:55 -06:00
brking@us.ibm.com
fa15b1f6be [SCSI] ipr: Physical resource error logging macro
Adds a macro in the ipr driver for logging a physical device location.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:00:34 -06:00
brking@us.ibm.com
cfc321397e [SCSI] ipr: Cleanup error structures
Simplify the ipr error structures a bit by removing some duplication.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 12:59:53 -06:00
brking@us.ibm.com
11cd8f1201 [SCSI] ipr: Disk array rescanning fix
IPR RAID arrays show up on a virtual scsi bus, with a scsi bus number
of 255, which is generated by the adapter microcode. For the initial
scan of the host, we manually scan this bus since it does not obey
SAM in regards to sparse LUNs and the disk array devices do not have
a consistent product id to use scsi core's blacklist. If /proc/scsi/scsi
or sysfs is used to delete one of these devices, the device will not
be able to get added back by rescanning the host since scsi core
will see ipr's max_channel as 4, rather than 255. Update max_channel
after the initial scan so that ipr raid arrays can get re-added
if they get deleted.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 12:59:48 -06:00
Adrian Bunk
d6933df97a [SCSI] remove the obsolete SCSI qlogicisp driver
The SCSI qlogicisp driver is both marked BROKEN and superseded by the
qla1280 driver.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 12:57:05 -06:00
Christoph Hellwig
4065a413d7 [SCSI] aic79xx: remove scsi_assign_lock usage
just take the internal lock in queuecommand instead.  also switch
the only direct use of the internal lock to the wrappers used elsewhere.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 12:52:08 -06:00
Christoph Hellwig
6d5e9fd196 [SCSI] aic7xxx: remove scsi_assign_lock usage
just take the internal lock in queuecommand instead.  also switch
the only direct use of the internal lock to the wrappers used elsewhere.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 12:51:58 -06:00
Christoph Hellwig
cb0258a2fb [SCSI] megaraid (legacy): remove scsi_assign_lock usage
just take the adapter lock in megaraid_queue.  Additional benefit is
that we can get rid of the awkward conditional locking in
mega_internal_command.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 12:51:48 -06:00
Christoph Hellwig
f2c8dc402b [SCSI] megaraid_mbox: remove scsi_assign_lock usage
also remove the adapter->host_lock alias for adapter->lock and remove
some superflous locking aswell as removing the tiny locking wrappers
for the EH routines.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 12:51:32 -06:00
Christoph Hellwig
3072c4abdd [SCSI] megaraid_sas: fix EH locking
recent kernels call the eh_ methods without the host lock held.
megaraid_sas doesn't need it but drops it before calling a sleeping
routine and reqcquires it afterwards.  Just remove the
spin_unlock/spin_lock calls.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 12:50:41 -06:00
Christoph Hellwig
7dfdc9a52b [SCSI] use a completion in scsi_send_eh_cmnd
scsi_send_eh_cmnd currently uses a semaphore and an overload of eh_timer
to either get a completion for a command for a timeout.
Switch to using a completion and wait_for_completion_timeout to simply
the code and not having to deal with the races ourselves.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 12:49:36 -06:00
Christoph Hellwig
262eef663b [SCSI] remove scsi_wait_req
This function has been superceeded by the block request based interfaces
and is unused (except for the uncompilable cpqfc driver).

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 12:45:20 -06:00
Christoph Hellwig
474838d5e5 [SCSI] remove Scsi_Host.eh_active
now that the abuse in qla2xxx is gone this field can be remove.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 12:44:44 -06:00
Christoph Hellwig
ad42eb1b77 [SCSI] tidy up scsi_error_handler
adjust comments, remove a useless cast and remove a write-only variable.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 12:43:26 -06:00
Willem Riede
3256534776 [SCSI] ide-scsi fails to call idescsi_check_condition for things like "Medium not present"
This patch started life as a response to fedora specific ide subsystem changes
that made error handling of my ATAPI tape drive fail; the specifics are in

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=160868

The insertion of the statement rq->errors = err; near the end of
ide_end_drive_cmd() in drivers/ide/ide-io.c means that rq->errors does not
contain what it needs to in idescsi_end_request() in drivers/scsi/ide-scsi.c
anymore. Recent mainline kernels now also have this change.

Signed-off-by: Willem Riede <wrlk@riede.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 12:40:51 -06:00
Jack Hammer
a60768e2d4 [SCSI] ips: remove "Version Matching"
IBM has finally agreed that the "Version Matching" between firmware and
drivers ( and the resulting warning messages ) is no longer necessary.
This patch will remove those functions from the ServeRAID driver.

Signed-off-by: Jack Hammer <jack_hammer@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 12:33:12 -06:00
James Bottomley
b1081ea6f0 [SCSI] raid class update
- Update raid class to use nested classes for raid components (this will
allow us to move to a component control model now)
- Make the raid level an enumeration rather than and int.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 12:32:31 -06:00
James Bottomley
df133c212e [SCSI] Fix transport class oops
There's an oops that sometimes shows up with SCSI transport classes in
sysfs_hash_and_remove.  The problem is that now, because of the class to
device and vice versa symlinks, all classes have to be removed from
visibility *before* the device is removed from visibility.

The transport class trigger points violate this, so bring them back into
conformance.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 12:31:30 -06:00
Tejun Heo
537a95d935 [libata] restore sg on DMA mapping failure 2005-11-05 14:29:01 -05:00
Linus Torvalds
fecb4a0c87 Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6 2005-11-05 10:31:35 -08:00