From owner-freebsd-stable@FreeBSD.ORG Wed Sep 17 21:18:45 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B88E21065683 for ; Wed, 17 Sep 2008 21:18:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3EC938FC19 for ; Wed, 17 Sep 2008 21:18:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m8HLIL9x009566; Wed, 17 Sep 2008 17:18:39 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-stable@freebsd.org Date: Wed, 17 Sep 2008 17:13:39 -0400 User-Agent: KMail/1.9.7 References: <20080917150433.GA3585@lpthe.jussieu.fr> In-Reply-To: <20080917150433.GA3585@lpthe.jussieu.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809171713.39694.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Wed, 17 Sep 2008 17:18:39 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8271/Wed Sep 17 12:58:50 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Michel Talon Subject: Re: floppy disk controller broken X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2008 21:18:45 -0000 On Wednesday 17 September 2008 11:04:33 am Michel Talon wrote: > Hello, > > when testing FreeBSD-7.1-BETA i discovered that the floppy disk > controller doesn't work correctly. Trying to format a floppy (perhaps > with bad blocks) i get: > Processing fdformat: ioctl(FD_FORM): Device not configured > instead of the normal E letter. I then checked the same problem is > present on FreeBSD-6.3 and it has been reported by Beech Rintoul (*) in > 2006! Of course the floppy disk driver is particularly messy, but > this is not pretty. > > (*) i386/103862: Error with fdformat It looks like the ioctl to format a track used to never report failures from the controller. The newer driver does. What I've done with fdformat is to make it just ignore the errors in userland instead. Try this: Index: fdformat.c =================================================================== --- fdformat.c (revision 183112) +++ fdformat.c (working copy) @@ -75,8 +75,7 @@ f.fd_formb_secno(i) = il[i+1]; f.fd_formb_secsize(i) = secsize; } - if(ioctl(fd, FD_FORM, (caddr_t)&f) < 0) - err(EX_OSERR, "ioctl(FD_FORM)"); + (void)ioctl(fd, FD_FORM, (caddr_t)&f); } static int -- John Baldwin