patch-2.1.125 linux/drivers/scsi/aha1542.c
Next file: linux/drivers/scsi/aic7xxx/aic7xxx.reg
Previous file: linux/drivers/scsi/README.aic7xxx
Back to the patch index
Back to the overall index
- Lines: 47
- Date:
Wed Oct 7 15:52:55 1998
- Orig file:
v2.1.124/linux/drivers/scsi/aha1542.c
- Orig date:
Wed Sep 9 14:51:08 1998
diff -u --recursive --new-file v2.1.124/linux/drivers/scsi/aha1542.c linux/drivers/scsi/aha1542.c
@@ -16,6 +16,8 @@
* Modified by Mike McLagan <mike.mclagan@linux.org>
* Recognise extended mode on AHA1542CP, different bit than 1542CF
* 1-Jan-97
+ * Modified by Bjorn L. Thordarson and Einar Thor Einarsson
+ * Recognize that DMA0 is valid DMA channel -- 13-Jul-98
*/
#include <linux/module.h>
@@ -98,13 +100,6 @@
* Factory default is 5 MB/s.
*/
-
-/* The DMA-Controller. We need to fool with this because we want to
- be able to use the aha1542 without having to have the bios enabled */
-#define DMA_MODE_REG 0xd6
-#define DMA_MASK_REG 0xd4
-#define CASCADE 0xc0
-
#define BIOS_TRANSLATION_1632 0 /* Used by some old 1542A boards */
#define BIOS_TRANSLATION_6432 1 /* Default case these days */
#define BIOS_TRANSLATION_25563 2 /* Big disk case */
@@ -767,8 +762,8 @@
*dma_chan = 5;
break;
case 0x01:
- printk("DMA priority 0 not available for Adaptec driver\n");
- return -1;
+ *dma_chan = 0;
+ break;
case 0:
/* This means that the adapter, although Adaptec 1542 compatible, doesn't use a DMA channel.
Currently only aware of the BusLogic BT-445S VL-Bus adapter which needs this. */
@@ -1038,9 +1033,9 @@
goto unregister;
}
- if (dma_chan >= 5) {
- outb((dma_chan - 4) | CASCADE, DMA_MODE_REG);
- outb(dma_chan - 4, DMA_MASK_REG);
+ if (dma_chan == 0 || dma_chan >= 5) {
+ set_dma_mode(dma_chan, DMA_MODE_CASCADE);
+ enable_dma(dma_chan);
}
}
aha_host[irq_level - 9] = shpnt;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov