Force media autodetection if the device has lost its parameter table.
Previously, any normal I/O on an fdc(4) device would fail with ENXIO if the device had been opened in non-blocking mode and then closed prior to the conventional access; that would last until the floppy disk was ejected and re-inserted to raise the unit attention condition. Add a clarifying comment.
This commit is contained in:
parent
e47e35e61b
commit
62cc1e0584
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=116434
@ -1588,6 +1588,11 @@ Fdopen(dev_t dev, int flags, int mode, struct thread *td)
|
||||
*
|
||||
* If UA has been forced, proceed.
|
||||
*
|
||||
* If the drive has no changeline support,
|
||||
* or if the drive parameters have been lost
|
||||
* due to previous non-blocking access,
|
||||
* assume a forced UA condition.
|
||||
*
|
||||
* If motor is off, turn it on for a moment
|
||||
* and select our drive, in order to read the
|
||||
* UA hardware signal.
|
||||
@ -1603,7 +1608,8 @@ Fdopen(dev_t dev, int flags, int mode, struct thread *td)
|
||||
*/
|
||||
unitattn = 0;
|
||||
if ((dflags & FD_NO_CHLINE) != 0 ||
|
||||
(fd->flags & FD_UA) != 0) {
|
||||
(fd->flags & FD_UA) != 0 ||
|
||||
fd->ft == 0) {
|
||||
unitattn = 1;
|
||||
fd->flags &= ~FD_UA;
|
||||
} else if (fdc->fdout & (FDO_MOEN0 | FDO_MOEN1 |
|
||||
|
@ -1588,6 +1588,11 @@ Fdopen(dev_t dev, int flags, int mode, struct thread *td)
|
||||
*
|
||||
* If UA has been forced, proceed.
|
||||
*
|
||||
* If the drive has no changeline support,
|
||||
* or if the drive parameters have been lost
|
||||
* due to previous non-blocking access,
|
||||
* assume a forced UA condition.
|
||||
*
|
||||
* If motor is off, turn it on for a moment
|
||||
* and select our drive, in order to read the
|
||||
* UA hardware signal.
|
||||
@ -1603,7 +1608,8 @@ Fdopen(dev_t dev, int flags, int mode, struct thread *td)
|
||||
*/
|
||||
unitattn = 0;
|
||||
if ((dflags & FD_NO_CHLINE) != 0 ||
|
||||
(fd->flags & FD_UA) != 0) {
|
||||
(fd->flags & FD_UA) != 0 ||
|
||||
fd->ft == 0) {
|
||||
unitattn = 1;
|
||||
fd->flags &= ~FD_UA;
|
||||
} else if (fdc->fdout & (FDO_MOEN0 | FDO_MOEN1 |
|
||||
|
Loading…
Reference in New Issue
Block a user