OpenSolaris

Printable Version Enter a New Search
Bug ID 6520510
Synopsis media state doesn't get updated properly on device removal
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel:driver-sd-fixed
Keywords
Responsible Engineer Eric Schrock
Reported Against
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_68
Fixed In snv_68
Release Fixed solaris_nevada(snv_68) , solaris_10u6(s10u6_01) (Bug ID:2156297)
Related Bugs 6578076
Submit Date 1-February-2007
Last Update Date 29-April-2008
Description
If a caller sends the DKIOCSTATE ioctl() to a sd(7D) device, then 
we don't actually correctly detect the DKIO_DEV_GONE state.  The reason
is that the un_mediastate is only updated in response to an explicit
test packet.  But in sd_check_media(), we never send out the test
packet if DKIO_NONE is specified:

        /* is there anything to do? */
        if (state == un->un_mediastate || un->un_mediastate == DKIO_NONE) {

This causes DKIO_NONE to return DKIO_INSERTED without noticing that the
drive has been removed.  Rather than force an explicit test packet, we
should notice CMD_DEV_GONE in sdintr() and proactively update un_mediastate.
Work Around
N/A
Comments
N/A