Results 1 to 2 of 2
Hi friends,
In /proc/scsi/scsi, we can see the scsi host no. (scsi identifier no.).
for e.g.
Host: scsi 4 Channel: 00 Id: 01 Lun: 00
In above e.g., scsi identifier ...
- 02-16-2011 #1Just Joined!
- Join Date
- Mar 2010
- Posts
- 3
How to reset/decrease scsi host number
Hi friends,
In /proc/scsi/scsi, we can see the scsi host no. (scsi identifier no.).
for e.g.
Host: scsi4 Channel: 00 Id: 01 Lun: 00
In above e.g., scsi identifier no. is 4.
Whenever we modprobe a particular module associated with scsi devices, we can see new entry in /proc/scsi/scsi with a greater identifier no.
When we do rmmod on that module, the entry from /proc/scsi/scsi wipes off but still the counter of scsi identifier no. doesn't decreases.
So, my question is is there any way to reset or decrement this counter so that next time when I do modprobe on scsi related module, it will assign no.s starting with 0 ???
Thanks in advance.....
- 02-17-2011 #2Just Joined!
- Join Date
- Mar 2010
- Posts
- 3
Hi,
I found more information after some googling.
I found that during registering a scsi device, scsi_register() method gets value from "next_host" (which is a static int initialized to 0) and then increments next_host counter.
Also, during scsi_unregister(), it decrements next_host counter.
rmmod internally calls scsi_unregister().
So, if it is true then why the scsi host id. doesn't decrement during rmmod?
Can anybody give me some guidelines?


Reply With Quote