All of lore.kernel.org
 help / color / mirror / Atom feed
* PATA handling on ICH5R in 2.6.8rc2
@ 2004-08-04 16:45 Andi Kleen
  2004-08-04 17:26 ` Jens Axboe
  0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2004-08-04 16:45 UTC (permalink / raw)
  To: jgarzik; +Cc: B.Zolnierkiewicz, linux-ide, axboe, jun.nakajima


Hallo,

I have a machine with a ICH5R southbridge and a PATA DVD hanging off it.
When I compile the kernel without CONFIG_BLK_DEV_IDE_SATA then the old IDE driver
detects the DVD anyways, but refuses to enable DMA (because the PCI ID entry
is not compiled into piix.c). It doesn't even disable -u1 which causes quite
some problems when accessing the CD ROM: I get endless floods of "too many lost
ticks", which means it has spent more than 100 jiffies with interrupts off
doing something. I fixed this with hdparm -u1, but it's still quite slow
with DMA off.

I could enable BLK_DEV_IDE_SATA, but then the old IDE driver would 
try to drive all SATA drives, which would be wrong I guess.

I presume the right way to fix it would be to always readd the PCI ID
entry for 82801EB_1 to piix.c, but only let it be handled by the old 
driver when there is a PATA DVD on the controller (and leave the other
controllers to libata). Still this could get conflicts when there is a
real SATA device on the same controller (can this happen?) 

For that the piix.c probe function would just need to do a quick
cable check and ignore the device when it is SATA and when BLK_DEV_IDE_SATA 
is unset. I looked through the  Intel ICH5 manuals, but it was not obvious to 
me how to probe this non intrusively. I suppose one way would be to go through
the full IDE driver initialization for the drive, and then when SATA is 
detected bail out again and reset the controller and leave it for libata.

Or drive the DVD always with libata? Does it have an working ATAPI driver yet?

Is there a better solution for this problem? 

Thanks,
-Andi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATA handling on ICH5R in 2.6.8rc2
  2004-08-04 16:45 PATA handling on ICH5R in 2.6.8rc2 Andi Kleen
@ 2004-08-04 17:26 ` Jens Axboe
  2004-08-04 17:36   ` Andi Kleen
  0 siblings, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2004-08-04 17:26 UTC (permalink / raw)
  To: Andi Kleen; +Cc: jgarzik, B.Zolnierkiewicz, linux-ide, jun.nakajima

On Wed, Aug 04 2004, Andi Kleen wrote:
> 
> Hallo,
> 
> I have a machine with a ICH5R southbridge and a PATA DVD hanging off
> it.  When I compile the kernel without CONFIG_BLK_DEV_IDE_SATA then
> the old IDE driver detects the DVD anyways, but refuses to enable DMA
> (because the PCI ID entry is not compiled into piix.c). It doesn't
> even disable -u1 which causes quite some problems when accessing the
> CD ROM: I get endless floods of "too many lost ticks", which means it
> has spent more than 100 jiffies with interrupts off doing something. I
> fixed this with hdparm -u1, but it's still quite slow with DMA off.
> 
> I could enable BLK_DEV_IDE_SATA, but then the old IDE driver would try
> to drive all SATA drives, which would be wrong I guess.
> 
> I presume the right way to fix it would be to always readd the PCI ID
> entry for 82801EB_1 to piix.c, but only let it be handled by the old
> driver when there is a PATA DVD on the controller (and leave the other
> controllers to libata). Still this could get conflicts when there is a
> real SATA device on the same controller (can this happen?) 
> 
> For that the piix.c probe function would just need to do a quick cable
> check and ignore the device when it is SATA and when BLK_DEV_IDE_SATA
> is unset. I looked through the  Intel ICH5 manuals, but it was not
> obvious to me how to probe this non intrusively. I suppose one way
> would be to go through the full IDE driver initialization for the
> drive, and then when SATA is detected bail out again and reset the
> controller and leave it for libata.
> 
> Or drive the DVD always with libata? Does it have an working ATAPI
> driver yet?
> 
> Is there a better solution for this problem? 

Can't you set it to enhanced mode in the bios, then shows up as a
seperate device id and just works. I had the same issue until Jeff
walked me through it :-)

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATA handling on ICH5R in 2.6.8rc2
  2004-08-04 17:26 ` Jens Axboe
@ 2004-08-04 17:36   ` Andi Kleen
  2004-08-04 19:20     ` Jeff Garzik
  0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2004-08-04 17:36 UTC (permalink / raw)
  To: Jens Axboe; +Cc: jgarzik, B.Zolnierkiewicz, linux-ide, jun.nakajima

On Wed, 4 Aug 2004 19:26:10 +0200
Jens Axboe <axboe@suse.de> wrote:


> Can't you set it to enhanced mode in the bios, then shows up as a
> seperate device id and just works. I had the same issue until Jeff
> walked me through it :-)

If that really solves all problems why does quirk_intel_ide_combined
not do that automatically? 

It seems very user unfriendly to me to require such magic BIOS 
settings.

-Andi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATA handling on ICH5R in 2.6.8rc2
  2004-08-04 17:36   ` Andi Kleen
@ 2004-08-04 19:20     ` Jeff Garzik
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2004-08-04 19:20 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Jens Axboe, B.Zolnierkiewicz, linux-ide, jun.nakajima

On Wed, Aug 04, 2004 at 07:36:08PM +0200, Andi Kleen wrote:
> On Wed, 4 Aug 2004 19:26:10 +0200
> Jens Axboe <axboe@suse.de> wrote:
> 
> 
> > Can't you set it to enhanced mode in the bios, then shows up as a
> > seperate device id and just works. I had the same issue until Jeff
> > walked me through it :-)
> 
> If that really solves all problems why does quirk_intel_ide_combined
> not do that automatically? 

I would like to do that.

The problem is allocating and assigning PCI I/O ranges to one or two PCI
devices.  And the BIOS may configure into combined mode, and get
confused if the kernel prefers enhanced mode (untested).

	Jeff




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-08-04 19:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-04 16:45 PATA handling on ICH5R in 2.6.8rc2 Andi Kleen
2004-08-04 17:26 ` Jens Axboe
2004-08-04 17:36   ` Andi Kleen
2004-08-04 19:20     ` Jeff Garzik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.