Port-mips archive

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

Re: recent mips updates causes asc0 problems on pmax port



> When booting a pmax kernel on a DECStation 5000 with a kernel built
> from sources current as of yesterday, I see several messages
> apparently indicating SCSI or disk problems:
 :
> ioasic_intr: xfer (-33552896) > req (2048)
> asc0: !TC on DATA XFER [intr 10, stat 87, step 4] prevphase 1, resid 800
> asc0: !TC on DATA XFER [intr 10, stat 83, step 4] prevphase 1, resid 0

Sorry, it's my fault, not recent mips changes.

Could you please try the following fix?

---
Index: asc_ioasic.c
===================================================================
RCS file: /cvsroot/src/sys/arch/pmax/tc/asc_ioasic.c,v
retrieving revision 1.21
diff -u -r1.21 asc_ioasic.c
--- asc_ioasic.c        1 Aug 2009 08:20:36 -0000       1.21
+++ asc_ioasic.c        11 Aug 2009 06:40:35 -0000
@@ -71,11 +71,11 @@
 };
 
 #define        ASC_READ_REG(asc, reg)                                          
\
-       bus_space_read_4((asc)->sc_bst, (asc)->sc_scsi_bsh,             \
-           (reg) * sizeof(uint32_t))
+       ((uint8_t)bus_space_read_4((asc)->sc_bst, (asc)->sc_scsi_bsh,   \
+           (reg) * sizeof(uint32_t)))
 #define        ASC_WRITE_REG(asc, reg, val)                                    
\
        bus_space_write_4((asc)->sc_bst, (asc)->sc_scsi_bsh,            \
-           (reg) * sizeof(uint32_t), (val))
+           (reg) * sizeof(uint32_t), (uint8_t)(val))
 
 static int  asc_ioasic_match(device_t, cfdata_t, void *);
 static void asc_ioasic_attach(device_t, device_t, void *);
@@ -421,11 +421,8 @@
 asc_read_reg(struct ncr53c9x_softc *sc, int reg)
 {
        struct asc_softc *asc = (struct asc_softc *)sc;
-       uint32_t v;
 
-       v = ASC_READ_REG(asc, reg);
-
-       return v & 0xff;
+       return ASC_READ_REG(asc, reg);
 }
 
 static void

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index