Linux.com

Feature: Linux

Linux 2.6 and the ide-scsi module

By Joe Barr on December 09, 2003 (8:00:00 AM)

Share    Print    Comments   

If you've followed Linus Torvalds' postings on the Linux kernel mailing list (the LKML) for awhile, then you're aware of the high esteem he has for kernel code written with "good taste." It seems the highest compliment Linus ever pays to other kernel hackers is to refer to them as having "good taste." It's a compliment he has reserved for a very select few: Alan Cox and a handful of others. His disdain for code written in "bad taste" appears to be just as strong as his appreciation of the good. Over the past few months, one particular kernel module has been the center of a mild controversy. On the surface the problem seemed at first to simply be a bug that was exposed in testing of the 2.6 kernel. But it's proved to be more serious than that: it's an example of "bad taste."

Should you be worried?

Still, Bill Davidsen warned of coming calamity for all sorts of strange device users, including tape drives and digital cameras. This left me wanting to know where this situation left users with devices currently using ide-scsi when they upgrade to the Linux 2.6 kernel. So I began to ask key players that very question.

I emailed Sebastian Trueg of the K3B project. He assured me that K3B is already working with the 2.6 kernel and that no further changes will be required. As for cdrecord, the underlying tool used by K3B and other projects, it is working too, thanks to a patch submitted by Torvalds.

I also queried SuSE Linux kernel hacker Jens Axboe as to why nobody was stepping up to assume the maintainer's position for the ide-scsi module. He replied: "There really isn't a great need for ide-scsi anymore, since burning works without it. So the "market" for it has shrunk to basically nothing. Apparently the remaining people either don't know it's broken yet because they haven't tried 2.6, or noone knowledgable enough to fix it has discovered it."

Jens did not seem to be overly concerned about the situation. He went on to say " My guess is that it will get fixed soonish by some volunteer. If that doesn't happen, then I might have to do it myself before SUSE ships it. It's tempting to say it's conveniently broken right now, as informs people (in a brutal way) that ide-scsi burning is deprecated and should not be used."

I also emailed Linus with a fist-full of questions on the subject, which he was kind enough to answer.

The first thing Linus did was to point out a fallacy in my understanding of the problem. The problem is not that there is a bug in ide-scsi. Rather it's:

No, the bug in ide-scsi is that it has no maintainers, and it's trying to cross two different subsystems, and it can easily get it wrong.

The "scsi device identification" thing is a separate issue: cdrecord basically doesn't want to bother with things like filenames, and instead it wants to just open a SCSI generic device (preferably one that has _no_ connection to any specific hardware at all), and then it wants to enumerate devices with "bus+device+lun" numbers.

That's a cdrecord oddity, nothing more.

As far as the lack of a maintainer for ide-scsi, Linus told me:
Yes. Both I and Jens have tried to fix it for breakage, and apparently my last fix actually made it work again for a lot of people, but basically it doesn't actually add any real value at that point anyway.

The value it adds seems to be:

