Re: Kernel panic when re-inserting Adaptec PCMCIA card



--- Alex Davis <alex14641@xxxxxxxxx> wrote:

--- Alex Davis <alex14641@xxxxxxxxx> wrote:

--- Chuck Ebbert <76306.1226@xxxxxxxxxxxxxx> wrote:

In-Reply-To: <20060614022139.21737.qmail@xxxxxxxxxxxxxxxxxxxxxxx>

On Tue, 13 Jun 2006 19:21:39 -0700, Alex Davis wrote:

Same panic occurs in 2.6.17rc6:

Jun 13 17:50:36 siafu kernel: [4295220.230000] pccard: PCMCIA card inserted into slot 0
Jun 13 17:50:36 siafu kernel: [4295220.230000] pcmcia: registering new device pcmcia0.0
Jun 13 17:50:37 siafu kernel: [4295220.281000] aha152x: resetting bus...
Jun 13 17:50:37 siafu kernel: [4295220.637000] aha152x13: vital data: rev=1, io=0xd340
(0xd340/0xd340), irq=3, scsiid=7, reconnect=enabled,
parity=enabled, synchronous=enabled, delay=100, extended translation=disabled
Jun 13 17:50:37 siafu kernel: [4295220.637000] aha152x13: trying software interrupt, ok.
Jun 13 17:50:37 siafu kernel: [4295221.638000] scsi13 : Adaptec 152x SCSI driver;
$Revision:
2.7 $
Jun 13 17:50:37 siafu kernel: [4295221.650000]
Jun 13 17:50:37 siafu kernel: [4295221.650000] aha152x22856: bottom-half already running!?
Jun 13 17:50:37 siafu kernel: [4295221.650000]
Jun 13 17:50:37 siafu kernel: [4295221.650000] queue status:
Jun 13 17:50:37 siafu kernel: [4295221.650000] issue_SC:
Jun 13 17:50:37 siafu kernel: [4295221.650000] current_SC:
Jun 13 17:50:37 siafu kernel: [4295221.650000] BUG: unable to handle kernel paging request
at
virtual address 00020016

Something is going very wrong here. At time .637 it says it is
adapter number 13 (aha152x13.) Then at .650 it thinks it's
adapter nr. 22856 (!) Looks like some kind of pointer to the
hostdata is corrupted.

Can you rmmod the driver after removing the card and see if that
helps?

It turns out I was trying to remove the driver before doing 'pccardctl eject'.

It seems that removing the driver after ejecting make the problem go away:
I ejected and re-inserted the card six times with no crash.

I'll continue testing just to make sure.

I now know what the problem is.

In drivers/scsi/aha152x.c, there is an array of two scsi hosts:
static struct Scsi_Host *aha152x_host[2];
There is also the aha152x_probe_one method.

The problem is that each re-insert of the card creates a new 'host' via aha152x_probe_one,
which increments the registered_count variable. This variable is used as an index into the afore-
mentioned 2-element host array. When registered_count is 2 or greater we're in no-man's land,
hence the crashes. I'm currently testing a fix for this, which I hope to post soon.

-Alex

I code, therefore I am

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: WDF storage driver is a dead-end street
    ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ... AHCI controller card, etc. ... Since the extension is passed in the miniport at ... So I need to create a virtual adapter out of two physical adapters. ...
    (microsoft.public.development.device.drivers)
  • Re: Ataptec SCSI card problem
    ... I tried to install this card debian 4.0, ubuntu 7.10, Fedora Core 8, ... Slackware 12 and I have always the same message from scsi card. ... what it looks like to me, the problem is to be found in the driver, rather ... SCSI adapter family, which means that they can be used in two modes, i.e. ...
    (comp.os.linux.hardware)
  • Re: Using a second display adapter
    ... adding a PCI adapter to a system that already ... has an AGP card. ... I am really more interested in the hardware level, not using Linux ... Console or xorg driver at all. ...
    (Debian-User)
  • Re: Network connection
    ... It is the KMDF "PCIDRV" sample driver. ... for the Intel 82557/82558 based PCI Ethernet Adapter and Intel ... he has a network card, and he wants to make its driver ignore NDIS ... NIC stands for 'Network Interface Card", so that, apparently, by " NIC ...
    (microsoft.public.development.device.drivers)
  • Re: USB mass storage issue
    ... driver is primarilly designed for use with non-removable storage (such ... So If you are replacing the SD/MMC card then ... USB host driver configures and searches for the device during the boot ...
    (microsoft.public.windowsce.platbuilder)