patch-2.4.21 linux-2.4.21/drivers/scsi/aic7xxx/aic7xxx_osm.h

Next file: linux-2.4.21/drivers/scsi/aic7xxx/aicasm/aicasm.c
Previous file: linux-2.4.21/drivers/scsi/aic7xxx/aic7xxx_osm.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/drivers/scsi/aic7xxx/aic7xxx_osm.h linux-2.4.21/drivers/scsi/aic7xxx/aic7xxx_osm.h
@@ -635,6 +635,7 @@
 
 static __inline uint8_t ahc_inb(struct ahc_softc * ahc, long port);
 static __inline void ahc_outb(struct ahc_softc * ahc, long port, uint8_t val);
+static __inline void ahc_outb_reset(struct ahc_softc * ahc, long port, uint8_t val);
 static __inline void ahc_outsb(struct ahc_softc * ahc, long port,
 			       uint8_t *, int count);
 static __inline void ahc_insb(struct ahc_softc * ahc, long port,
@@ -664,6 +665,22 @@
 #ifdef MMAPIO
 	if (ahc->tag == BUS_SPACE_MEMIO) {
 		writeb(val, ahc->bsh.maddr + port);
+		readb(ahc->bsh.maddr + HCNTRL); /* flush PCI posting */
+	} else {
+		outb(val, ahc->bsh.ioport + port);
+	}
+#else
+	outb(val, ahc->bsh.ioport + port);
+#endif
+	mb();
+}
+
+static __inline void
+ahc_outb_reset(struct ahc_softc * ahc, long port, uint8_t val)
+{
+#ifdef MMAPIO
+	if (ahc->tag == BUS_SPACE_MEMIO) {
+		writeb(val, ahc->bsh.maddr + port);
 	} else {
 		outb(val, ahc->bsh.ioport + port);
 	}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)