kern/72805: pccard ata locking problem
James E. Flemer
jflemer at alum.rpi.edu
Sun Oct 17 19:10:29 PDT 2004
>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:
More information about the freebsd-bugs
mailing list