Skip to contentSkip to conversation

BusLogic Flashpoint SCSI Adapter not working with x86_64 kernels

Bug 10226 [email protected] 2 participants 9 messages Mar 12, 2008 – Mar 26, 2009 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

http://bugzilla.kernel.org/show_bug.cgi?id=10226

------- Comment #7 from [email protected] 2008-03-12 12:03 -------
Reply-To: [email protected]

Quoted 37 lines · Boaz Harrosh
Quoted 36 lines · James Bottomley
Quoted 4 lines · Ulrich Schweitzer
Quoted 2 lines · Boaz Harrosh

An attached config file could help.
It looks like you need ISA_DMA_API && VIRT_TO_BUS enabled are they?

Quoted 8 lines

They are both enabled, but consider that I didn't customize the kernel in any way besides changing the processor type to K8 and setting CONFIG_IKCONFIG and CONFIG_IKCONFIG_PROC. I don't know if I need the options you mentioned.

I first noticed the problem with a Fedora kernel and compiled this one only to confirm that the problem exists in the vanilla kernel as well.

Here is the complete .config:

Actually, this is the problem in BusLogic.h:

/*
FlashPoint support is only available for the Intel x86 Architecture with CONFIG_PCI set.
*/

#ifndef __i386__
#undef CONFIG_SCSI_OMIT_FLASHPOINT
#define CONFIG_SCSI_OMIT_FLASHPOINT
#endif

#ifndef CONFIG_PCI
#undef CONFIG_SCSI_OMIT_FLASHPOINT
#define CONFIG_SCSI_OMIT_FLASHPOINT
#define BusLogic_InitializeProbeInfoListISA BusLogic_InitializeProbeInfoList #endif

Having this dependency logic done in the header file is not very user friendly, but the comment is pretty clear. I can move it to Kconfig, but it will still not work on x86_64 if that comment is accurate.

Quoted 5 lines
Quoted 2 lines

James

I think the all thing is total bullshit and should be removed. First it says x86 but that's not what is checked.

Yes it is ... when this driver was written, i386 and x86 were synonymous.

Quoted 3 lines

Second if it is LE bad
then it should be possible to be compiled on other ARCHs and problems reported and fixed. There is never a point in not letting it compile.

This is just a guess ...

Flashpoint is 7,700 lines long; be my guest and look in it to see what the problem is. Unfortunately, the original author isn't around to explain the reasoning.

However, it seems obvious to me that the packed sccb format will immediately fail on a 64 bit system, so I don't think it's at all safe to blindly enable it. The driver also doesn't look to be big endian safe.

Quoted 4 lines

At most a | BROKEN logic in Kconfig.

The all thing stinks of Windowism with the capitalized file names and all that stuff.

James

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
#2 lore raw
In reply to a message not in the archive

http://bugzilla.kernel.org/show_bug.cgi?id=10226

------- Comment #8 from [email protected] 2008-03-12 13:26 -------

Quoted 2 lines · James Bottomley
Quoted 1 line · Boaz Harrosh

On Wed, Mar 12 2008 at 20:36 +0200, James Bottomley

Quoted 36 lines · <[email protected]> wrote:
Quoted 18 lines
Quoted 18 lines

Actually, this is the problem in BusLogic.h:

/*
FlashPoint support is only available for the Intel x86 Architecture
with CONFIG_PCI set.
*/

#ifndef __i386__
#undef CONFIG_SCSI_OMIT_FLASHPOINT
#define CONFIG_SCSI_OMIT_FLASHPOINT
#endif

#ifndef CONFIG_PCI
#undef CONFIG_SCSI_OMIT_FLASHPOINT
#define CONFIG_SCSI_OMIT_FLASHPOINT
#define BusLogic_InitializeProbeInfoListISA
BusLogic_InitializeProbeInfoList #endif

Quoted 8 lines
Quoted 5 lines

Having this dependency logic done in the header file is not very user friendly, but the comment is pretty clear. I can move it to Kconfig, but it will still not work on x86_64 if that comment is accurate.

James

I think the all thing is total bullshit and should be removed. First it says x86 but that's not what is checked.

Yes it is ... when this driver was written, i386 and x86 were synonymous.

Quoted 3 lines

Second if it is LE bad
then it should be possible to be compiled on other ARCHs and problems reported and fixed. There is never a point in not letting it compile.

This is just a guess ...

Quoted 8 lines

Flashpoint is 7,700 lines long; be my guest and look in it to see what the problem is. Unfortunately, the original author isn't around to explain the reasoning.

However, it seems obvious to me that the packed sccb format will immediately fail on a 64 bit system, so I don't think it's at all safe to blindly enable it. The driver also doesn't look to be big endian safe.

You are right. I removed those lines and recompiled the module. Now I get

BusLogic: FlashPoint Host Adapter detected at PCI Bus 4 Device 8
BusLogic: I/O Address 0xCC00 PCI Address 0xFDBFE000, but FlashPoint
BusLogic: Probe Function failed to validate it.

