how to determine protocol of USB devices

Chuck Tuffli chuck at tuffli.net
Mon Jan 30 18:13:43 UTC 2017


I'm trying to use CAM to determine the protocol specific command to
send to a given device (e.g. Inquiry for SCSI devices or Identify for
SATA devices). The code works for direct attached SCSI/SATA devices,
but I'm not sure what to do with USB attached devices and could use
some advice.

The current code sends a XPT_GET_TRAN_SETTINGS and uses the returned
protocol field in the ccb_trans_settings structure. But for SATA
drives connected via USB, the protocol is SCSI. Is there a way via CAM
to determine that the drive is actually SATA? TIA.

--chuck


More information about the freebsd-scsi mailing list