lkml.org 
[lkml]   [2000]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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))
\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.086 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site