aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@SteelEye.com>2005-12-26 10:58:49 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-12-26 13:17:43 -0500
commit04333393b930370db0cc29fdf0dbbd08ecd43337 (patch)
treef50d8ab5315919c34ef2c97d99f92e3920b4c4d4 /drivers
parentf89f5948fc10bb973cd452d2e334da207828e228 (diff)
[PATCH] Fix Fibre Channel boot oops
The oops is characteristic of the underlying device being removed from visibility before the class device, and sure enough we do device_del() before transport_unregister() in the scsi_target_reap() routines. I've no idea why this is suddenly showing up, since the code has been in there since that function was first invented. However, I've confirmed this fixes Andrew Vasquez's boot oops. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/scsi_scan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index e36c21e06d31..4e6709f448e1 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -418,8 +418,9 @@ static void scsi_target_reap_work(void *data) {
418 if (--starget->reap_ref == 0 && list_empty(&starget->devices)) { 418 if (--starget->reap_ref == 0 && list_empty(&starget->devices)) {
419 list_del_init(&starget->siblings); 419 list_del_init(&starget->siblings);
420 spin_unlock_irqrestore(shost->host_lock, flags); 420 spin_unlock_irqrestore(shost->host_lock, flags);
421 transport_remove_device(&starget->dev);
421 device_del(&starget->dev); 422 device_del(&starget->dev);
422 transport_unregister_device(&starget->dev); 423 transport_destroy_device(&starget->dev);
423 put_device(&starget->dev); 424 put_device(&starget->dev);
424 return; 425 return;
425 426