[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/51331: cdrom will not mount after first time
The following reply was made to PR bin/51331; it has been noted by GNATS.
From: mlelstv%serpens.de@localhost (Michael van Elst)
Subject: Re: bin/51331: cdrom will not mount after first time
Date: Tue, 12 Jul 2016 05:41:52 +0000 (UTC)
kre%munnari.OZ.AU@localhost (Robert Elz) writes:
> What I don't see in sys/dev/scsipi/cd.c is any code to clear PERIPH_MEDIA_LOADED
> after an eject is done. Yet the p_fstype of all entries in the label is
> set to FS_UNUSED - so it seems likely than on any open after an eject,
> on anything other than the raw partition is guaranteed to fail.
The flag is supposed to be cleared by a UNIT ATTENTION sense which is
supposed to be generated always when the media is changed or a
NOT READY sense which is supposed to be returned for most commands
when no disk is loaded. This is handled by generic code in scsipi_base.c
Either event should be triggered by the scsipi_test_unit_ready()
or the following scsipi_start() call in cdopen().
So in theory, the code should just work....
Michael van Elst
"A potential Snark may lurk in every tree."
Main Index |
Thread Index |