Date: Tue, 16 Oct 2001 20:19:26 +0200 From: walter@belgers.com (Walter Belgers) To: current@freebsd.org Subject: Re: pcmcia cdrom/irq sharing problem? -> solved Message-ID: <20011016201926.A91544@teletubbie.het.net.je> In-Reply-To: <200110161424.f9GEOY731667@harmony.village.org>; from imp@harmony.village.org on Tue, Oct 16, 2001 at 08:24:34AM -0600 References: <20011016120830.A88534@teletubbie.het.net.je> <bulk.73072.20011016024601@hub.freebsd.org> <200110160957.f9G9v7K49919@vega.vega.com> <20011016120830.A88534@teletubbie.het.net.je> <200110161424.f9GEOY731667@harmony.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011016201926.A91544>