From: Richard Gooch <rgooch@ras.ucalgary.ca>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: nahshon@actcom.co.il, linux-kernel@vger.kernel.org
Subject: Re: SCSI host numbers?
Date: Wed, 2 Jan 2002 12:31:01 -0700 [thread overview]
Message-ID: <200201021931.g02JV1R27294@vindaloo.ras.ucalgary.ca> (raw)
In-Reply-To: <E16LjdE-0003m4-00@the-village.bc.nu>
In-Reply-To: <200201020119.g021JoK32730@lmail.actcom.co.il> <E16LjdE-0003m4-00@the-village.bc.nu>
Alan Cox writes:
> > Under some scenarios Linux assigns the same
> > host_no to more than one scsi device.
> >
> > Can someone tell me what is the intended behavior?
>
> A number should never be reissued.
>
> > The problem is that a newly registered device gets
> > its host_no from max_scsi_host. max_scsi_host is
> > decremented when a device driver is unregistered
> > (see drivers/scsi/host.c) allowing a second new
> > host to reuse the same host_no.
>
> I guess it needs to either only decrement the count if we are the
> highest one (trivial hack) or scan for a free number/keep a free
> bitmap. The devfs code has a handy little unique_id function for
> that
Yeah, I was going to get around to submitting a patch to change the
SCSI host allocation code to use devfs_alloc_unique_number(), but
right now that function is only functional if CONFIG_DEVFS_FS=y
(otherwise you get a stub function which returns -1). So really this
should be turned into a generic function, which was my plan all along,
but I didn't want to fight that battle back then. Now that it's in
the tree, I can look at doing this.
Comments? Got a suggestion for which file the generic function should
go into? I figure on stripping the leading "devfs_" part of the
function names.
Regards,
Richard....
Permanent: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca
next prev parent reply other threads:[~2002-01-02 19:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-02 1:19 Itai Nahshon
2002-01-02 11:32 ` Alan Cox
2002-01-02 23:35 ` Itai Nahshon
2002-01-06 1:44 ` Richard Gooch
2002-01-13 20:41 ` Itai Nahshon
2002-01-14 6:36 ` Richard Gooch
2002-01-15 12:19 ` Itai Nahshon
2002-01-16 7:03 ` Richard Gooch
2002-01-16 9:47 ` Itai Nahshon
2002-03-21 21:48 ` [PATCH] [was SCSI host numbers? ] Itai Nahshon
2002-01-02 19:31 ` Richard Gooch [this message]
2002-01-02 21:01 ` SCSI host numbers? Alan Cox
2002-01-02 21:18 ` Richard Gooch
[not found] <mailman.1009934881.4099.linux-kernel2news@redhat.com>
2002-01-02 2:07 ` Pete Zaitcev
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=200201021931.g02JV1R27294@vindaloo.ras.ucalgary.ca \
--to=rgooch@ras.ucalgary.ca \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=nahshon@actcom.co.il \
/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
all inboxes | Powered by JetHome®