Port-sparc64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Netra X1 with WD0 and AcerIDE



  Now many months later, I've gotten a chance to try this on my X1, running a 
recent (Feb 2011) netbsd-5.  I've verified that the code you added is in the 
sys/dev/pci/aceride.c in my tree, but it seems not to be doing what I expected.

  I don't see the message ("using PIO transfers above 137GB as workaround for 
48bit DMA access bug, expect reduced performance\n") when booting with -v, and 
upon fsck of the ccd device that uses all of the 232GB wd1, I see:

aceride0:1:0: lost interrupt
        type: ata tc_bcount: 2048 tc_skip: 0
aceride0:1:0: bus-master DMA error: missing interrupt, status=0x21
wd1: transfer error, downgrading to Ultra-DMA mode 3
wd1(aceride0:1:0): using PIO mode 4, Ultra-DMA mode 3 (using DMA)
wd1a: DMA error reading fsbn 487962400 of 487962400-487962403 (wd1 bn 
487963408; cn 484090 tn 10 sn 58), retrying
aceride0:1:0: lost interrupt
        type: ata tc_bcount: 2048 tc_skip: 0
aceride0:1:0: bus-master DMA error: missing interrupt, status=0x21
wd1: transfer error, downgrading to Ultra-DMA mode 2
wd1(aceride0:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)
wd1a: DMA error reading fsbn 487962400 of 487962400-487962403 (wd1 bn 
487963408; cn 484090 tn 10 sn 58), retrying
aceride0:1:0: lost interrupt
        type: ata tc_bcount: 2048 tc_skip: 0
aceride0:1:0: bus-master DMA error: missing interrupt, status=0x21
wd1: transfer error, downgrading to Ultra-DMA mode 1
wd1(aceride0:1:0): using PIO mode 4, Ultra-DMA mode 1 (using DMA)
wd1a: DMA error reading fsbn 487962400 of 487962400-487962403 (wd1 bn 
487963408; cn 484090 tn 10 sn 58), retrying
aceride0:1:0: lost interrupt
        type: ata tc_bcount: 2048 tc_skip: 0
aceride0:1:0: bus-master DMA error: missing interrupt, status=0x21
wd1: transfer error, downgrading to PIO mode 4
wd1(aceride0:1:0): using PIO mode 4
wd1a: DMA error reading fsbn 487962400 of 487962400-487962403 (wd1 bn 
487963408; cn 484090 tn 10 sn 58), retrying
wd1: soft error (corrected)
/dev/rccd0c: fie system is clean; not checking

  This was the same sort of behaviour I saw long ago, before I manually forced 
the wd1 device to be PIO only via kernel flags.

  Am I doing something wrong, or is this not yet working?  My aceride is:

aceride0 at pci0 dev 13 function 0
aceride0: Acer Labs M5229 UDMA IDE Controller (rev. 0xc3)
aceride0: bus-master DMA support present
aceride0: primary channel configured to native-PCI mode
aceride0: using ivec 180c for native-PCI interrupt
atabus0 at aceride0 channel 0
aceride0: secondary channel configured to native-PCI mode
atabus1 at aceride0 channel 1

  ...and again, this is in a Netra X1.

  Thanks...

                             - Chris


  
>>> Index: sys/dev/pci/aceride.c
>>> ===================================================================
>>> RCS file: /cvsroot/src/sys/dev/pci/aceride.c,v
>>> retrieving revision 1.27
>>> diff -u -d -r1.27 aceride.c
>>> --- sys/dev/pci/aceride.c   8 May 2010 19:49:02 -0000       1.27
>>> +++ sys/dev/pci/aceride.c   26 Oct 2010 13:12:03 -0000
>>> @@ -41,6 +41,7 @@
>>>  static void acer_chip_map(struct pciide_softc*, struct pci_attach_args*);
>>>  static void acer_setup_channel(struct ata_channel*);
>>>  static int  acer_pci_intr(void *);
>>> +static int  acer_dma_init(void *, int, int, void *, size_t, int);
>>> 
>>>  static int  aceride_match(device_t, cfdata_t, void *);
>>>  static void aceride_attach(device_t, device_t, void *);
>>> @@ -139,6 +140,12 @@
>>>                             sc->sc_wdcdev.sc_atac.atac_udma_cap = 2;
>>>             }
>>>             sc->sc_wdcdev.irqack = pciide_irqack;
>>> +           if (rev<= 0xc4) {
>>> +                   sc->sc_wdcdev.dma_init = acer_dma_init;
>>> +                   aprint_verbose_dev(sc->sc_wdcdev.sc_atac.atac_dev,
>>> +                    "using PIO transfer above 137GB as workaround for "
>>> +                    "48bit DMA access bug, expect reduced performance\n");
>>> +           }
>>>     }
>>> 
>>>     sc->sc_wdcdev.sc_atac.atac_pio_cap = 4;
>>> @@ -370,3 +377,15 @@
>>>     }
>>>     return rv;
>>>  }
>>> +
>>> +static int
>>> +acer_dma_init(void *v, int channel, int drive, void *databuf,
>>> +    size_t datalen, int flags)
>>> +{
>>> +
>>> +   /* use PIO for LBA48 transfer */
>>> +   if (flags&  WDC_DMA_LBA48)
>>> +           return EINVAL;
>>> +
>>> +   return pciide_dma_init(v, channel, drive, databuf, datalen, flags);
>>> +}
>>>     



Home | Main Index | Thread Index | Old Index