public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Erik Andersen <andersen@codepoet.org>
To: "Justin T. Gibbs" <gibbs@scsiguy.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Adaptec 1480b SlimSCSI vs hotplug
Date: Thu, 31 Jan 2002 06:19:49 -0700	[thread overview]
Message-ID: <20020131131949.GA11787@codepoet.org> (raw)
In-Reply-To: <20020130025212.GA5240@codepoet.org> <200201300453.g0U4rYI61847@aslan.scsiguy.com>
In-Reply-To: <200201300453.g0U4rYI61847@aslan.scsiguy.com>

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--

      reply	other threads:[~2002-01-31 13:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-29 23:26 Adaptec 1480b SlimSCSI vs hotplug Erik Andersen
2002-01-30  0:48 ` Justin T. Gibbs
2002-01-30  2:52   ` Erik Andersen
2002-01-30  4:53     ` Justin T. Gibbs
2002-01-31 13:19       ` Erik Andersen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020131131949.GA11787@codepoet.org \
    --to=andersen@codepoet.org \
    --cc=gibbs@scsiguy.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox