aha152x_cs and adaptec 1460D

struggeling for some days with aha152x_cs and an adaptec 1460D pcmcia-card. in case a harddrive is attached, loading the module always fails for several disk with messages like:

Nov 29 22:43:46 bommel kernel: sd 2:0:0:0: [sdb] Attached SCSI disk
Nov 29 22:43:46 bommel kernel: sd 2:0:0:0: Attached scsi generic sg2 type 0
Nov 29 22:45:16 bommel kernel: (scsi-1:-1:-1) reselection missed?<3>(scsi2:0:0) cannot abort running or disconnected command
Nov 29 22:46:56 bommel kernel: (scsi2:4:0) cannot reuse command

with different cd-rom-drive, everything works find.

does someone has an idea?

hartmut

–

openSUSE 11.0 (i586)
Linux bommel 2.6.25.18-0.2-default

/var/log/messages

Nov 29 22:43:44 bommel kernel: pcmcia: request for exclusive IRQ could not be fulfilled.
Nov 29 22:43:44 bommel kernel: pcmcia: the driver needs updating to supported shared IRQ lines.
Nov 29 22:43:45 bommel kernel: aha152x: resetting bus…
Nov 29 22:43:45 bommel kernel: aha152x2: vital data: rev=1, io=0xa340 (0xa340/0xa340), irq=10, scsiid=7, reconnect=enabled, parity=enabled, synchronous=enabled, delay=100, extended translation=enabled
Nov 29 22:43:46 bommel kernel: aha152x2: trying software interrupt, ok.
Nov 29 22:43:46 bommel kernel: scsi2 : Adaptec 152x SCSI driver; $Revision: 2.7 $
Nov 29 22:43:46 bommel kernel: (scsi2:0:0) Synchronous Data Transfer Request period = 200 ns offset = 8
Nov 29 22:43:46 bommel kernel: scsi 2:0:0:0: Direct-Access DEC RZ26F (C) DEC 1Q0A PQ: 0 ANSI: 2
Nov 29 22:43:46 bommel kernel: sd 2:0:0:0: [sdb] 2050860 512-byte hardware sectors (1050 MB)
Nov 29 22:43:46 bommel kernel: sd 2:0:0:0: [sdb] Write Protect is off
Nov 29 22:43:46 bommel kernel: sd 2:0:0:0: [sdb] Mode Sense: a3 00 00 08
Nov 29 22:43:46 bommel kernel: sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn’t support DPO or FUA
Nov 29 22:43:46 bommel kernel: sd 2:0:0:0: [sdb] 2050860 512-byte hardware sectors (1050 MB)
Nov 29 22:43:46 bommel kernel: sd 2:0:0:0: [sdb] Write Protect is off
Nov 29 22:43:46 bommel kernel: sd 2:0:0:0: [sdb] Mode Sense: a3 00 00 08
Nov 29 22:43:46 bommel kernel: sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn’t support DPO or FUA
Nov 29 22:43:46 bommel kernel: sdb: sdb1 < sdb5 >
Nov 29 22:43:46 bommel kernel: sd 2:0:0:0: [sdb] Attached SCSI disk
Nov 29 22:43:46 bommel kernel: sd 2:0:0:0: Attached scsi generic sg2 type 0
Nov 29 22:45:16 bommel kernel: (scsi-1:-1:-1) reselection missed?<3>(scsi2:0:0) cannot abort running or disconnected command
Nov 29 22:46:56 bommel kernel: (scsi2:4:0) cannot reuse command
Nov 29 22:48:37 bommel kernel: aha152x2: scsi reset in
Nov 29 22:48:58 bommel kernel: scsi 2:0:4:0: Device offlined - not ready after error recovery
Nov 29 22:48:58 bommel kernel: (scsi2:0:0) unexpected state (1)

Oh man, that’s an ancient card. I used to (may still) have a AHA1542, the ISA card version of that card. Low-end SCSI hardware in those days was always a bit fiddly and if you found some settings of the card or driver that made it work, you left it alone after that. SCSI CD were just as bad. The only reason I had a SCSI card was for the SCSI CD burner which would actually work very well on a 386 because SCSI did DMA and could keep up the data transfer rate.

Unless you are trying to recover some data from those disks (and I see they aren’t very big disks, just 1GB for the one you showed), if I were you I’d just forget it. USB is so much easier to use for expansion.

But if you still want to experiment, I think that message about not being able to get an exclusive IRQ is important. You may not have enough IRQ lines to give the PCMCIA card an exclusive IRQ. Try disabling some onboard devices like serial, parallel. I don’t know if it’s fixable in the driver or PCMCIA support has been abandoned.

lada04 wrote:
> struggeling for some days with aha152x_cs and an adaptec 1460D
> pcmcia-card. in case a harddrive is attached, loading the module always
> fails for several disk with messages like:
>
>> Nov 29 22:43:46 bommel kernel: sd 2:0:0:0: [sdb] Attached SCSI disk
>> Nov 29 22:43:46 bommel kernel: sd 2:0:0:0: Attached scsi generic sg2
>> type 0
>> Nov 29 22:45:16 bommel kernel: (scsi-1:-1:-1) reselection
>> missed?<3>(scsi2:0:0) cannot abort running or disconnected command
>> Nov 29 22:46:56 bommel kernel: (scsi2:4:0) cannot reuse command
>>
>
> with different cd-rom-drive, everything works find.
>
> does someone has an idea?
>
> hartmut
>
> –
>
> openSUSE 11.0 (i586)
> Linux bommel 2.6.25.18-0.2-default
>
> /var/log/messages
>
>> Nov 29 22:43:44 bommel kernel: pcmcia: request for exclusive IRQ could
>> not be fulfilled.
>> Nov 29 22:43:44 bommel kernel: pcmcia: the driver needs updating to
>> supported shared IRQ lines.

The critical details are in the last two lines above. ATM, this driver does not
support shared IRQ’s. I am CCing the pcmcia maintainer who will correct me if
the following is wrong.

The device can use an IRQ in the range from 9 - 12, with 11 as the default.
Apparently, some device on your system is already using 11. If I read the
documentation correctly, the IRQ is changed by adding the option ā€œirq=Xā€ to the
insmod statement, where X is a number between 9 and 12. You can find which IRQs
are being used from the ā€˜cat /proc/interrupts’ statement. Look for holes in the
9-12 range. Once you have one, modify the file /etc/modprobe.conf.local and add
a line that looks like ā€œoptions aha152x_cs irq=Xā€. You will vave to be root to
change the file.

I have this hardware, but have not used it in several years. Perhaps I can
prepare a patch so that shared interrupts can be used.

Larry

right, usb is much easier. but how to exchange data with an old nt4 machine without usb-support? have to stick with its old hardware (gpib-interface-card), the old drivers and software to operate an ancient slide-recorder… with no network interface in the room…

i also tried to set the irq manually. although in some docs parameter ā€˜irq’ (aha152x) or ā€˜irq_list’ are described, it was not possible to use it:

Nov 29 22:17:43 bommel kernel: aha152x_cs: Unknown parameter irq' ... Nov 29 22:42:40 bommel kernel: aha152x_cs: Unknown parameter irq_list’

if there is an irq-conflict, why does cdr doesn’t make any problems? is there anything wrong with translation of drive geometry?

Hartmut

I have a fix for aha152x_cs. The good news is that it is a one-line change;
however, you will need to generate a new kernel. If you want to go that route,
then the patch is

Index: wireless-testing/drivers/scsi/pcmcia/aha152x_stub.c

— wireless-testing.orig/drivers/scsi/pcmcia/aha152x_stub.c
+++ wireless-testing/drivers/scsi/pcmcia/aha152x_stub.c
@@ -114,7 +114,7 @@ static int aha152x_probe(struct pcmcia_d
link->io.NumPorts1 = 0x20;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.IOAddrLines = 10;

  • link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
  • link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
    link->irq.IRQInfo1 = IRQ_LEVEL_ID;
    link->conf.Attributes = CONF_ENABLE_IRQ;
    link->conf.IntType = INT_MEMORY_AND_IO;

If making your own kernel is not possible, please post the output from ā€˜uname -r’.

Larry

thank you, Larry!

i’ve changed the line in drivers/scsi/pcmcia/aha152x_stub.c
and recompiled the kernel. now, the module shares irq 10 with all the others, without complaining:

Nov 30 20:03:59 bommel kernel: aha152x: resetting bus…
Nov 30 20:03:59 bommel kernel: aha152x3: vital data: rev=1, io=0xa340 (0xa340/0xa340), irq=10, scsiid=7, reconnect=enabled, parity=enabled, synchronous=enabled, delay=100, extended translation=enabled
Nov 30 20:04:00 bommel kernel: aha152x3: trying software interrupt, ok.

hwz@bommel:~> cat /proc/interrupts
CPU0
0: 44183 XT-PIC-XT timer
1: 302 XT-PIC-XT i8042
2: 0 XT-PIC-XT cascade
3: 1642 XT-PIC-XT serial
6: 1 XT-PIC-XT
7: 1 XT-PIC-XT parport0
8: 0 XT-PIC-XT rtc0
9: 1763 XT-PIC-XT acpi
10: 8188 XT-PIC-XT uhci_hcd:usb1, ehci_hcd:usb2, uhci_hcd:usb3, uhci_hcd:usb4, ohci1394, ipw2200, yenta, Intel 82801DB-ICH4, Intel 82801DB-ICH4 Modem, eth1, aha152x
11: 2 XT-PIC-XT
12: 128 XT-PIC-XT i8042
14: 14509 XT-PIC-XT ata_piix
15: 3559 XT-PIC-XT ata_piix

unfortunately, the problem still persists, the error messages in the logfile look quite the same. the irq’s 5,6,11 seem to be available, but i don’t now how to force the driver the select one of those.

however, my feeling is, there’s something wrong with the option ā€œextended ranslation=enabledā€. as far as i understood, it’s some guess to interpret the geometry correctly in case the drive is larger than 1gb. i’ve turned this option off, but theres only slight change in the messages:

extended translation=enabled:

Nov 30 20:04:00 bommel kernel: sd 3:0:0:0: [sdc] Attached SCSI disk
Nov 30 20:04:00 bommel kernel: sd 3:0:0:0: Attached scsi generic sg3 type 0
Nov 30 20:04:05 bommel kernel: (scsi-1:-1:-1) reselection missed?<3>(scsi3:0:0) cannot abort running or disconnected command
Nov 30 20:06:15 bommel kernel: (scsi3:2:0) cannot reuse command
Nov 30 20:07:56 bommel kernel: aha152x3: scsi reset in
Nov 30 20:08:17 bommel kernel: scsi 3:0:2:0: Device offlined - not ready after error recovery

extended translation=disabled:

Nov 30 20:19:19 bommel kernel: sdc: sdc1
Nov 30 20:19:19 bommel kernel: sd 3:0:0:0: [sdc] Attached SCSI disk
Nov 30 20:19:19 bommel kernel: sd 3:0:0:0: Attached scsi generic sg3 type 0
Nov 30 20:19:25 bommel kernel: (scsi3:0:0) cannot abort running or disconnected command
Nov 30 20:23:15 bommel kernel: aha152x3: scsi reset in
Nov 30 20:23:36 bommel kernel: scsi 3:0:2:0: Device offlined - not ready after error recovery
Nov 30 20:25:06 bommel kernel: (scsi-1:-1:-1) reselection missed?<3>(scsi3:0:0) cannot abort running or disconnected command
Nov 30 20:26:46 bommel kernel: (scsi3:4:0) cannot reuse command
Nov 30 20:28:26 bommel kernel: aha152x3: scsi reset in
Nov 30 20:28:47 bommel kernel: scsi 3:0:4:0: Device offlined - not ready after error recovery
Nov 30 20:30:17 bommel kernel: (scsi-1:-1:-1) reselection missed?<3>(scsi3:0:0) cannot abort running or disconnected command
Nov 30 20:31:57 bommel kernel: (scsi3:5:0) cannot reuse command

best would be a check with a smaller drive, but the smallest i have is 1gb.

Hartmut

This one I cannot help you with as the only SCSI device that I have is a CD
writer, which worked just fine.

I suggest you post this problem and the pertinent part of your dmesg output to
the pcmcia mailing list at linux-pcmcia@lists.infradead.org. Someone there
should be able to help.

Larry