From owner-freebsd-bugs@FreeBSD.ORG Thu Sep 18 01:10:15 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 18F9416A4B3 for ; Thu, 18 Sep 2003 01:10:15 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA63943FBD for ; Thu, 18 Sep 2003 01:10:13 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h8I8ADFY077079 for ; Thu, 18 Sep 2003 01:10:13 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h8I8ADir077078; Thu, 18 Sep 2003 01:10:13 -0700 (PDT) (envelope-from gnats) Resent-Date: Thu, 18 Sep 2003 01:10:13 -0700 (PDT) Resent-Message-Id: <200309180810.h8I8ADir077078@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Antti Louko Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9D85216A4BF for ; Thu, 18 Sep 2003 01:03:31 -0700 (PDT) Received: from alo.louko.com (x1.louko.com [195.218.71.106]) by mx1.FreeBSD.org (Postfix) with SMTP id 16CB543F75 for ; Thu, 18 Sep 2003 01:03:30 -0700 (PDT) (envelope-from alo@alo.louko.com) Received: (qmail 39958 invoked by uid 406); 18 Sep 2003 08:03:28 -0000 Message-Id: <20030918080328.39957.qmail@alo.louko.com> Date: 18 Sep 2003 08:03:28 -0000 From: Antti Louko To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: alo@iki.fi Subject: kern/56975: Write to a Compact Flash (CF) card freezes the whole system X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Antti Louko List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2003 08:10:15 -0000 >Number: 56975 >Category: kern >Synopsis: Write to a Compact Flash (CF) card freezes the whole system >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Sep 18 01:10:13 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Antti Louko >Release: FreeBSD 5.1-RELEASE i386 >Organization: >Environment: System: FreeBSD xxxx.louko.com 5.1-RELEASE FreeBSD 5.1-RELEASE #26: Tue Sep 16 08:18:42 EEST 2003 root@xxxx.louko.com:/usr/src/sys/i386/compile/LEX2 i386 VIA Eden processor and chipset combo VIA VT8601A, VT82C686B. >Description: The machine has a CF slot on the motherboard and the problem occurs when writing to the CF with either dd to raw disk or through file system. The system quite soon freezes completely. >How-To-Repeat: Insert CF. dd if=/dev/zero bs=32k of=/dev/ad2 >Fix: It appears that chipset/CF combo doesn't like any IO operations immediately after s status inquiry. The following path fixes the problem. It seemed best to put the delay just after the INB and thus get it in all exit paths of the function. *** dev/ata/ata-all.c.orig Sun May 18 19:43:08 2003 --- dev/ata/ata-all.c Tue Sep 16 08:14:56 2003 *************** *** 978,983 **** --- 978,984 ---- DELAY(1); while (timeout < 5000000) { /* timeout 5 secs */ atadev->channel->status = ATA_IDX_INB(atadev->channel, ATA_STATUS); + DELAY(1); /* if drive fails status, reselect the drive just to be sure */ if (atadev->channel->status == 0xff) { >Release-Note: >Audit-Trail: >Unformatted: