Skip to contentSkip to conversation

ide-cd doesn't replace ide-scsi?

DISCUSSION Luke-Jr 4 participants 9 messages Nov 28, 2005 – Dec 2, 2005

lore
Share & tools
lore

Luke-Jr

author
#0 lore raw

Note: results are with 2.6.13 (-gentoo-r4 + supermount) and 2.6.14 (-gentoo) I've been struggling with burning DVD+R DL discs and upgrading the firmware on my DVD burner, and just today decided to rmmod ide-cd and try using ide-scsi. Turns out it works... so is ide-cd *supposed* to handle cases other than simple reading and burning or is this a bug? If not a bug, should ide-scsi really be marked as deprecated?
Also, two bugs with ide-scsi:
1. On loading the module, it detects and allocates 6 SCSI devices for a single DVD burner (Toshiba ODD-DVD SD-R5272); kernel log for this event attached
2. On attempted unloading of the module, rmmod says 'Killed' and the module stays put, corrupt. There was some kind of error in dmesg, but it appears to have avoided syslog-- If I see it again, I'll save it.

Signature · 3 lines
Luke-Jr
Developer, Utopios
http://utopios.org/
Nov 28 04:13:14 [kernel] ide-scsi is deprecated for cd burning! Use ide-cd and give dev=/dev/hdX as device
Nov 28 04:13:14 [kernel] scsi2 : SCSI host adapter emulation for IDE ATAPI devices
Nov 28 04:13:15 [kernel] sr0: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda tray
Nov 28 04:13:15 [kernel] Attached scsi CD-ROM sr0 at scsi2, channel 0, id 0, lun 0
Nov 28 04:13:15 [kernel] sr1: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda tray
Nov 28 04:13:15 [kernel] Attached scsi CD-ROM sr1 at scsi2, channel 0, id 0, lun 1
Nov 28 04:13:15 [kernel] sr2: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda tray
Nov 28 04:13:15 [kernel] Attached scsi CD-ROM sr2 at scsi2, channel 0, id 0, lun 2
Nov 28 04:13:15 [kernel] sr3: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda tray
Nov 28 04:13:15 [kernel] Attached scsi CD-ROM sr3 at scsi2, channel 0, id 0, lun 3
Nov 28 04:13:15 [kernel] sr4: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda tray
Nov 28 04:13:15 [kernel] Attached scsi CD-ROM sr4 at scsi2, channel 0, id 0, lun 4
Nov 28 04:13:15 [kernel] sr5: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda tray
Nov 28 04:13:15 [kernel] Attached scsi CD-ROM sr5 at scsi2, channel 0, id 0, lun 5
Nov 28 04:13:15 [kernel] sr6: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda tray
Nov 28 04:13:15 [kernel] Attached scsi CD-ROM sr6 at scsi2, channel 0, id 0, lun 6
Nov 28 04:13:15 [kernel] sr7: scsi3-mmc drive: 62x/62x writer cd/rw xa/form2 cdda tray
Nov 28 04:13:15 [kernel] Attached scsi CD-ROM sr7 at scsi3, channel 0, id 0, lun 0
#1 lore raw
Quoted 5 lines · Luke-Jr

Note: results are with 2.6.13 (-gentoo-r4 + supermount) and 2.6.14 (-gentoo)
I've been struggling with burning DVD+R DL discs and upgrading the firmware on my DVD burner, and just today decided to rmmod ide-cd and try using ide-scsi. Turns out it works... so is ide-cd *supposed* to handle cases other than simple reading and burning or is this a bug? If not a bug, should ide-scsi really be marked as deprecated? Also, two bugs with ide-scsi:
1. On loading the module, it detects and allocates 6 SCSI devices for a single DVD burner (Toshiba ODD-DVD SD-R5272); kernel log for this event attached
2. On attempted unloading of the module, rmmod says 'Killed' and the module stays put, corrupt. There was some kind of error in dmesg, but it appears to have avoided syslog-- If I see it again, I'll save it.

I think you may have the probe-all-LUNs set, and a CD burner which responds to more than one. That's one possible cause for this.

Unfortunately using ide-cd still doesn't have the code set to allow all burning features to work if you are not root. Even if you have read+write there's one command you need to do multi-session which is only allowed to root. Works fine for single sessions, I guess that's all someone uses.

Haven't tried unloading the module, so I have no advice on that other than "don't do that."

Signature · 3 lines
   -bill davidsen ([email protected])
"The secret to procrastination is to put things off until the
 last possible moment - but no longer"  -me
