Re: Problems with IDE on linux 2.6.22.X

Previous thread: [patch] fix the max path calculation in radix-tree.c by Jeff Moyer on Tuesday, August 21, 2007 - 3:48 pm. (5 messages)

Next thread: [PATCH] turn err into errx in lguest call sites by Glauber de Oliveira Costa on Tuesday, August 21, 2007 - 4:28 pm. (2 messages)
To: <linux-kernel@...>
Date: Tuesday, August 21, 2007 - 3:49 pm

Hi!

I'm writing for you because i'm experiencing some serious problems with the
IDE system on linux kernel 2.6.22 series, *I think* specifically with the
module IDE_GENERIC.

This is tested on all the 2.6.22 kernels (2.6.22, 2.6.22.1, 2.6.22.2, 2.6.22.3
and 2.6.22.4).

Well, I'm using Debian GNU/Linux on a Lenovo 3000-n100 laptop. The kernel that
I'm using now is a 2.6.20.15, compiled by myself, which works correctly. But
when I try to run a 2.6.22 series kernel, compiled with the same options than
the 2.6.20.15, some bad things happens.

First, there is a kernel panic, because kernel tries to boot the root
partition from a hda disk, but I'm using sda disks, not hda.

Here is the kernel panic message:
###################
#VFS: Cannot open root device "sda3" or unknown-block (0,0)
#Please, append a correct "root=" boot option; here are the available
#partitions:
#0300 97685784 hda driver: ide-disk
# 0301 29832763 hda1
# 0302 4931955 hda2
# 0303 60308010 hda3
# 0304 1 hda4
# 0305 2610531 hda5
#Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block
#(0,0)
###################

Somebody tolds me that I can solve this problem unchecking the IDE_GENERIC
option in the kernel configuration. It's true, but when I do this the DVD
device is not recognized by the kernel. No exists. In my working 2.6.20.15
kernel, the 'cat /proc/ide/drivers' command outputs this:
###################
#ide-disk version 1.18
#ide-cdrom version 4.61
###################

But in 2.6.22.X, the output is only:
###################
#ide-disk version 1.18
###################

I'm sure that is not a bad configuration options problem, because the problem
appears too when, for example, I try to boot an openSUSE-10.3-beta liveCD,
which has a 2.6.22.1 kernel, and boot process stops with this warning:
###################
#----> Probing module: generic
#----> Failed to detect CD drive!
#----> rebootException: reboot in 60 sec...
###################...

To: José Luis Patiño Andrés <jopan@...>
Cc: <linux-kernel@...>
Date: Tuesday, August 21, 2007 - 6:08 pm

The OpenSuSE Live CD thing not booting may mean you have a deeper problem,

