HomeFreeBSD

cam/cd: The SAW_MEDIA flag duplicates VALID_MEDIA

Description

cam/cd: The SAW_MEDIA flag duplicates VALID_MEDIA

This change mirrors what we do in da. Use only the VALID_MEDIA
flag. SAW_MEDIA was just used in one place. Transition to using
similar technique to what da uses for valid media.

We seem to handle media being ejected while we're doing I/O correctly,
both with prevent-allow and without (though the former threw some
vendor-specific errors before returning seek errors). I could only test
USB attached DVD (over ATAPI over BULK). I couldn't test it with SCSI CD
attachment, sata attached CD nor parallel ATA attached CDs because I
no longer have any of that hardware.

Differential Revision: https://reviews.freebsd.org/D48841
Sponsored by: Netflix

Details

Provenance
impAuthored on Sat, Feb 8, 9:40 PM
Differential Revision
D48841: cam/cd: The SAW_MEDIA flag duplicates VALID_MEDIA
Parents
rGf8de2be7d920: cam/da: Call cam_periph_invalidate on ENXIO in dadone
Branches
Unknown
Tags
Unknown