#2 lore raw
Quoted 14 lines · Bill Davidsen
Quoted 4 lines · Luke-Jr

Note: results are with 2.6.13 (-gentoo-r4 + supermount) and 2.6.14 (-gentoo) I've been struggling with burning DVD+R DL discs and upgrading the firmware on my DVD burner, and just today decided to rmmod ide-cd and try using ide-scsi. Turns out it works... so is ide-cd *supposed* to handle cases other than

Quoted 8 lines

simple reading and burning or is this a bug? If not a bug, should ide-scsi really be marked as deprecated?
Also, two bugs with ide-scsi:
1. On loading the module, it detects and allocates 6 SCSI devices for a single DVD burner (Toshiba ODD-DVD SD-R5272); kernel log for this event attached
2. On attempted unloading of the module, rmmod says 'Killed' and the module stays put, corrupt. There was some kind of error in dmesg, but it appears to have avoided syslog-- If I see it again, I'll save it.

Quoted 2 lines

I think you may have the probe-all-LUNs set, and a CD burner which responds to more than one. That's one possible cause for this.

That may be it.

Quoted 5 lines

Unfortunately using ide-cd still doesn't have the code set to allow all burning features to work if you are not root. Even if you have read+write there's one command you need to do multi-session which is only allowed to root. Works fine for single sessions, I guess that's all someone uses.

Interesting because both drivers ide-cd and sr+ide-scsi use exactly the same code (block/scsi_ioctl.c) to verify which commands don't need root privileges. Care to give details?

Quoted 2 lines

Haven't tried unloading the module, so I have no advice on that other than "don't do that."

Known problem with ide-scsi, reference counting for "virtual" SCSI host is missing (it was always buggy but was exposed in 2.6.x something by sr.c changes).

Bartlomiej

#3 lore raw
Quoted 9 lines · Bartlomiej Zolnierkiewicz
Quoted 5 lines

Unfortunately using ide-cd still doesn't have the code set to allow all burning features to work if you are not root. Even if you have read+write there's one command you need to do multi-session which is only allowed to root. Works fine for single sessions, I guess that's all someone uses.

Interesting because both drivers ide-cd and sr+ide-scsi use exactly the same code (block/scsi_ioctl.c) to verify which commands don't need root privileges. Care to give details?

Not if he is using /dev/sgX with ide-scsi, only SG_IO through /dev/srX will go through the block/scsi_ioctl.c path.

Signature · 1 line
Jens Axboe
author
#4 lore raw
Quoted 7 lines · Jens Axboe
Quoted 6 lines · Bartlomiej Zolnierkiewicz
Quoted 5 lines

Unfortunately using ide-cd still doesn't have the code set to allow all burning features to work if you are not root. Even if you have read+write there's one command you need to do multi-session which is only allowed to root. Works fine for single sessions, I guess that's all someone uses.

Quoted 6 lines
Quoted 3 lines

Interesting because both drivers ide-cd and sr+ide-scsi use exactly the same code (block/scsi_ioctl.c) to verify which commands don't need root privileges. Care to give details?

Not if he is using /dev/sgX with ide-scsi, only SG_IO through /dev/srX will go through the block/scsi_ioctl.c path.

Is is possible to get a "IDE generic" device for ide-cdrom? ;)

Signature · 3 lines
Luke-Jr
Developer, Utopios
http://utopios.org/
author
#5 lore raw
In reply to Jens Axboe
Quoted 7 lines · Jens Axboe
Quoted 6 lines · Bartlomiej Zolnierkiewicz
Quoted 5 lines

Unfortunately using ide-cd still doesn't have the code set to allow all burning features to work if you are not root. Even if you have read+write there's one command you need to do multi-session which is only allowed to root. Works fine for single sessions, I guess that's all someone uses.

Quoted 6 lines
Quoted 3 lines

Interesting because both drivers ide-cd and sr+ide-scsi use exactly the same code (block/scsi_ioctl.c) to verify which commands don't need root privileges. Care to give details?

Not if he is using /dev/sgX with ide-scsi, only SG_IO through /dev/srX will go through the block/scsi_ioctl.c path.

Actually, growisofs refuses to work with anything but a block device-- so it's using /dev/sr1. So apparently something else is up, since ide-cd errors, yet ide-scsi does not.

Apparently, ide-scsi isn't working either though, just a different problem:
the burning *appears* to work (I get status info, and the drive seems to do something), but the disc ends up unburned and empty. Has anyone successfully burned a dual layer disc? I'm using a BenQ DW1620 drive.

Signature · 3 lines
Luke-Jr
Developer, Utopios
http://utopios.org/
author
#6 lore raw
In reply to Bartlomiej Zolnierkiewicz
Quoted 3 lines · you

Known problem with ide-scsi, reference counting for "virtual" SCSI host is missing (it was always buggy but was exposed in 2.6.x something by sr.c changes).

In case it's helpful, here's the error:

Unable to handle kernel NULL pointer dereference at 0000000000000410 RIP:
<ffffffff881d42d2>{:ide_scsi:idescsi_queue+322}
PGD 31418067 PUD 31eb6067 PMD 0
Oops: 0000 [1] PREEMPT
CPU 0
Modules linked in: sr_mod cdrom ide_scsi ipv6 ohci_hcd analog 8250_pnp 8250 

serial_core parport_pc parport floppy radeonfb snd_via82xx gameport snd_ac97_codec snd_ac97_bus snd_pcm snd_timer snd_page_alloc snd_mpu401_uart snd_rawmidi snd_seq_device snd i2c_viapro ehci_hcd cdc_ether usbnet usbhid usblp uhci_hcd sata_via libata scsi_mod skge ohci1394 ieee1394 usbcore supermount sk98lin
Pid: 13304, comm: rmmod Tainted: G M 2.6.14-gentoo-r2-ljr #3

RIP: 0010:[<ffffffff881d42d2>] <ffffffff881d42d2>{:ide_scsi:idescsi_queue+322}
RSP: 0018:ffff810031897908  EFLAGS: 00010016
RAX: 0000000000000000 RBX: ffff81003721f2c0 RCX: 0000000000000000
RDX: 00000000ffffda7e RSI: ffff81003c9038fa RDI: ffff81003721f2ca
RBP: ffff81003c903880 R08: 00000000000004e1 R09: ffff81003c903988
R10: ffff81003e1d2c80 R11: ffffffff80280700 R12: ffff810031fab800
R13: ffffffff80408910 R14: ffff81003c903880 R15: ffff81003721f2c0
FS:  00002aaaaadfeb00(0000) GS:ffffffff80420800(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000410 CR3: 0000000032def000 CR4: 00000000000006e0
Process rmmod (pid: 13304, threadinfo ffff810031896000, task ffff810032c78180)
Stack: ffff81003c9038f0 0000000000000282 000000003f8ccb88 00000000000003e0
       ffffffff8807d740 ffff81003bfecee0 ffff81003c903880 ffff81003b315800
       0000000000000000 ffff81003ddd97f8
Call Trace:<ffffffff8807d740>{:scsi_mod:scsi_done+0} 
<ffffffff8807d959>{:scsi_mod:scsi_dispatch_cmd+505}
       <ffffffff88083500>{:scsi_mod:scsi_request_fn+768} 
<ffffffff80277169>{generic_unplug_device+25}
       <ffffffff80277e71>{blk_execute_rq+193} 
<ffffffff80277a53>{blk_rq_bio_prep+51}
       <ffffffff88081ef5>{:scsi_mod:scsi_execute+229} 
<ffffffff881e418f>{:sr_mod:sr_do_ioctl+175}
       <ffffffff881e3f9e>{:sr_mod:sr_packet+30} 
<ffffffff881d8326>{:cdrom:cdrom_get_disc_info+86}
       <ffffffff881d83a7>{:cdrom:cdrom_mrw_exit+39} 
<ffffffff80190d53>{dput+35}
       <ffffffff8019d37e>{simple_unlink+94} 
<ffffffff881d8115>{:cdrom:unregister_cdrom+213}
       <ffffffff881e400d>{:sr_mod:sr_kref_release+93} 
<ffffffff881e3fb0>{:sr_mod:sr_kref_release+0}
       <ffffffff801f68c0>{kref_put+96} 
<ffffffff881e4076>{:sr_mod:sr_remove+70}
       <ffffffff8027074b>{__device_release_driver+107} 
<ffffffff802707c1>{device_release_driver+49}
       <ffffffff8026ff1c>{bus_remove_device+172} 
<ffffffff8026eea8>{device_del+56}
       <ffffffff880865ba>{:scsi_mod:__scsi_remove_device+58}
       <ffffffff88085808>{:scsi_mod:scsi_forget_host+120} 
<ffffffff8807e504>{:scsi_mod:scsi_remove_host+212}
       <ffffffff881d3ffa>{:ide_scsi:ide_scsi_remove+106} 
<ffffffff8027074b>{__device_release_driver+107}
       <ffffffff802708b3>{driver_detach+195} 
<ffffffff80270154>{bus_remove_driver+148}
       <ffffffff80270b8d>{driver_unregister+13} 
<ffffffff8014dd14>{sys_delete_module+500}
       <ffffffff8016ae25>{sys_munmap+85} <ffffffff8010ea86>{system_call+126}
Code: 8b 80 10 04 00 00 a8 01 74 0a 41 0f ba 6f 50 02 4c 8b 73 40
RIP <ffffffff881d42d2>{:ide_scsi:idescsi_queue+322} RSP <ffff810031897908>
CR2: 0000000000000410
 <6>note: rmmod[13304] exited with preempt_count 1
Unable to handle kernel NULL pointer dereference at 0000000000000410 RIP:
<ffffffff881d42d2>{:ide_scsi:idescsi_queue+322}
PGD 32e09067 PUD 31d03067 PMD 0
Oops: 0000 [2] PREEMPT
CPU 0
Modules linked in: sr_mod cdrom ide_scsi ipv6 ohci_hcd analog 8250_pnp 8250 

serial_core parport_pc parport floppy radeonfb snd_via82xx gameport snd_ac97_codec snd_ac97_bus snd_pcm snd_timer snd_page_alloc snd_mpu401_uart snd_rawmidi snd_seq_device snd i2c_viapro ehci_hcd cdc_ether usbnet usbhid usblp uhci_hcd sata_via libata scsi_mod skge ohci1394 ieee1394 usbcore supermount sk98lin
Pid: 13174, comm: scsi_eh_3 Tainted: G M 2.6.14-gentoo-r2-ljr #3

RIP: 0010:[<ffffffff881d42d2>] <ffffffff881d42d2>{:ide_scsi:idescsi_queue+322}
RSP: 0018:ffff8100319d9da8  EFLAGS: 00010006
RAX: 0000000000000000 RBX: ffff810036caabc0 RCX: 0000000000000000
RDX: 00000000ffffdf60 RSI: ffff81003c9038f6 RDI: ffff810036caabc6
RBP: ffff81003c903880 R08: 00000000000009c3 R09: ffff81003c903988
R10: 00000000ffffffff R11: 0000000000000101 R12: ffff81003589fe00
R13: ffffffff80408910 R14: ffff81003c903880 R15: ffff810036caabc0
FS:  00002aaaaadfeb00(0000) GS:ffffffff80420800(0000) knlGS:0000000000000000
CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 0000000000000410 CR3: 00000000318f4000 CR4: 00000000000006e0
Process scsi_eh_3 (pid: 13174, threadinfo ffff8100319d8000, task 
ffff810031900240)
Stack: ffff81003c9038f0 0000000000000282 0000000000000296 00000000000003e0
       ffffffff880805a0 ffff81003c903880 ffff81003b315800 ffff8100319d9e18
       0000000000000001 ffff81003c903988
Call Trace:<ffffffff880805a0>{:scsi_mod:scsi_eh_done+0} 
<ffffffff88080c6e>{:scsi_mod:scsi_send_eh_cmnd+158}
       <ffffffff8029e5dd>{ide_wait_not_busy+45} 
<ffffffff88080e1f>{:scsi_mod:scsi_eh_tur+175}
       <ffffffff880813e3>{:scsi_mod:scsi_error_handler+851}
       <ffffffff88081090>{:scsi_mod:scsi_error_handler+0} 
<ffffffff80148a70>{keventd_create_kthread+0}
       <ffffffff80148a2d>{kthread+205} <ffffffff8010f52e>{child_rip+8}
       <ffffffff80148a70>{keventd_create_kthread+0} 
<ffffffff80148960>{kthread+0}
       <ffffffff8010f526>{child_rip+0}
Code: 8b 80 10 04 00 00 a8 01 74 0a 41 0f ba 6f 50 02 4c 8b 73 40

RIP <ffffffff881d42d2>{:ide_scsi:idescsi_queue+322} RSP <ffff8100319d9da8>
CR2: 0000000000000410
<6>note: scsi_eh_3[13174] exited with preempt_count 1

Signature · 3 lines
Luke-Jr
Developer, Utopios
http://utopios.org/
author
#7 lore raw
In reply to Bill Davidsen
Quoted 14 lines · you
Quoted 4 lines · Luke-Jr

Note: results are with 2.6.13 (-gentoo-r4 + supermount) and 2.6.14 (-gentoo) I've been struggling with burning DVD+R DL discs and upgrading the firmware on my DVD burner, and just today decided to rmmod ide-cd and try using ide-scsi. Turns out it works... so is ide-cd *supposed* to

Quoted 8 lines

handle cases other than simple reading and burning or is this a bug? If not a bug, should ide-scsi really be marked as deprecated? Also, two bugs with ide-scsi:
1. On loading the module, it detects and allocates 6 SCSI devices for a single DVD burner (Toshiba ODD-DVD SD-R5272); kernel log for this event attached 2. On attempted unloading of the module, rmmod says 'Killed' and the module stays put, corrupt. There was some kind of error in dmesg, but it appears to have avoided syslog-- If I see it again, I'll save it.

Quoted 2 lines

I think you may have the probe-all-LUNs set, and a CD burner which responds to more than one. That's one possible cause for this.

Yep, it was set. I'll try turning it off.

Quoted 4 lines

Unfortunately using ide-cd still doesn't have the code set to allow all burning features to work if you are not root. Even if you have read+write there's one command you need to do multi-session which is only allowed to root. Works fine for single sessions, I guess that's all someone uses.

I'm pretty sure I tried doing everything as root days before I even considered ide-scsi... In regards to firmware upgrades, I wouldn't expect non-root to be allowed to, even with rw access.

Quoted 2 lines

Haven't tried unloading the module, so I have no advice on that other than "don't do that."

Well, I had reasons... =p
The first time, I was going to switch back to ide-cd (for DMA), and the second time was because the drive was stuck on Busy and I'm not sure of any (other?) way to reset it without hotplugging the IDE power cable (which I'm sure isn't a good idea and I don't want to risk).

