Skip to contentSkip to conversation

SATA ICH6M problems on Sharp M4000

DISCUSSION Sergei Organov 3 participants 6 messages Dec 2, 2005 – Dec 6, 2005 1 message not in the archive SCSI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 200511221013.04798.marekw1977

#1 lore raw
Quoted 4 lines · Jeff Garzik
Quoted 3 lines · Josh Litherland

Trying to get this laptop operational; it has SATA for the hard disc and PATA for the optical drive. The hard drive is wired to the secondary IDE interface, the optical to the primary.

[...]

Quoted 2 lines
Quoted 2 lines

With ata_piix driving the hard drive, performance is great, but the optical device is never enumerated.

I have exactly the same problem with my IBM ThinkPad T43 and 2.6.14 kernel and still can't find a way to let ata_piix manage the hard drive and generic_ide to manage the optical one. BIOS doesn't have any settings for SATA on this notebook.

Quoted 10 lines

Expected behavior, since the default for module option atapi_enabled is zero (disabled).

Quoted 6 lines

When the piix driver tries to load, the following occurs:

ide0: I/O resource 0x1F0-0x1F7 not free.
ide0: ports already in use, skipping probe
ide1: I/O resource 0x170-0x177 not free.
ide1: ports already in use, skipping probe

[...]

Quoted 1 line

So far everything seems to be expected behavior.

Sorry, but provided ata_piix has ignored the optical drive, couldn't corresponding I/O resource be left free so that subsequently loaded, say, generic-ide module is able to get over and support the drive?

