aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/fdc/fdc.c
diff options
context:
space:
mode:
authorJoerg Wunsch <joerg@FreeBSD.org>2013-08-24 21:04:54 +0000
committerJoerg Wunsch <joerg@FreeBSD.org>2013-08-24 21:04:54 +0000
commit1f97b64cbbb3655c48fffb339f2781d9de72bafe (patch)
treea9865e92f0c4399bb0e62c3a7046f51079c2938e /sys/dev/fdc/fdc.c
parent161330357c9e1917ae13ea2afbc06fb52aee8376 (diff)
downloadsrc-1f97b64cbbb3655c48fffb339f2781d9de72bafe.tar.gz
src-1f97b64cbbb3655c48fffb339f2781d9de72bafe.zip
Do not use "Enable Implied Seek" on enhanced floppy controllers. This
breaks the "2step" feature of the driver, e.g. in order to read 360 KiB media on a 1200 KiB drive. As the only potential advantage of implied (vs. explicit) seeks is to minimize the software effort, yet our driver always contained the logic needed for explicit seeks, simply dropping implied seeks is the best solution without introducing risks for new bugs. There is no performance penalty, reading a 1440 KiB medium takes exactly the same time with both, implied or explicit seeks. MFC after: 1 week
Notes
Notes: svn path=/head/; revision=254809
Diffstat (limited to 'sys/dev/fdc/fdc.c')
-rw-r--r--sys/dev/fdc/fdc.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index 985e2296df73..4de5e81f3d28 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -528,7 +528,8 @@ fdc_reset(struct fdc_data *fdc)
if (fdc_cmd(fdc, 4,
I8207X_CONFIG,
0,
- 0x40 | /* Enable Implied Seek */
+ /* 0x40 | */ /* Enable Implied Seek -
+ * breaks 2step! */
0x10 | /* Polling disabled */
(fifo_threshold - 1), /* Fifo threshold */
0x00, /* Precomp track */
@@ -922,14 +923,8 @@ fdc_worker(struct fdc_data *fdc)
/*
* SEEK to where we want to be
- *
- * Enhanced controllers do implied seeks for read&write as long as
- * we do not need multiple steps per track.
*/
- if (cylinder != fd->track && (
- fdc->fdct != FDC_ENHANCED ||
- descyl != cylinder ||
- (bp->bio_cmd & (BIO_RDID|BIO_FMT)))) {
+ if (cylinder != fd->track) {
retry_line = __LINE__;
if (fdc_cmd(fdc, 3, NE7CMD_SEEK, fd->fdsu, descyl, 0))
return (1);