View previous topic :: View next topic |
Author |
Message |
dobbs Tux's lil' helper
Joined: 20 Aug 2005 Posts: 105 Location: Wenatchee, WA
|
Posted: Tue Nov 20, 2007 8:57 pm Post subject: Advansys on amd64 status |
|
|
Background: I want to use my SCSI scanner. I have an "Advanced System Products, Inc ABP940-U / ABP960-U (rev 03)" PCI SCSI card and an AMD64 system.
I see from this ancient post that the advansys driver is "unstable" on amd64, but my kernel config (gentoo-sources-2.6.22-r9) doesn't have an option to "Select only drivers expected to compile cleanly". I do have development and/or incomplete code/drivers enabled.
I remember previously having the clean compile option, where did it go?
What is the advansys modules development status for amd64? Did it migrate to a different name that I missed? Am I SOL with this card? |
|
Back to top |
|
|
saellaven l33t
Joined: 23 Jul 2006 Posts: 655
|
Posted: Wed Nov 21, 2007 3:17 am Post subject: |
|
|
Working (with a couple assertion failures on loading) on AMD64/gentoo-sources-2.6.23 here.
scsi9 : AdvanSys SCSI 3.3K: PCI Ultra: IO 0xAC00-0xAC0F, IRQ 0x10
I make no guarantees that it'll work for you, but here's a patch that will let you enable it:
Code: |
--- ../linux-2.6.23-gentoo-r2/drivers/scsi/Kconfig 2007-10-09 16:31:38.000000000 -0400
+++ ../linux-2.6.23-gentoo-r1/drivers/scsi/Kconfig 2007-11-09 00:24:15.000000000 -0500
@@ -502,7 +502,7 @@
tristate "AdvanSys SCSI support"
depends on SCSI
depends on ISA || EISA || PCI
- depends on BROKEN || X86_32
+ depends on BROKEN || X86_32 || X86_64
help
This is a driver for all SCSI host adapters manufactured by
AdvanSys. It is documented in the kernel source in
|
|
|
Back to top |
|
|
saellaven l33t
Joined: 23 Jul 2006 Posts: 655
|
Posted: Wed Nov 21, 2007 11:18 pm Post subject: |
|
|
I've traced the assertion down to a timestamp comparison (timestamp of the scsi_cmnd.this_residual (int) and jiffies (unsigned long)). I just submitted the following patch to linux-scsi and matthew wilcox (who has been working on the advansys driver).
Code: |
--- linux-2.6.23-gentoo-r2/drivers/scsi/advansys.c.orig 2007-11-21 02:33:00.000000000 -0500
+++ linux-2.6.23-gentoo-r1/drivers/scsi/advansys.c 2007-11-21 17:37:56.000000000 -0500
@@ -3497,7 +3497,7 @@ typedef struct scsi_cmnd REQ, *REQP;
* If the request time stamp is less than the system time stamp, then \
* maybe the system time stamp wrapped. Set the request time to zero.\
*/ \
- if (REQPTIME(reqp) <= REQTIMESTAMP()) { \
+ if ((unsigned long) REQPTIME(reqp) <= REQTIMESTAMP()) { \
REQPTIME(reqp) = REQTIMESTAMP() - REQPTIME(reqp); \
} else { \
/* Indicate an error occurred with the assertion. */ \
|
|
|
Back to top |
|
|
dobbs Tux's lil' helper
Joined: 20 Aug 2005 Posts: 105 Location: Wenatchee, WA
|
Posted: Fri Nov 23, 2007 9:36 am Post subject: |
|
|
Much gratitude for the patches. Module loads fine and scanner probed. Not much else achieved (problems with xsane?).
Edit: Ok, scanner works beautifully now for no reason. Again, thank you for the patches.
Code: |
dobbs@bender ~ $ cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: WDC WD3200KS-00P Rev: 21.0
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi1 Channel: 00 Id: 06 Lun: 00
Vendor: HP Model: C2520A Rev: 3503
Type: Processor ANSI SCSI revision: 02
|
Does anyone know why X86_64 was omitted? |
|
Back to top |
|
|
saellaven l33t
Joined: 23 Jul 2006 Posts: 655
|
Posted: Fri Nov 23, 2007 4:01 pm Post subject: |
|
|
The advansys driver's maintainer disappeared and it fell behind after PCI and DMA changes to the rest of the kernel. It was actually marked BROKEN and hidden entirely from the menu in Linus' kernel for most of the year. Andrew Morton and I did some tweaks to it earlier this year to keep it working and Matthew Wilcox started really cleaning it up over the summer. Since it had been broken and there were only two people using the driver (at least as far as those of us who reported bugs on lkml), it was probably marked X86_32 because nobody knew if it would work on anything else given how far behind it had fallen.
I believe the current plan is to drop the X86_32 tag and switch it to VIRT_TO_BUS (quick look says everything but powerpc, sparc and superh platforms) instead, which is why I didn't submit the KConfig patch, just the fix for the timestamp problem. I did let Matthew and linux-scsi know that it was working on AMD64 for me, though. I'm guessing we'll see the official changes in 2.6.24 or 2.6.25 (if Linux deems the changes to be too drastic for this late in 2.6.24).
Of course, I'm not a kernel dev, I just read lkml and this particular bug lit a fire under my butt to fix it for my own system too. I'm glad I could help. _________________ Ryzen 3700X, Asus Prime X570-Pro, 64 GB DDR4 3200, GeForce GTX 1660 Super
openrc-0.17, ~vanilla-sources, ~nvidia-drivers, ~gcc |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|