Re: 2.0.34pre2 bugs

Gadi Oxman (gadio@netvision.net.il)
Thu, 5 Mar 1998 00:21:32 +0300 (IST)


Ian,

> Itai Nahshon wrote:
>
> > Ian Eure wrote:
> > >
> > > found a couple bugs this weekend...
> > > first, the scsi emulation support for my HP CD-Writer+ 7110i seems
> > > broken; I can read raw audio tracks fine without the scsi emulation, but
> > > when it's turned on, all I get are NULLs. Very irritating to dupe an
> >
> > Getting the NULLs is probably not a kernel problem.
>
> It seems like it is- if the standard ATAPI ioctls work, but the SCSI commands
> don't, wouldn't that be a bug in the scsi emulation?

No; when using the ide-cd driver for audio extraction, user-space
applications are usually using the CDROM_READAUDIO ioctl. The ide-cd
driver is then issuing a READ_CD command to the ATAPI device on behalf
of the user-space application.

When we are using an audio application to access a SCSI device, we are
usually not using the CDROM_READAUDIO ioctl in combination with the SCSI
cdrom driver; instead, we are usually using the SCSI generic driver
to transport our own SCSI commands to the drive.

The ide-scsi driver enables us to issue SCSI commands to the ATAPI device
from a user-space application. This is far more generic than using the
CDROM_READAUDIO ioctl -- we just need to use the correct SCSI commands,
which differ from drive to drive.

Are you using the latest ALPHA version of cdda2wav? Support for SCSI
MMC-3 drives was added just recently.

> On another interesting
> aside, the standard cdstop/cdplay/cdpause stuff that come with Debian 1.3.1
> work fine in ATAPI mode, but return an `invalid ioctl()' error when run with
> SCSI emulation.

The application is probably using the CDROMPLAYTRKIND ioctl, which is
then using the SCMD_PLAYAUDIO_TI SCSI command. Unfortunately, this command
is usually not supported directly by the firmware of ATAPI devices (this
is a common case -- ATAPI is generally a sub-set of the SCSI command set).

The ide-cd driver is servicing the CDROMPLAYTRKIND ioctl by the
CDROMPLAYMSF ioctl. We can add similar code to the SCSI cdrom driver,
but meanwhile I would recommend using xplaycd, which is using
CDROMPLAYMSF directly.

> The only program that seems to like scsi emulation mode is
> cdrecord (lucky for me)

Nothing to do with luck.. thanks to the hard work of Joerg and others.

>- but when I tried the latest version of cdrecord, it
> did not work - couldn't get disc type or something.

cdrecord-1.6a11 included support for a new command, which unfortunately
is not supported by the HP-7110. This was fixed in cdrecord-1.6a12.

> I'm using 1.6a7 just fine
> though. So, it seems to me like the scsi emulation is very broken or there is
> some other factor that I'm not aware of- is there anything I can do to help
> pin down the source of the problem?
>
> >
> >
> > > audio cd, as I have to boot a kernel with the standard ATAPI driver to
> > > read, and the scsi emulation driver to write it :)
> >
> > This is a config problem which must be fixed for 2.0.34. You
> > should be able to use ide-scsi as a module.
>
> How is that going to work? Will the ATAPI cd-rom _and_ scsi emulation be built
> as modules, or will ATAPI cd-rom support be in the kernel with the scsi
> emulation as a module?

Unfortunately, we added module support to the IDE driver only in the 2.1.x
kernels. It is not possible to build the IDE subdrivers as modules in 2.0.x.

In the 2.1.x kernels, we can build ide-scsi and ide-cd as loadable modules
and switch between them in run-time by using "insmod" and "rmmod".

> It's version 0.8betaSomething - standard in Debian 1.3.1r6. I think I have the
> URL for cdparanoia, but thanks for the pointers.

Please try cdda2wav-0.95alpha11 or newer from
ftp://ftp.gwdg.de/pub/linux/misc/cdda2wav.

Gadi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu