Subject: Re: kern/15841 More info about WDC/ATA PCMCIA and CardBus problems using flash (i.e., not with microdrive)
To: Tad Hunt <tad@entrisphere.com>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 03/28/2002 23:52:27
--ZPt4rx8FFjLCG7dd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Wed, Mar 27, 2002 at 02:19:20PM -0800, Tad Hunt wrote:
>
> I just had one of our hardware engineers change the PCMCIA interface
> on our MPC8260 board so I can demultiplex the pcmcia interrupts
> from the other interrupts on the same irq line (aren't PALs great!).
> Anyway, the problem described in PR kern/15841 still exists when
> using the flash ATA PC Card.
>
> As before the jammed interrupt problem never occurs with the IBM
> Microdrive (side note: believe it or not, the microdrive is faster
> for both reading and writing than the flash disk!).
>
> In summary, the problem is that the flash disk is asserting the
> interrupt request, but the WDCF_IRQ_WAIT bit is not set in the
> "channel_softc", so the interrupt is never serviced.
>
> I see the same problem on the "stock" NetBSD-1.5 i386 port (a Dell
> with a cardbus card in a PCI slot) as I do on our MPC8260 port,
> which leads me to believe that it is a general problem.
>
> I see the same behavior with both of the following flash disk parts
> (the only ones I have been able to test with so far):
>
> 1) SMART Modular Technologies ATA PC Card (model SM9FLAPC512M1)
>
> NetBSD identifies this as follows:
>
> wdc0 at pcmcia0 function 0 port 0x15000000-0x1500000f
> wd0 at wdc0 channel 0 drive 0: <SMART ATA FLASH>
> wd0: drive supports 1-sector PIO transfers, LBA addressing
> wd0: 489 MB, 994 cyl, 16 head, 63 sec, 512 bytes/sect x 1001952 sectors
> wd0: drive supports PIO mode 4
>
> 2) AVL Compact Flash Card 128MB (unknown model number)
>
> NetBSD identifies this as follows:
>
> wdc0 at pcmcia0 function 0 port 0x15000000-0x1500000f
> wd0 at wdc0 channel 0 drive 0: <Ritek Corporation>
> wd0: drive supports 1-sector PIO transfers, LBA addressing
> wd0: 122 MB, 978 cyl, 8 head, 32 sec, 512 bytes/sect x 250368 sectors
Hi,
I just commited the attached patch to current. Does it solve your problem ?
--
Manuel Bouyer <bouyer@antioche.eu.org>
--
--ZPt4rx8FFjLCG7dd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff
Index: wdc.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/ic/wdc.c,v
retrieving revision 1.112
diff -u -r1.112 wdc.c
--- wdc.c 2002/03/08 20:48:38 1.112
+++ wdc.c 2002/03/28 22:46:40
@@ -714,6 +714,8 @@
}
if ((chp->ch_flags & WDCF_IRQ_WAIT) == 0) {
WDCDEBUG_PRINT(("wdcintr: inactive controller\n"), DEBUG_INTR);
+ /* try to clear the pending interrupt anyway */
+ (void)bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_status);
return (0);
}
--ZPt4rx8FFjLCG7dd--