# To figure how to add quirks to /sys/cam/scsi/scsi_da.c # I took a normal well behaved stick & tweaked the kernel: # in /sys/cam/scsi/scsi_all.c scsi_inquiry_match() I added # printf("JHS scsi_inquiry_match Vendor=\"%s\" Product=\"%s\"\n", # inq->vendor, inq->product ); # Vendor="IOCELL CellDisk 1.00" Product="CellDisk 1.00" Revision="1.00" # I observed the kernel first goes through xpt_quirk_table in cam/cam_xpt.c # then da_quirk_table in cam/scsi/scsi_da.c # The kernel reports eg: # umass0: IOCELL CellDisk, rev 2.00/1.00, addr 2 # da0: Removable Direct Access SCSI-2 device files worth looking at to understand the kernel include: cam/scsi/scsi_da.c cam/scsi/scsi_all.c dev/usb/umass.c cam/cam_xpt.c