Skip to contentSkip to conversation

Patch?: linux-2.5.45/drivers/scsi/hosts.[ch] - Eliminate scsi_host_tmpl_list

DISCUSSION Adam J. Richter 2 participants 2 messages Nov 10, 2002 SCSI

lore
Share & tools
lore
#0 lore raw
Quoted 9 lines · Patrick Mansfield

But, there is no way to match the previous functionallity without having a host name list.

That is before the patch we can do this:

insmod foo; insmod bar

And foo gets scsi4, bar scsi5. And then:

Quoted 7 lines

rmmod foo; rmmod bar
insmod bar; insmod foo

And foo should still be scsi4, bar scsi5.

Without the host name list, the best we can do is have foo become scsi5, and bar scsi4.

I do not understand why you think these is any change
in behavior.

If you passed "scsihosts=host1,host2,host3,foo,bar", then
you should the first foo controller will always be assigned ID 4, and the first bar controller will always be assigned ID 5, no matter how you load, unload and reload the foo and bar SCSI drivers. A successful scsi_register always calls scsi_hostnum; scsi_hostname always checks the scsihosts variable.

If you disagree with this, please walk me through how the
second "insmod foo" gets scsi ID 4 when the scsihosts string has reserved that ID for something else. If you can actually produce the behavior in real life, that would be even better.

Adam J. Richter     __     ______________   575 Oroville Road
[email protected]     \ /                  Miplitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America

"Free Software For The Rest Of Us."

#1 lore raw
Quoted 28 lines · Adam J. Richter
Quoted 9 lines · Patrick Mansfield

But, there is no way to match the previous functionallity without having a host name list.

That is before the patch we can do this:

insmod foo; insmod bar

And foo gets scsi4, bar scsi5. And then:

Quoted 7 lines

rmmod foo; rmmod bar
insmod bar; insmod foo

And foo should still be scsi4, bar scsi5.

Without the host name list, the best we can do is have foo become scsi5, and bar scsi4.

I do not understand why you think these is any change
in behavior.

If you passed "scsihosts=host1,host2,host3,foo,bar", then
you should the first foo controller will always be assigned ID 4, and the first bar controller will always be assigned ID 5, no matter how you load, unload and reload the foo and bar SCSI drivers. A successful scsi_register always calls scsi_hostnum; scsi_hostname always checks the scsihosts variable.

Quoted 4 lines

If you disagree with this, please walk me through how the
second "insmod foo" gets scsi ID 4 when the scsihosts string has reserved that ID for something else. If you can actually produce the behavior in real life, that would be even better.

The scenario I outlined is for the case _without_ any "scsihosts=...".

But, you point out a simple way to get around this difference in behaviour. If a user hits the problem I listed, they could just boot with "scsihosts=foo,bar".

I'll rediff with ... one of the scsi trees and post a modified patch.

-- Patrick Mansfield