libata in 2.6.14 vs 2.6.13.x

Submitted by Lupine
on October 30, 2005 - 5:29pm

After upgrading to the new 2.6.14, I noticed the old libata trick mentioned here:
http://forums.fedoraforum.org/showthread.php?p=279310#post279310
...no longer works.

To summarize the above post, before I would edit the: include/linux/libata.h file and change:
#undef ATA_ENABLE_ATAPI /* define to enable ATAPI support */
to
#define ATA_ENABLE_ATAPI /* define to enable ATAPI support */

Then I would go into the kernel and remove: Device Drivers ---> ATA/ATAPI/MFM/RLL support ---> < > ATA/ATAPI/MFM/RLL support

Finally, I would recompile the updated kernel, and the laptop would see my CDROM/DVD drive as "/dev/sr0" and the speed was much better than the normal ATA IDE method.

Now I can't seem to get the Dell Inspiron 9300 to see the CDROM/DVD drive anymore. I've tried to edit the above mentioned file but that option is now gone. Suggestions?

Thx,
-Lup

Check the changelog

on
October 30, 2005 - 7:53pm

According to the changelog, you must now pass atapi_enabled=1 as a kernel parameter in order to get libata ATAPI support.

Already tried that

on
October 31, 2005 - 10:33am

Sorry, I should've posted everything I've tried:

Yeah, I already tried that, and it didn't work. I've also tried to edit the /usr/src/linux-2.6.14/include/linux/libata.h file and change the:
#define ATAPI_ENABLE_DMADIR /* enables ATAPI DMADIR bridge support */
...setting around, thinking it was the old setting, just renamed or soemthing. I messed wit the above file, in commbination with the atapi_enabled=1 Grub setting. So far, no luck.

Try this

JJay (not verified)
on
November 2, 2005 - 7:51am

Try passing libata.atapi_enabled=1 to the kernel in GRUB's menu.lst or lilo.conf

Thanks!

on
November 2, 2005 - 11:10am

Hey, that's not what was in the change log....how'd ya know that! =)

Thanks! It's working now. It's nice not having to edit any header file, simply passing something to GRUB is easier.....as long as you know the what to pass.

Thanks again,
-Lup

some details...

cbenz (not verified)
on
November 18, 2005 - 8:40am

Hello (I am french, please excuse my bad english :)

I have the same problem, but after 2 days searching for the solution, I can't resolve it.

I use an Intel piix SATA hard disk (ICH6 controller) which is attached to sda in the bootup sequence, but my DVD drive is not attached to anything.

Could you explain me from the begining, with the 2.6.14 kernel, how do you make your DVD drive attached to hdc ? Did you change an #undef to #define, or simply added a kernel parameter ? Or, did you change your initrd adding modules in it ?

Regards
Christophe

SATA + kernel 2.6.14

Anonymous (not verified)
on
January 5, 2006 - 11:48am

Hi,

I saw your posts about SATA driver and CDrom problems... I'm having problems with my HD ! In fact, my inspiron 9300 is very slow and i saw that using SATA driver (located in SCSI config) was making it much faster... So i'm wondering which option i have to disable/enable to move to the SATA driver located in SCSI config ?

Do you have an idea ?

PS: en fait je parle français et tu peux sans autre me répondre en FR ! Merci par avance !

I actually gave up on the 2.6

on
January 6, 2006 - 9:44pm

I actually gave up on the 2.6.14 kernel and went back to the more stable (for me) 2.6.12.5 kernel. Here is the config file for that:
http://65.33.184.6:8008/thelupine/documentation.php?selectedtable=Linux&...

What I had to do exactly, was use the above kernel config file, and then edit the "/usr/src/linux-2.6.12.5/include/linx/libata.h" file by removing the # from the front of the following lines:

define ATA_ENABLE_ATAP /* define to enable ATAPI support */
define ATA_ENABLE_PATA /* define to enable PATA support in some */
define ATAPI_ENABLE_DMADIR /* enables ATAPI DMADIR bridge support */

Before the changes:

hdparm -tT /dev/cdrom
Timing cached reads: 1828 MB in 2.00 seconds = 914.14 MB/sec
Timing buffered disk reads: 4 MB in 3.30 seconds = 1.21 MB/s

After the changes:

hdparm -Tt /dev/cdrom
Timing cached reads: 3780 MB in 2.00 seconds = 1889.34 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device
Timing buffered disk reads: 4 MB in 3.08 seconds = 1.30 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

...not sure about the errors, but things seem to be working better.

-------------------------------------------------------------------------------------------------------------

For kernel versions 2.6.14, the above edit of the libata.h file is NOT needed, however the kernel compile options are the same. The only other thing I had to add is a parameter to the GRUB boot command. Add the following: libata.atapi_enabled=1 to the end of the boot line, and things should work correctly, so it should look like this:

kernel /boot/blfskernel-2.6.14 root=/dev/sda1 libata.atapi_enabled=1

-------------------------------------------------------------------------------------------------------------

As for the 2.6.15 kernel, I'll be rebooting in a minute to see how it's performance compares.

*EDIT* Just rebooted, and noticed I still need to have the GRUB line:
kernel /boot/blfskernel-2.6.15 root=/dev/sda1 libata.atapi_enabled=1
...for the DVD/CDROM to show up. The drive shows up as /dev/sr0 and I'm getting the same performance as before.

After adding the following lines to the top of my /etc/udev/24-cdrom.rules file:
KERNEL="sr0", SYMLINK="cdrom", GROUP="disk"
KERNEL="sr0", SYMLINK="dvd", GROUP="disk"

....everything appears to be working as it should =)

Oh, and here's my config file for the 2.6.15 kernel
http://65.33.184.6:8008/thelupine/documentation.php?selectedtable=Linux&...

sata_sil can't access my cdrom

Janosh (not verified)
on
January 16, 2006 - 4:12pm

When i use the small "define" patch in kernel 2.6.13.4, my cd-rom is detected and works fine as /dev/sr0, but when i try the atapi_enabled command in 2.6.15, i get this error.


scsi2 : sata_sil
ata4: no device found (phy stat 00000000)
scsi3 : sata_sil
ata3: command 0xa0 timeout, stat 0x78 host_stat 0x1
ATA: abnormal status 0x78 on port 0xF8802087
ATA: abnormal status 0x78 on port 0xF8802087
ATA: abnormal status 0x78 on port 0xF8802087
ATA: abnormal status 0x78 on port 0xF8802087
ata3 is slow to respond, please be patient

--- 30sec hang ---
ata3 failed to respond (30 secs)


Anyone knows what might be causing this?

My system is pure sata, and the ata_piix driver runs my two hardisks that are on the other contraller flawlessly.

--
Janosh

sata_sil/libata crash accessing Plextor DVD PX 750 SA drive

Anonymous (not verified)
on
March 30, 2006 - 4:40pm

I have the same symptoms, and I am struggling for a solution since days now.
Config
- SATA Controller : Silicon image 3112A
- Drive : Plextor PX 750SA
- kernel : Debian 2.6.16-1-k7

Symptoms, at boot :

