Messages in this thread Patch in this message | | | From | \"Björn L. Þórðarson\" <> | Subject | Patch to allow AHA-1542 to use DMA0 | Date | Wed, 29 Jul 1998 09:37:41 -0000 |
| |
Hi good folks,
I can´t find the current maintainer for AHA-1542 scsi adapter in the maintainers list. Therefore I am sending the patch to the general kernel list where I hope the current maintainer of the stable/developers kernel will include it if the patch seems ok to them!
Best regards, Björn L. Þórðarson
--- linux/drivers/scsi/aha1542.c.orig Fri Feb 28 23:14:18 1997 +++ linux/drivers/scsi/aha1542.c Mon Jul 13 13:33:57 1998 @@ -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 + * Allow use of DMA priority 0 -- 13-Jul-98 */ #include <linux/module.h> @@ -89,13 +91,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 */ @@ -748,8 +743,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. */ @@ -1019,9 +1014,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;
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html
| |