Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Oct 2004 02:01:11 GMT
From:      "James E. Flemer" <jflemer@alum.rpi.edu>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/72805: pccard ata locking problem
Message-ID:  <200410180201.i9I21B8g030821@www.freebsd.org>
Resent-Message-ID: <200410180210.i9I2ATeD066271@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410180201.i9I21B8g030821>