BTW, loading the modules in reverse order helped on 2.6.13 kernel (that I'm currently using) as generic-ide didn't recognize the hard-drive at all allowing ata_piix to get over it later. With 2.6.14 kernel generic-ide does recognize both hard-drive and optical drive thus preventing ata_piix from managing the hard-drive :(

Signature · 1 line
Sergei.
#2 lore raw
Quoted 9 lines · On Fri, 02 Dec 2005 22:33:57 +0300 Sergei Organov wrote:

Sorry, but provided ata_piix has ignored the optical drive, couldn't corresponding I/O resource be left free so that subsequently loaded, say, generic-ide module is able to get over and support the drive?

BTW, loading the modules in reverse order helped on 2.6.13 kernel (that I'm currently using) as generic-ide didn't recognize the hard-drive at all allowing ata_piix to get over it later. With 2.6.14 kernel generic-ide does recognize both hard-drive and optical drive thus preventing ata_piix from managing the hard-drive :(

See http://lkml.org/lkml/2005/10/18/167 and the reply to it :-\

If you want to build IDE as modules and still have support for combined mode, you will need the patch below:

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

ide/libata: fix SCSI_SATA_INTEL_COMBINED setting with modular IDE

SCSI_SATA_INTEL_COMBINED should be set in any case when both IDE and libata drivers are present in the configuration, even if both of them are modular. Checking for IDE=y breaks existing configurations with modular IDE drivers, because without SCSI_SATA_INTEL_COMBINED there is no way to use libata drivers for SATA and IDE drivers for PATA.

drivers/scsi/Kconfig renamed from drivers/scsi/Kconfig.alt-intel-combined +1 -1
@@ -555,7 +555,7 @@ config SCSI_SATA_VITESSE
 
 config SCSI_SATA_INTEL_COMBINED
 	bool
-	depends on IDE=y && !BLK_DEV_IDE_SATA && (SCSI_SATA_AHCI || SCSI_ATA_PIIX)
+	depends on IDE && !BLK_DEV_IDE_SATA && (SCSI_SATA_AHCI || SCSI_ATA_PIIX)
 	default y
 
 config SCSI_BUSLOGIC
#3 lore raw
Quoted 6 lines · Sergey Vlasov
Quoted 4 lines · On Fri, 02 Dec 2005 22:33:57 +0300 Sergei Organov wrote:

Sorry, but provided ata_piix has ignored the optical drive, couldn't corresponding I/O resource be left free so that subsequently loaded, say, generic-ide module is able to get over and support the drive?

Quoted 7 lines
Quoted 5 lines

BTW, loading the modules in reverse order helped on 2.6.13 kernel (that I'm currently using) as generic-ide didn't recognize the hard-drive at all allowing ata_piix to get over it later. With 2.6.14 kernel generic-ide does recognize both hard-drive and optical drive thus preventing ata_piix from managing the hard-drive :(

See http://lkml.org/lkml/2005/10/18/167 and the reply to it :-\

Well, Jef's answer was:

This is a reasonable point, but the rare person who runs modular IDE on these PATA/SATA combined mode beasts can certainly tell the IDE driver to not probe certain ports.

I can say that the kernel I have problem with is from Debian "testing" distribution so those "rare person" going to become quite a few in the near future. Besides, Debian loads ata_piix first, then IDE, so telling the IDE to ignore certain ports won't help.

Though one can argue that that's yet another distribution problem, I fail to see a way for a distribution to overcome the problem provided it doesn't know the exact hardware it will run on. No hope for modularized kernel to run out of the box on given hardware?

Jeff, is there any hope it will be fixed in the kernel.org sources, or should I report the problem to Debian instead so that they consider maintaining their own patch?

Quoted 2 lines

If you want to build IDE as modules and still have support for combined mode, you will need the patch below:

Sergey, thanks for the patch, -- now I understand the origin of the problem and how to avoid it should I consider building the kernel myself.

-- Sergei.

#4 lore raw
Quoted 29 lines · Sergei Organov
Quoted 7 lines · Sergey Vlasov
Quoted 4 lines · On Fri, 02 Dec 2005 22:33:57 +0300 Sergei Organov wrote:

Sorry, but provided ata_piix has ignored the optical drive, couldn't corresponding I/O resource be left free so that subsequently loaded, say, generic-ide module is able to get over and support the drive?

Quoted 7 lines
Quoted 5 lines

BTW, loading the modules in reverse order helped on 2.6.13 kernel (that I'm currently using) as generic-ide didn't recognize the hard-drive at all allowing ata_piix to get over it later. With 2.6.14 kernel generic-ide does recognize both hard-drive and optical drive thus preventing ata_piix from managing the hard-drive :(

See http://lkml.org/lkml/2005/10/18/167 and the reply to it :-\

Well, Jef's answer was:

This is a reasonable point, but the rare person who runs modular IDE on these PATA/SATA combined mode beasts can certainly tell the IDE driver to not probe certain ports.

I can say that the kernel I have problem with is from Debian "testing" distribution so those "rare person" going to become quite a few in the near future. Besides, Debian loads ata_piix first, then IDE, so telling the IDE to ignore certain ports won't help.

Quoted 8 lines

Though one can argue that that's yet another distribution problem, I fail to see a way for a distribution to overcome the problem provided it doesn't know the exact hardware it will run on. No hope for modularized kernel to run out of the box on given hardware?

Jeff, is there any hope it will be fixed in the kernel.org sources, or should I report the problem to Debian instead so that they consider maintaining their own patch?

Debian doesn't need to maintain a patch, they should load modules in the proper order.

Jeff

#5 lore raw
Quoted 10 lines · Jeff Garzik
Quoted 9 lines · Sergei Organov
Quoted 7 lines · Sergey Vlasov
Quoted 4 lines · On Fri, 02 Dec 2005 22:33:57 +0300 Sergei Organov wrote:

Sorry, but provided ata_piix has ignored the optical drive, couldn't corresponding I/O resource be left free so that subsequently loaded, say, generic-ide module is able to get over and support the drive?

[...]

Quoted 16 lines
Quoted 16 lines
Quoted 1 line

See http://lkml.org/lkml/2005/10/18/167 and the reply to it :-\

Well, Jef's answer was:

This is a reasonable point, but the rare person who runs modular IDE on these PATA/SATA combined mode beasts can certainly tell the IDE driver to not probe certain ports.

I can say that the kernel I have problem with is from Debian "testing" distribution so those "rare person" going to become quite a few in the near future. Besides, Debian loads ata_piix first, then IDE, so telling the IDE to ignore certain ports won't help. Though one can argue that that's yet another distribution problem, I fail to see a way for a distribution to overcome the problem provided it doesn't know the exact hardware it will run on. No hope for modularized kernel to run out of the box on given hardware?

Quoted 6 lines
Quoted 3 lines

Jeff, is there any hope it will be fixed in the kernel.org sources, or should I report the problem to Debian instead so that they consider maintaining their own patch?

Debian doesn't need to maintain a patch, they should load modules in the proper order.

Do you mean that IDE then ata_piix is the right order? If so then the following arguments arise:

1. It still won't work out-of-the-box as some IDE ports should be explicitly disabled depending on particular hardware to get reasonable performance of the hard-drive (changing of device name from hd to sd at this point is another trouble). I don't think it's an acceptable solution for a distribution kernel.

2. I doubt it's a good idea for the kernel in general to depend on particular order of loading of modules when no explicit dependencies between the modules are specified.

3. Loading IDE first somewhat suggests IDE should be preferred over libata. Is it indeed true? ;)

Besides, does your answer mean that it won't indeed be changed in the official kernel or it's undecided yet?

-- Sergei.

#6 lore raw
In reply to Jeff Garzik
Quoted 6 lines · Jeff Garzik
Quoted 5 lines · Sergei Organov
Quoted 1 line · Sergey Vlasov

See http://lkml.org/lkml/2005/10/18/167 and the reply to it :-\

Well, Jef's answer was:

Quoted 8 lines
Quoted 8 lines

This is a reasonable point, but the rare person who runs modular IDE on these PATA/SATA combined mode beasts can certainly tell the IDE driver to not probe certain ports.

I can say that the kernel I have problem with is from Debian "testing" distribution so those "rare person" going to become quite a few in the near future. Besides, Debian loads ata_piix first, then IDE, so telling the IDE to ignore certain ports won't help.

mkinitrd in ALT Linux has some hacks to detect driver type (IDE or SCSI subsystem) and load all IDE drivers before SCSI - exactly for this reason.

Quoted 11 lines
Quoted 8 lines

Though one can argue that that's yet another distribution problem, I fail to see a way for a distribution to overcome the problem provided it doesn't know the exact hardware it will run on. No hope for modularized kernel to run out of the box on given hardware?

Jeff, is there any hope it will be fixed in the kernel.org sources, or should I report the problem to Debian instead so that they consider maintaining their own patch?

Debian doesn't need to maintain a patch, they should load modules in the proper order.

This will not help - without my patch the combined mode support code is not compiled if IDE is modular.