From owner-svn-src-head@FreeBSD.ORG Sat Aug 24 21:04:55 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 612B8E0B; Sat, 24 Aug 2013 21:04:55 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4DE362347; Sat, 24 Aug 2013 21:04:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7OL4t1X068824; Sat, 24 Aug 2013 21:04:55 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7OL4tUf068823; Sat, 24 Aug 2013 21:04:55 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <201308242104.r7OL4tUf068823@svn.freebsd.org> From: Joerg Wunsch Date: Sat, 24 Aug 2013 21:04:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254809 - head/sys/dev/fdc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Aug 2013 21:04:55 -0000 Author: joerg Date: Sat Aug 24 21:04:54 2013 New Revision: 254809 URL: http://svnweb.freebsd.org/changeset/base/254809 Log: 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 Modified: head/sys/dev/fdc/fdc.c Modified: head/sys/dev/fdc/fdc.c ============================================================================== --- head/sys/dev/fdc/fdc.c Sat Aug 24 21:00:39 2013 (r254808) +++ head/sys/dev/fdc/fdc.c Sat Aug 24 21:04:54 2013 (r254809) @@ -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);