[lkml]   [2002]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: SCSI host numbers?
Itai Nahshon writes:
> On Wednesday 02 January 2002 01:32 pm, Alan Cox wrote:
> > > 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
> I'll argue that it should never decrement. The host that was just
> unregisrtered already has its host_id reserved and if we decrement,
> this number will be reasigned to the next new scsi host.
> Unless if the code for reservation that causes the conflicts
> is removed (but I guess it has a reason).
> > 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
> That would not solve it. The problem is that one piece of code
> tries to allocate unique numbers (and get them back to the pool
> when they are not in use), another piece of code remembers the
> old number that a scsi host had and whan it re-registers gives
> it back its old host_no regardless if this number was re-assigned
> to a new host.

Where exactly is the host_id for an unregistered host being


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:15    [W:0.070 / U:0.480 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site