Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Matthew Wilcox and committed by
James Bottomley
78b4b05d 5c815d15

+17 -29
+4 -1
drivers/scsi/BusLogic.c
··· 896 896 IRQ_Channel = PCI_Device->irq; 897 897 IO_Address = BaseAddress0 = pci_resource_start(PCI_Device, 0); 898 898 PCI_Address = BaseAddress1 = pci_resource_start(PCI_Device, 1); 899 - #ifndef CONFIG_SCSI_OMIT_FLASHPOINT 899 + #ifdef CONFIG_SCSI_FLASHPOINT 900 900 if (pci_resource_flags(PCI_Device, 0) & IORESOURCE_MEM) { 901 901 BusLogic_Error("BusLogic: Base Address0 0x%X not I/O for " "FlashPoint Host Adapter\n", NULL, BaseAddress0); 902 902 BusLogic_Error("at PCI Bus %d Device %d I/O Address 0x%X\n", NULL, Bus, Device, IO_Address); ··· 1006 1006 } 1007 1007 1008 1008 1009 + #else 1010 + #define BusLogic_InitializeProbeInfoList(adapter) \ 1011 + BusLogic_InitializeProbeInfoListISA(adapter) 1009 1012 #endif /* CONFIG_PCI */ 1010 1013 1011 1014
+2 -19
drivers/scsi/BusLogic.h
··· 34 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 37 Define the maximum number of BusLogic Host Adapters supported by this driver. 55 38 */ 56 39 ··· 161 178 Define macros for testing the Host Adapter Type. 162 179 */ 163 180 164 - #ifndef CONFIG_SCSI_OMIT_FLASHPOINT 181 + #ifdef CONFIG_SCSI_FLASHPOINT 165 182 166 183 #define BusLogic_MultiMasterHostAdapterP(HostAdapter) \ 167 184 (HostAdapter->HostAdapterType == BusLogic_MultiMaster) ··· 854 871 void (*CallbackFunction) (struct BusLogic_CCB *); /* Bytes 40-43 */ 855 872 u32 BaseAddress; /* Bytes 44-47 */ 856 873 enum BusLogic_CompletionCode CompletionCode; /* Byte 48 */ 857 - #ifndef CONFIG_SCSI_OMIT_FLASHPOINT 874 + #ifdef CONFIG_SCSI_FLASHPOINT 858 875 unsigned char:8; /* Byte 49 */ 859 876 unsigned short OS_Flags; /* Bytes 50-51 */ 860 877 unsigned char Private[48]; /* Bytes 52-99 */
+3 -3
drivers/scsi/FlashPoint.c
··· 16 16 */ 17 17 18 18 19 - #ifndef CONFIG_SCSI_OMIT_FLASHPOINT 19 + #ifdef CONFIG_SCSI_FLASHPOINT 20 20 21 21 #define MAX_CARDS 8 22 22 #undef BUSTYPE_PCI ··· 7626 7626 #define FlashPoint_InterruptPending FlashPoint__InterruptPending 7627 7627 #define FlashPoint_HandleInterrupt FlashPoint__HandleInterrupt 7628 7628 7629 - #else /* CONFIG_SCSI_OMIT_FLASHPOINT */ 7629 + #else /* !CONFIG_SCSI_FLASHPOINT */ 7630 7630 7631 7631 /* 7632 7632 Define prototypes for the FlashPoint SCCB Manager Functions. ··· 7641 7641 extern int FlashPoint_HandleInterrupt(FlashPoint_CardHandle_T); 7642 7642 extern void FlashPoint_ReleaseHostAdapter(FlashPoint_CardHandle_T); 7643 7643 7644 - #endif /* CONFIG_SCSI_OMIT_FLASHPOINT */ 7644 + #endif /* CONFIG_SCSI_FLASHPOINT */
+8 -6
drivers/scsi/Kconfig
··· 588 588 <http://www.tldp.org/docs.html#howto>, and the files 589 589 <file:Documentation/scsi/BusLogic.txt> and 590 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 594 To compile this driver as a module, choose M here: the 593 595 module will be called BusLogic. 594 596 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 598 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 602 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. 603 605 604 606 config SCSI_DMX3191D 605 607 tristate "DMX3191D SCSI support"