Skip to content

Commit 78b4b05

Browse files
Matthew Wilcoxjejb
authored andcommitted
[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>
1 parent 5c815d1 commit 78b4b05

4 files changed

Lines changed: 17 additions & 29 deletions

File tree

‎drivers/scsi/BusLogic.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ static int __init BusLogic_InitializeFlashPointProbeInfo(struct BusLogic_HostAda
896896
IRQ_Channel = PCI_Device->irq;
897897
IO_Address = BaseAddress0 = pci_resource_start(PCI_Device, 0);
898898
PCI_Address = BaseAddress1 = pci_resource_start(PCI_Device, 1);
899-
#ifndef CONFIG_SCSI_OMIT_FLASHPOINT
899+
#ifdef CONFIG_SCSI_FLASHPOINT
900900
if (pci_resource_flags(PCI_Device, 0) & IORESOURCE_MEM) {
901901
BusLogic_Error("BusLogic: Base Address0 0x%X not I/O for " "FlashPoint Host Adapter\n", NULL, BaseAddress0);
902902
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
10061006
}
10071007

10081008

1009+
#else
1010+
#define BusLogic_InitializeProbeInfoList(adapter) \
1011+
BusLogic_InitializeProbeInfoListISA(adapter)
10091012
#endif /* CONFIG_PCI */
10101013

10111014

‎drivers/scsi/BusLogic.h‎

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,6 @@
3333
#define PACKED __attribute__((packed))
3434
#endif
3535

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-
5336
/*
5437
Define the maximum number of BusLogic Host Adapters supported by this driver.
5538
*/
@@ -178,7 +161,7 @@ static int BusLogic_HostAdapterAddressCount[3] = { 0, BusLogic_MultiMasterAddres
178161
Define macros for testing the Host Adapter Type.
179162
*/
180163

181-
#ifndef CONFIG_SCSI_OMIT_FLASHPOINT
164+
#ifdef CONFIG_SCSI_FLASHPOINT
182165

183166
#define BusLogic_MultiMasterHostAdapterP(HostAdapter) \
184167
(HostAdapter->HostAdapterType == BusLogic_MultiMaster)
@@ -871,7 +854,7 @@ struct BusLogic_CCB {
871854
void (*CallbackFunction) (struct BusLogic_CCB *); /* Bytes 40-43 */
872855
u32 BaseAddress; /* Bytes 44-47 */
873856
enum BusLogic_CompletionCode CompletionCode; /* Byte 48 */
874-
#ifndef CONFIG_SCSI_OMIT_FLASHPOINT
857+
#ifdef CONFIG_SCSI_FLASHPOINT
875858
unsigned char:8; /* Byte 49 */
876859
unsigned short OS_Flags; /* Bytes 50-51 */
877860
unsigned char Private[48]; /* Bytes 52-99 */

‎drivers/scsi/FlashPoint.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818

19-
#ifndef CONFIG_SCSI_OMIT_FLASHPOINT
19+
#ifdef CONFIG_SCSI_FLASHPOINT
2020

2121
#define MAX_CARDS 8
2222
#undef BUSTYPE_PCI
@@ -7626,7 +7626,7 @@ FlashPoint__HandleInterrupt(FlashPoint_CardHandle_T CardHandle)
76267626
#define FlashPoint_InterruptPending FlashPoint__InterruptPending
76277627
#define FlashPoint_HandleInterrupt FlashPoint__HandleInterrupt
76287628

7629-
#else /* CONFIG_SCSI_OMIT_FLASHPOINT */
7629+
#else /* !CONFIG_SCSI_FLASHPOINT */
76307630

76317631
/*
76327632
Define prototypes for the FlashPoint SCCB Manager Functions.
@@ -7641,4 +7641,4 @@ extern bool FlashPoint_InterruptPending(FlashPoint_CardHandle_T);
76417641
extern int FlashPoint_HandleInterrupt(FlashPoint_CardHandle_T);
76427642
extern void FlashPoint_ReleaseHostAdapter(FlashPoint_CardHandle_T);
76437643

7644-
#endif /* CONFIG_SCSI_OMIT_FLASHPOINT */
7644+
#endif /* CONFIG_SCSI_FLASHPOINT */

‎drivers/scsi/Kconfig‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -588,18 +588,20 @@ config SCSI_BUSLOGIC
588588
<http://www.tldp.org/docs.html#howto>, and the files
589589
<file:Documentation/scsi/BusLogic.txt> and
590590
<file:Documentation/scsi/FlashPoint.txt> for more information.
591+
Note that support for FlashPoint is only available for 32-bit
592+
x86 configurations.
591593

592594
To compile this driver as a module, choose M here: the
593595
module will be called BusLogic.
594596

595-
config SCSI_OMIT_FLASHPOINT
596-
bool "Omit FlashPoint support"
597-
depends on SCSI_BUSLOGIC
597+
config SCSI_FLASHPOINT
598+
bool "FlashPoint support"
599+
depends on SCSI_BUSLOGIC && PCI && X86_32
598600
help
599-
This option allows you to omit the FlashPoint support from the
601+
This option allows you to add FlashPoint support to the
600602
BusLogic SCSI driver. The FlashPoint SCCB Manager code is
601-
substantial, so users of MultiMaster Host Adapters may wish to omit
602-
it.
603+
substantial, so users of MultiMaster Host Adapters may not
604+
wish to include it.
603605

604606
config SCSI_DMX3191D
605607
tristate "DMX3191D SCSI support"

0 commit comments

Comments
 (0)