summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1995-12-07 09:13:48 +0000
committerpeter <peter@FreeBSD.org>1995-12-07 09:13:48 +0000
commit53a232b78efd4ef6c84ff8047a3a43c3d8cf0a25 (patch)
treea770e07be3a77aa51fc72efd03b8a26a1d04fe9e
parentc0273b2f6435eb28e855bdccf8752c6bce096291 (diff)
downloadFreeBSD-src-53a232b78efd4ef6c84ff8047a3a43c3d8cf0a25.zip
FreeBSD-src-53a232b78efd4ef6c84ff8047a3a43c3d8cf0a25.tar.gz
Implement detection of whether or not bounce-buffering is required
for the particular card in use. At the moment, I've set it to any of the bt445S VLB cards (not the bt445C which apparently work) and the bt5xx series (isa cards). The 742 and PCI cards should not need it. :-) It may be useful to have something like this: #ifndef BOUNCE_BUFFERS if (bounce_buffers_required && more_than_16MB_ram) panic("this card requires bounce buffers for more than 16MB ram!") #endif
-rw-r--r--sys/i386/isa/bt742a.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/i386/isa/bt742a.c b/sys/i386/isa/bt742a.c
index 8ab3c56..a092cea 100644
--- a/sys/i386/isa/bt742a.c
+++ b/sys/i386/isa/bt742a.c
@@ -12,7 +12,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
- * $Id: bt742a.c,v 1.43 1995/11/04 17:07:08 bde Exp $
+ * $Id: bt742a.c,v 1.44 1995/12/06 23:50:06 bde Exp $
*/
/*
@@ -382,6 +382,7 @@ struct bt_data {
int bt_dma; /* DMA channel read of board */
int bt_scsi_dev; /* adapters scsi id */
int numccbs; /* how many we have malloc'd */
+ int bt_bounce; /* should we bounce? */
struct scsi_link sc_link; /* prototype for devs */
} *btdata[NBT];
@@ -702,7 +703,7 @@ btattach(dev)
bt->sc_link.adapter_targ = bt->bt_scsi_dev;
bt->sc_link.adapter = &bt_switch;
bt->sc_link.device = &bt_dev;
- bt->sc_link.flags = SDEV_BOUNCE;
+ bt->sc_link.flags = bt->bt_bounce ? SDEV_BOUNCE : 0;
/*
* Prepare the scsibus_data area for the upperlevel
@@ -1173,15 +1174,21 @@ bt_init(unit)
return (ENXIO);
break;
}
- if ( binfo.id[0] == '5' ) {
+ if ( binfo.id[0] == '4' && binfo.id[1] == '4' && binfo.id[2] == '5' &&
+ binfo.id[3] == 'S' ) {
+ printf("bt%d: Your card cannot DMA above 16MB boundary. Bounce buffering enabled.\n", unit);
+ bt->bt_bounce++;
+ } else if ( binfo.id[0] == '5' ) {
printf("bt%d: This driver is designed for using 32 bit addressing\n",unit);
printf("bt%d: mode firmware and EISA/PCI/VLB bus architectures\n",unit);
printf("bt%d: Bounce-buffering will be used (and is necessary)\n", unit);
printf("bt%d: if you have more than 16MBytes memory.\n",unit);
+ bt->bt_bounce++;
} else if ( info.bus_type == BT_BUS_TYPE_24bit ) {
printf("bt%d: Your board should report a 32bit bus architecture type..\n",unit);
printf("bt%d: The firmware on your board may have a problem with over\n",unit);
printf("bt%d: 16MBytes memory handling with this driver.\n",unit);
+ bt->bt_bounce++;
}
/*
OpenPOWER on IntegriCloud