From owner-freebsd-current Tue Oct 16 11:19:36 2001 Delivered-To: freebsd-current@freebsd.org Received: from teletubbie.het.net.je (teletubbie.het.net.je [192.87.110.29]) by hub.freebsd.org (Postfix) with ESMTP id EA25037B40B for ; Tue, 16 Oct 2001 11:19:27 -0700 (PDT) Received: by teletubbie.het.net.je (Postfix, from userid 500) id DC0761B251; Tue, 16 Oct 2001 20:19:26 +0200 (CEST) Date: Tue, 16 Oct 2001 20:19:26 +0200 To: current@freebsd.org Subject: Re: pcmcia cdrom/irq sharing problem? -> solved Message-ID: <20011016201926.A91544@teletubbie.het.net.je> References: <20011016120830.A88534@teletubbie.het.net.je> <200110160957.f9G9v7K49919@vega.vega.com> <20011016120830.A88534@teletubbie.het.net.je> <200110161424.f9GEOY731667@harmony.village.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ikeVEW9yuYc//A+q" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200110161424.f9GEOY731667@harmony.village.org>; from imp@harmony.village.org on Tue, Oct 16, 2001 at 08:24:34AM -0600 From: walter@belgers.com (Walter Belgers) Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Warner Losh wrote: > There's a bug in the ata driver that Ian Downes has a patch for. Yes - Ian sent it to me (thanks!) and indeed it does work. I've attached the version that will fix -CURRENT. Cheers, Walter. -- Walter Belgers "Si hoc signum legere potes, operis boni in rebus walter@belgers.com Latinis alacribus et fructuosis potiri potes!" --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch_ata --- ata-all.c.orig Tue Oct 16 17:05:36 2001 +++ ata-all.c Tue Oct 16 17:07:16 2001 @@ -156,7 +156,7 @@ ata_attach(device_t dev) { struct ata_softc *scp; - int error, rid; + int error, rid, s; if (!dev) return ENXIO; @@ -181,6 +181,7 @@ * otherwise attach what the probe has found in scp->devices. */ if (!ata_delayed_attach) { + s = splbio(); if (scp->devices & ATA_ATA_SLAVE) if (ata_getparam(scp, ATA_SLAVE, ATA_C_ATA_IDENTIFY)) scp->devices &= ~ATA_ATA_SLAVE; @@ -205,6 +206,7 @@ if (scp->devices & ATA_ATAPI_SLAVE) atapi_attach(scp, ATA_SLAVE); #endif + splx(s); } return 0; } @@ -723,7 +725,7 @@ /* wait for BUSY to go inactive */ for (timeout = 0; timeout < 310000; timeout++) { - if (stat0 & ATA_S_BUSY) { + if (mask & 0x01 && stat0 & ATA_S_BUSY) { ATA_OUTB(scp->r_io, ATA_DRIVE, ATA_D_IBM | ATA_MASTER); DELAY(10); stat0 = ATA_INB(scp->r_io, ATA_STATUS); @@ -738,7 +740,7 @@ scp->devices |= ATA_ATAPI_MASTER; } } - if (stat1 & ATA_S_BUSY) { + if (mask & 0x02 && stat1 & ATA_S_BUSY) { ATA_OUTB(scp->r_io, ATA_DRIVE, ATA_D_IBM | ATA_SLAVE); DELAY(10); stat1 = ATA_INB(scp->r_io, ATA_STATUS); --ikeVEW9yuYc//A+q-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message