scsi1 : sata_sil
ATA: abnormal status 0x78 on port 0xE0848087
ATA: abnormal status 0x78 on port 0xE0848087
ATA: abnormal status 0x78 on port 0xE0848087
ATA: abnormal status 0x78 on port 0xE0848087
ata1 failed to respond (30 secs)
ATA: abnormal status 0xF8 on port 0xE0848087
Assertion failed! qc->flags & ATA_QCFLAG_ACTIVE,drivers/scsi/libata-core.c,ata_q c_complete,line=3631
ata1: translated ATA stat/err 0xf8/00 to SCSI SK/ASC/ASCQ 0xb/47/00
------------[ cut here ]------------
kernel BUG at drivers/scsi/scsi_lib.c:1219!
invalid opcode: 0000 [#1]
Modules linked in: dm_mod tsdev sata_sil snd_mpu401 snd_mpu401_uart snd_intel8x0 analog snd_ac97_codec snd_ac97_bus 3c59x psmouse snd_pcm_oss snd_mixer_oss mii nvidia_agp snd_rawmidi snd_seq_device gameport serio_raw pcspkr i2c_nforce2 parp ort_pc parport agpgart snd_pcm snd_timer i2c_core ohci_hcd ide_cd cdrom snd ehci _hcd soundcore rtc usbcore ohci1394 ieee1394 floppy snd_page_alloc shpchp pci_ho tplug forcedeth ext3 jbd mbcache ide_disk amd74xx generic ide_core sata_nv libat a scsi_mod evdev mousedev
CPU: 0
EIP: 0060:[] Not tainted VLI
EFLAGS: 00010046 (2.6.16-1-k7 #1)
EIP is at scsi_blk_pc_done+0x10/0x2a [scsi_mod]
eax: dfb35ae4 ebx: df6c874c ecx: e084f01d edx: deaefb60
esi: 00000000 edi: 00000202 ebp: df6c874c esp: dfb09f28
ds: 007b es: 007b ss: 0068
Process ata/0 (pid: 810, threadinfo=dfb08000 task=dfc3ca90)
Stack: <0>e08399d0 deaefb60 df6c8280 e08357ef df6c874c df6c8280 df6c8280 0000000 0
00000202 df6c874c e0835f2b df6c874c df6c8280 df6c8800 df891660 00000293
df6c8280 b0121a95 df6c874c e0835f34 df891668 df891660 df891670 b0121b39
Call Trace:
[] atapi_sense_complete+0x20/0x25 [libata]
[] ata_qc_complete+0x1ba/0x1d1 [libata]
[] ata_poll_qc_complete+0x88/0x91 [libata]
[] run_workqueue+0x64/0x94
[] atapi_packet_task+0x0/0x127 [libata]
[] worker_thread+0x0/0x10f
[] worker_thread+0xdf/0x10f
[] default_wake_function+0x0/0x15
[] kthread+0x94/0xc1
[] kthread+0x0/0xc1
[] kernel_thread_helper+0x5/0xb
Code: 06 8b 8a 8c 00 00 00 6a 01 31 d2 89 e8 e8 38 f9 ff ff 58 83 c4 24 5b 5e 5f 5d c3 8b 54 24 04 8b 82 a4 00 00 00 f6 40 11 20 75 08 <0f> 0b c3 04 a7 9e 85 e0 6a 00 ff b2 8c 00 00 00 52 e8 97 fb ff

Sometimes I got quite the same output but with a libata "Oops".

I am desperate.

What did you exactly do ?

Maj0r (not verified)
on
November 24, 2005 - 7:06am

What did you exactly do ?

I have an Inspiron 9300, too, but I cannot get my dvd-drive working.

Up to 2.6.14 I used the one-line-patch "#define xxx" without disabling ATA/ATAPI/MFM/RLL support and it worked fine.

With 2.6.14 I tried various combinations:
- no kernel-modification, only adding atapi_enabled=1 (tried libata.atapi_enabled=1 too) to grub
- disabing ATA/ATAPI/MFM/RLL AND passing the lines to grub
- both combinations with additional old modification of libata.h

Nothing works, my dvd-rom does not appear as /dev/srX.

Do you have any suggestions ?

Instability with #define patch?

Christopher (not verified)
on
December 9, 2005 - 7:00pm

For those of you who used the #define patch for kernels before 2.6.14, did it cause instability in your systems?

Also, which is correct? One person says it's a one line patch, another person says it's that one line plus disabling a device driver. Finally, I'm using a patch that touches a few #defines in two files, but it causes my system to be unstable (i.e. my kernel randomly locks up). Here is the link to the patch I'm using:
http://www.math.ucla.edu/~jimc/insp6000/ata_piix-2.6.12-rc1.txt

Thanks for the help.

re: Instability with #define patch? (stupid boot-param)

arne anka (not verified)
on
December 15, 2005 - 6:01pm

are you using kde? there's a kded-module called mediamanager (i think) polling all devices suspected to be mass-storage -- thus even the cdrom/dvd. if there's no cd/dvd inside the device does not respond thus freezing the system.
probably there are other tools too, able to cause that look, because it's merely a kernel-bug i think.
insert a cd and check whether the lock-ups are gone. if so, then you need another patch too, http://rtr.ca/dell_i9300/kernel/libata_error_handling.patch

which genius came up with that stupid boot-parameter to enable s-ata? is a s-ata device to be used only accidentally? my s-ata-cdrom/dvd is built-in, why should i use a boot-parameter instead of enabling it inside the kernel? is it anew trend? do i have to enable my graphics-adapter likewise in future kernel-versions? or my keyboard? or just everything?

sata on inspiron 9300

LaFond (not verified)
on
January 22, 2006 - 2:51am

i had the same problems with my Hd and dvd rom working really slow on slackware 10.2 (2.6.15.1). I enabled the libata and low level scsi generic in the kernel, and that got my HD using sata. I then did the #defines in libata.h and also set a atapi_ide = 1 in scsi_core.c in my kernel. After this i couuld detect my DVD rom at startup, but i cant find where it's mapped to.
root@slayer:/proc/scsi# dmesg | grep scsi
scsi0 : ata_piix
scsi1 : ata_piix
sd 0:0:0:0: Attached scsi disk sda
sd 0:0:0:0: Attached scsi generic sg0 type 0
1:0:0:0: Attached scsi generic sg1 type 5

it shows my DVD as attached generic sg0, but i cant mount it (invalid block device). Im going to keep googling and tweaking to see if i can get my DVD to work

That is not working for me!

TriggerMonk (not verified)
on
February 22, 2006 - 5:45pm

I tried to pass it to the kernel but the kernel will stop with the error messsage:

ata4: error occurred, port reset
ata4: error occurred, port reset

Assertion failed! qc->flags & ATA_ACTIVE,drivers/scsi/libata-core.c,ata_qc_complete,line=3232

This whole libata thing drives me nuts to be honest. I kinda get the feeling that I'm the only one for whom that "patch" isn't working.

Help would be much appreciated.

libata.atapi_enabled

Tadeu (not verified)
on
March 16, 2006 - 6:53pm

My distro is Debian 2.6.15.4 and my Sata Plextor PX-716-SA and my Pata
Plextor PX-130-A are working 100% What I did?.
root_shell nano /boot/grub/menu.lst
and at line saying:
# kopt=root=/dev/sda2 ro
update to:
# kopt=root=/dev/sda2 ro libata.atapi_enabled=1 hdb=ide-scsi
don't remove the symbole # placed starting the line
And finally run the command update-grub.
That's all
good luck

Finally Working in 2.6.15

on
March 20, 2006 - 6:10pm

Thanks in part to this thread, I finally got DMA access working in 2.6.15 (more specifically Gentoo 2.6.15-suspend2-r8). This is on a Dell D610 with a Samsung CD-RW/DVD-ROM. The changes I needed to do were:

Device Drivers --->
SCSI device support --->
<*> SCSI CDROM support
SCSI low-level drivers --->
<*> Serial ATA (SATA) support
<*> Intel PIIX/ICH SATA support

In addition I HAD TO DISABLE:
Device Drivers --->
ATA/ATAPI/MFM/RLL Support

If I left support enabled, I could only get non-DMA speeds (and my drive would appear as /dev/hdc). This above step might be what's affecting a lot of people.

Finally I had to pass: libata.atapi_enabled to my kernel via GRUB. My CD-RW/DVD-ROM now appears as /dev/sr0 and can't be set by hdparm, however I just tested it and it plays DVD's, etc. just fine.

Comment viewing options

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