aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi.c
Commit message (Collapse)AuthorAgeFilesLines
* [SCSI] Remove devfs support from the SCSI subsystemGreg KH2006-02-271-3/+0
| | | | | | | | | | | | As devfs has been disabled from the kernel tree for a number of months now (5 to be exact), here's a patch against 2.6.16-rc1-git1 that removes support for it from the SCSI subsystem. The patch also removes the scsi_disk devfs_name field as it's no longer needed. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] SCSI core kmalloc2kzallocJes Sorensen2006-02-271-2/+1
| | | | | | | | Change the core SCSI code to use kzalloc rather than kmalloc+memset where possible. Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [PATCH] percpu data: only iterate over possible CPUsEric Dumazet2006-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | percpu_data blindly allocates bootmem memory to store NR_CPUS instances of cpudata, instead of allocating memory only for possible cpus. As a preparation for changing that, we need to convert various 0 -> NR_CPUS loops to use for_each_cpu(). (The above only applies to users of asm-generic/percpu.h. powerpc has gone it alone and is presently only allocating memory for present CPUs, so it's currently corrupting memory). Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: James Bottomley <James.Bottomley@steeleye.com> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: Jens Axboe <axboe@suse.de> Cc: Anton Blanchard <anton@samba.org> Acked-by: William Irwin <wli@holomorphy.com> Cc: Andi Kleen <ak@muc.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [SCSI] turn most scsi semaphores into mutexesArjan van de Ven2006-01-121-6/+7
| | | | | | | | the scsi layer is using semaphores in a mutex way, this patch converts these into using mutexes instead Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] Kill the SCSI softirq handlingJens Axboe2006-01-091-101/+8
| | | | | | | This patch moves the SCSI softirq handling to the block layer version. There should be no functional changes. Signed-off-by: Jens Axboe <axboe@suse.de>
* [PATCH] Fix a bug in scsi_get_commandMatthew Dobson2005-11-221-1/+1
| | | | | | | | | | | scsi_get_command() attempts to write into a structure that may not have been successfully allocated. Move this write inside the if statement that ensures we won't panic the kernel with a NULL pointer dereference. Signed-off-by: Matthew Dobson <colpatch@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>
* [SCSI] use {sdev,scmd,starget,shost}_printk in generic codeJeff Garzik2005-10-281-2/+3
| | | | | rejections fixed and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] move the mid-layer printk's over to shost/starget/sdev_printkJames Bottomley2005-10-281-13/+8
| | | | | | | | | This should eliminate (at least in the mid layer) to make numeric assumptions about any of the enumeration variables. As a side effect, it will also make all the messages consistent and line us up nicely for the error logging strategy (if it ever shows itself again). Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [PATCH] gfp_t: drivers/scsiAl Viro2005-10-281-4/+4
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [SCSI] fix oops on usb storage device disconnectJames Bottomley2005-09-191-3/+2
| | | | | | | | | We fix the oops by enforcing the host state model. There have also been two extra states added: SHOST_CANCEL_RECOVERY and SHOST_DEL_RECOVERY so we can take the model through host removal while the recovery thread is active. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] fix warning in scsi_softirqakpm@osdl.org2005-08-121-1/+1
| | | | | | | | | | From: Andrew Morton <akpm@osdl.org> drivers/scsi/scsi.c: In function `scsi_softirq': drivers/scsi/scsi.c:814: warning: int format, long int arg (arg 4) Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] add global timeout to the scsi mid-layerJames Bottomley2005-08-081-0/+15
| | | | | | | | | | | | | | | | | | There are certain rogue devices (and the aic7xxx driver) that return BUSY or QUEUE_FULL forever. This code will apply a global timeout (of the total number of retries times the per command timer) to a given command. If it is exceeded, the command is completed regardless of its state. The patch also removes the unused field in the command: timeout and timeout_total. This solves the problem of detecting an endless loop in the mid-layer because of BUSY/QUEUE_FULL bouncing, but will not recover the device. In the aic7xxx case, the driver can be recovered by sending a bus reset, so possibly this should be tied into the error handler? Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] host state model update: reimplement scsi_host_cancelMike Anderson2005-07-301-1/+1
| | | | | | | | | | Remove the old scsi_host_cancel function as it has not been working for sometime do to the device list possibly being empty when it is called and possible race issues. Add setting of SHOST_CANCEL at the state of beginning of scsi_remove_host. Signed-off-by: Mike Anderson <andmike@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] host state model update: replace old host bitmap stateMike Anderson2005-07-301-1/+1
| | | | | | | | | | | Migrate the current SCSI host state model to a model like SCSI device is using. Signed-off-by: Mike Anderson <andmike@us.ibm.com> Rejections fixed up and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] add TYPE_RBC to our type tableJames Bottomley2005-07-111-0/+1
| | | | | | | Here's a tiny update that means we print the correct ASCII type information Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] remove scsi_cmnd->stateChristoph Hellwig2005-06-261-7/+0
| | | | | | | | | We never look at it except for the old megaraid driver that abuses it for sending internal commands. That usage can be fixed easily because those internal commands are single-threaded by a mutex and we can easily use a completion there. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] remove scsi_cmnd->ownerChristoph Hellwig2005-06-261-5/+0
| | | | | | never checked anywhere Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] remove scsi_cmnd->abort_reasonChristoph Hellwig2005-06-261-1/+0
| | | | | | Never used for anything but printing it out in debug routines. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [PATCH] make various thing staticAdrian Bunk2005-06-241-2/+4
| | | | | | | | Another rollup of patches which give various symbols static scope Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* merge by hand - fix up rejections in Documentation/DocBook/MakefileJames Bottomley2005-05-201-1/+1
|\
| * [SCSI] call correct scsi_done function in scsi_dispatch_cmdMike Christie2005-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | scsi_dispatch_cmd currently calls scsi_done when the device is in the SDEV_DEL state, but at this point the command has not had a timer added to it (this is done a couple lines down) so scsi_done just returns and the command is lost. The attached patch made against 2.6.12-rc3 calls __scsi_done in this case so the comamnd will be returned upwards. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* | [SCSI] remove a timer race in scsi_queue_insert()Tejun Heo2005-05-201-4/+6
|/ | | | | | | | | | | | | | scsi_queue_insert() has four callers. Three callers call with timer disabled and one (the second invocation in scsi_dispatch_cmd()) calls with timer activated. scsi_queue_insert() used to always call scsi_delete_timer() and ignore the return value. This results in race with timer expiration. Remove scsi_delete_timer() call from scsi_queue_insert() and make the caller delete timer and check the return value. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [PATCH] scsi: remove meaningless scsi_cmnd->serial_number_at_timeout field2005-04-181-2/+0
| | | | | | | | | | | | | scsi_cmnd->serial_number_at_timeout doesn't serve any purpose anymore. All serial_number == serial_number_at_timeout tests are always true in abort callbacks. Kill the field. Also, as ->pid always equals ->serial_number and ->serial_number doesn't have any special meaning anymore, update comments above ->serial_number accordingly. Once we remove all uses of this field from all lldd's, this field should go. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [PATCH] scsi: remove unused scsi_cmnd->internal_timeout field2005-04-181-1/+0
| | | | | | | | scsi_cmnd->internal_timeout field doesn't have any meaning anymore. Kill the field. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [PATCH] remove outdated print_* functions2005-04-181-1/+1
| | | | | | | We have the scsi_print_* functions in the proper namespace for a long time now and there weren't a lot users left. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* Linux-2.6.12-rc2Linus Torvalds2005-04-161-0/+1375
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!