Date: Sat, 22 Sep 2007 06:10:11 GMT From: Eugene Grosbein <eugen@grosbein.pp.ru> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/116538: [fdc] [patch] reintroduce FD_NO_CHLINE flag for fdc(4) Message-ID: <200709220610.l8M6AB0S067605@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/116538; it has been noted by GNATS. From: Eugene Grosbein <eugen@grosbein.pp.ru> To: bug-followup@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)); /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709220610.l8M6AB0S067605>