aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/scsi.c
AgeCommit message (Collapse)AuthorFilesLines
2006-04-13[SCSI] for_each_possible_cpu: scsiKAMEZAWA Hiroyuki1-1/+1
for_each_cpu() actually iterates across all possible CPUs. We've had mistakes in the past where people were using for_each_cpu() where they should have been iterating across only online or present CPUs. This is inefficient and possibly buggy. We're renaming for_each_cpu() to for_each_possible_cpu() to avoid this in the future. This patch replaces for_each_cpu with for_each_possible_cpu. Signed-off-by: KAMEZAWA Hiroyuki <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2006-02-27[SCSI] Remove devfs support from the SCSI subsystemGreg KH1-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 <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2006-02-27[SCSI] SCSI core kmalloc2kzallocJes Sorensen1-2/+1
Change the core SCSI code to use kzalloc rather than kmalloc+memset where possible. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2006-02-05[PATCH] percpu data: only iterate over possible CPUsEric Dumazet1-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 <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: James Bottomley <[email protected]> Acked-by: Ingo Molnar <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Anton Blanchard <[email protected]> Acked-by: William Irwin <[email protected]> Cc: Andi Kleen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-01-12[SCSI] turn most scsi semaphores into mutexesArjan van de Ven1-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 <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2006-01-09[SCSI] Kill the SCSI softirq handlingJens Axboe1-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 <[email protected]>
2005-11-22[PATCH] Fix a bug in scsi_get_commandMatthew Dobson1-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 <[email protected]> Cc: James Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2005-10-28[SCSI] use {sdev,scmd,starget,shost}_printk in generic codeJeff Garzik1-2/+3
rejections fixed and Signed-off-by: James Bottomley <[email protected]>
2005-10-28[SCSI] move the mid-layer printk's over to shost/starget/sdev_printkJames Bottomley1-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 <[email protected]>
2005-10-28[PATCH] gfp_t: drivers/scsiAl Viro1-4/+4
Signed-off-by: Al Viro <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2005-09-19[SCSI] fix oops on usb storage device disconnectJames Bottomley1-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 <[email protected]>
2005-08-12[SCSI] fix warning in scsi_softirq[email protected]1-1/+1
From: Andrew Morton <[email protected]> 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 <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2005-08-08[SCSI] add global timeout to the scsi mid-layerJames Bottomley1-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 <[email protected]>
2005-07-30[SCSI] host state model update: reimplement scsi_host_cancelMike Anderson1-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 <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2005-07-30[SCSI] host state model update: replace old host bitmap stateMike Anderson1-1/+1
Migrate the current SCSI host state model to a model like SCSI device is using. Signed-off-by: Mike Anderson <[email protected]> Rejections fixed up and Signed-off-by: James Bottomley <[email protected]>
2005-07-11[SCSI] add TYPE_RBC to our type tableJames Bottomley1-0/+1
Here's a tiny update that means we print the correct ASCII type information Signed-off-by: James Bottomley <[email protected]>
2005-06-26[SCSI] remove scsi_cmnd->stateChristoph Hellwig1-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 <[email protected]>
2005-06-26[SCSI] remove scsi_cmnd->ownerChristoph Hellwig1-5/+0
never checked anywhere Signed-off-by: James Bottomley <[email protected]>
2005-06-26[SCSI] remove scsi_cmnd->abort_reasonChristoph Hellwig1-1/+0
Never used for anything but printing it out in debug routines. Signed-off-by: James Bottomley <[email protected]>
2005-06-24[PATCH] make various thing staticAdrian Bunk1-2/+4
Another rollup of patches which give various symbols static scope Signed-off-by: Adrian Bunk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2005-05-20merge by hand - fix up rejections in Documentation/DocBook/MakefileJames Bottomley1-1/+1
2005-05-20[SCSI] remove a timer race in scsi_queue_insert()Tejun Heo1-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 <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2005-05-01[SCSI] call correct scsi_done function in scsi_dispatch_cmdMike Christie1-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 <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2005-04-18[PATCH] scsi: remove meaningless scsi_cmnd->serial_number_at_timeout field1-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 <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2005-04-18[PATCH] scsi: remove unused scsi_cmnd->internal_timeout field1-1/+0
scsi_cmnd->internal_timeout field doesn't have any meaning anymore. Kill the field. Signed-off-by: Tejun Heo <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2005-04-18[PATCH] remove outdated print_* functions1-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 <[email protected]>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-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!