### On Thu, 28 Oct 2004 17:38:52 -0700, Bruce M Simpson <bms_at_spc.org> ### casually decided to expound upon Jake Khuon <khuon_at_NEEBU.Net> the ### following thoughts about "Re: broken APM on IBM-T30 with 6.0-CURRENT": BMS> On Thu, Oct 28, 2004 at 05:33:03PM -0700, Jake Khuon wrote: BMS> > That patch worked perfectly. I had to do a little hand-patching of one of BMS> > the hunks that got rejected though. Any thoughts on if this will get BMS> > merged? Thanks. BMS> BMS> Please send me these patches so I can look at them... After applying the patch, I did a backdiff. This is against: /src/sys/dev/ata/ata-all.c,v 1.233 2004/10/19 20:13:38 *** ata-all.c.orig Mon Oct 25 06:28:47 2004 --- ata-all.c Thu Oct 28 15:18:20 2004 *************** *** 86,91 **** --- 86,92 ---- static struct intr_config_hook *ata_delayed_attach = NULL; static int ata_dma = 1; static int atapi_dma = 1; + static int ata_resuming = 0; /* sysctl vars */ SYSCTL_NODE(_hw, OID_AUTO, ata, CTLFLAG_RD, 0, "ATA driver parameters"); *************** *** 346,356 **** --- 347,359 ---- if (ch->state == ATA_IDLE) { ch->state = ATA_ACTIVE; mtx_unlock(&ch->state_mtx); + goto out; break; } mtx_unlock(&ch->state_mtx); tsleep(ch, PRIBIO, "atasusp", hz/10); } + out: ch->locking(ch, ATA_LF_UNLOCK); return 0; } *************** *** 364,371 **** --- 367,376 ---- if (!dev || !(ch = device_get_softc(dev))) return ENXIO; + ata_resuming = 1; error = ata_reinit(ch); ata_start(ch); + ata_resuming = 0; return error; } *************** *** 838,844 **** void ata_udelay(int interval) { ! if (interval < (1000000/hz) || ata_delayed_attach) DELAY(interval); else tsleep(&interval, PRIBIO, "ataslp", interval/(1000000/hz)); --- 843,849 ---- void ata_udelay(int interval) { ! if (interval < (1000000/hz) || ata_delayed_attach || ata_resuming) DELAY(interval); else tsleep(&interval, PRIBIO, "ataslp", interval/(1000000/hz)); -- /*===================[ Jake Khuon <khuon_at_NEEBU.Net> ]======================+ | Packet Plumber, Network Engineers /| / [~ [~ |) | | --------------- | | for Effective Bandwidth Utilisation / |/ [_ [_ |) |_| N E T W O R K S | +=========================================================================*/Received on Fri Oct 29 2004 - 05:36:31 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:20 UTC