Port-sparc64 archive

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

Re: Netra X1 IDE controller/disk issues



Hi,

>   So, the next question falls to, is there anything that anyone can  
> think to try?  Or is it just a lost cause, and I should assume that  
> only one of my disks will run in Ultra-DMA mode?

I had similar problems on a Blade 100 (where I was running a pair of disks
as a RAID mirror).  The following in the kernel configuration made things
stable for me:

  # Disable UDMA 5 & 6 for disks (buggy Acer IDE)
  wd*   at atabus? drive ? flags 0x0c00
  # Disable UDMA and DMA for CD (buggy Acer IDE)
  cd*   at atapibus? drive ? flags 0x0ff0       # ATAPI CD-ROM drives

I also looked at the FreeBSD and linux drivers for the chip and saw there
were some minor initialisation differences (see attached).  However, adding
their changes didn't make any difference for me.

It seems that there is some problem with DMA, both on the ATAPI drives and,
also when you have a disk on the secondary channel.  I'm not 100% sure if
this is driver or hardware or (more likely) some combination of the two.  (I
haven't looked at the OpenSolaris code to see what they do.)

Thanks,

J

-- 
  My other computer also runs NetBSD    /        Sailing at Newbiggin
        http://www.netbsd.org/        /   http://www.newbigginsailingclub.org/
--- aceride.c   2008-11-03 09:11:34.000000000 +0000
+++ /usr/src/sys/dev/pci/aceride.c      2009-11-15 12:20:22.000000000 +0000
@@ -147,9 +147,19 @@
        sc->sc_wdcdev.sc_atac.atac_channels = sc->wdc_chanarray;
        sc->sc_wdcdev.sc_atac.atac_nchannels = PCIIDE_NUM_CHANNELS;
 
-       pciide_pci_write(sc->sc_pc, sc->sc_tag, ACER_CDRC,
-           (pciide_pci_read(sc->sc_pc, sc->sc_tag, ACER_CDRC) |
-               ACER_CDRC_DMA_EN) & ~ACER_CDRC_FIFO_DISABLE);
+       /* Enable CD DMA */
+       if (rev <= 0x20)
+               pciide_pci_write(sc->sc_pc, sc->sc_tag, ACER_CDRC,
+                   (pciide_pci_read(sc->sc_pc, sc->sc_tag, ACER_CDRC) |
+                       ACER_CDRC_DMA_EN) & ~ACER_CDRC_FIFO_DISABLE);
+       else if (rev == 0xc7)
+               pciide_pci_write(sc->sc_pc, sc->sc_tag, ACER_CDRC,
+                   (pciide_pci_read(sc->sc_pc, sc->sc_tag, ACER_CDRC) |
+                       ACER_CDRC_DMA_EN) | ACER_CDRC_FIFO_DISABLE);
+       else
+               pciide_pci_write(sc->sc_pc, sc->sc_tag, ACER_CDRC,
+                   pciide_pci_read(sc->sc_pc, sc->sc_tag, ACER_CDRC) |
+                       ACER_CDRC_DMA_EN);
 
        /* Enable "microsoft register bits" R/W. */
        pciide_pci_write(sc->sc_pc, sc->sc_tag, ACER_CCAR3,
@@ -187,8 +197,13 @@
        interface = PCI_INTERFACE(pci_conf_read(sc->sc_pc, sc->sc_tag,
            PCI_CLASS_REG));
 
-       /* From linux: enable "Cable Detection" */
        if (rev >= 0xC2) {
+               /* From FreeBSD: use device interrupt as byte count end */
+               pciide_pci_write(sc->sc_pc, sc->sc_tag, ACER_0x4A,
+                   pciide_pci_read(sc->sc_pc, sc->sc_tag, ACER_0x4A)
+                   | ACER_0x4A_BCEINT);
+
+               /* From Linux: enable "Cable Detection" */
                pciide_pci_write(sc->sc_pc, sc->sc_tag, ACER_0x4B,
                    pciide_pci_read(sc->sc_pc, sc->sc_tag, ACER_0x4B)
                    | ACER_0x4B_CDETECT);


Home | Main Index | Thread Index | Old Index