From owner-freebsd-current@FreeBSD.ORG Fri Oct 29 07:36:31 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8CEB116A4CF for ; Fri, 29 Oct 2004 07:36:31 +0000 (GMT) Received: from Espresso.NEEBU.Net (espresso.neebu.net [66.166.158.130]) by mx1.FreeBSD.org (Postfix) with SMTP id 0635843D4C for ; Fri, 29 Oct 2004 07:36:31 +0000 (GMT) (envelope-from khuon@Espresso.NEEBU.Net) Received: from Espresso.NEEBU.Net (khuon@localhost [127.0.0.1]) by Espresso.NEEBU.Net (8.12.10/8.12.10) with ESMTP id i9T7aJS4017215; Fri, 29 Oct 2004 00:36:20 -0700 (PDT) Received: from Espresso.NEEBU.Net (khuon@localhost)i9T7aIia017214; Fri, 29 Oct 2004 00:36:19 -0700 (PDT) Message-Id: <200410290736.i9T7aIia017214@Espresso.NEEBU.Net> From: "Jake Khuon" To: Bruce M Simpson Dcc: In-reply-to: Bruce M Simpson's message of Thu, 28 Oct 2004 17:38:52 -0700. <20041029003852.GE2063@empiric.icir.org> Action: Expires: Precedence: Priority: Normal X-Face: "(e&e|OIYrcV1x8y?txN%k1E2f[qWLjRjOn+a30)3>x`Wx%_9XiXs\IO2#G5L1m=c/|^h|z29wJ#]D/.?Ks,Mw1 X-URI: http://Espresso.NEEBU.Net/~khuon/ X-Organisation: Network Engineers for Effective Bandwidth Utilisation X-Header: /usr/include gives great headers X-System: Sun UltraSPARCstation2/2300MP running SunOS Release 5.8 X-Shell: tcsh 6.07.02 (Astron) 1996-10-27 (sparc-sun-solaris) options 8b,nls,dl,al,ng,rh X-Chtorr: History is full of revisionists. Where it used to say "THOU SHALT NOT KILL" it now says, "except as specified in section III-B, Paragraph 12, Sub-section D, Schedule 3." If that still doesn't suit you, wait till next year's commandments come out and trade it in for something that does. X-Mailer: MH 6.8.4 #4[UCI] (Espresso.NEEBU.Net) of Mon Feb 19 15:14:03 EST 1996 Date: Fri, 29 Oct 2004 00:36:18 -0700 Sender: khuon@Espresso.NEEBU.Net cc: freebsd-current@freebsd.org Subject: Re: broken APM on IBM-T30 with 6.0-CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Oct 2004 07:36:31 -0000 ### On Thu, 28 Oct 2004 17:38:52 -0700, Bruce M Simpson ### casually decided to expound upon Jake Khuon 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 ]======================+ | Packet Plumber, Network Engineers /| / [~ [~ |) | | --------------- | | for Effective Bandwidth Utilisation / |/ [_ [_ |) |_| N E T W O R K S | +=========================================================================*/