- "keep things the same" (ie just to avoid breakage for people who don't want to touch their configuration)

- some people apparently use some really odd-ball devices, like IDE tape drives, and maybe the ide-tape driver is flaky or something, so they apparently do ide-scsi + the scsi tape driver.

I'm not actually sure about the last one. I've not gotten any reports from people like that. But others claim they exist.

Basically, for the regular IDE-CD read/write, the normal IDE driver should work. If it doesn't, it's a driver bug already, and ide-scsi isn't likely to work either ;)

One thing I did have correct was that he dislikes the phony-SCSI and much prefers things be properly named. Torvalds wrote "Absolutely. I actually like the SCSI _command_ set, and that one is used by pretty much everything (ie whether it is electrically SCSI or not, FC, IDE, USB all use the SCSI command set to talk to disks). But I always disliked the notion that some people have that that should make it all be "SCSI".

Don't worry, be happy

The bottom line seems to be that since cdrecord has been patched to handle IDE device names as well as the old SCSI naming scheme, and most applications for those devices (like K3B) use cdrecord to access them, there will be only a few broken by the move to 2.6. If and when that happens, someone will step up to fix it.

 

Share    Print    Comments   

Comments

on Linux 2.6 and the ide-scsi module

Note: Comments are owned by the poster. We are not responsible for their content.

what about dvd-writing?

Posted by: Anonymous Coward on December 09, 2003 11:15 PM
as dvd+/-r(w) are getting more and more important: what's the status of ide support in dvd+rw-tools, dvdrecord, cdrecord-ProDVD? Will I still be able to burn dvd with Linux 2.6?

#

Re:what about dvd-writing? - be happy

Posted by: Joe Barr on December 09, 2003 11:21 PM


Yes. Quoting from a recent post on the LKML:


Can burn CDs and DVD+RWs without IDE-SCSI just fine.


k3b 0.10.2

cdrdao 1.1.8pre2

cdtools 2.01 alpha 19

#

What about IDE devices on a USB bus?

Posted by: Anonymous Coward on December 09, 2003 11:30 PM
Funny, I was just ripping ide-scsi the other day with a friend. Besides the issues proposed by this article, there's a huge problem affecting users of IDE devices connected via the USB bus.

I recently purchased a USB 2.0 external enclosure for some of my IDE drives. However, it wasn't until I started playing with it that I realized that ide-scsi was necessary for interoperating with the usb-storage drivers. Forcing a scsi interface on these devices means I lose the ability to tweak IDE settings with hdparm (32-bit I/O, DMA, etc). Has anyone considered this?

-fuzzyping

#

Re:What about IDE devices on a USB bus?

Posted by: Anonymous Coward on December 10, 2003 04:05 AM
"Forcing a scsi interface on these devices means I lose the ability to tweak IDE settings with hdparm (32-bit I/O, DMA, etc). Has anyone considered this?"


Wouldn't something like "echo using_dma:1 ><nobr> <wbr></nobr>/proc/ide/hdd/settings" also do the trick? I haven't tested this on anything other than internally connected devices (e.g. internal HD's and CD/DVD-ROMs.

#

Re:What about IDE devices on a USB bus?

Posted by: fuzzyping on December 10, 2003 04:47 AM
No, because it wouldn't be presented in<nobr> <wbr></nobr>/proc as an IDE drive in the first place. Because it uses the SCSI interface, all USB external drives are presented as<nobr> <wbr></nobr>/dev/sd*.

-FP

#

Re:What about IDE devices on a USB bus?

Posted by: Anonymous Coward on December 10, 2003 05:06 PM
ide-scsi goes the other way. It makes IDE devices into pretend SCSI ones.... poorly. You can't hdparm an IDE device that is being handled by ide-scsi, either. You have to understand those enclosures may talk IDE to the drive, but talk USB to the bus. I'm not real sure why the USB developers decided to pretend that USB storage devices are SCSI, though. I have to admit, it's a little odd talking to a USB floppy drive through<nobr> <wbr></nobr>/dev/sda, but luckily, that's my only USB mass storage device, so the number of bad things that can happen are severely limited.

#

Re:What about IDE devices on a USB bus?

Posted by: fuzzyping on December 10, 2003 08:56 PM
Yes, I know. You've just restated everything I said.

#

burncd

Posted by: Anonymous Coward on December 10, 2003 09:26 AM
http://www.freebsd.org/cgi/man.cgi?query=burncd&a<nobr>p<wbr></nobr> ropos=0&sektion=0&manpath=FreeBSD+4.9-RELEASE&for<nobr>m<wbr></nobr> at=html

#

Re:burncd

Posted by: Sean on December 10, 2003 12:06 PM
I have burned DVDs fine with the latest k3b using 2.6 test-10, running Slackware 9.1<nobr> <wbr></nobr>/w updates using Swaret. I haven't had a problem<nobr> <wbr></nobr>:D Only a little glitch where I couldn't see the buffer status, but that just might be my setup. The burn was a complete success though. I am using a LiteON 401S currently.

#

Question!!

Posted by: Anonymous Coward on December 10, 2003 11:08 PM
Forgive the Linux Newbie. It was my understanding that cdrecord ans ide-scsi were the only way to go. Now that I see that it is not. What are the otions? What software? Which kernel version are supported...etc?

#

Indeed

Posted by: Anonymous Coward on December 11, 2003 04:44 AM
I allways tought ide-scasi for cdburning was a bit tacky. Glad this isn't needed anymore. Hopefully any of the cd writing howtos will be updated soon.

#

Okay.. So what tool then?

Posted by: Anonymous Coward on February 06, 2005 01:22 AM
cdrecord worked great for me. I used it with Plextor SCSI devices. ATAPI sucked in Linux.

As for the syntax, give me a break. I wrote a simple shell script called 'mkcd'. Amazing, eh?

The point of the cdrecord author is extremely valid. He doesn't want to change his code when the Linux kernel guys decide to change the interface, etc. He wants a standard API. That API is SCSI. He wants someone else to deal with all the device BS and simplify it as SCSI. Linus, it seems, wants him to deal with the device issues or for someone to write a nice ide-scsi.

So what is the preferred burning tool now?

#

Re:Okay.. So what tool then?

Posted by: Anonymous Coward on March 19, 2005 04:43 PM
cdrecord with the linux atapi patch is the current preferred tool.

SCSI is a shoddy way to interface to non-scsi devices. What we need is a standard interface for devices that are not SCSI that is not a faux-scsi interface. A single interface that is NOT scsi that works for both scsi and ide devices would work as well. Really though, it'd be more fun if cdrecord's functionality were built into the kernel.

#

Re:Okay.. So what tool then?

Posted by: Anonymous Coward on May 05, 2005 07:52 AM
Why built into the kernel? Since we already know a functional CD writing method can run quite happily in userspace, I'd just like to see one that understood IDE. Preferably in the form of a lib with a nice simple interface and then we can all write our own utilities, just the way we like them. I'm not holding my breath though.

Surely the ideal is to have as few things as possible in kernel space? That was supposedly the big architectural argument behid udev. Although, at the same time the mouse drivers were moved into the kernel, for no real reason as far as I can see, messing up a lot of people's pointing devices.

#

Well its 2007 and this article proves all involved

Posted by: Anonymous Coward on March 09, 2007 11:12 AM
... are fucking idiots. This is exactly why "real" companies use a software PROCESS and all the fucking "hacking" (read negative conotation) is really just all about ego-maniacs who would be kings. Fuck Linux, Fuck CDRTOOLS. I been using Linux since 1998 but I can now see cracks in the "bazzare". Maybe I'll give vista a try - works great at work, maybe Microsoft IS the better choice if this kind of infantile ego-maniac tantrums are going to be the norm. Linus - my 6 year acts more adult than you - too bad it never had the opportunity to GROW-UP!

#

Re:You do not need ise-scsi a 2.6 anymore burning

Posted by: Administrator on December 10, 2003 09:24 PM
That's what Linus was stating in his comments. You don't have to restate what has already been told. We *CAN* read. As for DVD playback, well that's a good thing. The mem stick should've been working since 2.4.19 at least. That is the first kernel I got my mem stick to work on, simply insmod the usb module for it and viola( the mistake here is done on purpose. I know how to spell voila, since my first language is French ). As for the camera, well, it's a matter of driver in the apps, not the kernel.

#

You do not need ise-scsi a 2.6 anymore burning cd

Posted by: Administrator on December 10, 2003 02:28 AM
I don't don ise-scsi in kernel 2.6 anymore for burning my cd of dvd anymore.

A lot of problems are solved also the quality of palyback of the dvdwriter for playing dvd was incredible improved.

My usb camera and memory stick is working quit well

#

ide-scsi

Posted by: Administrator on December 10, 2003 11:29 PM
I agree with Linus on this one! I have never quite understood why I should use ide-scsi for an atapi drive - it makes a lot of potential linux users run a mile (I have seen them!)

#

Non-CD/DVD based devices?

Posted by: Administrator on December 11, 2003 05:45 PM
What about all of the non-CD/DVD devices? I know there are many non-CD/DVD based devices that required the scsi-ide module. A few that come to mind are the 3Ware Escalade driver, certain USB floppy drives, and the USB SanDisk-9 module. Have all of these modules been giving native support?

#

Re:Non-CD/DVD based devices?

Posted by: Administrator on December 11, 2003 11:43 PM
I know there are many non-CD/DVD based devices that required the scsi-ide module. A few that come to mind are the 3Ware Escalade driver, certain USB floppy drives, and the USB SanDisk-9 module.


Actually, no.. the Escalade has it's own driver already in the kernel since at least sometime in the 2.4 series. It's seen by Linux as an actual SCSI device (ie:<nobr> <wbr></nobr>/dev/sda) and not accessed as some rediculous dev=0,1,0 device.

As far as I know the USB devices also have never been accessed via the scsi-ide interface either (especially since they are USB and not IDE devices.)

#

What is Shilling's real objection?

Posted by: Administrator on December 12, 2003 02:03 AM
What is he really complaining about? The fact that Linux won't create an all encompassing SCSI driver that does everything so the code doesn't have to change? Or is it simply that the Linux SCSI drivers are inadequate in there implementation? All I can tell is he is pissed and opinionated.

#

cdrecord sucks.

Posted by: Administrator on December 12, 2003 01:02 PM
I always thought cdrecord sucked. The use of a bogus SCSI addressing system instead of a<nobr> <wbr></nobr>/dev/cdrw or similar link, is a weird thing.

But it's hardly the only weird thing in Unix,Linux, and BSDs. In fact, just about every unix app has its own set of totally unique idioms: make, patch, configure, gzip, tar, vi, emacs, less, awk, grep, sed, tr, dd. Then there are the different flavours of incompatible shells: bash, csh, ksh.

The solution is simple: cdrecord is free software, it works well enough, if you don't like the interface, which I sure didn't, you can change it, or you can just learn to live with it. If it irritates you enough, fork it or patch it. SCSI is irrelevant, the point is burn the damn cd. If the very author of cdrecord doesn't get it, maybe it's time people who aren't sheep thought for themselves, and fixed the uglies. Linus is no dummy. It's ugly for a reason. I have used cdrecord for several years, and I *still* need to do a "man cdrecord" before every time I use it. It's worse even than how awful I find using tar, or patch. (gzcat<nobr> <wbr></nobr>../foo.patch.gz | patch -p1)? Why not "patch<nobr> <wbr></nobr>../foo.patch.gz"?

Warren Postma

#

Re:cdrecord sucks.

Posted by: Administrator on December 12, 2003 08:08 PM
> (gzcat<nobr> <wbr></nobr>../foo.patch.gz | patch -p1)? Why not "patch<nobr> <wbr></nobr>../foo.patch.gz"?

You *could* use "patch -i<nobr> <wbr></nobr>../foo.patch", provided that foo.patch has already been decompressed.

And the answer to your question lies deep in the Unix philosophy: have small tools that do one thing well, and combine them to achieve composite results. There's really on point in patch's knowing how to deal with gz files. I personally do not use gzipped patches, but rather bzip2ed ones. Someone else might prefer patching directly from the Internet (wget -O- -q http://kernel.org/pub/linux/kernel/v2.4/patch-2.4<nobr>.<wbr></nobr> 23.bz2 | bzcat | patch). You see where I'm going<nobr> <wbr></nobr>;)

Reading ESR's nice book The Art of Unix Programming (readable online at ) might give do you good. Don't get intimidated by the title, it really has little to do with programming details but gives you some ideas of why Unix is what it is today and what facilities have traditionally been available to develop software on it.

#

Which utilities were those?!

Posted by: Administrator on December 16, 2003 05:18 AM
I would like to know which utility it is that "[does] one thing well". They may do something well, but I'm having a hard time thinking of a utility that does just on thing, and doesn't need twelve command line switches just to do one thing.

And if it is necessary to have all of these switches, I would think that you could make them contextual so that incompatible switches can't be entered.

As far as I can tell, the environments that fostered the creation every legacy Unix utility have ceased to exist. Vi, for one, according to its author, was created to make it possible to do editing over EXTREMELY slow (110 baud) connections. Now, the existence of most of these programs is only justified by compatibility with the scripts that were created so that people could actually be productive.

In short, they are small, useful and ubiquitous, so there is no need to stop using them, but don't villify people trying to create something a little more usable. After all, the GUI is the the right tool for the job if you need to point at something and say, "I want THAT." Under other circumstances, latitude and longitude might be better, but the goal remains the same: efficiency.

#

Re:cdrecord sucks.

Posted by: Administrator on December 12, 2003 08:34 PM
That's the funny thing. I already know the things ESR talks of, and most times I agree with him. But what I find odd in Unix is that the most common tasks often are never thought of.

What are the two things 99.99% of people do most often do with tar? THey should be the default actions. "tar [tarfilename] [directory]", and "untar [tarfilename]", not "tar jxf [filename.tar.bz2]", and if 99.99% of the time, patch is used as you put it "patch -i ", then "patch " ought to be the default.

Pipes, and all, are good. But must one use pipes merely to do simple tasks? Must one combine two utilities with a pipe just to do the most common case of using each tool? This stems from a wholly non-admirable tendency (in both Unix and other operating systems), which is that it's easier to develop a library of workarounds and kludges than it is to try to improve things. I like most things about Linux and in general, I have learned to like most things about common unix-like command line tools, but I can't deny their ugliness. A few things are really elegantly designed, but most common utilities contain entirely accidental designs.


WPostma

#

Re:cdrecord sucks.

Posted by: Administrator on December 15, 2003 04:26 PM
I hate to have to point this out but have you thought about creating aliases? This way you can set up commands with your own preferred options/pipes and thoroughly confuse anyone else that tries to use your system (:

#

Re:cdrecord sucks.

Posted by: Administrator on January 05, 2004 12:54 PM
You have a point about utilities not behaving the way you expect, but in many cases a utilities "erroneous" behavior cannot be changed. The command line is really another example of an interface, and to changinging an interface runs the risk of breaking all the scripts that rely on the existing (possibly POSIX) behavior. Sometimes even fixing a bug would break existing scripts or code.

The only safe bet is to introduce wrapper scripts which are in effect an alternate API, then again once you get used to using the wrapper, you forget how to use the standard tools. Sort of a catch-22

#

So what is the solution for DVD Playback with 2.6?

Posted by: Administrator on December 16, 2003 09:06 PM
Ogle, Xine and mplayer all use libdvdread / libdvdcss. The following errors used to vanish when using ide-scsi:



libdvdread: Can't seek to block 256

libdvdread: Can't open file VIDEO_TS.IFO.



the long description is <A HREF="http://criggie.dyndns.org/linux-dvd/" TITLE="dyndns.org">here</a dyndns.org>:

[...]

Kernel 2.6.x has removed devfs, so links like<nobr> <wbr></nobr>/dev/dvd are not made automatically, and they're not remembered across reboots. You may need to make them another way.



What does this error mean?



libdvdread: Using libdvdcss version 1.2.5 for DVD access

libdvdread: Can't seek to block 256

libdvdread: Can't open file VIDEO_TS.IFO

It means that you aren't using ide-scsi for the
DVD drive. Read and follow this page.

[...]


btw. I do have r/w access to<nobr> <wbr></nobr>/dev/dvd and the symlink it points to (which i can mount to read the content of the dvd)



anyway: What is the standart way of watching dvds with kernel 2.6(-test9)

#

cdrecord is the worst C code I've ever seen

Posted by: Administrator on January 06, 2004 01:13 PM
It's a horrible piece of shit, in badly need of re-writing. The entire cdrtools is an example of how NOT to write C code.

I do not burn CDs on linux because of it.

#

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya