From owner-freebsd-acpi@FreeBSD.ORG Sun Apr 6 02:42:38 2008 Return-Path: Delivered-To: freebsd-acpi@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 252EC106566C; Sun, 6 Apr 2008 02:42:38 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E829E8FC1A; Sun, 6 Apr 2008 02:42:37 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from freefall.freebsd.org (takawata@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m362gb5v049441; Sun, 6 Apr 2008 02:42:37 GMT (envelope-from takawata@freefall.freebsd.org) Received: (from takawata@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m362gb3I049437; Sun, 6 Apr 2008 02:42:37 GMT (envelope-from takawata) Date: Sun, 6 Apr 2008 02:42:37 GMT Message-Id: <200804060242.m362gb3I049437@freefall.freebsd.org> To: cristi@net.utcluj.ro, takawata@FreeBSD.org, freebsd-acpi@FreeBSD.org From: takawata@FreeBSD.org Cc: Subject: Re: kern/114649: [patch][acpi] panic: recursed on non-recursive mutex X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2008 02:42:38 -0000 Synopsis: [patch][acpi] panic: recursed on non-recursive mutex State-Changed-From-To: open->closed State-Changed-By: takawata State-Changed-When: Sun Apr 6 02:37:46 UTC 2008 State-Changed-Why: I encountered same problem on ThinkPad X61 uni processor suspend/resume. And fixed on the same way. http://www.freebsd.org/cgi/query-pr.cgi?pr=114649 From owner-freebsd-acpi@FreeBSD.ORG Sun Apr 6 02:44:23 2008 Return-Path: Delivered-To: freebsd-acpi@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18496106566C; Sun, 6 Apr 2008 02:44:23 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DB5CA8FC1F; Sun, 6 Apr 2008 02:44:22 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from freefall.freebsd.org (takawata@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m362iMjI049533; Sun, 6 Apr 2008 02:44:22 GMT (envelope-from takawata@freefall.freebsd.org) Received: (from takawata@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m362iMPa049527; Sun, 6 Apr 2008 02:44:22 GMT (envelope-from takawata) Date: Sun, 6 Apr 2008 02:44:22 GMT Message-Id: <200804060244.m362iMPa049527@freefall.freebsd.org> To: alangrow+b9d2265c@gmail.com, takawata@FreeBSD.org, freebsd-acpi@FreeBSD.org From: takawata@FreeBSD.org Cc: Subject: Re: kern/114113: [acpi] [patch] ACPI kernel panic during S3 suspend / resume X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2008 02:44:23 -0000 Synopsis: [acpi] [patch] ACPI kernel panic during S3 suspend / resume State-Changed-From-To: open->closed State-Changed-By: takawata State-Changed-When: Sun Apr 6 02:42:51 UTC 2008 State-Changed-Why: I encountered same problem, and fixed with the same way. http://www.freebsd.org/cgi/query-pr.cgi?pr=114113 From owner-freebsd-acpi@FreeBSD.ORG Sun Apr 6 11:39:39 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26DD9106566C for ; Sun, 6 Apr 2008 11:39:39 +0000 (UTC) (envelope-from mickey242@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 674838FC2A for ; Sun, 6 Apr 2008 11:39:38 +0000 (UTC) (envelope-from mickey242@gmx.net) Received: (qmail invoked by alias); 06 Apr 2008 11:12:57 -0000 Received: from port-ip-213-211-209-123.reverse.mdcc-fun.de (EHLO gunhead.enforcer.cc) [213.211.209.123] by mail.gmx.net (mp055) with SMTP; 06 Apr 2008 13:12:57 +0200 X-Authenticated: #8913523 X-Provags-ID: V01U2FsdGVkX18Xw6N6LJwXt4FbQVah4pcmDaIQ4gdhnBW3lZdCmu AKJRNSCT23BsgW Message-ID: <47F8B038.7000400@gmx.net> Date: Sun, 06 Apr 2008 13:12:56 +0200 From: Andreas Wetzel User-Agent: Thunderbird 2.0.0.12 (X11/20080310) MIME-Version: 1.0 To: freebsd-acpi@freebsd.org Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Subject: FreeBSD 7.0 suspend X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2008 11:39:39 -0000 Hi i recently upgraded an IBM ThinkPad T30 from 6.3 to 7.0 and checked out the suspend/resume support which seems to work much more reliable with 7.0. But there was one problem i came across. On suspend /etc/rc.suspend does not get executed and the machine enters the given sleep state immediately. After some fiddling i now seem to have found the reason for this behaviour in /sys/dev/acpica/acpi.c: /* If devd(8) is not running, immediately enter the sleep state. */ if (devctl_process_running() == FALSE) { ... For some reason this check returns FALSE, although devd is actually running. When i comment out the check, everything works as expected: devd is notified, executes /etc/rc.suspend, which in turn calls acpiconf -k 0 when done, and then the system goes to sleep. Any ideas, why this function does not correctly recognize that devd is running? Andreas -- Keep it icy man. I don't want to end up a corpse before my time because you were daydreaming. From owner-freebsd-acpi@FreeBSD.ORG Sun Apr 6 12:11:22 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F407F106566B for ; Sun, 6 Apr 2008 12:11:21 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from hosted.kievnet.com (hosted.kievnet.com [193.138.144.10]) by mx1.freebsd.org (Postfix) with ESMTP id 6EB848FC1F for ; Sun, 6 Apr 2008 12:11:21 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost ([127.0.0.1] helo=edge.pp.kiev.ua) by hosted.kievnet.com with esmtpa (Exim 4.62) (envelope-from ) id 1JiSx6-00050b-00; Sun, 06 Apr 2008 14:22:24 +0300 Message-ID: <47F8B269.6030606@icyb.net.ua> Date: Sun, 06 Apr 2008 14:22:17 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.12 (X11/20080320) MIME-Version: 1.0 To: Nate Lawson References: <47C67001.20101@icyb.net.ua> <47C6FACC.9090502@root.org> <47C70B87.5060301@icyb.net.ua> In-Reply-To: <47C70B87.5060301@icyb.net.ua> Content-Type: multipart/mixed; boundary="------------000400010100020701020907" Cc: freebsd-acpi@freebsd.org Subject: Re: mismatch between FACP and chipset spec X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2008 12:11:22 -0000 This is a multi-part message in MIME format. --------------000400010100020701020907 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit on 28/02/2008 21:29 Andriy Gapon said the following: > on 28/02/2008 20:17 Nate Lawson said the following: >> Andriy Gapon wrote: >>> But addresses given for PM1a_CNT_BLK are not documented at all! On the >>> other hand ACPI description of that register perfectly matches >>> description of PIIX4 PMCNTRL register that is located at 0x4004 with a >>> given base address. So, this is 0x4040 vs. 0x4004, looks like a possible >>> typo/mistake by an author of ACPI tables for this motherboard. >> 440BX is pretty old, and typos like that were common back then. ACPI >> was less used and drivers would just hardcode 0x4004 or whatever. >> >>> Question: is there any way I can way override the address of >>> PM1a_CNT_BLK? My guess is that there is zero chance that there would be >>> any BIOS updates for this old and exotic motherboard (MP2-BX-X). >> No generic way. You'd have to add a quirk to acpi.c/acpi_quirks and use >> that to override FADT. >> >>> I think that this register is mostly useful for BM_RLD bit which is used >>> in C3 support. I don't use C3 (there is an errata for C3 with this >>> chipset and there is no PM2_CNT register defined anyway), but I am >>> curios anyway. >> Seems like a lot of effort for no gain. Since you are getting good at >> debugging, can we get you newer hardware to play with? :) > > Nate, > > thank you for pointing me to acpi_quirks and for confirming my doubts > over worthwhileness of this endeavor. I knew that I wouldn't be able to keep my hands off it :-) Actually that PM1a_CNT_BLK typo caused one very minor annoyance for me (but still an annoyance!) - 'shutdown -p' would cause the machine to hang right after 'Powering system off using ACPI' line. It seems that ACPI power off requires a write to PM1a_CNT_BLK area and the hardware doesn't tolerate a write to a bogus IO register. Attached is small patch that fixes the issue for my particular system. It is a bit ugly but I couldn't think of another way for a quirk like this. -- Andriy Gapon --------------000400010100020701020907 Content-Type: text/x-patch; name="mp2bxx.piix4.PM1a_CNT_BLK-poweroff.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mp2bxx.piix4.PM1a_CNT_BLK-poweroff.patch" --- sys/dev/acpica/acpi_quirk.c.orig 2008-04-05 01:01:08.000000000 +0300 +++ sys/dev/acpica/acpi_quirk.c 2008-04-05 01:55:54.000000000 +0300 @@ -71,6 +71,7 @@ static int aq_strcmp(char *actual, char *possible); static int aq_match_header(ACPI_TABLE_HEADER *hdr, const struct acpi_q_rule *match); +static void aq_special(void); static int aq_revcmp(int revision, enum ops_t op, int value) @@ -154,6 +155,7 @@ bzero(&fadt, sizeof(xsdt)); /* Then, override the quirks with any matched from table signatures. */ + done = FALSE; for (entry = acpi_quirks_table; entry->match; entry++) { done = TRUE; for (match = entry->match; match->sig[0] != '\0'; match++) { @@ -180,5 +182,48 @@ } } + /* Special quirks that can not be expressed in a generic form */ + if (!done) + aq_special(); + return (0); } + +void aq_special(void) +{ + static const struct acpi_q_rule MP2_BX_X[] = { + { "FADT", OEM, {"AWARD "}, {"AWRDACPI"} }, + { "FADT", OEM_REV, {.op = OP_EQL}, {.rev = 0x42302e31} }, + { "FADT", CREATOR, {"AWRD"} }, + { "FADT", CREATOR_REV, {.op = OP_EQL}, {.rev = 0x0} }, + { "" } + }; + + const struct acpi_q_rule *match; + ACPI_TABLE_HEADER fadt; + int done; + + if (ACPI_FAILURE(AcpiGetTableHeader(ACPI_SIG_FADT, 0, &fadt))) + bzero(&fadt, sizeof(fadt)); + + /* Code specific to MP2-BX-X motherboard. */ + done = TRUE; + for (match = &MP2_BX_X[0]; match->sig[0] != '\0'; match++) { + if (aq_match_header(&fadt, match) == FALSE) { + done = FALSE; + break; + } + } + if (done) { + /* This MP2-BX-X FADT specifies PM1a_CNT_BLK=0x4040-0x4041, + * while in fact it should be 0x4004-0x4005 according to + * PIIX4E specification (PMCNTRL IO register). + */ + printf("MP2-BX-X: changing PM1a_CNT_BLK from 0x%x to 0x4004\n", + AcpiGbl_FADT.Pm1aControlBlock); + AcpiGbl_FADT.Pm1aControlBlock = 0x4004; + AcpiGbl_FADT.Pm1ControlLength = 2; + return; + } +} + --------------000400010100020701020907-- From owner-freebsd-acpi@FreeBSD.ORG Mon Apr 7 11:06:53 2008 Return-Path: Delivered-To: freebsd-acpi@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2D271065675 for ; Mon, 7 Apr 2008 11:06:53 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B2B648FC24 for ; Mon, 7 Apr 2008 11:06:53 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m37B6rgE048685 for ; Mon, 7 Apr 2008 11:06:53 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m37B6reO048681 for freebsd-acpi@FreeBSD.org; Mon, 7 Apr 2008 11:06:53 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 7 Apr 2008 11:06:53 GMT Message-Id: <200804071106.m37B6reO048681@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-acpi@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-acpi@FreeBSD.org X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Apr 2008 11:06:53 -0000 Current FreeBSD problem reports Critical problems Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o i386/54756 acpi ACPI suspend/resume problem on CF-W2 laptop o i386/55661 acpi ACPI suspend/resume problem on ARMADA M700 o kern/56024 acpi ACPI suspend drains battery while in S3 o i386/72566 acpi ACPI, FreeBSD disables fan on Compaq Armada 1750 o i386/79081 acpi ACPI suspend/resume not working on HP nx6110 o kern/81000 acpi [apic] Via 8235 sound card worked great with FreeBSD 5 s kern/91038 acpi [panic] [ata] [acpi] 6.0-RELEASE on Fujitsu Siemens Am s i386/91748 acpi acpi problem on Acer TravelMare 4652LMi (nvidia panic, o kern/102252 acpi acpi thermal does not work on Abit AW8D (intel 975) o kern/104625 acpi ACPI on ASUS A8N-32 SLI/ASUS P4P800 does not show ther o kern/106924 acpi [acpi] ACPI resume returns g_vfs_done() errors and ker o kern/108954 acpi [acpi] 'sleep(1)' sleeps >1 seconds when speedstep (Cx o i386/114562 acpi [acpi] cardbus is dead after s3 on Thinkpad T43 with a o amd64/115011 acpi ACPI problem ,reboot system down. o kern/116939 acpi [acpi] PCI-to-PCI misconfigured for bus three and can o bin/118973 acpi [acpi]: Kernel panic with acpi boot o kern/119200 acpi [acpi] Lid close switch suspends CPU for 1 second on H o kern/119356 acpi [acpi]: i386 ACPI wakeup not work due resource exhaust o kern/120953 acpi [acpi]: FreeBSD 6.3 Release: acpi_tz0: _TMP value is o kern/121454 acpi [pst] Promise SuperTrak SX6000 does not load during bo 20 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- f kern/67309 acpi zzz reboot computer (ACPI S3) o i386/69750 acpi Boot without ACPI failed on ASUS L5 s kern/73823 acpi [request] acpi / power-on by timer support o kern/76950 acpi ACPI wrongly blacklisted on Micron ClientPro 766Xi sys o kern/89411 acpi [acpi] acpiconf bug s kern/90243 acpi Laptop fan doesn't turn off (ACPI enabled) (Packard Be o kern/97383 acpi Volume buttons on IBM Thinkpad crash system with ACPI o kern/103365 acpi [acpi] acpi poweroff doesn't work with geli device att o kern/105537 acpi [acpi] problems in acpi on HP Compaq nc6320 o kern/108017 acpi [acpi]: Acer Aspire 5600 o kern/108488 acpi [acpi] ACPI-1304: *** Error: Method execution failed o kern/108581 acpi [sysctl] sysctl: hw.acpi.cpu.cx_lowest: Invalid argume o kern/108695 acpi [acpi]: Fatal trap 9: general protection fault when in s kern/112544 acpi [acpi] [patch] Add High Precision Event Timer Driver f o kern/114165 acpi [acpi] Dell C810 - ACPI problem o kern/117605 acpi [acpi] [request] add debug.cpufreq.highest o kern/120515 acpi [acpi] [patch] acpi_alloc_wakeup_handler: can't alloc o kern/121102 acpi [acpi_fujitsu] [patch] update acpi_fujitsu for the P80 o kern/121504 acpi [patch] Correctly set hw.acpi.osname on certain machin 19 problems total. From owner-freebsd-acpi@FreeBSD.ORG Mon Apr 7 11:36:48 2008 Return-Path: Delivered-To: freebsd-acpi@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8383D1065676; Mon, 7 Apr 2008 11:36:48 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5AAF58FC1C; Mon, 7 Apr 2008 11:36:48 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from freefall.freebsd.org (gavin@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m37BamlP055191; Mon, 7 Apr 2008 11:36:48 GMT (envelope-from gavin@freefall.freebsd.org) Received: (from gavin@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m37Bamsv055187; Mon, 7 Apr 2008 11:36:48 GMT (envelope-from gavin) Date: Mon, 7 Apr 2008 11:36:48 GMT Message-Id: <200804071136.m37Bamsv055187@freefall.freebsd.org> To: ruud@t-boonproductions.nl, gavin@FreeBSD.org, freebsd-amd64@FreeBSD.org, freebsd-acpi@FreeBSD.org From: gavin@FreeBSD.org Cc: Subject: Re: amd64/122521: ACPI Error after upgrade to 7.0 X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Apr 2008 11:36:48 -0000 Synopsis: ACPI Error after upgrade to 7.0 State-Changed-From-To: open->feedback State-Changed-By: gavin State-Changed-When: Mon Apr 7 11:35:01 UTC 2008 State-Changed-Why: To submitter: can you confirm that hw.acpi.thermal existed before the upgrade? What FreeBSD version were you using before? Responsible-Changed-From-To: freebsd-amd64->freebsd-acpi Responsible-Changed-By: gavin Responsible-Changed-When: Mon Apr 7 11:35:01 UTC 2008 Responsible-Changed-Why: Over to -acpi mailing list http://www.freebsd.org/cgi/query-pr.cgi?pr=122521 From owner-freebsd-acpi@FreeBSD.ORG Mon Apr 7 15:09:37 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13B9E1065671 for ; Mon, 7 Apr 2008 15:09:37 +0000 (UTC) (envelope-from sarumont@mail.sigil.org) Received: from mail.sigil.org (mail.sigil.org [69.13.51.5]) by mx1.freebsd.org (Postfix) with ESMTP id EA12A8FC0A for ; Mon, 7 Apr 2008 15:09:36 +0000 (UTC) (envelope-from sarumont@mail.sigil.org) Received: from localhost (localhost [127.0.0.1]) by mail.sigil.org (Postfix) with ESMTP id D3B1E508E6 for ; Mon, 7 Apr 2008 09:51:22 -0500 (CDT) X-Virus-Scanned: amavisd-new at sigil.org Received: from mail.sigil.org ([127.0.0.1]) by localhost (mail.sigil.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ejh1JYCAAzLb for ; Mon, 7 Apr 2008 09:51:16 -0500 (CDT) Received: by mail.sigil.org (Postfix, from userid 1001) id 12658508E3; Mon, 7 Apr 2008 09:51:16 -0500 (CDT) Date: Mon, 7 Apr 2008 09:51:16 -0500 From: Richard Kolkovich To: freebsd-acpi@freebsd.org Message-ID: <20080407145115.GA11167@snobol> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-OS: FreeBSD snobol 7.0-BETA2 i386 X-Composed-With: vim User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Thinkpad t43p suspend/resume only once X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Apr 2008 15:09:37 -0000 Hi, On my T43p, I can suspend to RAM (S3) and resume once. After this, nothing happens when I close the lid (until a reboot). I started digging into this today, and it looks like the acpi device is in a bad state after the resume. Running devd -dD from a terminal shows no output from ACPI buttons after the resume. I discovered today, however, that I can run acpiconf -s S3 to regain my ability to sleep/resume. This will suspend the machine and immediately resume it, after which devd shows output again. I'm running RELENG_7 as of about March 25th. I've only run 7.0 on this laptop, so I've always had this problem. I've just now gotten a chance to work on finding a fix. Please CC me, as I'm not subscribed to freebsd-acpi. Thanks, -- Richard Kolkovich sarumont@sigil.org From owner-freebsd-acpi@FreeBSD.ORG Mon Apr 7 15:52:59 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87A821065727; Mon, 7 Apr 2008 15:52:59 +0000 (UTC) (envelope-from takawata@init-main.com) Received: from sana.init-main.com (unknown [IPv6:2001:240:28::1]) by mx1.freebsd.org (Postfix) with ESMTP id 327B68FC16; Mon, 7 Apr 2008 15:52:59 +0000 (UTC) (envelope-from takawata@init-main.com) Received: from ns.init-main.com (localhost [127.0.0.1]) by sana.init-main.com (8.14.1/8.13.8) with ESMTP id m37FdLcT026089; Tue, 8 Apr 2008 00:39:21 +0900 (JST) (envelope-from takawata@ns.init-main.com) Message-Id: <200804071539.m37FdLcT026089@sana.init-main.com> To: sos@freebsd.org, freebsd-acpi@freebsd.org Date: Tue, 08 Apr 2008 00:39:21 +0900 From: Takanori Watanabe Cc: Subject: some problems in suspend/resume on ThinkPad X61 X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Apr 2008 15:52:59 -0000 I bought a new laptop;ThinkPad X61 and I'm trying to hack suspend/resume. As the first step, I'm trying to make sure to suspend/resume work in uniprocessor kernel. Finally I did succeeded to suspend and resume with 1) fwohci disabled 2) if_em down 3) hw.acpi.reset_video=1 4) modify ata driver with following crude patch. (Not generic solution.) So I want ata_pci_controller->chipinit and ata_pci_controller->allocate should split into two parts:Hardware initialization and data structure initialization. --- ata-chipset.c.~1.212.~ 2008-03-07 09:29:19.000000000 +0000 +++ ata-chipset.c 2008-04-08 00:23:34.000000000 +0000 @@ -540,7 +540,37 @@ (ATA_INL(ctlr->r_res2, ATA_AHCI_CAP) & ATA_AHCI_NPMASK) + 1); return 0; } +void ata_ahci_tell_dma(device_t dev); +void ata_ahci_tell_dma(device_t dev) +{ + struct ata_pci_controller *ctlr; + struct ata_channel *ch = device_get_softc(dev); + u_int64_t work; + int offset = ch->unit << 7; + + ctlr = device_get_softc(device_get_parent(dev)); + /* setup work areas */ + work = ch->dma->work_bus + ATA_AHCI_CL_OFFSET; + ATA_OUTL(ctlr->r_res2, ATA_AHCI_P_CLB + offset, work & 0xffffffff); + ATA_OUTL(ctlr->r_res2, ATA_AHCI_P_CLBU + offset, work >> 32); + + work = ch->dma->work_bus + ATA_AHCI_FB_OFFSET; + ATA_OUTL(ctlr->r_res2, ATA_AHCI_P_FB + offset, work & 0xffffffff); + ATA_OUTL(ctlr->r_res2, ATA_AHCI_P_FBU + offset, work >> 32); + /* enable wanted port interrupts */ + ATA_OUTL(ctlr->r_res2, ATA_AHCI_P_IE + offset, + (ATA_AHCI_P_IX_CPD | ATA_AHCI_P_IX_TFE | ATA_AHCI_P_IX_HBF | + ATA_AHCI_P_IX_HBD | ATA_AHCI_P_IX_IF | ATA_AHCI_P_IX_OF | + ATA_AHCI_P_IX_PRC | ATA_AHCI_P_IX_PC | ATA_AHCI_P_IX_DP | + ATA_AHCI_P_IX_UF | ATA_AHCI_P_IX_SDB | ATA_AHCI_P_IX_DS | + ATA_AHCI_P_IX_PS | ATA_AHCI_P_IX_DHR)); + + /* start operations on this channel */ + ATA_OUTL(ctlr->r_res2, ATA_AHCI_P_CMD + offset, + (ATA_AHCI_P_CMD_ACTIVE | ATA_AHCI_P_CMD_FRE | + ATA_AHCI_P_CMD_POD | ATA_AHCI_P_CMD_SUD | ATA_AHCI_P_CMD_ST)); +} static int ata_ahci_allocate(device_t dev) { --- ata-pci.c.~1.123.~ 2007-11-18 14:44:52.000000000 +0000 +++ ata-pci.c 2008-04-07 23:25:04.000000000 +0000 @@ -48,6 +48,7 @@ #include #include #include +extern void ata_ahci_tell_dma(device_t dev); /* local vars */ static MALLOC_DEFINE(M_ATAPCI, "ata_pci", "ATA driver PCI"); @@ -186,6 +187,18 @@ return ENXIO; } +static int ata_pci_resume(device_t dev) +{ + struct ata_pci_controller *ctlr = device_get_softc(dev); + int chans = ctlr->channels; + ctlr->chipinit(dev); + + if(chans != ctlr->channels){ + device_printf(dev, "WARNING: channel number changed\n"); + } + + return bus_generic_resume(dev); +} int ata_pci_attach(device_t dev) { @@ -546,7 +559,7 @@ DEVMETHOD(device_detach, ata_pci_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD(device_resume, ata_pci_resume), /* bus methods */ DEVMETHOD(bus_alloc_resource, ata_pci_alloc_resource), @@ -678,6 +691,15 @@ ctlr->setmode(dev, mode); } +static int ata_pcichannel_resume(device_t dev) +{ + struct ata_channel *ch = device_get_softc(dev); + struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); + if(ch->dma&&ctlr->r_res2) + ata_ahci_tell_dma(dev); + + return ata_resume(dev); +} static device_method_t ata_pcichannel_methods[] = { /* device interface */ DEVMETHOD(device_probe, ata_pcichannel_probe), @@ -685,7 +707,7 @@ DEVMETHOD(device_detach, ata_pcichannel_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, ata_suspend), - DEVMETHOD(device_resume, ata_resume), + DEVMETHOD(device_resume, ata_pcichannel_resume), /* ATA methods */ DEVMETHOD(ata_setmode, ata_pcichannel_setmode), From owner-freebsd-acpi@FreeBSD.ORG Mon Apr 7 18:55:35 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91E7C106568B; Mon, 7 Apr 2008 18:55:35 +0000 (UTC) (envelope-from takawata@init-main.com) Received: from sana.init-main.com (unknown [IPv6:2001:240:28::1]) by mx1.freebsd.org (Postfix) with ESMTP id 3005F8FC23; Mon, 7 Apr 2008 18:55:35 +0000 (UTC) (envelope-from takawata@init-main.com) Received: from ns.init-main.com (localhost [127.0.0.1]) by sana.init-main.com (8.14.1/8.13.8) with ESMTP id m37IfukE027475; Tue, 8 Apr 2008 03:41:56 +0900 (JST) (envelope-from takawata@ns.init-main.com) Message-Id: <200804071841.m37IfukE027475@sana.init-main.com> To: jfv@freebsd.org Date: Tue, 08 Apr 2008 03:41:56 +0900 From: Takanori Watanabe Cc: freebsd-acpi@freebsd.org Subject: if_em locking issue in resume path. X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Apr 2008 18:55:35 -0000 This patch resolve a problem which will cause lock assertion in resume path. Comment? --- if_em.c.~1.190.~ 2008-02-29 21:50:10.000000000 +0000 +++ if_em.c 2008-04-08 03:04:05.000000000 +0000 @@ -915,12 +915,13 @@ EM_CORE_LOCK(adapter); em_init_locked(adapter); em_init_manageability(adapter); + EM_CORE_UNLOCK(adapter); + EM_TX_LOCK(adapter); if ((ifp->if_flags & IFF_UP) && (ifp->if_drv_flags & IFF_DRV_RUNNING)) em_start_locked(ifp); - - EM_CORE_UNLOCK(adapter); + EM_TX_UNLOCK(adapter); return bus_generic_resume(dev); } From owner-freebsd-acpi@FreeBSD.ORG Mon Apr 7 19:36:43 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8EF7106566C for ; Mon, 7 Apr 2008 19:36:43 +0000 (UTC) (envelope-from spil.oss@googlemail.com) Received: from rn-out-0910.google.com (rn-out-0910.google.com [64.233.170.188]) by mx1.freebsd.org (Postfix) with ESMTP id 5A83B8FC14 for ; Mon, 7 Apr 2008 19:36:43 +0000 (UTC) (envelope-from spil.oss@googlemail.com) Received: by rn-out-0910.google.com with SMTP id s46so1808579rnb.3 for ; Mon, 07 Apr 2008 12:36:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=jiYm0kXMz1VhqYVRZqzhxIqF0BW/w5Wud1fCz98lUUQ=; b=u1j218oWMOP3U97h0Twv2JtncfgqLAbpGDDtB1l7/5Gskv/zGeBbC2mIlvOHUaLO8GzMFeX3xzptGr/oWDvSC24piiTaUBbq73/OqxOO8GViJofsHfNvHO5AKND0xp+1ilFAjUjEOU50LDzCRZ8YWR9jZpOT6Pm1Ouj3TWxLii4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=SZI2YxJVlh6DtGS2GtcQ8sCj8+E45oPvO6EZhmapDR8rELdKlVPk3BvGQrbqc/CMy1CCsRc0NPpqwywQI/HbXSL9vGegPsB3sU9G0Sc65OgHLoS4VSQz0yfX+UmxguR80EWxQ9dDkLVlLoF+gwSpYZesxi0gXoCPTrfid7cyHzY= Received: by 10.141.206.13 with SMTP id i13mr1753063rvq.211.1207597001862; Mon, 07 Apr 2008 12:36:41 -0700 (PDT) Received: by 10.70.27.5 with HTTP; Mon, 7 Apr 2008 12:36:41 -0700 (PDT) Message-ID: <5fbf03c20804071236i6db67a2ascd95f94eb1ba7abc@mail.gmail.com> Date: Mon, 7 Apr 2008 21:36:41 +0200 From: "Spil Oss" To: freebsd-acpi@freebsd.org In-Reply-To: <5fbf03c20804070149j15a3e3b1s54ced2f0bfc81efd@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5fbf03c20804040812t5fdf8065ubf46d6420358595@mail.gmail.com> <5fbf03c20804040844q22875ac8nbbc3fae121d3eac8@mail.gmail.com> <731432799.20080406100414@masm.elcom.ru> <5fbf03c20804070149j15a3e3b1s54ced2f0bfc81efd@mail.gmail.com> Subject: Re: Problem with lid on Dell D400 X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: spil.oss@gmail.com List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Apr 2008 19:36:43 -0000 > On 06/04/2008, Victor M. Blood wrote: > > On 04.04.2008, Spil Oss wrote: > > > On a Dell D400 notebook (Pentium-M 1.4GHz, Intel 855GM, ICH4M) running > > > FreeBSD 7.0 #0 > > > > > Closing the lid switches off the display, opening the lid does not > > > switch the display back on. Very annoying. The machine is fully > > > functional otherwise (accessed via ssh). > > > > > Noticed this first on a vanilla FreeBSD-7.0 #0 install, the optimized > > > kernel seems to behave the same. > > > > > In sysctl I noticed after closing and opening the lid > > > hw.acpi.lid_switch_state: NONE > > > but I have not checked the status of this sysctl before I closed the lid. > > > > > dmesg output is not of boot -v, but of regular boot > > > > > I wouldn't care if the lid doesn't have acpi features (e.g. suspend on > > > lid close), but I'd like the screen to switch off for additional > > > battery-life. > > > > > Hope someone can help me! > > > > on Dell 1300B I use module acpi_video > > add to loader.conf acpi_video_load="yes" > > > > and configure devd.conf to run script on lid change status: exist in > > it's examples. > > > > notify 10 { > > match "system" "ACPI"; > > match "subsystem" "Lid"; > > action "/sbin/lidctl $notify"; > > }; > > > > > > # cat /sbin/lidctl > > #!/bin/sh > > hive=hw.acpi.video.lcd0.active > > sysctl=/sbin/sysctl > > > > case "$1" in > > "1" | "0x01") > > ${sysctl} ${hive}=1 >/dev/null > > ;; > > "0" | "0x00") > > ${sysctl} ${hive}=0 >/dev/null > > ;; > > esac > > > > -- > > With all regards, Victor M. Blood. mailto: freebsd@masm.elcom.ru > > FTN: 2:5024/1.95@Fidonet.org, ICQ#3567656 > > > > Thanks Victor, > > Installed acpi_video and will try this later, currently I can't get to > the console to check. Will report back after checking! > > New sysctls after kldload acpi_video: > hw.acpi.video.tv0.active: 0 > hw.acpi.video.crt0.active: 0 > hw.acpi.video.lcd0.active: 0 > hw.acpi.video.ext0.active: 0 > > Kind regards, > > Spil > Thanks Victor, When I load acpi_video, I get following messages: acpi_video0: on vgapci0 acpi_video1: on vgapci1 evaluation of \\_SB_.PCI0.VID2._DOD makes no sense At least I could get the display back on by issueing sysctl hw.acpi.video.lcd0.active=1 But as I set the execute bit on /sbin/lidctl it was flying! Thanks a bundle! Kind regards, Spil. From owner-freebsd-acpi@FreeBSD.ORG Mon Apr 7 20:26:04 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B72E1065673 for ; Mon, 7 Apr 2008 20:26:04 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.30]) by mx1.freebsd.org (Postfix) with ESMTP id 425248FC1D for ; Mon, 7 Apr 2008 20:26:03 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: by yw-out-2324.google.com with SMTP id 2so258859ywt.13 for ; Mon, 07 Apr 2008 13:26:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=BqyE8CtpH2u/+lXPKY/6cATzijQcrP3JA/o4zJVssKw=; b=BezkF9S59SVnzw+8+3t8YEz1Mldj+Cp1+THhen64ENisweGFY3OC+fCzTvFTYyW7pCtm42y88vJlzkYxhdi4NR1x1L6TBNTSIYRwe2zJOSksbZJYHhEPeo/7q0bBuGgnJm8NVUGPbw9MFMNsXGfZL/RAIrn3hIAcns92IUQ2+BY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Hm99ZSwMHUqArySlNuKFOjABgM8qn3ravmaaxzuBLvEKLomLrAmmZ5wgw9bxAQ4kwahjYJ7OuJ3leR7CfLPLtnlBbiTjyZiNzSEEw4jFBSpYkQDMQBO0a17HQHsbmeoGG2DLo8R/YWyWIHojWqzdTk7XrO+Rfn80odrzI1ts2Zs= Received: by 10.114.135.1 with SMTP id i1mr6478089wad.88.1207598394238; Mon, 07 Apr 2008 12:59:54 -0700 (PDT) Received: by 10.114.174.20 with HTTP; Mon, 7 Apr 2008 12:59:54 -0700 (PDT) Message-ID: <2a41acea0804071259g28f2e2a7tc687a97e3c9d3988@mail.gmail.com> Date: Mon, 7 Apr 2008 12:59:54 -0700 From: "Jack Vogel" To: "Takanori Watanabe" In-Reply-To: <200804071841.m37IfukE027475@sana.init-main.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200804071841.m37IfukE027475@sana.init-main.com> Cc: jfv@freebsd.org, freebsd-acpi@freebsd.org Subject: Re: if_em locking issue in resume path. X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Apr 2008 20:26:04 -0000 Yes, thanks for noticing this, however rather than fix it as your patch I think I prefer just doing the CORE work, and then calling em_start(), it checks for the interface being up and gets the TX LOCK. I'll make the change as soon as I can. Jack On Mon, Apr 7, 2008 at 11:41 AM, Takanori Watanabe wrote: > This patch resolve a problem which will cause lock assertion > in resume path. Comment? > > > --- if_em.c.~1.190.~ 2008-02-29 21:50:10.000000000 +0000 > +++ if_em.c 2008-04-08 03:04:05.000000000 +0000 > @@ -915,12 +915,13 @@ > EM_CORE_LOCK(adapter); > em_init_locked(adapter); > em_init_manageability(adapter); > + EM_CORE_UNLOCK(adapter); > > + EM_TX_LOCK(adapter); > if ((ifp->if_flags & IFF_UP) && > (ifp->if_drv_flags & IFF_DRV_RUNNING)) > em_start_locked(ifp); > - > - EM_CORE_UNLOCK(adapter); > + EM_TX_UNLOCK(adapter); > > return bus_generic_resume(dev); > } > From owner-freebsd-acpi@FreeBSD.ORG Wed Apr 9 12:43:23 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F228F10656C0 for ; Wed, 9 Apr 2008 12:43:23 +0000 (UTC) (envelope-from iwasaki@jp.FreeBSD.org) Received: from locore.org (ns01.locore.org [218.45.21.227]) by mx1.freebsd.org (Postfix) with ESMTP id AB7808FC30 for ; Wed, 9 Apr 2008 12:43:23 +0000 (UTC) (envelope-from iwasaki@jp.FreeBSD.org) Received: from localhost (celeron.v4.locore.org [192.168.0.10]) by locore.org (8.14.2/8.14.2/iwasaki) with ESMTP/inet id m39ChKSj020268; Wed, 9 Apr 2008 21:43:20 +0900 (JST) (envelope-from iwasaki@jp.FreeBSD.org) Date: Wed, 09 Apr 2008 21:43:18 +0900 (JST) Message-Id: <20080409.214318.132031270.iwasaki@jp.FreeBSD.org> To: mickey242@gmx.net From: Mitsuru IWASAKI In-Reply-To: <47F8B038.7000400@gmx.net> References: <47F8B038.7000400@gmx.net> X-Mailer: Mew version 3.3 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org Subject: Re: FreeBSD 7.0 suspend X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2008 12:43:24 -0000 Hi, From: Andreas Wetzel Subject: FreeBSD 7.0 suspend Date: Sun, 06 Apr 2008 13:12:56 +0200 Message-ID: <47F8B038.7000400@gmx.net> > /* If devd(8) is not running, immediately enter the sleep state. */ > if (devctl_process_running() == FALSE) { > ... > > For some reason this check returns FALSE, although devd is actually running. > When i comment out the check, everything works as expected: devd is notified, > executes /etc/rc.suspend, which in turn calls acpiconf -k 0 when done, and > then the system goes to sleep. > > Any ideas, why this function does not correctly recognize that devd is > running? Please try the following patches and see if the problem is solved. Thanks! Index: subr_bus.c =================================================================== RCS file: /home/ncvs/src/sys/kern/subr_bus.c,v retrieving revision 1.201.2.1 diff -u -r1.201.2.1 subr_bus.c --- subr_bus.c 6 Feb 2008 01:34:18 -0000 1.201.2.1 +++ subr_bus.c 9 Apr 2008 12:30:30 -0000 @@ -504,7 +504,7 @@ boolean_t devctl_process_running(void) { - return (devsoftc.async_proc != NULL); + return (devsoftc.inuse == 1) } /** From owner-freebsd-acpi@FreeBSD.ORG Wed Apr 9 13:02:13 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 022441065676 for ; Wed, 9 Apr 2008 13:02:13 +0000 (UTC) (envelope-from iwasaki@jp.FreeBSD.org) Received: from locore.org (ns01.locore.org [218.45.21.227]) by mx1.freebsd.org (Postfix) with ESMTP id B020D8FC1B for ; Wed, 9 Apr 2008 13:02:12 +0000 (UTC) (envelope-from iwasaki@jp.FreeBSD.org) Received: from localhost (celeron.v4.locore.org [192.168.0.10]) by locore.org (8.14.2/8.14.2/iwasaki) with ESMTP/inet id m39D28g4020415; Wed, 9 Apr 2008 22:02:08 +0900 (JST) (envelope-from iwasaki@jp.FreeBSD.org) Date: Wed, 09 Apr 2008 22:02:08 +0900 (JST) Message-Id: <20080409.220208.39498804.iwasaki@jp.FreeBSD.org> To: takawata@init-main.com From: Mitsuru IWASAKI In-Reply-To: <200804071539.m37FdLcT026089@sana.init-main.com> References: <200804071539.m37FdLcT026089@sana.init-main.com> X-Mailer: Mew version 3.3 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org Subject: Re: some problems in suspend/resume on ThinkPad X61 X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2008 13:02:13 -0000 Hi, From: Takanori Watanabe Subject: some problems in suspend/resume on ThinkPad X61 Date: Tue, 08 Apr 2008 00:39:21 +0900 Message-ID: <200804071539.m37FdLcT026089@sana.init-main.com> > I bought a new laptop;ThinkPad X61 and I'm trying to hack > suspend/resume. Cool! You are trying to support suspend/resume on the dual core systems, right? It seems that all processors, but only one, need to be disabled (just like using UP kernel) before the sleeping, then enabled again on resume. I've just started investigating on the FreeBSD MP initialization code. I hope the following summary helps something. Good luck! BSP | AP ----------------------------------------+------------------------------------ cpu_mp_start() start_all_aps() install_ap_tramp() start_ap() lapic_ipi_raw() bootMP() MPentry() mp_begin() init_secondary() lapic_disable() [wait for 5 sec.] <------------------- mp_naps++; set_interrupt_apic_ids() while (!aps_ready) intr_add_cpu() ia32_pause(); mp_topology() release_aps() atomic_store_rel_int(&aps_ready, 1); --> lapic_setup(1) while (smp_started == 0) <-------------- atomic_store_rel_int(&smp_started, 1); ia32_pause(); sched_throw() From owner-freebsd-acpi@FreeBSD.ORG Wed Apr 9 15:46:00 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B88D2106566C for ; Wed, 9 Apr 2008 15:46:00 +0000 (UTC) (envelope-from tfcheng@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.169]) by mx1.freebsd.org (Postfix) with ESMTP id 8FD168FC13 for ; Wed, 9 Apr 2008 15:46:00 +0000 (UTC) (envelope-from tfcheng@gmail.com) Received: by wf-out-1314.google.com with SMTP id 25so2550724wfa.7 for ; Wed, 09 Apr 2008 08:46:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=tLcW6pP5rdcUJB3Se3HsgwWWehbTF1anEZQM0VKdeVk=; b=N3Mg6HRzgCZJxN+qpwQsH3ED5CsxPNvlijbIkR0NY167WOyff34VZMOI/NhmRl0qvbnTqKj/jDYZJbkcdhC33KVsZGtDfZCZl1Z1eRZU0FDmlELPM6xhig+wqqD7nu9GoSfiDV+IPx9myGWFAPsRi4XDUs6ts9fheZJ2dbYKjGY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=OwPhl5AJTdmwE5NR27qDf0BdF1yeTesdU6jynWbSLXVjwJZGekfrpCEbGmWyJbhfejRSBduW6PaDlRWMODU63K4nfRZP21U+DYlfp0NbklG2vR55LOTtkhzVgsJYMdQz6Nrr5ptAGUH44RHtrtVT9wWVAu9vhgfQQim1UZZfQSY= Received: by 10.142.162.5 with SMTP id k5mr71901wfe.53.1207754320365; Wed, 09 Apr 2008 08:18:40 -0700 (PDT) Received: by 10.142.52.20 with HTTP; Wed, 9 Apr 2008 08:18:40 -0700 (PDT) Message-ID: Date: Wed, 9 Apr 2008 11:18:40 -0400 From: "Tsu-Fan Cheng" To: freebsd-acpi@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: is this an ACPI problem? X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2008 15:46:00 -0000 Hi, I am running 7.0-stable these days, and I found that my computer dead/crash after I left it tunning overnight. I can' wake it up by striking the keyboard or moving the mouse, and I also can't login by ssh from my laptop. I never deal with acpi before, does this look like an acpi problem? thank you!! TFC From owner-freebsd-acpi@FreeBSD.ORG Wed Apr 9 16:26:11 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9967010656A9 for ; Wed, 9 Apr 2008 16:26:11 +0000 (UTC) (envelope-from sbruno@miralink.com) Received: from plato.miralink.com (mail.miralink.com [70.103.185.20]) by mx1.freebsd.org (Postfix) with ESMTP id 5AF908FC13 for ; Wed, 9 Apr 2008 16:26:11 +0000 (UTC) (envelope-from sbruno@miralink.com) Received: from localhost (localhost.localdomain [127.0.0.1]) by plato.miralink.com (Postfix) with ESMTP id 086BD1D0068; Wed, 9 Apr 2008 09:26:10 -0700 (PDT) Received: from plato.miralink.com ([127.0.0.1]) by localhost (plato.miralink.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01107-10; Wed, 9 Apr 2008 09:26:08 -0700 (PDT) Received: from iago.office.miralink.com (iago.office.miralink.com [10.0.0.40]) by plato.miralink.com (Postfix) with ESMTP id C62591D0040; Wed, 9 Apr 2008 09:26:08 -0700 (PDT) Message-ID: <47FCEE20.7080502@miralink.com> Date: Wed, 09 Apr 2008 09:26:08 -0700 From: Sean Bruno User-Agent: Thunderbird 2.0.0.12 (X11/20080226) MIME-Version: 1.0 To: Tsu-Fan Cheng References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Wed Apr 9 09:26:09 2008 X-DSPAM-Confidence: 0.9997 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 47fcee21262305260519334 X-DSPAM-Factors: 27, X-Virus-Scanned: amavisd-new at X-Spam-Status: No, score=-4.499 tagged_above=-10 required=6.6 autolearn=ham tests=[ALL_TRUSTED=-1.8, BAYES_00=-2.599, DSPAM_HAM=-0.1] X-Spam-Score: -4.499 X-Spam-Level: Cc: freebsd-acpi@freebsd.org Subject: Re: is this an ACPI problem? X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2008 16:26:11 -0000 Tsu-Fan Cheng wrote: > Hi, > I am running 7.0-stable these days, and I found that my computer > dead/crash after I left it tunning overnight. I can' wake it up by > striking the keyboard or moving the mouse, and I also can't login by > ssh from my laptop. I never deal with acpi before, does this look like > an acpi problem? thank you!! > > TFC > Without any output from the screen, there's no way to tell. Can you post "pciconf -lv" and the output of "acpidump -dtv" ? sean From owner-freebsd-acpi@FreeBSD.ORG Wed Apr 9 20:49:46 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29E6F106564A for ; Wed, 9 Apr 2008 20:49:46 +0000 (UTC) (envelope-from mpieuchot@nolizard.org) Received: from 42.mail-out.ovh.net (42.mail-out.ovh.net [213.251.189.42]) by mx1.freebsd.org (Postfix) with SMTP id 97A328FC13 for ; Wed, 9 Apr 2008 20:49:45 +0000 (UTC) (envelope-from mpieuchot@nolizard.org) Received: (qmail 30387 invoked by uid 503); 9 Apr 2008 20:23:05 -0000 Received: from gw2.ovh.net (HELO mail186.ha.ovh.net) (213.251.189.202) by 42.mail-out.ovh.net with SMTP; 9 Apr 2008 20:23:05 -0000 Received: from b0.ovh.net (HELO queue-out) (213.186.33.50) by b0.ovh.net with SMTP; 9 Apr 2008 20:22:34 -0000 Received: from unknown (HELO ?192.168.0.13?) (mpieuchot@nolizard.org@201.78.222.12) by ns0.ovh.net with SMTP; 9 Apr 2008 20:22:28 -0000 From: Martin Pieuchot To: freebsd-acpi@FreeBSD.org Content-Type: text/plain; charset=UTF-8 Date: Wed, 09 Apr 2008 17:18:26 -0300 Message-Id: <1207772306.988.18.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.0 FreeBSD GNOME Team Port Content-Transfer-Encoding: 8bit X-Ovh-Remote: 201.78.222.12 () X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Spam-Check: DONE|H 0.5/N X-Ovh-Tracer-Id: 2713700251671234550 Cc: Subject: ACPI on Sony VAIO VGN-SZ5MN X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2008 20:49:46 -0000 Hello, I am currently using a FreeBSD/i386 7.0-STABLE on a Sony Vaio VGN-SZ5MN. I have some trouble with ACPI which are : * I cannot boot the system when the module "acpi.ko" is not load. The last msg is : > PNP0c02 : adding fixed memory32 range ... > pnpbios: handle 24 device ID PNP0c02 * I cannot standby the computer (reboot works). When I try a "halt -p" the system shutdown as usual but after displaying "Powering off the computer using ACPI" the display turns black but stay on power and I must unplugged the cable and the battery to switch off my laptop. * I have also tried an "acpiconf -s3" but without surprise it freezes the system. I am also using NetBSD and Linux on the same laptop without those problems (I don't know for suspend/resume). I have followed the "Using and Debugging FreeBSD ACPI",so you can find : My dmesg: http://www.nolizard.org/acpi-freebsd/dmesg-with-acpi.txt The "sysctl hw.acpi": http://www.nolizard.org/acpi-freebsd/hw.acpi.output The ASL (which compile without error): http://www.nolizard.org/acpi-freebsd/aer-VGN-SZ5MN.asl Here is the output of my kldstat: Id Refs Address Size Name 1 10 0xc0400000 4e1d3c kernel 2 1 0xc08e2000 14314 snd_hda.ko 3 2 0xc08f7000 495fc sound.ko 4 1 0xc0941000 672b4 acpi.ko 5 1 0xc5540000 21000 linux.ko 6 1 0xc55aa000 e000 fuse.ko I have also tried to set "hint.apic.0.disabled="1"" without any success. Many thanks in advance, Martin From owner-freebsd-acpi@FreeBSD.ORG Thu Apr 10 12:41:43 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F19ED106564A for ; Thu, 10 Apr 2008 12:41:43 +0000 (UTC) (envelope-from gaijin.k@gmail.com) Received: from rn-out-0910.google.com (rn-out-0910.google.com [64.233.170.188]) by mx1.freebsd.org (Postfix) with ESMTP id A77CA8FC1B for ; Thu, 10 Apr 2008 12:41:43 +0000 (UTC) (envelope-from gaijin.k@gmail.com) Received: by rn-out-0910.google.com with SMTP id e11so2702036rng.7 for ; Thu, 10 Apr 2008 05:41:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; bh=ZJnP1pjq5G/q6fQD/4p64skvm65Vkq8TjlhJvSIZ3aM=; b=QX53AeL23U0quYnUCo5g0mgr3k02I8Vq2JmDGcOglBHpFBr2YQOZ1+YpF2cBqhFtQRZIhQp4UQC3FlR+4tTkHSSK+X373JdNJ9nsMr0vwKPeGaRPIR4HoDKYQBa5GCWHg+P1LzuRJFAR1nAfK5o5dT2BUihCwRlxlGJw1zOz4eM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=hxLjlnlTU3QWZx7zjbvadjxbklVCDUunaX3b6+zlL6AFYVpiqm/JdQV98iDu2qyMFCs32pwI1FOe7QEax0H/qAkiK6lCjYGx+JKeg6GRxDPqDbXQkcdblLlmoei9YT2FBz31iugnEpNj0ZWTyZMGxv25W/wjAnb5cPqBhEIlZaM= Received: by 10.151.99.3 with SMTP id b3mr1547814ybm.179.1207829737316; Thu, 10 Apr 2008 05:15:37 -0700 (PDT) Received: from ?10.0.3.231? ( [70.111.178.194]) by mx.google.com with ESMTPS id 67sm2413443wra.19.2008.04.10.05.15.35 (version=SSLv3 cipher=RC4-MD5); Thu, 10 Apr 2008 05:15:37 -0700 (PDT) From: "Alexandre \"Sunny\" Kovalenko" To: Martin Pieuchot In-Reply-To: <1207772306.988.18.camel@localhost> References: <1207772306.988.18.camel@localhost> Content-Type: text/plain; charset=utf-8 Date: Thu, 10 Apr 2008 08:14:59 -0400 Message-Id: <1207829699.61979.4.camel@RabbitsDen> Mime-Version: 1.0 X-Mailer: Evolution 2.22.0 FreeBSD GNOME Team Port Content-Transfer-Encoding: 8bit Cc: freebsd-acpi@FreeBSD.org Subject: Re: ACPI on Sony VAIO VGN-SZ5MN X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Apr 2008 12:41:44 -0000 On Wed, 2008-04-09 at 17:18 -0300, Martin Pieuchot wrote: > Hello, > > I am currently using a FreeBSD/i386 7.0-STABLE on a Sony Vaio > VGN-SZ5MN. > > I have some trouble with ACPI which are : > * I cannot boot the system when the module "acpi.ko" is not load. The > last msg is : > > PNP0c02 : adding fixed memory32 range ... > > pnpbios: handle 24 device ID PNP0c02 > > * I cannot standby the computer (reboot works). When I try a "halt -p" > the system shutdown as usual but after displaying "Powering off the > computer using ACPI" the display turns black but stay on power and I > must unplugged the cable and the battery to switch off my laptop. While I could not help you with your main problem, on all more or less modern laptops, I was able to lay my hands on, pressing the power button and holding it down for 8-15 seconds will turn machine off from any hang state. You can try that instead of unplugging the power and pulling out the battery. -- Alexandre "Sunny" Kovalenko (Олександр Коваленко) From owner-freebsd-acpi@FreeBSD.ORG Thu Apr 10 13:47:08 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A15ED106564A for ; Thu, 10 Apr 2008 13:47:08 +0000 (UTC) (envelope-from mpieuchot@nolizard.org) Received: from 30.mail-out.ovh.net (30.mail-out.ovh.net [213.186.62.213]) by mx1.freebsd.org (Postfix) with SMTP id ED1108FC18 for ; Thu, 10 Apr 2008 13:47:07 +0000 (UTC) (envelope-from mpieuchot@nolizard.org) Received: (qmail 6836 invoked by uid 503); 10 Apr 2008 13:47:26 -0000 Received: (QMFILT: 1.0); 10 Apr 2008 13:47:26 -0000 Received: from b7.ovh.net (HELO mail181.ha.ovh.net) (213.186.33.57) by 30.mail-out.ovh.net with SMTP; 10 Apr 2008 13:47:26 -0000 Received: from b0.ovh.net (HELO queue-out) (213.186.33.50) by b0.ovh.net with SMTP; 10 Apr 2008 13:46:43 -0000 Received: from 201008150106.user.veloxzone.com.br (HELO ?192.168.0.13?) (mpieuchot@nolizard.org@201.8.150.106) by ns0.ovh.net with SMTP; 10 Apr 2008 13:46:41 -0000 From: Martin Pieuchot To: freebsd-acpi@FreeBSD.org In-Reply-To: <1207829699.61979.4.camel@RabbitsDen> References: <1207772306.988.18.camel@localhost> <1207829699.61979.4.camel@RabbitsDen> Content-Type: text/plain; charset=UTF-8 Date: Thu, 10 Apr 2008 10:42:35 -0300 Message-Id: <1207834955.996.7.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.0 FreeBSD GNOME Team Port Content-Transfer-Encoding: 8bit X-Ovh-Remote: 201.8.150.106 (201008150106.user.veloxzone.com.br) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Spam-Check: DONE|H 0.500019/N X-Ovh-Tracer-Id: 1904459693482018806 Cc: Subject: Re: ACPI on Sony VAIO VGN-SZ5MN X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Apr 2008 13:47:08 -0000 Thanks for a such quick reply, I forgot to mention that pression the power button as you said doesn't work... But have you any idea of what can be the problem? As I have some free time, I can try to compare the ACPI support for my laptop between NetBSD 4, wich is working well, and FreeBSD. If you have advices, it can help me a lot. Martin On Thu, 2008-04-10 at 08:14 -0400, Alexandre "Sunny" Kovalenko wrote: > On Wed, 2008-04-09 at 17:18 -0300, Martin Pieuchot wrote: > > Hello, > > > > I am currently using a FreeBSD/i386 7.0-STABLE on a Sony Vaio > > VGN-SZ5MN. > > > > I have some trouble with ACPI which are : > > * I cannot boot the system when the module "acpi.ko" is not load. The > > last msg is : > > > PNP0c02 : adding fixed memory32 range ... > > > pnpbios: handle 24 device ID PNP0c02 > > > > * I cannot standby the computer (reboot works). When I try a "halt -p" > > the system shutdown as usual but after displaying "Powering off the > > computer using ACPI" the display turns black but stay on power and I > > must unplugged the cable and the battery to switch off my laptop. > While I could not help you with your main problem, on all more or less > modern laptops, I was able to lay my hands on, pressing the power button > and holding it down for 8-15 seconds will turn machine off from any hang > state. You can try that instead of unplugging the power and pulling out > the battery. > From owner-freebsd-acpi@FreeBSD.ORG Fri Apr 11 05:11:54 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C11C106566C for ; Fri, 11 Apr 2008 05:11:54 +0000 (UTC) (envelope-from glorgster@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.232]) by mx1.freebsd.org (Postfix) with ESMTP id C2AC58FC15 for ; Fri, 11 Apr 2008 05:11:53 +0000 (UTC) (envelope-from glorgster@gmail.com) Received: by wx-out-0506.google.com with SMTP id i29so365584wxd.7 for ; Thu, 10 Apr 2008 22:11:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=E2bzraC5FuvUpIl99yIxOsDVywIhgatPK5xz8b9/uws=; b=v4RR0GEAMHmfhq81KWI+CgVUy1yszY8oj1dZ1szjCit/e8DSrbJnKyF7Vo5Nm1Wu5S3iN5CEWggM4Ad5NCSp9hNFdXDBq7CNlD8NxUJS4ckX8myypER0i7X7kfEToOrCB0O5ctS2AxQt3wqZIYUKP/xVKOp7jG06SmoKL2vQM4E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=WAzFxpzsx7pt/rSWns1Z76xGfoNI4YrTtg/0baHj/1nY/miv/LlfjDIIrovBwW+KS75bSw/QQVFuGfzJERSWVZKm+rr/URER7mxYtH/kXvWF3uziMLHZ8zFfcMgvmj56+s3KXsSHnR+isonK51jkuBdBCpufcCsnQEhKG/RYHro= Received: by 10.141.145.11 with SMTP id x11mr1246011rvn.215.1207890711786; Thu, 10 Apr 2008 22:11:51 -0700 (PDT) Received: by 10.141.43.7 with HTTP; Thu, 10 Apr 2008 22:11:51 -0700 (PDT) Message-ID: Date: Fri, 11 Apr 2008 16:11:51 +1100 From: "Alexey Tarasov" To: freebsd-acpi@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Question about resource allocation X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2008 05:11:54 -0000 Hi, I'm trying to update spic and acpi_sony drivers, looking to Linux sony_laptop driver. Now I'm at allocating IO ports resource stage. spic driver on FreeBSD uses bus_alloc_resources() with default for bus values (0, ~0) for this purpose ---- if (!(sc->port_res = bus_alloc_resource(sc->dev, SYS_RES_IOPORT, &sc->port_rid, 0, ~0, 5, RF_ACTIVE))) { device_printf(sc->dev,"Couldn't map I/O\n"); return (ENXIO); } ---- sony_laptop enumerates resources of device using acpi_walk_resources() function and then calls request_region() for all found IO regions. First non fail result will be used later in working with SPIC. So question: is it better to use approach from sony_laptop. If yes, then how to walk resources (I've not found analog of acpi_walk_resource function in FreeBSD) If there is link to any related documentation, it'll be great help. Thanks. --- Best regards, Alexey From owner-freebsd-acpi@FreeBSD.ORG Sat Apr 12 17:06:36 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5F501065670 for ; Sat, 12 Apr 2008 17:06:36 +0000 (UTC) (envelope-from mickey242@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 3360B8FC26 for ; Sat, 12 Apr 2008 17:06:35 +0000 (UTC) (envelope-from mickey242@gmx.net) Received: (qmail invoked by alias); 12 Apr 2008 17:06:34 -0000 Received: from port-ip-213-211-209-123.reverse.mdcc-fun.de (EHLO gunhead.enforcer.cc) [213.211.209.123] by mail.gmx.net (mp007) with SMTP; 12 Apr 2008 19:06:34 +0200 X-Authenticated: #8913523 X-Provags-ID: V01U2FsdGVkX1/A4QpnQS7AhdJ77tf2Lnck0D5kUH5Az1yhDyz0Ia iiw49466F4c7Li Message-ID: <4800EC15.5060206@gmx.net> Date: Sat, 12 Apr 2008 19:06:29 +0200 From: Andreas Wetzel User-Agent: Thunderbird 2.0.0.12 (X11/20080310) MIME-Version: 1.0 To: Mitsuru IWASAKI References: <47F8B038.7000400@gmx.net> <20080409.214318.132031270.iwasaki@jp.FreeBSD.org> In-Reply-To: <20080409.214318.132031270.iwasaki@jp.FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: freebsd-acpi@freebsd.org Subject: Re: FreeBSD 7.0 suspend X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2008 17:06:37 -0000 Mitsuru IWASAKI wrote: > >> /* If devd(8) is not running, immediately enter the sleep state. */ >> if (devctl_process_running() == FALSE) { >> ... >> >> For some reason this check returns FALSE, although devd is actually running. >> When i comment out the check, everything works as expected: devd is notified, >> executes /etc/rc.suspend, which in turn calls acpiconf -k 0 when done, and >> then the system goes to sleep. >> >> Any ideas, why this function does not correctly recognize that devd is >> running? > > Please try the following patches and see if the problem is solved. > Thanks! > > Index: subr_bus.c > =================================================================== > RCS file: /home/ncvs/src/sys/kern/subr_bus.c,v > retrieving revision 1.201.2.1 > diff -u -r1.201.2.1 subr_bus.c > --- subr_bus.c 6 Feb 2008 01:34:18 -0000 1.201.2.1 > +++ subr_bus.c 9 Apr 2008 12:30:30 -0000 > @@ -504,7 +504,7 @@ > boolean_t > devctl_process_running(void) > { > - return (devsoftc.async_proc != NULL); > + return (devsoftc.inuse == 1) > } > > /** > Yes! With a semicolon added, the patch seems to work fine. -- Keep it icy man. I don't want to end up a corpse before my time because you were daydreaming. From owner-freebsd-acpi@FreeBSD.ORG Sat Apr 12 22:20:10 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E00A3106564A for ; Sat, 12 Apr 2008 22:20:10 +0000 (UTC) (envelope-from funa@funa.org) Received: from sbserv.systems-biology.org (host01.sbi-unet.ocn.ne.jp [221.186.74.241]) by mx1.freebsd.org (Postfix) with SMTP id 3B6418FC19 for ; Sat, 12 Apr 2008 22:20:10 +0000 (UTC) (envelope-from funa@funa.org) Received: (qmail 27296 invoked from network); 13 Apr 2008 06:53:25 +0900 Received: from sbserv.symbio.jst.go.jp (HELO funasoul.fun.bio.keio.ac.jp) (10.0.0.14) by sbserv.symbio.jst.go.jp with SMTP; 13 Apr 2008 06:53:25 +0900 Date: Sun, 13 Apr 2008 06:53:25 +0900 Message-ID: From: Akira Funahashi To: freebsd-acpi@freebsd.org User-Agent: Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.7 Emacs/22.1.50 (i386-apple-darwin8.11.1) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Subject: EeePC LCD brightness control X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2008 22:20:11 -0000 Hi, I've created a patch to FreeBSD 7.0-RELEASE for ASUS EeePC. The patch will be applied to /sys/dev/acpi_support/acpi_asus.c, which enalbes me to control LCD brightness on EeePC through sysctl and [Fn]+[F3],[F4] key. Here is a patch: http://celldesigner.org/~funa/acpi_asus.c.diff Hope this helps, -- Akira Funahashi/[funa@funa.org]