From: Olaf Hering <olh@suse.de>
To: Dan Hollis <goemon@anime.net>, linux-scsi@vger.kernel.org
Cc: bcollins@debian.org, linux1394-devel@lists.sourceforge.net
Subject: Re: 100% repeatable way to send firewire out to lunch permanently on 2.6.8.1
Date: Sun, 24 Oct 2004 16:42:36 +0200 [thread overview]
Message-ID: <20041024144236.GA21793@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.44.0409050434540.8779-100000@sasami.anime.net>
On Sun, Sep 05, Dan Hollis wrote:
> Vendor: PIONEER Model: DVD-RW DVR-104 Rev: 1.31
> Type: CD-ROM ANSI SCSI revision: 02
> cat /proc/scsi/scsi, it shows up
>
> now turn drive off
>
> ieee1394: Node changed: 0-01:1023 -> 0-00:1023
> ieee1394: Node suspended: ID:BUS[0-00:1023] GUID[00309995505516f8]
>
> and now...
> cat /proc/scsi/scsi
>
> entire firewire system is permanently out to lunch. the cat hangs and
> can't be kill -9'd, no hotplug ever works again, the only solution is a
> complete reboot.
This is the backtrace:
knodemgrd_0 D 00000000 0 296 1 307 293 (L-TLB)
Call trace:
[c000a228] __switch_to+0x48/0x70
[c017736c] schedule+0x2b8/0x5e0
[c0177914] wait_for_completion+0x7c/0xec
[c5d2fb94] scsi_wait_req+0x64/0xac [scsi_mod]
[c54f7598] sr_do_ioctl+0x70/0x240 [sr_mod]
[c54f6a00] sr_packet+0x5c/0x9c [sr_mod]
[c5d11a34] cdrom_get_disc_info+0x60/0xc4 [cdrom]
[c5d121e4] cdrom_mrw_exit+0x1c/0x104 [cdrom]
[c5d10b6c] unregister_cdrom+0xd0/0x104 [cdrom]
[c54f61a8] sr_kref_release+0x54/0x80 [sr_mod]
[c00ad96c] kref_put+0x60/0x70
[c54f6924] sr_remove+0x50/0xd0 [sr_mod]
[c00eb100] device_release_driver+0x1b8/0x1bc
[c00eb2f0] bus_remove_device+0xc0/0x12c
[c00e9620] device_del+0xa4/0x114
The trouble starts in register_cdrom(), it sets the ->exit() function if
the CD can do CDC_MRW_W.
On unregister, it tries to send a packet to the device which is already
gone.
How about this patch?
diff -purN linux-2.6.9.orig/drivers/scsi/sr.c linux-2.6.9-olh/drivers/scsi/sr.c
--- linux-2.6.9.orig/drivers/scsi/sr.c 2004-10-22 19:02:43.545400072 +0200
+++ linux-2.6.9-olh/drivers/scsi/sr.c 2004-10-24 16:32:10.765682704 +0200
@@ -916,6 +918,7 @@ static void sr_kref_release(struct kref
struct gendisk *disk = cd->disk;
spin_lock(&sr_index_lock);
+ cd->use = 0;
clear_bit(disk->first_minor, sr_index_bits);
spin_unlock(&sr_index_lock);
diff -purN linux-2.6.9.orig/drivers/scsi/sr_ioctl.c linux-2.6.9-olh/drivers/scsi/sr_ioctl.c
--- linux-2.6.9.orig/drivers/scsi/sr_ioctl.c 2004-10-22 19:02:43.547399768 +0200
+++ linux-2.6.9-olh/drivers/scsi/sr_ioctl.c 2004-10-24 16:31:05.921540512 +0200
@@ -86,6 +86,11 @@ int sr_do_ioctl(Scsi_CD *cd, struct pack
struct request *req;
int result, err = 0, retries = 0;
+ if(!cd->use) {
+ err = -ENODEV;
+ goto out;
+ }
+
SDev = cd->device;
SRpnt = scsi_allocate_request(SDev, GFP_KERNEL);
if (!SRpnt) {
--
USB is for mice, FireWire is for men!
sUse lINUX ag, nÜRNBERG
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next parent reply other threads:[~2004-10-24 14:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.44.0409050434540.8779-100000@sasami.anime.net>
2004-10-24 14:42 ` Olaf Hering [this message]
2004-10-24 14:53 ` 100% repeatable way to send firewire out to lunch permanently on 2.6.8.1 James Bottomley
2004-10-24 15:00 ` Olaf Hering
2004-10-24 15:22 ` James Bottomley
2004-10-24 17:22 ` Dmitry Torokhov
2004-10-24 18:02 ` Olaf Hering
2004-10-24 19:29 ` Olaf Hering
2005-07-31 14:43 ` Dan Hollis
2005-07-31 17:31 ` Stefan Richter
2005-07-31 17:54 ` Stefan Richter
2005-07-31 17:59 ` Christoph Hellwig
2005-07-31 18:08 ` Stefan Richter
2005-07-31 19:16 ` Olaf Hering
2005-07-31 22:57 ` [PATCH] ieee1394/sbp2: fix for hot-unplug Stefan Richter
2005-07-31 23:14 ` 100% repeatable way to send firewire out to lunch permanently on 2.6.8.1 Stefan Richter
2004-10-31 21:05 ` Herbert Schmid
[not found] <200410241930.47104.chrivers@iversen-net.dk>
2004-10-24 18:12 ` Stefan Richter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041024144236.GA21793@suse.de \
--to=olh@suse.de \
--cc=bcollins@debian.org \
--cc=goemon@anime.net \
--cc=linux-scsi@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.