Linux: SATA Status

Submitted by Jeremy
on August 12, 2005 - 6:13am

Jeff Garzik noted that he has updated the Serial ATA Linux software status report, "things in SATA-land have been moving along recently". The status report notes that, "the 'ATA host state machine', the core of the entire driver, is considered production-stable." The libATA driver uses the kernel's SCSI layer, and causes each SATA port to appear as a new SCSI bus. A programmer's guide to libata [pdf] further explains, "libATA is a library used inside the Linux kernel to support ATA host controllers and devices. libATA provides an ATA driver API, class transports for ATA and ATAPI devices, and SCSI<->ATA translations for ATA devices according to the T10 SAT specification [pdf]." The latest patches for the 2.4 and 2.6 kernels can be found here.

Regarding PATA, or Parallel ATA (IDE), Jeff also posted a ten item todo list. The software status webpage notes, "libata will be gaining full support for PATA, including older chipsets and devices with buggy/problematic designs. PATA will be fully supported, as will SATA. Currently, libata PATA drivers only exist for Intel PIIX and a few Promise chipsets."



From: Jeff Garzik [email blocked]
Subject: SATA status report updated
Date:	Fri, 12 Aug 2005 01:09:12 -0400


Things in SATA-land have been moving along recently, so I updated the 
software status report:

	http://linux.yyz.us/sata/software-status.html

Although I have not updated it in several weeks, folks may wish to refer 
to the hardware status report as well:

	http://linux.yyz.us/sata/sata-status.html

Thanks to all the hard-working SATA contributors!

	Jeff


From: Jeff Garzik [email blocked] To: linux-ide [email blocked] Subject: libata PATA todo list Date: Thu, 11 Aug 2005 16:54:40 -0400 Since there's been some recent interest in the subject, I thought I would post the PATA todo list for libata. Some of these items are from my memory, and some are from a list Alan was kind enough to create. The items verbatim from Alan are prefixed "Alan: ". 1) Locked device/host speed To support devices such as those in the ide/pci/generic.c list, we need to ensure that libata -never- attempts to change the device speed (ata_dev_set_xfermode should be avoided). 2) Simplex DMA PCI IDE specification has a 'simplex' DMA bit, which should be tested. Simplex means that only one command can be outstanding, for BOTH port0 and port1, at any given time. Possibly some hosts also need Simplex DMA, but may not assert the standard PCI IDE Simplex DMA capability bit. I don't know. 3) Speed change on error Downshift device to a slower UDMA speed, and eventually from DMA->PIO, as errors persist. There is no 'specified way' to do this, this is purely hueristic. 4) Alan: Command filter Alan -- explanation? I know one line item here, at least: Promise controllers snoop SET FEATURES - XFER MODE command. We must stop command processing on ALL ports when this command is issued, to avoid corruption. 5) Alan: MWDMA broken still? is piix doc correct? 6) Alan: some PATA LBA48 devices cannot do > 256 sectors. 7) Alan: Some ALi requires LBA48 be done via PIO. LBA28 DMA is OK. 8) ATAPI device CDB interrupt Some older ATAPI devices require the OS driver to wait for an interrupt, after CDB is written, before command processing proceeds. 9) ATAPI devices may delay setting DRQ=1 for up to 3ms. Make sure we honor the delay noted in IDENTIFY PACKET DEVICE word 0. 10) ATAPI DMA alignment (discussed elsewhere) Needed even for PATA, AFAICT.

Related Links:

So, no more /dev/hdx?

mixonic but i didnt log in (not verified)
on
August 12, 2005 - 7:10am

So, today's IDE bus will become /dev/sdx? During 2.6?!

Nope, that's old

Anonymoose (not verified)
on
August 12, 2005 - 9:51am

Yes and no. It is only SATA (the sexy cables) that has become /dev/sdx, not PATA (the flat cables), and only when using the libata drivers. (Which is called libata in the kernel config, not sata.) But that's old news, it has been like that for a long time (always for libata perhaps?).

Yes it is a bit clumsy for the user. But the naming scheme under /dev is insane in many ways, and it is not libata's fault. devfs had a much nicer scheme with /dev/discs (symlinked to /dev/ide based on the respective devices physical address), but someone decided devfs had to go because it was a mess to maintain.

Now we are stuck with udev, which apparently has all this flexibility that can make it appear like devfs, but I have seen nothing of that yet. I hope that more people will wish for a saner /dev tree (the whole static device naming scheme seems inappropriate to me) and that someone more knowledgable will fix it.

Use *BSD. They have devfs.

Anonymouse! (not verified)
on
August 13, 2005 - 11:44am

Use *BSD. They have devfs.

All BSDs use devfs? Could ha

NotAnonymous (not verified)
on
August 14, 2005 - 7:13pm

All BSDs use devfs? Could have fooled me.

BSD? Again?

Anonymous/00001 (not verified)
on
August 15, 2005 - 3:22am

Gosh. I'd love to have some of the stability to be ported from BSD to Linux.

