Re: Adaptec 1480b SlimSCSI vs hotplug

From: Erik Andersen (andersen@codepoet.org)
Date: Thu Jan 31 2002 - 08:19:49 EST


On Tue Jan 29, 2002 at 09:53:34PM -0700, Justin T. Gibbs wrote:
> to doing the comparison. The logic in the kernel handles the
> mask correctly:
>
> ((ids->class ^ dev->class) & ids->class_mask) == 0
>
> My guess is that diethotplug is not handling the mask correctly
> and thus doesn't work with a partial mask.

Upon looking closer, you are correct. diethotplug gets it wrong
here. I've fixed diethotplug, and now I can plug in my Adaptec
1480 card and have hotplug load the driver and everything works.
I can also unplug the card, and things seem to work as expected.

If I subsequently insert the card, it no longer works until I
have first manually unloaded the aic7xxx module. A quick bit of
debugging shows that ahc_linux_pci_dev_probe is getting called
the second time as it should be, and aic7xxx_detect_complete is
indeed 1 the second time, so ahc_linux_register_host gets
called... But nothing seems to actually get registered with the
scsi layer the second time around.

Here is another interesting bit. insert the card for the first
time and wait for initialization and 'cat /proc/scsi/aic7xxx/0'
and all looks normal. Now remove the card. /proc/scsi/aic7xxx/0
is still present, and 'cat /proc/scsi/aic7xxx/0' produces an
Oops... Hmm.

I see that on card removal, ahc_linux_pci_dev_remove() calls
ahc_free() which calls ahc_platform_free() which calls
scsi_unregister(), which means that /proc/scsi/aic7xxx/0
shouldn't be there anymore.... I'm missing something in
there somewhere. Ideas?

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jan 31 2002 - 21:01:34 EST