linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3] ide: fix drive_is_ready() for non-PCI hosts and CONFIG_IDEPCI_SHARE_IRQ=y
@ 2007-10-25 23:36 Bartlomiej Zolnierkiewicz
  2007-10-26  0:05 ` Alan Cox
  0 siblings, 1 reply; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-10-25 23:36 UTC (permalink / raw)
  To: linux-ide; +Cc: linux-kernel


Need to check if the host is a PCI one before reading IDE_ALTSTATUS_REG.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide-iops.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/drivers/ide/ide-iops.c
===================================================================
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -455,7 +455,7 @@ int drive_is_ready (ide_drive_t *drive)
 	 * an interrupt with another pci card/device.  We make no assumptions
 	 * about possible isa-pnp and pci-pnp issues yet.
 	 */
-	if (IDE_CONTROL_REG)
+	if (hwif->pci_dev && IDE_CONTROL_REG)
 		stat = hwif->INB(IDE_ALTSTATUS_REG);
 	else
 #endif /* CONFIG_IDEPCI_SHARE_IRQ */

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

* Re: [PATCH 2/3] ide: fix drive_is_ready() for non-PCI hosts and CONFIG_IDEPCI_SHARE_IRQ=y
  2007-10-25 23:36 [PATCH 2/3] ide: fix drive_is_ready() for non-PCI hosts and CONFIG_IDEPCI_SHARE_IRQ=y Bartlomiej Zolnierkiewicz
@ 2007-10-26  0:05 ` Alan Cox
  2007-10-26  0:30   ` Bartlomiej Zolnierkiewicz
  2007-10-26  0:42   ` Jeff Garzik
  0 siblings, 2 replies; 6+ messages in thread
From: Alan Cox @ 2007-10-26  0:05 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, linux-kernel

On Fri, 26 Oct 2007 01:36:37 +0200
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:

> 
> Need to check if the host is a PCI one before reading IDE_ALTSTATUS_REG.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Umm why ? The altstatus register goes back to ST-506 and the original IBM
XT hard disk controller card ?

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

* Re: [PATCH 2/3] ide: fix drive_is_ready() for non-PCI hosts and CONFIG_IDEPCI_SHARE_IRQ=y
  2007-10-26  0:05 ` Alan Cox
@ 2007-10-26  0:30   ` Bartlomiej Zolnierkiewicz
  2007-10-26  0:35     ` Alan Cox
  2007-10-26  0:42   ` Jeff Garzik
  1 sibling, 1 reply; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-10-26  0:30 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-ide, linux-kernel

On Friday 26 October 2007, Alan Cox wrote:
> On Fri, 26 Oct 2007 01:36:37 +0200
> Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
> 
> > 
> > Need to check if the host is a PCI one before reading IDE_ALTSTATUS_REG.
> > 
> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> 
> Umm why ? The altstatus register goes back to ST-506 and the original IBM
> XT hard disk controller card ?

Thought that there have to be some (non-obvious) reason behing the fact that
IDE_ALTSTATUS_REG reading was covered by #ifdef CONFIG_IDEPCI_SHARE_IRQ.

However if this is the case patch #2/3 can be dumped and we can go straight
to patch #3/3.

Thanks,
Bart

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

* Re: [PATCH 2/3] ide: fix drive_is_ready() for non-PCI hosts and CONFIG_IDEPCI_SHARE_IRQ=y
  2007-10-26  0:30   ` Bartlomiej Zolnierkiewicz
@ 2007-10-26  0:35     ` Alan Cox
  0 siblings, 0 replies; 6+ messages in thread
From: Alan Cox @ 2007-10-26  0:35 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, linux-kernel

On Fri, 26 Oct 2007 02:30:52 +0200
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:

> On Friday 26 October 2007, Alan Cox wrote:
> > On Fri, 26 Oct 2007 01:36:37 +0200
> > Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
> > 
> > > 
> > > Need to check if the host is a PCI one before reading IDE_ALTSTATUS_REG.
> > > 
> > > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> > 
> > Umm why ? The altstatus register goes back to ST-506 and the original IBM
> > XT hard disk controller card ?
> 
> Thought that there have to be some (non-obvious) reason behing the fact that
> IDE_ALTSTATUS_REG reading was covered by #ifdef CONFIG_IDEPCI_SHARE_IRQ.

Only that reading altstatus is done to get the state without clearing the
IRQ which a status read would do.

Alan

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

* Re: [PATCH 2/3] ide: fix drive_is_ready() for non-PCI hosts and CONFIG_IDEPCI_SHARE_IRQ=y
  2007-10-26  0:05 ` Alan Cox
  2007-10-26  0:30   ` Bartlomiej Zolnierkiewicz
@ 2007-10-26  0:42   ` Jeff Garzik
  2007-10-26 11:53     ` Alan Cox
  1 sibling, 1 reply; 6+ messages in thread
From: Jeff Garzik @ 2007-10-26  0:42 UTC (permalink / raw)
  To: Alan Cox; +Cc: Bartlomiej Zolnierkiewicz, linux-ide, linux-kernel

Alan Cox wrote:
> On Fri, 26 Oct 2007 01:36:37 +0200
> Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
> 
>> Need to check if the host is a PCI one before reading IDE_ALTSTATUS_REG.
>>
>> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> 
> Umm why ? The altstatus register goes back to ST-506 and the original IBM
> XT hard disk controller card ?

I'm pretty sure there are at least a few controllers out there where the 
AltStatus/Control register block is simply non-existent.

	Jeff




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

* Re: [PATCH 2/3] ide: fix drive_is_ready() for non-PCI hosts and CONFIG_IDEPCI_SHARE_IRQ=y
  2007-10-26  0:42   ` Jeff Garzik
@ 2007-10-26 11:53     ` Alan Cox
  0 siblings, 0 replies; 6+ messages in thread
From: Alan Cox @ 2007-10-26 11:53 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Bartlomiej Zolnierkiewicz, linux-ide, linux-kernel

On Thu, 25 Oct 2007 20:42:16 -0400
Jeff Garzik <jeff@garzik.org> wrote:

> Alan Cox wrote:
> > On Fri, 26 Oct 2007 01:36:37 +0200
> > Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
> > 
> >> Need to check if the host is a PCI one before reading IDE_ALTSTATUS_REG.
> >>
> >> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> > 
> > Umm why ? The altstatus register goes back to ST-506 and the original IBM
> > XT hard disk controller card ?
> 
> I'm pretty sure there are at least a few controllers out there where the 
> AltStatus/Control register block is simply non-existent.

One or two of the commode Amiga controllers did this. Makes error
recovery rather interesting. The register itself is however present even
on things like the WD10xx devices.

Alan

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

end of thread, other threads:[~2007-10-26 11:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-25 23:36 [PATCH 2/3] ide: fix drive_is_ready() for non-PCI hosts and CONFIG_IDEPCI_SHARE_IRQ=y Bartlomiej Zolnierkiewicz
2007-10-26  0:05 ` Alan Cox
2007-10-26  0:30   ` Bartlomiej Zolnierkiewicz
2007-10-26  0:35     ` Alan Cox
2007-10-26  0:42   ` Jeff Garzik
2007-10-26 11:53     ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).