Linux got so many features - but inevitably it became undocumented mess. Since Linux, you know, is only kernel. We have: ata layer, then we have ide-scsi, now we have libata which in fact is sata. Nice, isn't it? Bunch of stuff intended to do the same thing, but apparently not managing to. None of them.

BSD is on other side lack many features, but gosh so stable over many years. Driver names do not change. Gosh, that's why after all we have names! so that user do not need to mess with major/minor manually. BSD will never ever have two drivers to do the same thing - it is just absurd and hell to maintain. If works needs to be done - people sit down and do that. Every device eventually gets proper driver.

How it is unfortunate that Debian is only distribution: its organization results in very stable product. Something Linux kernel can definitely use.

Linux has great development process, but as many have felt on their own skin, have outsourced release management to distros. From my experience in proprietary environment when release management gets so distant from development, no good product will ever emerge. And alas, over more than decade of development of Linux it didn't manage to become a product, but remained merely technology. Good technology doesn't make good product.

Good product is what people like and even will pay for. Check the Apple out: nobody cares about technology inside and people buy sometimes outdated technology. But who cares as long as it works as great as many Apple products do.

Good technology doesn't make good product, but good product may have a use for good technology. It is always that way.

Not to rain on your parade, b

AnonĂ¼mous (not verified)
on
August 16, 2005 - 12:58am

Not to rain on your parade, but MacOSX is the first thing that is wiped from the HD of my Apple-computers. In 4 words: it sucks monkey balls.

Everything is possible with udev

Anonymooose (not verified)
on
August 14, 2005 - 2:17am

Suggest you have a look at "man udev" and "/etc/udev/udev.rules".

I'm sure you can recreate the discs subtree with udev rules, but who would want that if you can have a /dev/disk/thisismyharddisk that always points to a device identified by it's ID string/serial number? :)

People who want software to a

Zombywuf (not verified)
on
August 15, 2005 - 5:41am

People who want software to automatically be able to find their disks.

This article says that PATA w

Anonymous3233 (not verified)
on
August 14, 2005 - 10:58pm

This article says that PATA will be handled by libata as well, thus making /dev/hd* go away and be replaced by the new /dev/sd*. Apparently, libata is going to make /dev/hd* a thing of the past.

Already done for some drivers

Wrawrat
on
August 15, 2005 - 10:42am

I have recently bought a Promise SATAII150 TX2plus controller with 2 SATA ports and 1 PATA port. Since the PATA port is also controlled by the libata driver, it got a /dev/sd* name. Unfortunately, I have lost the means to tweak some settings with hdparm (power management for my backup drives), but I suppose it's going to get libata support sooner or later.

What about sdparm?

Mr_Z
on
August 15, 2005 - 12:40pm

It appears sdparm may end up taking up the slack here eventually, but I must admit unless you know what bits to frob where, it's still not quite as friendly as hdparm. Not even close.

By the way, what about his sc

Anonymouse! (not verified)
on
August 13, 2005 - 11:56am

By the way, what about his scheme:
Why not name the deviced after their major and minor numbers? For example: /devnum/8,1 or /devnum/3,1
And then, everyone can symlink whatever they want to them; say, a former Windows enthusiast can symlink /C: -> /devnum/3,1 and /D: -> /devnum/3,2
A devfs fan can symlink /dev/scsi/host0/bus0/target2/lun0/part1 -> /devnum/8,1
Or a traditionalist can symlink /dev/hda1 -> /devnum/3,1

Would that make sense?

no..

strcmp
on
August 13, 2005 - 12:13pm

Users who can create symlinks in /dev can as easily mknod in /dev (btw. udev does just that). Symlinks are just a confusing indirection here, because you can't assign access rights to them (or, if you could, override them by using the /devnum/-devices directly). So you have to assign user:group and access bits to some numbered objects in /devnum, which gets really hard to understand: "/devnum/123,45 is user writable, which device does that correspond to and is it ok? Let's search for symlinks in /dev which point there." It gets even worse, if multiple links point to one device.

Eh.

moribund
on
August 25, 2005 - 2:29am

Device numbers aren't necessarily stable (think USB).

Marvell 88SX50[48]x libata driver status

Erasmo Acosta (not verified)
on
August 18, 2005 - 4:58pm

Hello,

I was wondering why is the status for the Marvell 88SX50[48]x libata driver "stalled"? I very much look forward to see this chipset supported, rather than having to patch the Marvell drivers and recompile the module each time I have a new Kernel.

Erasmo Acosta.

libata

rlsn (not verified)
on
August 21, 2005 - 7:14am

just as a user I should probably not post here, but I would like to check smthg: I recently upgraded from 2.4 to 2.6 (2.6.12) and it seems to me the disk performance was way better on 2.4 with the ide driver, in terms of cpu overhead (iowait)...

should (and can I) switch to libata?

hw: 82371AB/EB/MB PIIX4 IDE (rev 01)

thks!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.