Messages in this thread Patch in this message | | | Date | Fri, 3 Mar 2000 04:13:22 -0700 (MST) | From | Craig Kulesa <> | Subject | [PATCH] !CONFIG_PCI handling in scsi.h, for 2.3.49 |
| |
With changes made to the aic7xxx driver in 2.3.47+, the Adaptec aic7xxx driver yields undefined references (breaking compilation) when building without PCI support. This is bad news for those using the EISA Adaptec 274x and VESA Adaptec 284x cards.
The offending function is scsi_to_pci_dma_dir(), which is defined in drivers/scsi/scsi.h, but only if CONFIG_PCI is set.
Attached is a patch, against 2.3.48[9], which fixes the problem for me (tested extensively on 486's w/o PCI, using Adaptec 2842 VLB cards). This patch keeps #ifdefs out of the driver code; instead it adds a compatibility inline function to drivers/scsi/scsi.h.
Another option is to leave scsi.h alone and patch the aic7xxx driver. I have also made an aic7xxx patch, available separately. Please email me if that is the preferred way to go.
Best regards,
Craig Kulesa Steward Observatory ======================================================================== --- linux/drivers/scsi/scsi.h.orig Wed Mar 1 19:40:42 2000 +++ linux/drivers/scsi/scsi.h Fri Mar 3 01:42:27 2000 @@ -61,6 +61,10 @@ #endif #endif +#ifndef CONFIG_PCI +extern __inline__ int scsi_to_pci_dma_dir(unsigned char scsi_dir) { return 0; } +#endif + #ifdef CONFIG_SBUS #include <asm/sbus.h> #if ((SCSI_DATA_UNKNOWN == SBUS_DMA_BIDIRECTIONAL) && (SCSI_DATA_WRITE == SBUS_DMA_TODEVICE) && (SCSI_DATA_READ == SBUS_DMA_FROMDEVICE) && (SCSI_DATA_NONE == SBUS_DMA_NONE))
| |