Adaptect 1460 on ThinkPad T20

2003-10-15
2003-10-17
  • Peter Ketcham
    Peter Ketcham
    2003-10-15

    I am experiencing problems using an Adaptec 1460 on a ThinkPad T20.  I have searched Google, Red Hat's Bugzilla, this PCMCIA forum, and have read the Linux PCMCIA HOWTO from cover to cover--but I am unable to determine what is wrong.  I have collected quite a bit of information over a couple weeks of experimentation, so this posting may be long.

    1.  Basic Information:
    System:  IBM ThinkPad T20
    OS:  Red Hat Linux 9
    Kernel Version:  2.4.20-6 #1 Thu Feb 27 10:06:59 EST 2003
    PCMCIA Driver Version:  cardctl version 3.1.31
    PCMCIA Card:  Adaptec SlimSCSI 1460, APA-1460D
    Socket Controller:  Texas Instruments PCI1450
    SCSI Device:  Iomega 2GB Jaz Drive

    2.  Motivation:
    I began my investigation because I received the following message upon system shutdown:  "Trying to free nonexistent resource <00000340-0000035f>".  The address 0x340 is the start of the I/O port used by my SCSI card, according to the system log.

    3.  Related Reports:
    A Google search does return a few hits for the message listed in (2).  In particular, bug 67285 in Red Hat's Bugzilla archive contains this message.  However, bug 67285 is significantly different because I do not receive the message "trying software interupt, lost" in /var/log/messages.  In fact, I receive the message "kernel: aha152x0: trying software interrupt, ok."

    4.  Analysis:
    After much experimentation and review of the log files, I came to the conclusion that my system is behaving differently depending upon whether or not my SCSI card is inserted in my system during OS installation.  The rest of my posting gives details on two different scenarios:  the first with my SCSI card inserted during installation and the second without it inserted.

    5.  Scenario A:
    In scenario A, I perform an installation of RHL 9 on a completely erased hard disk (hda) with the SCSI card inserted and connected to a powered-on 2GB Jaz drive.  There are no other devices on the SCSI chain.

    5a.  Observation:
    When the RHL installation program is about to install the package "kernel-pcmcia-cs-3.1.31-13", I hear the Jaz drive spin up.  I suspect that the installation program notices the existent of my PCMCIA SCSI subsystem and is making installation/configuration choices based on this information.

    5b.  Observation:
    After the installation is complete, the following messages appear on the screen during system boot.  These messages look like they are related to the checksums discussed in section 3.1 of the HOWTO:
    Loading scsi_mod.o module
    SCSI subsystem driver Revision: 1.00
    Loading sd_mod.o module
    Loading aha152x_cs.o module
    /lib/aha152x_cs.o: unresolved symbol register_pccard_driver_R1c442d6c
    /lib/aha152x_cs.o: unresolved symbol CardServices_Re4eef0a4
    /lib/aha152x_cs.o: unresolved symbol unregister_pccard_driver_Rdb348cd2
    ERROR: /bin/insmod exited abnormally!

    5c.  Log File Exerpts:
    Here are some excerpts from /var/log/messages that I believe are relevant.
    Oct 13 16:39:04 shrimp pcmcia: Starting PCMCIA services:
    Oct 13 16:39:05 shrimp kernel: SCSI subsystem driver Revision: 1.00
    Oct 13 16:39:05 shrimp kernel: Linux Kernel Card Services 3.1.22
    Oct 13 16:39:05 shrimp kernel:   options:  [pci] [cardbus] [pm]
    Oct 13 16:39:05 shrimp kernel: ds: no socket drivers loaded!
    Oct 13 16:39:05 shrimp kernel: unloading Kernel Card Services
    Oct 13 16:39:05 shrimp kernel: Linux Kernel Card Services 3.1.22
    Oct 13 16:39:05 shrimp kernel:   options:  [pci] [cardbus] [pm]
    Oct 13 16:39:05 shrimp kernel: Yenta IRQ list 06b8, PCI irq11
    Oct 13 16:39:05 shrimp kernel: Socket status: 30000010
    Oct 13 16:39:05 shrimp kernel: Yenta IRQ list 06b8, PCI irq11
    Oct 13 16:39:05 shrimp kernel: Socket status: 30000006
    Oct 13 16:39:05 shrimp pcmcia:  cardmgr.
    Oct 13 16:39:05 shrimp cardmgr[1642]: starting, version is 3.1.31
    Oct 13 16:39:05 shrimp rc: Starting pcmcia:  succeeded
    Oct 13 16:39:05 shrimp cardmgr[1642]: watching 2 sockets
    Oct 13 16:39:05 shrimp cardmgr[1642]: Card Services release does not match
    Oct 13 16:39:05 shrimp kernel: cs: IO port probe 0x0c00-0x0cff: clean.
    Oct 13 16:39:05 shrimp kernel: cs: IO port probe 0x0100-0x04ff: excluding 0x3b8-0x3df 0x4d0-0x4d7
    Oct 13 16:39:05 shrimp kernel: cs: IO port probe 0x0a00-0x0aff: clean.
    Oct 13 16:39:05 shrimp kernel: cs: memory probe 0xa0000000-0xa0ffffff: clean.
    Oct 13 16:39:05 shrimp cardmgr[1642]: socket 0: Adaptec APA-1460 SlimSCSI
    Oct 13 16:39:05 shrimp cardmgr[1642]: executing: 'modprobe aha152x_cs'
    Oct 13 16:39:07 shrimp kernel: aha152x: processing commandline: ok
    Oct 13 16:39:07 shrimp kernel: aha152x: BIOS test: passed, detected 1 controller(s)
    Oct 13 16:39:07 shrimp kernel: aha152x: resetting bus...
    Oct 13 16:39:07 shrimp kernel: aha152x0: vital data: rev=1, io=0x340 (0x340/0x340), irq=3, scsiid=7, reconnect=enabled, parity=enabled, synchronous=disabled, delay=100, extended translation=disabled
    Oct 13 16:39:07 shrimp kernel: aha152x0: trying software interrupt, ok.
    Oct 13 16:39:07 shrimp kernel: scsi0 : Adaptec 152x SCSI driver; $Revision: 2.5 $
    Oct 13 16:39:07 shrimp kernel:   Vendor: iomega    Model: jaz 2GB           Rev: E.15
    Oct 13 16:39:07 shrimp kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
    Oct 13 16:39:08 shrimp kernel: Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
    Oct 13 16:39:08 shrimp kernel: SCSI device sda: 3915600 512-byte hdwr sectors (2005 MB)
    Oct 13 16:39:08 shrimp kernel: sda: Write Protect is off
    Oct 13 16:39:08 shrimp kernel:  sda: sda1
    Oct 13 16:39:08 shrimp cardmgr[1642]: executing: './scsi start sda'

    5d.  Comments:
    Some of the messages in (5c) look fine and some don't.  In particular, I think it is fine that the SCSI card is using irq 3.  On my system, the second serial device is assigned to irq 3, but both the first and second serial devices are disabled in the BIOS.  What I find most troubling is the message "ds: no socket drivers loaded!".  Following this message, Linux card services seems to make a second attempt to get going.  After the system boots and I login, my Jaz drive seems to work properly despite the various messages in (5b-c).

    5e. Experiment:
    The following experiment might provide some useful information (I realize that this experiment should not be done under normal circumstances since the SCSI cards are not hot swappable):  I boot the system without the SCSI card inserted.  Once the system is running, I insert the SCSI card by itself, without being connected to the Jaz drive.  I see the following on the screen:
    (high beep) aha152x: resetting bus...
    (4 second pause)
    (low beep) Trying to free nonexistent resource <00000340-0000035f>

    6.  Scenario B:
    In scenario B, I perform an installation of RHL 9 on a completely erased hard disk (hda) without the SCSI card inserted.  After installation is complete, I shut down the system, insert the SCSI card, attach and power on the Jaz drive, and then boot the system.

    6a.  After installation, the installation log shows that the package "kernel-pcmcia-cs-3.1.31-13" was installed.

    6b.  I do not see any of the messages that appear in (5b).

    6c.  Log File Excerpts:
    Oct 15 11:06:43 shrimp pcmcia: Starting PCMCIA services:
    Oct 15 11:06:44 shrimp kernel: Linux Kernel Card Services 3.1.22
    Oct 15 11:06:44 shrimp kernel:   options:  [pci] [cardbus] [pm]
    Oct 15 11:06:44 shrimp kernel: Yenta IRQ list 06b8, PCI irq11
    Oct 15 11:06:44 shrimp kernel: Socket status: 30000010
    Oct 15 11:06:44 shrimp kernel: Yenta IRQ list 06b8, PCI irq11
    Oct 15 11:06:44 shrimp kernel: Socket status: 30000006
    Oct 15 11:06:44 shrimp pcmcia:  cardmgr.
    Oct 15 11:06:44 shrimp cardmgr[1635]: starting, version is 3.1.31
    Oct 15 11:06:44 shrimp rc: Starting pcmcia:  succeeded
    Oct 15 11:06:44 shrimp cardmgr[1635]: watching 2 sockets
    Oct 15 11:06:44 shrimp cardmgr[1635]: Card Services release does not match
    Oct 15 11:06:44 shrimp kernel: cs: IO port probe 0x0c00-0x0cff: clean.
    Oct 15 11:06:45 shrimp kernel: cs: IO port probe 0x0100-0x04ff: excluding 0x3b8-0x3df 0x4d0-0x4d7
    Oct 15 11:06:45 shrimp kernel: cs: IO port probe 0x0a00-0x0aff: clean.
    Oct 15 11:06:45 shrimp kernel: cs: memory probe 0xa0000000-0xa0ffffff: clean.
    Oct 15 11:06:45 shrimp cardmgr[1635]: socket 0: Adaptec APA-1460 SlimSCSI
    Oct 15 11:06:45 shrimp cardmgr[1635]: executing: 'modprobe aha152x_cs'
    Oct 15 11:06:45 shrimp kernel: SCSI subsystem driver Revision: 1.00
    Oct 15 11:06:46 shrimp kernel: aha152x: processing commandline: ok
    Oct 15 11:06:46 shrimp kernel: aha152x: BIOS test: passed, detected 1 controller(s)
    Oct 15 11:06:46 shrimp kernel: aha152x: resetting bus...
    Oct 15 11:06:46 shrimp kernel: aha152x0: vital data: rev=1, io=0x340 (0x340/0x340), irq=3, scsiid=7, reconnect=enabled, parity=enabled, synchronous=disabled, delay=100, extended translation=disabled
    Oct 15 11:06:46 shrimp kernel: aha152x0: trying software interrupt, ok.
    Oct 15 11:06:46 shrimp kernel: scsi0 : Adaptec 152x SCSI driver; $Revision: 2.5 $
    Oct 15 11:06:46 shrimp kernel:   Vendor: iomega    Model: jaz 2GB           Rev: E.15
    Oct 15 11:06:47 shrimp kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
    Oct 15 11:06:48 shrimp kernel: Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
    Oct 15 11:06:48 shrimp kernel: SCSI device sda: 3915600 512-byte hdwr sectors (2005 MB)
    Oct 15 11:06:48 shrimp kernel: sda: Write Protect is off
    Oct 15 11:06:48 shrimp kernel:  sda: sda1
    Oct 15 11:06:48 shrimp cardmgr[1635]: executing: './scsi start sda'

    6d.  Comments:
    All of the messages in (6c) look fine to me.  Also, my Jaz drive seems to work fine.

    6e.  I repeat the experiment in (5e) and get the same result.

    7.  Questions:
    a.  Are the messages I am seeing a cause for concern?
    b.  My PCMCIA SCSI subsystem seems to be working fine, but is it really?
    c.  Why do I see different behavior depending on whether the SCSI card is inserted (and attached to a powered-on device) during system installation?
    d.  What is the meaning of the message "Trying to free nonexistent resource ..."?

    I realize this is a long posting, but I wanted to include all the relevant facts and information.  Any help or insights are appreciated.

     
    • David Hinds
      David Hinds
      2003-10-17

      Answers:

      a.  I think they are not really a cause for concern.  It would be nice to not have to look at them, but they are essentially harmless.

      b.  You'll have to tell me.  In general, real failures are catastrophic.

      c.  I suspect that there is a bug in the system scan that Red Hat runs at install time to identify your devices.  It is deciding that it should try to load the aha152x_cs driver for you; but it doesn't realize that this is a PCMCIA card.  It does not understand PCMCIA module dependencies, and doesn't realize that cardmgr ensures that the aha152x_cs driver will be loaded on demand.

      d.  I assume it is a bug in the aha152x driver.  When you plug the card in with an unterminated SCSI bus, the driver times out and refuses to load; its exit code tries to clean up and free all allocated resources (specifically IO ports) without realizing that it never got as far as actually allocating those ports.

      I think the "ds: no socket drivers loaded!" is also connected with the bogus aha152x_cs driver load.  There must be a configuration file somewhere that lists modules to be autoloaded, that incorrectly specifies this.

      -- Dave