[patch] Re: PYXIS bug detection

From: Ivan Kokshaysky (ink@jurassic.park.msu.ru)
Date: Fri Dec 14 2001 - 10:35:42 EST


On Thu, Dec 13, 2001 at 02:59:11PM -0500, Jay Estabrook wrote:
> On Thu, Dec 13, 2001 at 10:51:29PM +0300, Ivan Kokshaysky wrote:
> >
> > BTW, yet another idea: since the bug affects only scatter/gather DMA, what
> > if we'll disable sg windows completely on affected machines? ;-)
> > It would be generic fix, not only for bus mastering IDE.
>
> That's what was done here for NT on MIATAs, IIRC; no S/G.
>
> Does our Linux pci_iommu code failover to use direct correctly in all
> the cases, ie not only map_single but (epecially) map_sg? Actually,
> it's really only the latter that is necessary to check, as map_single
> will always use direct when possible, and it should always be possible
> on MIATA (because it can't have more than 2GB of memory).

Yes - nautilus works this way. I also checked that my sx164 is quite
happy with disabled s/g.

It seems that there is another way to distinguish old MIATA from
MIATA GL - according the comment in miata_init_pci() the latter
has SMC37c669 chip, and the former doesn't.
Jay, can you confirm that? If so, the fix is quite simple.

Ivan.

--- 2.4.17-rc1/arch/alpha/kernel/smc37c669.c Fri Feb 9 22:29:44 2001
+++ linux/arch/alpha/kernel/smc37c669.c Fri Dec 14 12:49:39 2001
@@ -2528,7 +2528,7 @@ SMC37c669_dump_registers(void)
  *
  * RETURNS:
  *
- * Nothing
+ * 1 if the chip found, 0 otherwise
  *
  * ARGUMENTS:
  *
@@ -2539,7 +2539,7 @@ SMC37c669_dump_registers(void)
  * None
  *
  */
-void __init SMC669_Init ( int index )
+int __init SMC669_Init ( int index )
 {
     SMC37c669_CONFIG_REGS *SMC_base;
     unsigned long flags;
@@ -2602,11 +2602,13 @@ void __init SMC669_Init ( int index )
         __restore_flags(flags);
         printk( "SMC37c669 Super I/O Controller found @ 0x%lx\n",
                 (unsigned long) SMC_base );
+ return 1;
     }
     else {
         __restore_flags(flags);
 #if SMC_DEBUG
         printk( "No SMC37c669 Super I/O Controller found\n" );
 #endif
+ return 0;
     }
 }
--- 2.4.17-rc1/arch/alpha/kernel/sys_miata.c Mon Nov 26 18:10:42 2001
+++ linux/arch/alpha/kernel/sys_miata.c Fri Dec 14 13:12:47 2001
@@ -230,7 +230,15 @@ static void __init
 miata_init_pci(void)
 {
         cia_init_pci();
- SMC669_Init(0); /* it might be a GL (fails harmlessly if not) */
+ /* The PYXIS has data corruption problem with scatter/gather
+ burst DMA reads crossing 8K boundary. It had been fixed
+ using off-chip logic on all PYXIS systems except first
+ MIATAs, so disable SG DMA on such machines. */
+ if (!SMC669_Init(0)) { /* MIATA GL has SMC37c669 Super I/O */
+ alpha_mv.mv_pci_tbi = NULL;
+ printk(KERN_INFO "pci: pyxis 8K boundary dma bug - "
+ "sg dma disabled\n");
+ }
         es1888_init();
 }
 
-
To unsubscribe from this list: send the line "unsubscribe linux-alpha" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html



This archive was generated by hypermail 2b29 : Sat Dec 15 2001 - 21:00:33 EST