Subject: pdcide also has the problem (Re: Problems with rccide0)
To: None <current-users@NetBSD.org>
From: Ryo HAYASAKA <ryoh@m3.dion.ne.jp>
List: current-users
Date: 12/04/2003 02:07:42
Hi,
It seems that pdcide also has the similar problem, which causes booting
process hang. The following is the booting message of my machine:
---------------------------------------------------------------------------
NetBSD 1.6ZF (BONNIE) #396: Thu Dec 4 00:15:34 JST 2003
(snip)
pdcide0 at pci0 dev 9 function 0
pdcide0: Promise Ultra100TX2/ATA Bus Master IDE Accelerator (rev. 0x01)
pdcide0: bus-master DMA support present
pdcide0: primary channel configured to native-PCI mode
pdcide0: using irq 12 for native-PCI interrupt
atabus0 at pdcide0 channel 0
pdcide0: secondary channel configured to native-PCI mode
atabus1 at pdcide0 channel 1
(snip)
Kernelized RAIDframe activated
vinum: loaded
IPsec: Initialized Security Association Processing.
scsibus0: waiting 2 seconds for devices to settle...
<It hangs here!>
---------------------------------------------------------------------------
If I change pdcide.c just for a test as follows, it successfully boots
up.
Index: pdcide.c
===================================================================
RCS file: /usr/cvsup/src/sys/dev/pci/pdcide.c,v
retrieving revision 1.9
diff -d -p -u -r1.9 pdcide.c
--- pdcide.c 27 Nov 2003 23:02:40 -0000 1.9
+++ pdcide.c 3 Dec 2003 15:13:58 -0000
@@ -522,7 +522,9 @@ pdc20265_pci_intr(void *arg)
struct pciide_channel *cp;
struct channel_softc *wdc_cp;
int i, rv, crv;
+ /*
u_int32_t dmastat;
+ */
rv = 0;
for (i = 0; i < sc->sc_wdcdev.nchannels; i++) {
@@ -542,15 +544,21 @@ pdc20265_pci_intr(void *arg)
* So use it instead (requires 2 reg reads instead of 1,
* but we can't do it another way).
*/
+ /*
dmastat = bus_space_read_1(sc->sc_dma_iot,
cp->dma_iohs[IDEDMA_CTL], 0);
if((dmastat & IDEDMA_CTL_INTR) == 0)
continue;
+ */
crv = wdcintr(wdc_cp);
+ /*
if (crv == 0)
printf("%s:%d: bogus intr\n",
sc->sc_wdcdev.sc_dev.dv_xname, i);
else
+ rv = 1;
+ */
+ if (crv != 0)
rv = 1;
}
return rv;
--
Ryo HAYASAKA <ryoh@m3.dion.ne.jp>