when I try to insert it.

Sorry for straying off topic, but this has to be the right crowd to ask:
I assume that the driver won't be ported to x86_64 soon (if ever), so I'll need a different SCSI adapter. Is the Adaptec AHA-2940 supported on x86_64 (those are cheap on ebay)? If not, what other, preferably cheap, SE SCSI adapter would you recommend?

Ulrich

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
#3 lore raw
In reply to a message not in the archive

http://bugzilla.kernel.org/show_bug.cgi?id=10226

------- Comment #9 from [email protected] 2008-03-12 14:36 -------
Reply-To: [email protected]

Quoted 2 lines · Ulrich Schweitzer

Sorry for straying off topic, but this has to be the right crowd to ask:
I assume that the driver won't be ported to x86_64 soon (if ever),

Not unless someone volunteers, but FlashPoint.c is huge.

Quoted 4 lines

so I'll
need a different SCSI adapter. Is the Adaptec AHA-2940 supported on x86_64 (those are cheap on ebay)? If not, what other, preferably cheap, SE SCSI adapter would you recommend?

Yes, the adaptec 7xxx/79xx series work fine both on 64 bits and big endian.

James

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
#4 lore raw
In reply to a message not in the archive

http://bugzilla.kernel.org/show_bug.cgi?id=10226

------- Comment #10 from [email protected] 2008-03-12 23:10 -------

Quoted 5 lines · James Bottomley
Quoted 2 lines · Ulrich Schweitzer

Sorry for straying off topic, but this has to be the right crowd to ask:
I assume that the driver won't be ported to x86_64 soon (if ever),

Not unless someone volunteers, but FlashPoint.c is huge.

If its not going to be ported, I guess we should add a sentence to the help text of CONFIG_SCSI_BUSLOGIC so people like me don't think its a bug. Something like "Flashpoint Host Adapter support is only available on x86 but not on x86_64 systems."
Would one of you please submit such a patch? I've never submitted a kernel patch and don't know how to do it.

Ulrich

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
#5 lore raw
In reply to a message not in the archive

http://bugzilla.kernel.org/show_bug.cgi?id=10226

------- Comment #11 from [email protected] 2008-03-13 05:55 -------

Quoted 6 lines · Ulrich Schweitzer

If its not going to be ported, I guess we should add a sentence to the help text of CONFIG_SCSI_BUSLOGIC so people like me don't think its a bug. Something like "Flashpoint Host Adapter support is only available on x86 but not on x86_64 systems."
Would one of you please submit such a patch? I've never submitted a kernel patch and don't know how to do it.

How does this look? I've inverted the sense of the flashpoint config option and neatened up the PCI-less support while I was there.

drivers/scsi/BusLogic.c +0 -0
index 4d3ebb1..2d689af 100644
@@ -896,7 +896,7 @@ static int __init

