extern int cputype; /* XXX */
-#define KVTOPHYS(x) (((int)(x) & 0x7fffff) | 0x800000)
-#define PHYSTOKV(x) (((int)(x) & 0x7fffff) | (cputype == DESKSTATION_TYNE ? TYNE_V_BOUNCE : 0))
+#define KVTOPHYS(x) ((cputype == DESKSTATION_TYNE) ? \
+ (((int)(x) & 0x7fffff) | 0x800000) : ((int)(x)))
+#define PHYSTOKV(x) ((cputype == DESKSTATION_TYNE) ? \
+ (((int)(x) & 0x7fffff) | TYNE_V_BOUNCE) : ((int)(x)))
#include "aha.h"
#include "btl.h"
0,
};
+/* XXX static buffer as a kludge. DMA isn't cache coherent on the rpc44, so
+ * we always use uncached buffers for DMA. */
+static char rpc44_buffer[ TYNE_S_BOUNCE ];
+
/* the below structure is so we have a default dev struct for out link struct */
struct scsi_device bt_dev = {
NULL, /* Use default error handler */
bouncesize = TYNE_S_BOUNCE;
} else {
bouncesize = TYNE_S_BOUNCE; /* Good enough? XXX */
- bouncebase = (u_int) malloc( bouncesize, M_DEVBUF, M_NOWAIT);
- }
+/* bouncebase = (u_int) malloc( bouncesize, M_DEVBUF, M_NOWAIT);*/
+ bouncebase = (u_int) rpc44_buffer | 0xa0000000;
+ }
bouncearea = bouncebase + sizeof(struct bt_mbx);
sc->sc_mbx = (struct bt_mbx *)bouncebase;
#ifdef BTDEBUG
if (bt_debug) {
- u_char *cp = &ccb->scsi_cmd;
+ u_char *cp = (u_char *) &ccb->scsi_cmd;
printf("op=%x %x %x %x %x %x\n",
cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]);
printf("stat %x for mbi addr = 0x%08x, ",