You have a SATA harddrive (Hitachi Travelstar 5K100 100GB SATA/2.5") and an
IDE (also known as PATA) DVD drive (LG GMA-4082N). That is, your disk should
be driven by the:

"Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support"

under the "Serial ATA (prod) and Parallel ATA (experimental) drivers" menu,
and it seems this driver should also take care of your DVD. Not sure from
your report what you are using -- first try with only that driver, and
nothing from the old "ATA/ATAPI/MFM/RLL support" menu selected.

In that situation, your harddrive works, but your DVD does not?

If so, this should be fixed in the driver, but to get things working I
believe you may try with both the above driver for your harddisk and the old
IDE driver for the DVD:

<*> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
<*> Include IDE/ATAPI CDROM support (NEW)
[*] PCI IDE chipset support
[*] Generic PCI bus-master DMA support
<*> Intel PIIXn chipsets support

(do not select IDE/ATA-2 disk support)

where you may need to boot with a "libata.atapi_enabled=0" kernel parameter.

Not actually particularly sure if that works given that it's the same chip
and all it seems but anyways, please first verify results with only that
SATA driver.

Rene.
-

To: Rene Herman <rene.herman@...>
Cc: <linux-kernel@...>
Date: Tuesday, August 21, 2007 - 9:39 pm

Okay, now it's tested as you said. In fact, in this way with only the SATA
drivers activated and ATA/ATAPI support completely unselected, my HDD works
but my DVD not.

Unselected.

Now, I have this kernel panic:
###################
#VFS: cannot open root device "sda3" or unknown-block (0,0)
#Please, append a correct "root=" boot option; here are the available
#partitions:
#1600 4194302 hdc driver: ide-cdrom
#Kernel panic - not syncing: VFS: Unable to mount root fs on
#unknown-block(0,0)

This parameter has no effect. I have the same kernel panic with or without it.

José Luis Patiño.
-

To: José Luis Patiño Andrés <jopan@...>
Cc: <linux-kernel@...>, Jeff Garzik <jgarzik@...>, <linux-ide@...>, Alan Cox <alan@...>
Date: Tuesday, August 21, 2007 - 10:35 pm

Okay. Jeff, Alan -- 2.6.20.15 apparently working. A few weeks ago there was
another report of a DVD drive failing detection on pata_amd (my CD and DVD
drives work fine on pata_amd). Did some ATAPI timeouts change or something?

He's using:

00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial

Okay, makes sense, seems the new driver simply can't grab the SATA part
anymore when the old driver already's got the IDE part -- I wasn't sure
about that (not a SATA user myself -- just noticed your report due to
noticing that previous one due to pata_amd...).

The old SATA driver available from the IDE menu also does not support your
chip, so I don't believe there are any workarounds -- you'll need the issue
fixed.

Rene.

-

To: Rene Herman <rene.herman@...>
Cc: José <jopan@...>, <linux-kernel@...>, Jeff Garzik <jgarzik@...>, <linux-ide@...>
Date: Wednesday, August 22, 2007 - 7:23 am

drivers and it should all work fine.
-

To: Alan Cox <alan@...>
Cc: José Luis Patiño Andrés <jopan@...>, <linux-kernel@...>, Jeff Garzik <jgarzik@...>, <linux-ide@...>
Date: Wednesday, August 22, 2007 - 11:48 am

He has a SATA harddrive and an IDE DVD drive. When he compiles with
CONFIG_ATA_PIIX (a driver which advertises both SATA and PATA in its
description) his drive works, his DVD does not. Is that not the correct
driver? Does he need something else? How does he get his DVD to work?

Rene.

-

To: Rene Herman <rene.herman@...>
Cc: Alan Cox <alan@...>, Jos? Luis Pati?o Andr?s <jopan@...>, <linux-kernel@...>, Jeff Garzik <jgarzik@...>, <linux-ide@...>
Date: Wednesday, August 22, 2007 - 12:23 pm

Well of course the DVD should show up as /dev/sr0 or scd0 with the new
driver, not the /dev/hd? name. And scsi cdrom support is required too.

--
Len Sorensen
-

To: Lennart Sorensen <lsorense@...>
Cc: Alan Cox <alan@...>, Jos? Luis Pati?o Andr?s <jopan@...>, <linux-kernel@...>, Jeff Garzik <jgarzik@...>, <linux-ide@...>
Date: Wednesday, August 22, 2007 - 12:54 pm

Obviously. Looking back through the report, him having SCSI CD-ROM support
wasn't actually explicit so that might in fact be the problem but his
self-compiled 2.6.20.15 worked and a 2.6.22 based Open SuSE Live CD does not
(and he does have SCSI disk support, which suggests he will've likely also
have thought of SCSI CD-ROM support) so it does not seem to be.

José: do you have SCSI CD-ROM support compiled in? What are the ATA/SCSI
related messages in the output of "dmesg" when you compile with the
CONFIG_ATA_PIIX driver, SCSI disk and SCSI CD-ROM support (and nothing from
the old IDE menu)?

Rene.

-

To: Rene Herman <rene.herman@...>
Cc: Lennart Sorensen <lsorense@...>, Alan Cox <alan@...>, <linux-kernel@...>, Jeff Garzik <jgarzik@...>, <linux-ide@...>
Date: Monday, August 27, 2007 - 8:44 pm

Hi again. I'm very sorry for the delay. I was on a travel since wednesday 22.

Okay Rene, I activated SCSI CD-ROM support in kernel config and now all works
again. It's strange, because I never used this option to get my DVD device
on.

Well, sorry for the inconvenience. Thanks for your help.
-

To: José Luis Patiño Andrés <jopan@...>
Cc: Lennart Sorensen <lsorense@...>, Alan Cox <alan@...>, <linux-kernel@...>, Jeff Garzik <jgarzik@...>, <linux-ide@...>
Date: Tuesday, August 28, 2007 - 1:05 pm

Sheesh. How could anyone _not_ understand you need SCSI CD-ROM support for
your IDE DVD-RW drive...

Rene "Sigh" Herman

-

To: Rene Herman <rene.herman@...>
Cc: José Luis Patiño Andrés <jopan@...>, Lennart Sorensen <lsorense@...>, Alan Cox <alan@...>, <linux-kernel@...>, Jeff Garzik <jgarzik@...>, <linux-ide@...>
Date: Thursday, August 30, 2007 - 3:31 pm

Welcome to the wonderful world of SCSIfying ATA. (Don't talk about
ATAPI, USB/Firewire, it's a different matter.)

Jan
--
-

To: Jan Engelhardt <jengelh@...>
Cc: José Luis Patiño Andrés <jopan@...>, Lennart Sorensen <lsorense@...>, Alan Cox <alan@...>, <linux-kernel@...>, Jeff Garzik <jgarzik@...>, <linux-ide@...>
Date: Thursday, August 30, 2007 - 4:05 pm

Well -- the world where ATA, SCSI, USB, Firewire and what have you are
low-level drivers to a unifying storage layer is under non too obscure
definitions sort of not non-wonderful...

Admittedly, the unifying layer is a little SCSI inspired but so is a lot of
the hardware. As long as the users (the humans) resist SCSI inspiration, it
should be safe.

Rene
-

To: Rene Herman <rene.herman@...>
Cc: Jan Engelhardt <jengelh@...>, José Luis Patiño Andrés <jopan@...>, Lennart Sorensen <lsorense@...>, Alan Cox <alan@...>, <linux-kernel@...>, Jeff Garzik <jgarzik@...>, <linux-ide@...>
Date: Thursday, August 30, 2007 - 5:16 pm

USB / Firewire / FC / iSCSI are all SCSI transports and fit within the
SCSI subsystem by design.

ie. Just like ethernet, DSL, T-1, etc can all carry IP traffic with no
conceptual conflict, many media by design carry SCSI traffic.

The PATA and SATA physical layer typically carry ATA commands and
having them tied into the SCSI stack is an aberration that I hope will
be eliminated some day.

ATAPI is an exception. Not sure where that would end up in a perfect world.

Greg
--
Greg Freemyer
Litigation Triage Solutions Specialist
http://www.linkedin.com/in/gregfreemyer

The Norcross Group
The Intersection of Evidence & Technology
http://www.norcrossgroup.com
-

To: Greg Freemyer <greg.freemyer@...>
Cc: Jan Engelhardt <jengelh@...>, José Lu <jopan@...>, Lennart Sorensen <lsorense@...>, Alan Cox <alan@...>, <linux-kernel@...>, Jeff Garzik <jgarzik@...>, <linux-ide@...>
Date: Thursday, August 30, 2007 - 5:34 pm

As said, if you make a bit of an effort to view the former SCSI stack as a
unified storage midlayer the abberation becomes less abberational (if that's
a word).

Real SCSI, the other SCSI transports and ATAPI would just use more of the
common mid-layer than P/SATA would. I'd expect the way forward would be to
just refactor things until someone notices that drivers/scsi is the wrong
place for sd.c and sr.c and moves them to drivers/block or whereever.

Practically, the PATA driver gives me (almost) the same throughput as the
old IDE driver does, and given that I need the former SCSI stack _anyway_
for my external USB harddrive, I don't see a pressing need to carry along
yet another storage stack for my harddrive.

Rene.

-

To: Greg Freemyer <greg.freemyer@...>
Cc: Rene Herman <rene.herman@...>, Jan Engelhardt <jengelh@...>, Jos? Luis Pati?o Andr?s <jopan@...>, Alan Cox <alan@...>, <linux-kernel@...>, Jeff Garzik <jgarzik@...>, <linux-ide@...>
Date: Thursday, August 30, 2007 - 5:32 pm

But isn't SATA related to SAS? And isn't SAS using SCSI commands? And
if ATAPI is essentially SCSI commands, and everything other then disks
use ATAPI on ATA, then that makes ATA disks the odd ball, and mangling
it into line with everything else isn't that bad (since all other ATA
devices are close to SCSI already).

--
Len Sorensen
-

To: Jan Engelhardt <jengelh@...>
Cc: Rene Herman <rene.herman@...>, Jos? Luis Pati?o Andr?s <jopan@...>, Alan Cox <alan@...>, <linux-kernel@...>, Jeff Garzik <jgarzik@...>, <linux-ide@...>
Date: Thursday, August 30, 2007 - 3:46 pm

I guess eventually all disks will appear the same, just like on BSD and
many other systems (probably most other systems). :)

--
Len Sorensen
-

To: Rene Herman <rene.herman@...>
Cc: José Luis Patiño Andrés <jopan@...>, <linux-kernel@...>, Jeff Garzik <jgarzik@...>, <linux-ide@...>, Alan Cox <alan@...>
Date: Wednesday, August 22, 2007 - 2:15 am

I had the same issue when I compiled 2.6.22 on my T60 (SATA_AHCI drives
my hd). I workarounded it selecting IDE_GENERIC as a module.

Worth a try…

--
Kiko
Private mail is preferred encrypted:
http://www.pirispons.net/pgpkey.html
-

To: Rene Herman <rene.herman@...>
Cc: José <jopan@...>, <linux-kernel@...>
Date: Tuesday, August 21, 2007 - 7:00 pm

> "Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support"

Not for the newer chips. You want ATA/SATA (PIIX and possibly AHCI)

Why deliberately disable atapi when you need atapi ?

Alan
-

To: Alan Cox <alan@...>
Cc: José Luis Patiño Andrés <jopan@...>, <linux-kernel@...>
Date: Tuesday, August 21, 2007 - 7:07 pm

That _is_ the *config description for the new (CONFIG_ATA_PIIX) driver (in

Because he described the problem that if he got his (SATA) disk supported he
lost his (PATA) DVD drive. Although I'm as said not completely sure it would
actually work, I suggested compiling in both ATA_PIIX (yes, and sd) for his
drive and the IDE PIIX/ICH driver and ide-cd for his DVD, where if it works
at all, passing the above option may or may not be useful.

But his report, although expansive, was a little unclear. Let's wait for
what happens with only ATA_PIIIX.

Rene.
-

Previous thread: [patch] fix the max path calculation in radix-tree.c by Jeff Moyer on Tuesday, August 21, 2007 - 3:48 pm. (5 messages)

Next thread: [PATCH] turn err into errx in lguest call sites by Glauber de Oliveira Costa on Tuesday, August 21, 2007 - 4:28 pm. (2 messages)