kern/116538: [fdc] [patch] reintroduce FD_NO_CHLINE flag for
fdc(4)
Eugene Grosbein
eugen at grosbein.pp.ru
Fri Sep 21 23:10:11 PDT 2007
The following reply was made to PR kern/116538; it has been noted by GNATS.
From: Eugene Grosbein <eugen at grosbein.pp.ru>
To: bug-followup at freebsd.org
Cc:
Subject: Re: kern/116538: [fdc] [patch] reintroduce FD_NO_CHLINE flag for fdc(4)
Date: Sat, 22 Sep 2007 13:55:31 +0800
Sorry, I've attached malformed version of patch. The correct line follows.
Another note, one may verify that is works only after applying another
patch from http://www.freebsd.org/cgi/query-pr.cgi?pr=116536,
because fdc(4) ignores per-drive hints for now. After all, you may
use 'hint.fd.0.flags=0x40' to enable FD_NO_CHLINE.
--- share/man/man4/fdc.4.orig 2007-09-16 16:23:27.000000000 +0800
+++ share/man/man4/fdc.4 2007-09-16 16:23:34.000000000 +0800
@@ -101,7 +101,7 @@
the driver.
To indicate a drive that does not have the changeline support,
this can be overridden using the per-drive device flags value of
-.Ar 0x10
+.Ar 0x40
(causing each call to
.Xr open 2
to perform the autodetection).
--- sys/dev/fdc/fdc.c.orig 2007-09-15 16:53:23.000000000 +0800
+++ sys/dev/fdc/fdc.c 2007-09-16 16:26:07.000000000 +0800
@@ -98,6 +98,8 @@
* and fd1 */
#define FD_NO_PROBE 0x20 /* don't probe drive (seek test), just
* assume it is there */
+#define FD_NO_CHLINE 0x40 /* drive does not support changeline
+ * aka. unit attention */
/*
* Things that could conceiveably considered parameters or tweakables
@@ -827,7 +829,8 @@
if (bp->bio_cmd & BIO_PROBE) {
- if (!(fdin_rd(fdc) & FDI_DCHG) && !(fd->flags & FD_EMPTY))
+ if (!(fd->flags & FD_NO_CHLINE) &&
+ !(fdin_rd(fdc) & FDI_DCHG) && !(fd->flags & FD_EMPTY))
return (fdc_biodone(fdc, 0));
/*
More information about the freebsd-bugs
mailing list