Subject: sd: MEDIA_LOADED not reset on last close?
To: None <tech-kern@NetBSD.ORG>
From: Mark Brinicombe <email@example.com>
Date: 05/06/1996 00:21:29
>I was wondering if there is a good reason why the sdclose function does not
>reset the SDEV_MEDIA_LOADED flag on the last close on the device. The unwanted
>(at least for me) side effect is that the disklabel will only be read on
>the first open.
This is a problem I have had as well. My problem was with some optical drives
e.g. Panasonic PD drive then mean the disklabel did not get reloaded
when I swapped disk. I just added a bit to sdclose() to clear this
flag on the last close.
I suspect that in my case the drive is meant to report a unit attention
command when the media is changed (this will cause a disklabel re-read)
but the pd drive does not do this which means that is it very easy to
trash PD discs unless sdclose is fixed.
Mark Brinicombe firstname.lastname@example.org
Research Associate http://www.ph.kcl.ac.uk/~amb/
Department of Physics tel: 0171 873 2894
King's College London fax: 0171 873 2716