Skip to contentSkip to conversation

Usage question

DISCUSSION Dan Dennedy 3 participants 3 messages Apr 3, 2005 – May 13, 2005 3 messages not in the archive SCSI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 1112450118.5518.3.camel@defiant

#3 lore raw
Quoted 8 lines · Matthias Bläsing

Am Sa, den 02.04.2005 schrieb Stefan Richter um 4:07:

Quoted 3 lines

...CD/DVD-ROMs, because there are problems with device and host structures management if sr_mod of Linux 2.6 is involved. It is an old known bug whose cause has not yet been figured out.

There was a patch for the kernel on this list, which work quite good for me (sr.c and sr_ioctl.c have to be modified - Olaf Hering on 24.10.2004). I couldn't find any bad side effects of this.

Thanks, I located the message on the linux1394-devel list:
http://marc.theaimsgroup.com/?l=linux1394-devel&m=109862922621832&w=2

There is a very good report response to Olaf's little patch.
http://marc.theaimsgroup.com/?l=linux1394-devel&m=109925711513542&w=2

Please, others, try it as well. I'm going to....

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw

patch (was Usage question)

Dan Dennedy wrote on 2005-04-03:

Quoted 1 line · Matthias Bläsing

[hotplugging of SBP-2 CD-ROMs]

Quoted 11 lines
Quoted 3 lines

There was a patch for the kernel on this list, which work quite good for me (sr.c and sr_ioctl.c have to be modified - Olaf Hering on 24.10.2004). I couldn't find any bad side effects of this.

Thanks, I located the message on the linux1394-devel list:
http://marc.theaimsgroup.com/?l=linux1394-devel&m=109862922621832&w=2

There is a very good report response to Olaf's little patch.
http://marc.theaimsgroup.com/?l=linux1394-devel&m=109925711513542&w=2

Please, others, try it as well. I'm going to....

I tried it with up to two different CD-RWs and a HDD on the same FireWire bus. Works for me. There have been other positive reports on linux1394-user as well. Quote from Olaf's posting:

| 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?
drivers/scsi/sr.c +1 -0
diff -purN linux-2.6.9.orig/drivers/scsi/sr.c linux-2.6.9-olh/drivers/scsi/sr.c
@@ -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);
 
drivers/scsi/sr_ioctl.c +5 -0
diff -purN linux-2.6.9.orig/drivers/scsi/sr_ioctl.c linux-2.6.9-olh/drivers/scsi/sr_ioctl.c
@@ -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) {
Signature · 7 lines
Stefan Richter
-=====-=-=-= -=-= --=--
http://arcgraph.de/sr/
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw
In reply to Dan Dennedy
Quoted 10 lines · Dan Dennedy
Quoted 8 lines · Matthias Bläsing

Am Sa, den 02.04.2005 schrieb Stefan Richter um 4:07:

Quoted 3 lines

...CD/DVD-ROMs, because there are problems with device and host structures management if sr_mod of Linux 2.6 is involved. It is an old known bug whose cause has not yet been figured out.

There was a patch for the kernel on this list, which work quite good for me (sr.c and sr_ioctl.c have to be modified - Olaf Hering on 24.10.2004). I couldn't find any bad side effects of this.

Quoted 7 lines

Thanks, I located the message on the linux1394-devel list:
http://marc.theaimsgroup.com/?l=linux1394-devel&m=109862922621832&w=2

There is a very good report response to Olaf's little patch.
http://marc.theaimsgroup.com/?l=linux1394-devel&m=109925711513542&w=2

Please, others, try it as well. I'm going to....

This patch is just a workaround.
ide-scsi shows exactly the same oops.
ide-scsi was fixed in 2.6.11 or 2.6.12, it should now have proper refcounting. Someone has to implement the same for the sbp2 driver. I cant help you with that challenge.
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html