From owner-freebsd-current@FreeBSD.ORG Thu Aug 19 13:43:10 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13FEA16A4CE; Thu, 19 Aug 2004 13:43:10 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FFA943D55; Thu, 19 Aug 2004 13:43:09 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id i7JDh7QW018768; Thu, 19 Aug 2004 15:43:07 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: current@freebsd.org, pc98@freebsd.org From: Poul-Henning Kamp Date: Thu, 19 Aug 2004 15:43:07 +0200 Message-ID: <18767.1092922987@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Subject: [REVIEW/TEST] Rewritten floppy driver. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2004 13:43:10 -0000 Please review and test this patch: http://phk.freebsd.dk/patch/fdc.patch This is a substantial rewrite of the floppy driver to make it GEOM friendly and MP safe. It would be very beneficial to get it into 5.3 but that hinges on it getting a very good shakeout first. - Ditch the state machine and park a kthread for each controller and have it service the requests. - The interrupt handler becomes a simple wakeup() and is now fast and MPSAFE. - Eliminate cdevsw{} and make_dev() and use a native GEOM interface instead. - Improve bus tag/handling abstraction and read the DIGITAL INPUT register the right place. - Implement handling of media change suitable for floppies: Destroy and recreate the provider if the media changes. Autoprobe on first open. Refuse write open of read-only devices. - Add sysctl tunables (debug.fdc.*) for various parameters. - Add central definition of common formats. MISSING: 2.88M format (still missing, look for a related XXX comment) PC98 porting. PCMCIA (YE ?) floppy testing. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.