BusLogic_InitializeFlashPointProbeInfo(struct BusLogic_HostAda

                IRQ_Channel = PCI_Device->irq;
                IO_Address = BaseAddress0 = pci_resource_start(PCI_Device, 0);
                PCI_Address = BaseAddress1 = pci_resource_start(PCI_Device, 1);
-#ifndef CONFIG_SCSI_OMIT_FLASHPOINT
+#ifdef CONFIG_SCSI_FLASHPOINT
                if (pci_resource_flags(PCI_Device, 0) & IORESOURCE_MEM) {
                        BusLogic_Error("BusLogic: Base Address0 0x%X not I/O

for " "FlashPoint Host Adapter\n", NULL, BaseAddress0);
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
}

+#else
+#define BusLogic_InitializeProbeInfoList(adapter) \
+ BusLogic_InitializeProbeInfoListISA(adapter)
#endif /* CONFIG_PCI */

drivers/scsi/BusLogic.h +0 -17
index bfbfb5c..73f237a 100644
@@ -34,23 +34,6 @@
 #endif
 
 /*
-  FlashPoint support is only available for the Intel x86 Architecture with
-  CONFIG_PCI set.
-*/
-
-#ifndef __i386__
-#undef CONFIG_SCSI_OMIT_FLASHPOINT
-#define CONFIG_SCSI_OMIT_FLASHPOINT
-#endif
-
-#ifndef CONFIG_PCI
-#undef CONFIG_SCSI_OMIT_FLASHPOINT
-#define CONFIG_SCSI_OMIT_FLASHPOINT
-#define BusLogic_InitializeProbeInfoListISA BusLogic_InitializeProbeInfoList
-#endif
-
-
-/*
   Define the maximum number of BusLogic Host Adapters supported by this

driver.
*/

@@ -178,7 +161,7 @@ static int BusLogic_HostAdapterAddressCount[3] = { 0, BusLogic_MultiMasterAddres
Define macros for testing the Host Adapter Type.
*/

-#ifndef CONFIG_SCSI_OMIT_FLASHPOINT
+#ifdef CONFIG_SCSI_FLASHPOINT

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

drivers/scsi/FlashPoint.c +1 -1
index 1c90781..b374e45 100644
@@ -16,7 +16,7 @@
 */
 
 
-#ifndef CONFIG_SCSI_OMIT_FLASHPOINT
+#ifdef CONFIG_SCSI_FLASHPOINT
 
 #define MAX_CARDS      8
 #undef BUSTYPE_PCI
@@ -7626,7 +7626,7 @@ FlashPoint__HandleInterrupt(FlashPoint_CardHandle_T

CardHandle)
#define FlashPoint_InterruptPending FlashPoint__InterruptPending
#define FlashPoint_HandleInterrupt FlashPoint__HandleInterrupt

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

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

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

drivers/scsi/Kconfig +8 -6
index c46666a..196d7d0 100644
@@ -588,18 +588,20 @@ config SCSI_BUSLOGIC
          <http://www.tldp.org/docs.html#howto>, and the files
          <file:Documentation/scsi/BusLogic.txt> and
          <file:Documentation/scsi/FlashPoint.txt> for more information.
+         Note that support for FlashPoint is only available for 32-bit
+         x86 configurations.
 
          To compile this driver as a module, choose M here: the
          module will be called BusLogic.
 
-config SCSI_OMIT_FLASHPOINT
-       bool "Omit FlashPoint support"
-       depends on SCSI_BUSLOGIC
+config SCSI_FLASHPOINT
+       bool "FlashPoint support"
+       depends on SCSI_BUSLOGIC && PCI && X86_32
        help
-         This option allows you to omit the FlashPoint support from the
+         This option allows you to add FlashPoint support to the
          BusLogic SCSI driver. The FlashPoint SCCB Manager code is
-         substantial, so users of MultiMaster Host Adapters may wish to omit
-         it.
+         substantial, so users of MultiMaster Host Adapters may not
+         wish to include it.
 
 config SCSI_DMX3191D
        tristate "DMX3191D SCSI support"
Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
#6 lore raw
In reply to a message not in the archive

http://bugzilla.kernel.org/show_bug.cgi?id=10226

------- Comment #12 from [email protected] 2008-03-13 09:46 -------
Reply-To: [email protected]

Quoted 2 lines · Matthew Wilcox

How does this look? I've inverted the sense of the flashpoint config option and neatened up the PCI-less support while I was there.

I think it's a good start. Long-term flashpoint should either die or become a driver of it's own - these cards have very little in common with the regular intelligent buslogic cards and if you look at the driver it's full of if (flashpoint) in every major function.

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
#7 lore raw
In reply to a message not in the archive

http://bugzilla.kernel.org/show_bug.cgi?id=10226

------- Comment #13 from [email protected] 2008-03-13 10:12 -------

Quoted 8 lines · Christoph Hellwig
Quoted 2 lines · Matthew Wilcox

How does this look? I've inverted the sense of the flashpoint config option and neatened up the PCI-less support while I was there.

I think it's a good start. Long-term flashpoint should either die or become a driver of it's own - these cards have very little in common with the regular intelligent buslogic cards and if you look at the driver it's full of if (flashpoint) in every major function.

Completely agreed about the long term direction.

I'm not volunteering to work on this particular obsolescent driver though. Advansys is quite enough trouble for me.

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
#8 lore raw
In reply to a message not in the archive

http://bugzilla.kernel.org/show_bug.cgi?id=10226

------- Comment #14 from [email protected] 2008-03-13 10:16 -------
Reply-To: [email protected]

Quoted 10 lines · Matthew Wilcox
Quoted 8 lines · Christoph Hellwig
Quoted 2 lines · Matthew Wilcox

How does this look? I've inverted the sense of the flashpoint config option and neatened up the PCI-less support while I was there.

I think it's a good start. Long-term flashpoint should either die or become a driver of it's own - these cards have very little in common with the regular intelligent buslogic cards and if you look at the driver it's full of if (flashpoint) in every major function.

Quoted 4 lines

Completely agreed about the long term direction.

I'm not volunteering to work on this particular obsolescent driver though. Advansys is quite enough trouble for me.

Yes, that's why I said your patch is a good start :) Anything more than that is not required although it would of course be nice if we could find someone with too much spare time on his/her hand to fix the driver up.

Actually a proper driver for the multimaster adapters wouldn't even be a lot of time as this hardware is quite nice (unlike the driver).

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
#9 lore raw
In reply to a message not in the archive

http://bugzilla.kernel.org/show_bug.cgi?id=10226

Alan <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|                            |WILL_NOT_FIX
         Regression|---                         |No

--- Comment #15 from Alan <[email protected]> 2009-03-26 17:04:02 --- Since there are no volunteers and not likely to be any

But if you want to send patches ..

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.