From owner-freebsd-stable Fri Mar 22 1:14:38 2002 Delivered-To: freebsd-stable@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 7DDD137B400; Fri, 22 Mar 2002 01:14:32 -0800 (PST) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 22 Mar 2002 09:14:25 +0000 (GMT) To: Jon Larssen Cc: freebsd-stable@freebsd.org, sos@freebsd.org Subject: Re: Is ATA partially broken in -STABLE? In-Reply-To: Your message of "Fri, 22 Mar 2002 03:36:22 GMT." Date: Fri, 22 Mar 2002 09:14:24 +0000 From: Ian Dowse Message-ID: <200203220914.aa83048@salmon.maths.tcd.ie> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message , Jon Larssen writes: >I have just cvsup'd my -STABLE system running under VMware 3 >Workstation under Windows 2000. After making world and a >GENERIC kernel I can't boot into my system. These are the >messages I get: > >ata0-master: timeout waiting for interrupt >ata0-master: ATA identify failed >ata1-master: timeout waiting for interrupt >ata1-master: ATAPI identify failed I get something similar with VMware2. The following patch seems to work for me, but I haven't really investigated the problem. It is the change in ata_boot_attach() below that actually makes the difference; I think the ata_attach bit won't affect boot-time probes. Ian Index: ata-all.c =================================================================== RCS file: /dump/FreeBSD-CVS/src/sys/dev/ata/ata-all.c,v retrieving revision 1.50.2.30 diff -u -r1.50.2.30 ata-all.c --- ata-all.c 18 Mar 2002 08:37:33 -0000 1.50.2.30 +++ ata-all.c 22 Mar 2002 09:06:30 -0000 @@ -162,7 +162,7 @@ ata_attach(device_t dev) { struct ata_channel *ch; - int error, rid; + int error, rid, s; if (!dev || !(ch = device_get_softc(dev))) return ENXIO; @@ -186,6 +186,7 @@ * otherwise attach what the probe has found in ch->devices. */ if (!ata_delayed_attach) { + s = splbio(); if (ch->devices & ATA_ATA_SLAVE) if (ata_getparam(&ch->device[SLAVE], ATA_C_ATA_IDENTIFY)) ch->devices &= ~ATA_ATA_SLAVE; @@ -210,6 +211,7 @@ if (ch->devices & ATA_ATAPI_SLAVE) atapi_attach(&ch->device[SLAVE]); #endif + splx(s); } return 0; } @@ -469,13 +471,14 @@ ata_boot_attach(void) { struct ata_channel *ch; - int ctlr; + int ctlr, s; if (ata_delayed_attach) { config_intrhook_disestablish(ata_delayed_attach); free(ata_delayed_attach, M_TEMP); ata_delayed_attach = NULL; } + s = splbio(); /* * run through all ata devices and look for real ATA & ATAPI devices @@ -522,6 +525,7 @@ atapi_attach(&ch->device[SLAVE]); } #endif + splx(s); } static void To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message