(Continuing to catch up from the mountain of backlog...)
>I added a 'struct sg_scsi_id' to sg.h that contains: host_no, channel,
>scsi_id, lun and scsi_type. It is populated by the SG_GET_SCSI_ID
>ioctl. With 3 disks, 2 adapters (same manufacturer), a cdrom reader
>and a scanner (all SCSI), I got confused who was who. The ioctls
>to the midlevel to get this info are only available in the kernel
>space which seems a bit restrictive.
How do they differ from SCSI_IOCTL_GET_IDLUN and
SCSI_IOCTL_GET_BUS_NUMBER? Granted, I like the information to be
returned by one ioctl, but these are available for all SCSI devices.
>I have written a test program
>'sg_whoami' to output this information (so to be updated on
>http://www.netwinder.org/~dougg ). So if you are really desperate
>to find your device write a loop over sga, sgb, sgc ... until an
>error occurs (other than EBUSY) and 'ask' each one what it is. Is
>there more useful information that could be provided? Naturally the
>more scsi specific information that is provided, the more difficult
>it will be to make a unified linux generic device :-)
Using the two ioctl()s I mention above, cdparanoia does the same thing
to match specialized and generic devices (it does not use /dev/proc).
>Well yes the error checking in the original was pretty slack. Now
>you could use further error status such as the target_status (scsi
>status from target) and the host_status (DID codes with things like
>timeouts). Also by using unique pack_ids out-of-sequence stuff should
>not occur.
OK. One problem with the original code is that it checked the wrong
byte of return status for errors. Even if it had gotten the right
one, it still isn't enough information :-)
>The version that I'm putting up today has the extra ioctls moved from
>0x220? to 0x227? The rationale is to not run into anyone else doing
>extensions. I am assuming the range 0x2200...0x22ff is reserved for the
>sg device. How could I reserve the range 0x2270..0x227f for my
>extensions?
Well, at this point I *think* you're addressing most of the people
actively interested in sg development. Let's declare hegemony, decide
what to do and then convince Linus the changes are good. I think that
makes it pretty official.
Monty
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]