[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: scsi emulation for CD burner



On Thu, 2003-11-20 at 16:31, marcos wrote:
> Hello
> 
> I'm having big troubles when I try to use my ide CD burner with scsi 
> emulation.
> 
> (Question #1 : is it true we have to use scsi emulation in order to burn 
> CDs with a IDE cd burner ?)
> 
> The problems begin when the system tries to load the ide-scsi module 
> (when I manually load it with modprobe, when I run cdrecord -scanbus, 
> when I try to mount a CD, etc...). As soon as the module is needed, the 
> system enters an infinite loop :
> 
> syslog shows me this:
> 
> kernel: scsi : aborting command due to timeout : pid 0, scssi0, channel 
> 0, id 0, lun 0 Inquiry 00 00 00 ff 00
> hdc: lost interrupt
> kernel: ide-scsi: The scsi wants to send us more data than expected - 
> discarding data
> kernel: ide-scsi: [[ 12 0 0 0 ff 0 0 0 0 0 0 0 ]
> kernel: ]
> kernel: ide-scsi: expected 256 got 352 limit 256
> kernel: hdc: lost interrupt
> kernel: ide-scsi: The scsi wants to send us more data than expected - 
> discarding data
> kernel: ide-scsi: [[ 12 0 0 0 ff 0 0 0 0 0 0 0 ]
> kernel: ]
> [... endless loop]
> 
> Here is my configuration:
> 
> I have 2 hard drives (hda, hdb) on bus ide0
> I have 1 Samsung SW-240B CD burner (hdc) on bus ide1
> 
> I use Debian Sid, kernel 2.4.22 with this compilation options :
> 
> loopback device support : M
> scsi support (scsi_mod) : M
> scsi cdrom support (sr_mod) : M
> scsi generic support (sg) : M
> scsi emulation support (ide-scsi) : M
> include atapi-cdrom (ide-cd) : M
> iso9660 cdrom FS : M
> microsoft joliet cdrom : Y
> 
> I have these lines in modules.conf:
> 
> alias scd0 sr_mod  #load sr_mod upon access of scd0
> alias scd1 sr_mod
> alias scd2 sr_mod
> alias scd3 sr_mod
> pre-install sg modprobe ide-scsi       #load ide-scsi before sg
> pre-install sr_mod modprobe ide-scsi #load ide-scsi before sr_mod
> pre-install ide-scsi modprobe ide-cd #load ide-cd before ide-scsi
> 
> I've added append "hdc=ide-scsi" in lilo.conf:
> 
> image=/vmlinuz
>         label=Linux
>         append="hdc=ide-scsi acpi=off"
>         read-only
> #       restricted
> #       alias=1
> 
> Question #2 : I've read contradictory things about "hdc=ide-scsi". Some 
> people say that this line is useless when compiling ide-scsi as a 
> module. Some people says you HAVE TO put it there anyway. And some 
> people say that the correct syntax for the latest kernels is
> "hdX=scsi" instead of "hdX=ide-scsi".
> I don't know who/what to believe.
> 
> Now, let's take an example of what happens in my system:
> 
> When I boot my linux, syslog shows me this :
> 
> [...]
> kernel: ide_setup: hdc=ide-scsi
> [...]
> kernel: Uniform Multi-Platform E-IDE driver Revision: 7.00b eta4-2.4
> kernel: ide: Assuming 33MHz system bus speed for PIO modes;  override 
> with idebus=xx
> kernel: ICH2: IDE controller at PCI slot 00:1f.1
> kernel: ICH2: chipset revision 18
> kernel: ICH2: not 100%% native mode: will probe irqs later
> kernel:     ide0: BM-DMA at 0xa800-0xa807, BIOS settings: h da:DMA, hdb:DMA
> kernel:     ide1: BM-DMA at 0xa808-0xa80f, BIOS settings: h dc:DMA, hdd:pio
> kernel: hda: WDC WD400BB-75AUA1, ATA DISK drive
> kernel: hdb: WDC WD1200BB-00CAA1, ATA DISK drive
> kernel: blk: queue c02b8840, I/O limit 4095Mb (mask 0xfffff fff)
> kernel: blk: queue c02b897c, I/O limit 4095Mb (mask 0xfffff fff)
> kernel: hdc: SAMSUNG CD-R/RW SW-240B, ATAPI CD/DVD-ROM driv e
> kernel: ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
> kernel: ide1 at 0x170-0x177,0x376 on irq 15
> kernel: hda: attached ide-disk driver.
> kernel: hda: host protected area => 1
> kernel: hda: 78165360 sectors (40021 MB) w/2048KiB Cache, C 
> HS=4865/255/63, UDMA(100)
> kernel: hdb: attached ide-disk driver.
> kernel: hdb: host protected area => 1
> kernel: hdb: 234441648 sectors (120034 MB) w/2048KiB Cache, 
> CHS=14593/255/63, UDMA(100)
> kernel: Partition check:
> kernel:  hda: hda1 hda2 hda3
> kernel:  hdb: hdb1 hdb2
> [...]
> 
> There is no indication about scsi emulation (excepted the first line).
> 
> Question #3 : is it normal ?
> 
> Then, I put an audio CD in my drive I try to mount the filesystem :
> 
> mount -t iso9660 /dev/scd0 /cdburner
> 
> And there the system HANGS !
> 
> I open a new console and read syslog again to see what is going on:
> 
> kernel: SCSI subsystem driver Revision: 1.00
> kernel: hdc: attached ide-scsi driver.
> kernel: scsi0 : SCSI host adapter emulation for IDE ATAPI ddevices
> kernel: scsi : aborting command due to timeout : pid 0, scssi0, channel 
> 0, id 0, lun 0 Inquiry 00 00 00 ff 00
> hdc: lost interrupt
> kernel: ide-scsi: The scsi wants to send us more data than expected - 
> discarding data
> kernel: ide-scsi: [[ 12 0 0 0 ff 0 0 0 0 0 0 0 ]
> kernel: ]
> kernel: ide-scsi: expected 256 got 352 limit 256
> kernel: hdc: lost interrupt
> kernel: ide-scsi: The scsi wants to send us more data than expected - 
> discarding data
> kernel: ide-scsi: [[ 12 0 0 0 ff 0 0 0 0 0 0 0 ]
> kernel: ]
> kernel: ide-scsi: expected 256 got 352 limit 256
> kernel: hdc: lost interrupt
> kernel: ide-scsi: The scsi wants to send us more data than expected - 
> discarding data
> kernel: ide-scsi: [[ 12 0 0 0 ff 0 0 0 0 0 0 0 ]
> [... endless loop]
> 
> Question #4 : how can I exit this loop without having to reboot (I'm 
> getting tired of it?)
> 
> Then, I have a look at the loaded modules:
> 
> # lsmod
> Module                  Size  Used by    Not tainted
> ide-scsi               10320   2  (initializing)
> ide-cd                 32352   0
> scsi_mod               85504   1  (autoclean) [ide-scsi]
> cdrom                  28512   0  (autoclean) [ide-cd]
> [...]
> 
> They have all been loaded after the mount command.
> ide-scsi remains in the "initializing" state, so I can't do anything...
> 
> Just by curiosity:
> 
> # cat /proc/scsi/scsi
> Attached devices:
> Host: scsi0 Channel: 00 Id: 00 Lun: 00
>    Vendor:          Model:                  Rev:
>    Type:   <NULL>                ANSI SCSI revision: ffffffff
> 
> Now, I don't know where to search anymore, I've spent hours looking at 
> posts and searching in google, I've tried lots of diferent things 
> (recompiling the kernel with differnt options, etc...).
> 
> I need help !
> 
> Thanks to all of you who can help me.
> 
> Marcos
> 
> PS one more thing : my cd burner does work (I've just tested it under 
> windows to check... and it works !)
> 
> 

I have a very similar setting up and running (kernel 2.4.22 with hdb and
hdc mapped to scd0 and scd1 via ide-scsi). My experiences were:

(1) Yes you have to use the 'ide-scsi' emulation to bur cds with an ide
burner and cdrecord or cdrdao. I never heard of any software beeing able
to directly access ATAPI devices.

(2) You must pass the kernel parameter 'hdX=ide-scsi' for every ide
device you wont to map to a scsi device.

(3) You (try to) configure your system that way, that the scsi emulation
layer is loaded into the kernel only when needed. That is the reason,
that scsi is not mentioned at system boot time.

I did not manage to get that thing going, although I see no reason, why
that schould be impossible. Try to load all modules you need (scsi_mod,
sr_mod, sg, ide_scsi, etc.) at boot time, by putting them into
'/etc/modules'.

(4) Maybe unloading all scsi modules will help you to avoid a reboot,
but I never tried this (I always did reboot :-()

What looks really strange to me, is the loaded module 'ide-cd'. Judge me
wrong, but I think that that is the thing, you want to replace by
ide-scsi. I strongly suggest to unload 'ide-cd'

Hope that helped a bit.

-alf



Reply to: