From owner-freebsd-bugs@FreeBSD.ORG Mon Oct 18 02:10:29 2004 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 5759916A4CF for ; Mon, 18 Oct 2004 02:10:29 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A9A843D3F for ; Mon, 18 Oct 2004 02:10:29 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i9I2AT3Z066272 for ; Mon, 18 Oct 2004 02:10:29 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i9I2ATeD066271; Mon, 18 Oct 2004 02:10:29 GMT (envelope-from gnats) Resent-Date: Mon, 18 Oct 2004 02:10:29 GMT Resent-Message-Id: <200410180210.i9I2ATeD066271@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, "James E. Flemer" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E56E16A4CE for ; Mon, 18 Oct 2004 02:01:12 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2050643D1D for ; Mon, 18 Oct 2004 02:01:12 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i9I21BgB030822 for ; Mon, 18 Oct 2004 02:01:11 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i9I21B8g030821; Mon, 18 Oct 2004 02:01:11 GMT (envelope-from nobody) Message-Id: <200410180201.i9I21B8g030821@www.freebsd.org> Date: Mon, 18 Oct 2004 02:01:11 GMT From: "James E. Flemer" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: kern/72805: pccard ata locking problem X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Oct 2004 02:10:29 -0000 >Number: 72805 >Category: kern >Synopsis: pccard ata locking problem >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Oct 18 02:10:28 GMT 2004 >Closed-Date: >Last-Modified: >Originator: James E. Flemer >Release: 6.0-CURRENT >Organization: n/a >Environment: FreeBSD null.speednaked.com 6.0-CURRENT FreeBSD 6.0-CURRENT #13: Sun Oct 17 18:14:23 MDT 2004 root@:/usr/src/sys/i386/compile/NULL6 i386 >Description: The locking changes to ata-all.c made in r1.229 expect the locking method to return ch->unit. The pccard ata (ata-card.c) driver has bogus locking which was not updated to return ch->unit, it returns 1. This causes ata-all.c enter an infinite loop trying to lock in ata_attach(). >How-To-Repeat: Insert a pcmcia ata device or compact flash ata device and watch it not attach. Ejecting the device will cause a panic as soon as something (atacontrol) tries to touch it. >Fix: This has an extremely trivial fix, so it should probably be applied and merged to 5.x quickly (for 5.3). Note: this was submitted via web form so whitespace will be broken, but its a simple enough patch. --- ata-card.c 6 Oct 2004 19:46:07 -0000 1.26 +++ ata-card.c 18 Oct 2004 01:41:58 -0000 @@ -91,7 +91,7 @@ static int ata_pccard_locknoop(struct ata_channel *ch, int type) { - return 1; + return ch->unit; } static void >Release-Note: >Audit-Trail: >Unformatted: