Testing Notes¶
Before Change¶
I created a ramdisk image of stock illumos bits and used it to boot (via PXE) a system with an Insyde BMC. Once booted, I confirmed that "inserting" an ISO file into the virtual CD-ROM messed things up. In particular, diskinfo
would hang forever, trying to get a devices snapshot, and through kmdb we could see that sd
was trapped in a MODE SENSE
:
[3]> ::stacks -m sd
THREAD STATE SOBJ COUNT
fffffe00f7a23c20 SLEEP SEMA 1
swtch+0x133
sema_p+0x1cf
biowait+0xa4
default_physio+0x2cc
physio+0x11
scsi`scsi_uscsi_handle_cmd+0x2bd
sd`sd_ssc_send+0x12f
sd`sd_send_scsi_MODE_SENSE+0x174
sd`sd_get_caching_mode_page+0xb4
sd`sd_get_write_cache_enabled+0x6d
sd`sd_unit_attach+0xa84
sd`sdattach+0x2d
devi_attach+0xa1
attach_node+0x8b
i_ndi_config_node+0x12c
i_ddi_attachchild+0x3a
devi_attach_node+0x5d
config_immediate_children+0xd0
ndi_busop_bus_config+0x98
scsa2usb`scsa2usb_scsi_bus_config+0xbc
scsi`scsi_hba_bus_config+0x72
devi_config_common+0xcf
mt_config_thread+0x13a
thread_start+0xb
I "unplugged" the virtual CD-ROM and things immediately came good after we gave up:
Oct 5 04:02:22 unknown scsi: WARNING: /pci@1d,0/pci1022,1484@8,1/pci1022,148c@0,3/hub@2/storage@1/disk@0,0 (sd1):
Oct 5 04:02:22 unknown Command failed to complete...Device is gone
After Change¶
I build another ramdisk with new bits built with this change (and #13817 upon which it depends). After inserting the CD-ROM this time, diskinfo
was able to complete; NB, diskinfo
does not actually list CD-ROM drives, but it at least was not hung. I was able to mount the hsfs
file system on the device and read the contents.
I confirmed at the scsa2usb
level that the device had the expected attribute disabled as per the quirks table:
> *scsa2usb_statep::walk softstate | ::print struct scsa2usb_state scsa2usb_dip | ::devinfo -q
fffffeb1cdd65c78 usbif,class8, instance #0 (driver name: scsa2usb)
> fffffeb1cdd65c78::devinfo ! grep -A1 usb-.*-id
name='usb-revision-id' type=int items=1
value=00000409
name='usb-product-id' type=int items=1
value=000003ea
name='usb-vendor-id' type=int items=1
value=00000b1f
> *scsa2usb_statep::walk softstate | ::print struct scsa2usb_state scsa2usb_attrs
scsa2usb_attrs = 0xfdff
> ~fdff=x
200
> scsa2usb_quirks::print ! tail
q_rev = 0xffff
q_attr = 0x4000
},
{
q_vid = 0xb1f
q_pid = 0x3ea
q_rev = 0xffff
q_attr = 0x200
},
]