diff options
author | Matthew Wilcox <matthew@wil.cx> | 2008-03-13 08:55:08 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-04-07 13:15:44 -0400 |
commit | 78b4b05db57b04b3ed17dc71259bf1402c04abfa (patch) | |
tree | 9d3100ad64dec6c5c3a9aa718682e13e3345c4d3 /drivers/scsi | |
parent | 5c815d1501a9ce84578cb3ec64c9d31ef91e3de2 (diff) |
[SCSI] BusLogic: make FlashPoint support x86-32 only
We've verified that there are 64 bit and endianness problems in the
flashpoint driver. Reverse the logic of CONFIG_OMIT_FLASHPOINT (make
it CONFIG_SCSI_FLASHPOINT) and make it depend on X86_32 so it can't
appear for any other architectures. Long term, if someone chooses,
they could make FlashPoint 64 bit compliant (it looks like its a
question of fixing up the sizes in some of the packed descriptors)
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/BusLogic.c | 5 | ||||
-rw-r--r-- | drivers/scsi/BusLogic.h | 21 | ||||
-rw-r--r-- | drivers/scsi/FlashPoint.c | 6 | ||||
-rw-r--r-- | drivers/scsi/Kconfig | 14 |
4 files changed, 17 insertions, 29 deletions
diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c index 4d3ebb1af490..2d689af24664 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c | |||
@@ -896,7 +896,7 @@ static int __init BusLogic_InitializeFlashPointProbeInfo(struct BusLogic_HostAda | |||
896 | IRQ_Channel = PCI_Device->irq; | 896 | IRQ_Channel = PCI_Device->irq; |
897 | IO_Address = BaseAddress0 = pci_resource_start(PCI_Device, 0); | 897 | IO_Address = BaseAddress0 = pci_resource_start(PCI_Device, 0); |
898 | PCI_Address = BaseAddress1 = pci_resource_start(PCI_Device, 1); | 898 | PCI_Address = BaseAddress1 = pci_resource_start(PCI_Device, 1); |
899 | #ifndef CONFIG_SCSI_OMIT_FLASHPOINT | 899 | #ifdef CONFIG_SCSI_FLASHPOINT |
900 | if (pci_resource_flags(PCI_Device, 0) & IORESOURCE_MEM) { | 900 | if (pci_resource_flags(PCI_Device, 0) & IORESOURCE_MEM) { |
901 | BusLogic_Error("BusLogic: Base Address0 0x%X not I/O for " "FlashPoint Host Adapter\n", NULL, BaseAddress0); | 901 | BusLogic_Error("BusLogic: Base Address0 0x%X not I/O for " "FlashPoint Host Adapter\n", NULL, BaseAddress0); |
902 | BusLogic_Error("at PCI Bus %d Device %d I/O Address 0x%X\n", NULL, Bus, Device, IO_Address); | 902 | BusLogic_Error("at PCI Bus %d Device %d I/O Address 0x%X\n", NULL, Bus, Device, IO_Address); |
@@ -1006,6 +1006,9 @@ static void __init BusLogic_InitializeProbeInfoList(struct BusLogic_HostAdapter | |||
1006 | } | 1006 | } |
1007 | 1007 | ||
1008 | 1008 | ||
1009 | #else | ||
1010 | #define BusLogic_InitializeProbeInfoList(adapter) \ | ||
1011 | BusLogic_InitializeProbeInfoListISA(adapter) | ||
1009 | #endif /* CONFIG_PCI */ | 1012 | #endif /* CONFIG_PCI */ |
1010 | 1013 | ||
1011 | 1014 | ||
diff --git a/drivers/scsi/BusLogic.h b/drivers/scsi/BusLogic.h index bfbfb5c3a8f6..73f237a1ed94 100644 --- a/drivers/scsi/BusLogic.h +++ b/drivers/scsi/BusLogic.h | |||
@@ -34,23 +34,6 @@ | |||
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | /* | 36 | /* |
37 | FlashPoint support is only available for the Intel x86 Architecture with | ||
38 | CONFIG_PCI set. | ||
39 | */ | ||
40 | |||
41 | #ifndef __i386__ | ||
42 | #undef CONFIG_SCSI_OMIT_FLASHPOINT | ||
43 | #define CONFIG_SCSI_OMIT_FLASHPOINT | ||
44 | #endif | ||
45 | |||
46 | #ifndef CONFIG_PCI | ||
47 | #undef CONFIG_SCSI_OMIT_FLASHPOINT | ||
48 | #define CONFIG_SCSI_OMIT_FLASHPOINT | ||
49 | #define BusLogic_InitializeProbeInfoListISA BusLogic_InitializeProbeInfoList | ||
50 | #endif | ||
51 | |||
52 | |||
53 | /* | ||
54 | Define the maximum number of BusLogic Host Adapters supported by this driver. | 37 | Define the maximum number of BusLogic Host Adapters supported by this driver. |
55 | */ | 38 | */ |
56 | 39 | ||
@@ -178,7 +161,7 @@ static int BusLogic_HostAdapterAddressCount[3] = { 0, BusLogic_MultiMasterAddres | |||
178 | Define macros for testing the Host Adapter Type. | 161 | Define macros for testing the Host Adapter Type. |
179 | */ | 162 | */ |
180 | 163 | ||
181 | #ifndef CONFIG_SCSI_OMIT_FLASHPOINT | 164 | #ifdef CONFIG_SCSI_FLASHPOINT |
182 | 165 | ||
183 | #define BusLogic_MultiMasterHostAdapterP(HostAdapter) \ | 166 | #define BusLogic_MultiMasterHostAdapterP(HostAdapter) \ |
184 | (HostAdapter->HostAdapterType == BusLogic_MultiMaster) | 167 | (HostAdapter->HostAdapterType == BusLogic_MultiMaster) |
@@ -871,7 +854,7 @@ struct BusLogic_CCB { | |||
871 | void (*CallbackFunction) (struct BusLogic_CCB *); /* Bytes 40-43 */ | 854 | void (*CallbackFunction) (struct BusLogic_CCB *); /* Bytes 40-43 */ |
872 | u32 BaseAddress; /* Bytes 44-47 */ | 855 | u32 BaseAddress; /* Bytes 44-47 */ |
873 | enum BusLogic_CompletionCode CompletionCode; /* Byte 48 */ | 856 | enum BusLogic_CompletionCode CompletionCode; /* Byte 48 */ |
874 | #ifndef CONFIG_SCSI_OMIT_FLASHPOINT | 857 | #ifdef CONFIG_SCSI_FLASHPOINT |
875 | unsigned char:8; /* Byte 49 */ | 858 | unsigned char:8; /* Byte 49 */ |
876 | unsigned short OS_Flags; /* Bytes 50-51 */ | 859 | unsigned short OS_Flags; /* Bytes 50-51 */ |
877 | unsigned char Private[48]; /* Bytes 52-99 */ | 860 | unsigned char Private[48]; /* Bytes 52-99 */ |
diff --git a/drivers/scsi/FlashPoint.c b/drivers/scsi/FlashPoint.c index 1c9078191d9e..b374e457e5e2 100644 --- a/drivers/scsi/FlashPoint.c +++ b/drivers/scsi/FlashPoint.c | |||
@@ -16,7 +16,7 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | 18 | ||
19 | #ifndef CONFIG_SCSI_OMIT_FLASHPOINT | 19 | #ifdef CONFIG_SCSI_FLASHPOINT |
20 | 20 | ||
21 | #define MAX_CARDS 8 | 21 | #define MAX_CARDS 8 |
22 | #undef BUSTYPE_PCI | 22 | #undef BUSTYPE_PCI |
@@ -7626,7 +7626,7 @@ FlashPoint__HandleInterrupt(FlashPoint_CardHandle_T CardHandle) | |||
7626 | #define FlashPoint_InterruptPending FlashPoint__InterruptPending | 7626 | #define FlashPoint_InterruptPending FlashPoint__InterruptPending |
7627 | #define FlashPoint_HandleInterrupt FlashPoint__HandleInterrupt | 7627 | #define FlashPoint_HandleInterrupt FlashPoint__HandleInterrupt |
7628 | 7628 | ||
7629 | #else /* CONFIG_SCSI_OMIT_FLASHPOINT */ | 7629 | #else /* !CONFIG_SCSI_FLASHPOINT */ |
7630 | 7630 | ||
7631 | /* | 7631 | /* |
7632 | Define prototypes for the FlashPoint SCCB Manager Functions. | 7632 | Define prototypes for the FlashPoint SCCB Manager Functions. |
@@ -7641,4 +7641,4 @@ extern bool FlashPoint_InterruptPending(FlashPoint_CardHandle_T); | |||
7641 | extern int FlashPoint_HandleInterrupt(FlashPoint_CardHandle_T); | 7641 | extern int FlashPoint_HandleInterrupt(FlashPoint_CardHandle_T); |
7642 | extern void FlashPoint_ReleaseHostAdapter(FlashPoint_CardHandle_T); | 7642 | extern void FlashPoint_ReleaseHostAdapter(FlashPoint_CardHandle_T); |
7643 | 7643 | ||
7644 | #endif /* CONFIG_SCSI_OMIT_FLASHPOINT */ | 7644 | #endif /* CONFIG_SCSI_FLASHPOINT */ |
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index b9d374082b65..7f78e3ea517d 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig | |||
@@ -588,18 +588,20 @@ config SCSI_BUSLOGIC | |||
588 | <http://www.tldp.org/docs.html#howto>, and the files | 588 | <http://www.tldp.org/docs.html#howto>, and the files |
589 | <file:Documentation/scsi/BusLogic.txt> and | 589 | <file:Documentation/scsi/BusLogic.txt> and |
590 | <file:Documentation/scsi/FlashPoint.txt> for more information. | 590 | <file:Documentation/scsi/FlashPoint.txt> for more information. |
591 | Note that support for FlashPoint is only available for 32-bit | ||
592 | x86 configurations. | ||
591 | 593 | ||
592 | To compile this driver as a module, choose M here: the | 594 | To compile this driver as a module, choose M here: the |
593 | module will be called BusLogic. | 595 | module will be called BusLogic. |
594 | 596 | ||
595 | config SCSI_OMIT_FLASHPOINT | 597 | config SCSI_FLASHPOINT |
596 | bool "Omit FlashPoint support" | 598 | bool "FlashPoint support" |
597 | depends on SCSI_BUSLOGIC | 599 | depends on SCSI_BUSLOGIC && PCI && X86_32 |
598 | help | 600 | help |
599 | This option allows you to omit the FlashPoint support from the | 601 | This option allows you to add FlashPoint support to the |
600 | BusLogic SCSI driver. The FlashPoint SCCB Manager code is | 602 | BusLogic SCSI driver. The FlashPoint SCCB Manager code is |
601 | substantial, so users of MultiMaster Host Adapters may wish to omit | 603 | substantial, so users of MultiMaster Host Adapters may not |
602 | it. | 604 | wish to include it. |
603 | 605 | ||
604 | config SCSI_DMX3191D | 606 | config SCSI_DMX3191D |
605 | tristate "DMX3191D SCSI support" | 607 | tristate "DMX3191D SCSI support" |