From: "N.C.Krishna Murthy" <krmurthy@cisco.com>
To: SCSI -DEVELOPERS <linux-scsi@vger.kernel.org>
Subject: two SCSI HBAs having same host no in Linux 2.4 kernel
Date: Wed, 17 Mar 2004 19:40:23 +0530 [thread overview]
Message-ID: <200403171940.23006.krmurthy@cisco.com> (raw)
Hi,
In 2.4 kernel ,a scsi HBA driver gets it's host no after scsi_register() call
returns.
The call to scsi_register is made from the driver's 'detect' routine.
scsi_register_host calls the driver's 'detect' routine.
The following is an excerpt from scsi_register_host which does the above job.
-----------------------------------------------------------------------------
if (tpnt->use_new_eh_code) {
spin_lock_irqsave(&io_request_lock, flags);
tpnt->present = tpnt->detect(tpnt);
spin_unlock_irqrestore(&io_request_lock, flags);
} else
tpnt->present = tpnt->detect(tpnt);
-----------------------------------------------------------------------------
In case of drivers which do not support new_eh_code, 'detect' is called
without any locks. Is this SMP safe?
We were testing our iSCSI driver on an SMP machine which had a FC HBA as well.
Both iSCSI driver and FC HBA had the same host no allocated. The behaviour
could not be reproduced consistently though.
Please let me know in case I am missing something.
Thanx
N.C.Krishna Murthy
next reply other threads:[~2004-03-17 14:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-17 14:10 N.C.Krishna Murthy [this message]
2004-03-17 14:46 ` two SCSI HBAs having same host no in Linux 2.4 kernel Matthew Wilcox
2004-03-17 14:48 ` N.C.Krishna Murthy
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=200403171940.23006.krmurthy@cisco.com \
--to=krmurthy@cisco.com \
--cc=linux-scsi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.