CD-R / RW and scsi emulation

From: marcos (marcosbezerra_at_altern.org)
Date: 11/20/03


Date: Thu, 20 Nov 2003 17:55:05 +0100

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 !)



Relevant Pages

  • [PATCH 18-rc2] Fix typos in /Documentation : N-P
    ... Again, if you're not gonna do synchronization with disk drives (dang, ... -the kernel. ... There are two options specific to PSX driver portion. ... The driver uses the settings from the EEPROM set in the SCSI BIOS ...
    (Linux-Kernel)
  • PROBLEM: SCSI failure resulting in kernel panic - also 2.6.6 kernel
    ... SCSI failure resulting in kernel panic ... a IDE disc partition, results almost immediately in the following panic ... (see earlier problem report using 2.4.26 kernel based setup). ... # ACPI Support ...
    (Linux-Kernel)
  • scsi emulation for CD burner
    ... I'm having big troubles when I try to use my ide CD burner with scsi ... The problems begin when the system tries to load the ide-scsi module ... kernel: ide-scsi: The scsi wants to send us more data than expected - ...
    (Debian-User)
  • Re: CD writing in future Linux (stirring up a hornets nest)
    ... I did not get any proposal for working on making ide-scsi work nor did ... ATA/ATAPI bus at the same time it scans the SCSI bus on Linux systems. ... uniquely identify said devices and the problem with the kernel munging SCSI ... From what I can tell a lot of the warnings are bogus. ...
    (Linux-Kernel)
  • Retry: Problem with boot/loader I cant seem to solve. Ideas anyone?
    ... The problem started after compiling and installing a new kernel to replace ... Detects the AH2940 SCSI controller. ... pci0: <PCI bus> on pcib0 ... sectors/track: 32 ...
    (freebsd-questions)