From: James Bottomley Date: Mon, 26 Dec 2005 15:58:49 +0000 (-0600) Subject: [PATCH] Fix Fibre Channel boot oops X-Git-Tag: v2.6.15~36 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=04333393b930370db0cc29fdf0dbbd08ecd43337;p=linux-2.6-omap-h63xx.git [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 Signed-off-by: Linus Torvalds --- diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index e36c21e06d3..4e6709f448e 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) { if (--starget->reap_ref == 0 && list_empty(&starget->devices)) { list_del_init(&starget->siblings); spin_unlock_irqrestore(shost->host_lock, flags); + transport_remove_device(&starget->dev); device_del(&starget->dev); - transport_unregister_device(&starget->dev); + transport_destroy_device(&starget->dev); put_device(&starget->dev); return;