Signature · 3 lines
Luke-Jr
Developer, Utopios
http://utopios.org/
#8 lore raw
Quoted 24 lines · Luke-Jr
Quoted 15 lines · you
Quoted 4 lines · Luke-Jr

Note: results are with 2.6.13 (-gentoo-r4 + supermount) and 2.6.14 (-gentoo) I've been struggling with burning DVD+R DL discs and upgrading the firmware on my DVD burner, and just today decided to rmmod ide-cd and try using ide-scsi. Turns out it works... so is ide-cd *supposed* to

Quoted 8 lines

handle cases other than simple reading and burning or is this a bug? If not a bug, should ide-scsi really be marked as deprecated? Also, two bugs with ide-scsi:
1. On loading the module, it detects and allocates 6 SCSI devices for a single DVD burner (Toshiba ODD-DVD SD-R5272); kernel log for this event attached 2. On attempted unloading of the module, rmmod says 'Killed' and the module stays put, corrupt. There was some kind of error in dmesg, but it appears to have avoided syslog-- If I see it again, I'll save it.

Quoted 2 lines

I think you may have the probe-all-LUNs set, and a CD burner which responds to more than one. That's one possible cause for this.

Yep, it was set. I'll try turning it off.

Quoted 7 lines
Quoted 4 lines

Unfortunately using ide-cd still doesn't have the code set to allow all burning features to work if you are not root. Even if you have read+write there's one command you need to do multi-session which is only allowed to root. Works fine for single sessions, I guess that's all someone uses.

I'm pretty sure I tried doing everything as root days before I even considered ide-scsi... In regards to firmware upgrades, I wouldn't expect non-root to be allowed to, even with rw access.

Actually, a single session burn seems to work (I'm doing tests as soon as I get a compile of the latest kernel). What doesn't (or didn't) work is multisession, even with r/w "cdrecord -msinfo" fails, which is how you get the starting info for the next session.

Quoted 8 lines
Quoted 4 lines

Haven't tried unloading the module, so I have no advice on that other than "don't do that."

Well, I had reasons... =p
The first time, I was going to switch back to ide-cd (for DMA), and the second time was because the drive was stuck on Busy and I'm not sure of any (other?) way to reset it without hotplugging the IDE power cable (which I'm sure isn't a good idea and I don't want to risk).

I thought ide-scsi now did DMA, at least for data burns. Don't know about audio, I occasionally do an audio burn, but my main machine for burning uses ide-cd, so it's not an issue.

I saw a note somewhere about using capabilities on the cdrecord executable to allow the realtime sched to be set, but I don't seem to find it now. Maybe it was a question rather than an example :-(

Signature · 3 lines
bill davidsen <[email protected]>
  CTO TMR Associates, Inc
  Doing interesting things with small computers since 1979