It's not clear what you're asking. You start off with the question >When a new SCSI device is added to a SCSI channel, how can we find out what >is the target ID of that device?
That's clear enough, except I don't know who "we" is. Depending on who you are, i.e. from what perspective you're looking, you would get this information differently. But then you give two hypotheses that describe how a device comes to have its target ID, not how someone finds out what target ID it has. >1) If a channel supports 8 SCSI devices, then each of the 8 ports will have >a specific Target ID. And any device attached to that port will have that >Target ID. >2) Is it done one the fly? I mean (starting from zero), the SCSI device is >given a target ID that is 1 greater that the last SCSI device's ID. Who >assigns this ID? Others have read a particular question into your question and answered it, but it might not be what you were looking for. Let me give a shot at answering a few of the questions that it might be: A device traditionally gets its target ID from a physical switch on the device. The person who installs the device sets the switch and can tell the target ID by looking at it the switch. That person chooses the target IDs to be anything he wants, but makes sure that no two devices plugged into the same bus have the same target ID. In modern times, some devices (disk devices, anyway) get their target ID by being plugged into a backplane or cable in a certain place. In that case, you can tell the target ID by noting where it's plugged in and knowing how the thing you plugged it into is configured. SCA is one standard for allowing this kind of target ID assignment. Some devices even get their target IDs dynamically with SCAM, but I don't know anything about SCAM. If you're inside the computer and trying to figure out what target ID an attached device has, all you can do is search the namespace. You try each target ID and if a device answers, you can ask it for information about itself (model, serial number, etc.). But you don't necessarily ever know what target ID a particular device has -- you just know that there exists a device with a certain target ID. At various levels of Linux, matching up target IDs with devices is done via various interfaces, most of them quite tortured. - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html