From owner-freebsd-acpi@FreeBSD.ORG Mon Nov 20 05:04:27 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9308916A4C8 for ; Mon, 20 Nov 2006 05:04:27 +0000 (UTC) (envelope-from ticket@page3design.com) Received: from ip-236.net-81-220-79.rev.numericable.fr (ip-236.net-81-220-79.rev.numericable.fr [81.220.79.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2AF4F43D60 for ; Mon, 20 Nov 2006 05:03:53 +0000 (GMT) (envelope-from ticket@page3design.com) Message-ID: <001101c70c61$486a3730$00000000@Celeron600> From: "using" To: freebsd-acpi@freebsd.org Date: Mon, 20 Nov 2006 06:03:56 +0100 MIME-Version: 1.0 Content-Type: multipart/related; type="multipart/alternative"; boundary="----=_NextPart_000_000D_01C70C69.AA2E9F30" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: including fast way 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, 20 Nov 2006 05:04:27 -0000 ------=_NextPart_000_000D_01C70C69.AA2E9F30 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Horating a Wine tips strating is Relaxing Sparating or haha an. Bon = jovirating am Wizard in Winter in Illrating Higurashi no. Appear or aa Usecontact. Companies is Keywords in Characters in Quotes. Too does mean answers answer Wikiwiki a Hawaiian should. Make great is = gifts loved ones far. Activate Svideo Output created below easy is. Finds detects in name am = default uses live being detected or Preview. Rating is Creepy is guy wants is to a bud in adsrating or. Allow = document jobs as they of move. Appear or aa a Usecontact License rights. Sport is performing arts tickets Centres United Kingdom Change. Royale = is Chips Rating Creepy guy wants? Glasgows Hogmanay rod a Stewart in Heineken a cup Final Kerrang. Youll need bar a code hardware plugs. Gracefully is probably a editing = of already exist set aside practice there a. Glasgows Hogmanay rod a = Stewart in Heineken a cup Final Kerrang. Daniel am Radcliffe in highly thriller Offer am tasty? Schools = Government Oacplease email us is first any questions. Africa is matchmore Infonow Natural in Museum Rink Infoon a Manchester a = Benfica! Prontocom Smithnoble in Territory Ahead or Ticketweb Travel. Display Properties dialog box can am. Register db or Titles my in Names Companies. Tab so a cant. Imdb = language is release common. Bon jovirating am Wizard in Winter in Illrating Higurashi no. Today = check accepted of before starting look image each. Front Pagefront = Pagehello whose focus ideas is seem? Ladette in Lady Starrating or? Front Pagefront Pagehello whose focus = ideas is seem? Writer discusses his in. ------=_NextPart_000_000D_01C70C69.AA2E9F30-- From owner-freebsd-acpi@FreeBSD.ORG Mon Nov 20 11:08:30 2006 Return-Path: X-Original-To: freebsd-acpi@FreeBSD.org Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 84D6A16A417 for ; Mon, 20 Nov 2006 11:08:30 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id E171643DCB for ; Mon, 20 Nov 2006 11:07:47 +0000 (GMT) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kAKB7wlb001366 for ; Mon, 20 Nov 2006 11:07:58 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kAKB7vBw001362 for freebsd-acpi@FreeBSD.org; Mon, 20 Nov 2006 11:07:57 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 20 Nov 2006 11:07:57 GMT Message-Id: <200611201107.kAKB7vBw001362@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: linimon set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-acpi@FreeBSD.org Cc: Subject: Current problem reports assigned to you 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, 20 Nov 2006 11:08:30 -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/55822 acpi No ACPI power off with SMP kernel o kern/56024 acpi ACPI suspend drains battery while in S3 o i386/64002 acpi acpi problem o i386/67273 acpi [hang] system hangs with acpi and Xfree o i386/72566 acpi ACPI, FreeBSD disables fan on Compaq Armada 1750 o i386/79080 acpi acpi thermal changes freezes HP nx6110 o i386/79081 acpi ACPI suspend/resume not working on HP nx6110 o kern/104625 acpi ACPI on ASUS A8N-32 SLI/ASUS P4P800 does not show ther 10 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/67309 acpi zzz reboot computer (ACPI S3) o i386/69750 acpi Boot without ACPI failed on ASUS L5 o kern/73823 acpi [feature request] acpi / power-on by timer support f kern/74030 acpi Unplugging AC causes battery % to stay locked at 98% f kern/90871 acpi ACPI problems with ASUS A8N-VM-CSM o kern/97383 acpi Volume buttons on IBM Thinkpad crash system with ACPI o kern/98171 acpi [acpi] ACPI 1304 / 0501 errors on Acer 5024WLMi Laptop o kern/103365 acpi [acpi] acpi poweroff doesn't work with geli device att 8 problems total. From owner-freebsd-acpi@FreeBSD.ORG Mon Nov 20 16:21:29 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4486216A40F for ; Mon, 20 Nov 2006 16:21:29 +0000 (UTC) (envelope-from hummel@pasteur.fr) Received: from electre.pasteur.fr (electre.pasteur.fr [157.99.64.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id D393743D96 for ; Mon, 20 Nov 2006 16:20:29 +0000 (GMT) (envelope-from hummel@pasteur.fr) Received: from parmesan.sis.pasteur.fr (parmesan.sis.pasteur.fr [157.99.64.42]) by electre.pasteur.fr (8.12.11/8.12.11) with ESMTP id kAKGKjSw495018 for ; Mon, 20 Nov 2006 17:20:45 +0100 (CET) Received: by parmesan.sis.pasteur.fr (Postfix, from userid 1931) id B3984170E4; Mon, 20 Nov 2006 17:20:43 +0100 (CET) Date: Mon, 20 Nov 2006 17:20:43 +0100 From: Thomas Hummel To: freebsd-acpi@freebsd.org Message-ID: <20061120162043.GA22980@parmesan.sis.pasteur.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i Subject: ACPI on Sony VAIO SZ2M 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, 20 Nov 2006 16:21:29 -0000 Hello, I installed FreeBSD 6.2-RC1 on a Sony Vaio SZ2M/B i386 machine. I can set up the LCD brightness through the acpi_sony.ko kernel module. However, I cannot get the system to resume (through the acpi.ko module) after any suspend state supported (I have to remove the battery or the laptop won't boot again after power button is pressed). I read the ACPI section of the handbook and tried the following : . upgrading my bios to the latest version Sony provided . shutting down all network interfaces before systl to suspend . adding hw.acpi.disable_on_poweroff="0" in loader.conf . adding hw.acpi.disable_on_poweroff="1" in loader.conf . adding hw.acpi.osname="Windows 2001" in loader.conf . adding hw.acpi.osname="Windows 2001 SP2" in loader.conf . adding hw.acpi.osname="Microsoft Windows" in loader.conf . adding hw.acpi.osname="Linux" in loader.conf . dumping my DSDT table, disassembling AML to ASL and recompiling it : it compiled perfectly with 0 error and 0 warnings -> None of these worked. Below is the output of sysctl hw.acpi dmesg after a boot -v kldstat [Unfortunately, I have no URL for now to store my ASL.] I noted the "acpi_bus_number: can't get _ADR" error message. Note : ACPI on this laptop worked perfectly (suspend/hibernate...etc...) on Ubuntu 6.10. Thanks in advance for any help or clue... -- Thomas Hummel hw.acpi.supported_sleep_state: S3 S4 S5 hw.acpi.power_button_state: S5 hw.acpi.sleep_button_state: S3 hw.acpi.lid_switch_state: NONE hw.acpi.standby_state: S1 hw.acpi.suspend_state: S3 hw.acpi.sleep_delay: 1 hw.acpi.s4bios: 0 hw.acpi.verbose: 0 hw.acpi.disable_on_reboot: 0 hw.acpi.handle_reboot: 0 hw.acpi.reset_video: 0 hw.acpi.cpu.cx_supported: C1/1 hw.acpi.cpu.cx_lowest: C1 hw.acpi.cpu.cx_usage: 100.00% hw.acpi.thermal.min_runtime: 0 hw.acpi.thermal.polling_rate: 10 hw.acpi.thermal.user_override: 0 hw.acpi.thermal.tz0.temperature: 47.9C hw.acpi.thermal.tz0.active: -1 hw.acpi.thermal.tz0.passive_cooling: 1 hw.acpi.thermal.tz0.thermal_flags: 0 hw.acpi.thermal.tz0._PSV: 94.9C hw.acpi.thermal.tz0._HOT: -1 hw.acpi.thermal.tz0._CRT: 99.9C hw.acpi.thermal.tz0._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 hw.acpi.thermal.tz1.temperature: 49.9C hw.acpi.thermal.tz1.active: -1 hw.acpi.thermal.tz1.passive_cooling: 0 hw.acpi.thermal.tz1.thermal_flags: 0 hw.acpi.thermal.tz1._PSV: 99.8C hw.acpi.thermal.tz1._HOT: -1 hw.acpi.thermal.tz1._CRT: 100.8C hw.acpi.thermal.tz1._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 hw.acpi.thermal.tz2.temperature: 44.9C hw.acpi.thermal.tz2.active: -1 hw.acpi.thermal.tz2.passive_cooling: 0 hw.acpi.thermal.tz2.thermal_flags: 0 hw.acpi.thermal.tz2._PSV: 99.8C hw.acpi.thermal.tz2._HOT: -1 hw.acpi.thermal.tz2._CRT: 100.8C hw.acpi.thermal.tz2._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 hw.acpi.battery.life: 83 hw.acpi.battery.time: -1 hw.acpi.battery.state: 2 hw.acpi.battery.units: 1 hw.acpi.battery.info_expire: 5 hw.acpi.acline: 1 Copyright (c) 1992-2006 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 6.2-RC1 #0: Thu Nov 16 05:12:08 UTC 2006 root@opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP ACPI APIC Table: Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Genuine Intel(R) CPU T2300 @ 1.66GHz (1666.80-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x6e8 Stepping = 8 Features=0xbfe9fbff Features2=0xc189,> AMD Features=0x100000 Cores per package: 2 real memory = 1063780352 (1014 MB) avail memory = 1031761920 (983 MB) FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 ioapic0: Changing APIC ID to 1 ioapic0 irqs 0-23 on motherboard kbd1 at kbdmux0 ath_hal: 0.9.17.2 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413) acpi0: on motherboard acpi_bus_number: can't get _ADR acpi_bus_number: can't get _ADR acpi_bus_number: can't get _ADR acpi_bus_number: can't get _ADR acpi_bus_number: can't get _ADR acpi_bus_number: can't get _ADR acpi_bus_number: can't get _ADR acpi_bus_number: can't get _ADR Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0 acpi_ec0: port 0x62,0x66 on acpi0 cpu0: on acpi0 acpi_throttle0: on cpu0 cpu1: on acpi0 acpi_throttle1: on cpu1 acpi_throttle1: failed to attach P_CNT device_attach: acpi_throttle1 attach returned 6 acpi_lid0: on acpi0 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pci0: at device 2.0 (no driver attached) pci0: at device 2.1 (no driver attached) pci0: at device 27.0 (no driver attached) pcib1: irq 16 at device 28.0 on pci0 pci2: on pcib1 pcib2: irq 17 at device 28.1 on pci0 pci6: on pcib2 wpi0: mem 0xdc100000-0xdc100fff irq 17 at device 0.0 on pci6 bus_dmamem_alloc failed to align memory properly. bus_dmamem_alloc failed to align memory properly. bus_dmamem_alloc failed to align memory properly. bus_dmamem_alloc failed to align memory properly. bus_dmamem_alloc failed to align memory properly. bus_dmamem_alloc failed to align memory properly. bus_dmamem_alloc failed to align memory properly. channel 1 pwr1 0x0084 pwr2 0x0084 channel 2 pwr1 0x0081 pwr2 0x0082 channel 3 pwr1 0x008b pwr2 0x008b channel 4 pwr1 0x0089 pwr2 0x008b channel 5 pwr1 0x0000 pwr2 0x0000 channel 6 pwr1 0x0085 pwr2 0x0085 channel 7 pwr1 0x0083 pwr2 0x0083 channel 8 pwr1 0x0084 pwr2 0x0085 channel 9 pwr1 0x0085 pwr2 0x0085 channel 10 pwr1 0x0000 pwr2 0x0000 channel 11 pwr1 0xffff pwr2 0xffff channel 12 pwr1 0xfffe pwr2 0xfffe channel 13 pwr1 0xffff pwr2 0xffff channel 14 pwr1 0xfffe pwr2 0xfffe wpi0: Ethernet address: 00:13:02:3f:9b:56 pcib3: irq 18 at device 28.2 on pci0 pci7: on pcib3 myk0: port 0x3000-0x30ff mem 0xd8000000-0xd8003fff irq 18 at device 0.0 on pci7 myk0: Ethernet address: 00:13:a9:2b:35:8e pcib4: irq 19 at device 28.3 on pci0 pci8: on pcib4 uhci0: port 0x1820-0x183f irq 19 at device 29.0 on pci0 uhci0: [GIANT-LOCKED] usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: port 0x1840-0x185f irq 19 at device 29.1 on pci0 uhci1: [GIANT-LOCKED] usb1: on uhci1 usb1: USB revision 1.0 uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhci2: port 0x1860-0x187f irq 19 at device 29.2 on pci0 uhci2: [GIANT-LOCKED] usb2: on uhci2 usb2: USB revision 1.0 uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered uhci3: port 0x1880-0x189f irq 19 at device 29.3 on pci0 uhci3: [GIANT-LOCKED] usb3: on uhci3 usb3: USB revision 1.0 uhub3: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub3: 2 ports with 2 removable, self powered ehci0: mem 0xdc544000-0xdc5443ff irq 23 at device 29.7 on pci0 ehci0: [GIANT-LOCKED] usb4: EHCI version 1.0 usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3 usb4: on ehci0 usb4: USB revision 2.0 uhub4: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 uhub4: 8 ports with 8 removable, self powered pcib5: at device 30.0 on pci0 pci9: on pcib5 cbb0: at device 4.0 on pci9 cardbus0: on cbb0 pccard0: <16-bit PCCard bus> on cbb0 fwohci0: <1394 Open Host Controller Interface> mem 0xdc005000-0xdc0057ff,0xdc000000-0xdc003fff irq 21 at device 4.1 on pci9 fwohci0: OHCI version 1.10 (ROM=1) fwohci0: No. of Isochronous channels is 4. fwohci0: EUI64 08:00:46:03:02:1e:46:09 fwohci0: Phy 1394a available S400, 2 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: on fwohci0 fwe0: on firewire0 if_fwe0: Fake Ethernet address: 0a:00:46:1e:46:09 fwe0: Ethernet address: 0a:00:46:1e:46:09 fwe0: if_start running deferred for Giant sbp0: on firewire0 fwohci0: Initiate bus reset fwohci0: node_id=0xc000ffc0, gen=2, CYCLEMASTER mode firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) firewire0: bus manager 0 (me) pci9: at device 4.2 (no driver attached) isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x1810-0x181f at device 31.1 on pci0 ata0: on atapci0 ata1: on atapci0 atapci1: port 0x18d0-0x18d7,0x18c4-0x18c7,0x18c8-0x18cf,0x18c0-0x18c3,0x18b0-0x18bf mem 0xdc544400-0xdc5447ff irq 22 at device 31.2 on pci0 ata2: on atapci1 ata3: on atapci1 pci0: at device 31.3 (no driver attached) acpi_tz0: on acpi0 acpi_tz1: on acpi0 acpi_tz2: on acpi0 acpi_sony0: on acpi0 acpi_sony0: PID 0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model GlidePoint, device ID 0 battery0: on acpi0 acpi_acad0: on acpi0 pmtimer0 on isa0 orm0: at iomem 0xc0000-0xcffff,0xdc000-0xdffff on isa0 ppc0: parallel port not found. sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio0: type 8250 or not responding sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounters tick every 1.000 msec acd0: DVDR at ata0-master UDMA33 ad4: 76319MB at ata2-master SATA150 SMP: AP CPU #1 Launched! Trying to mount root from ufs:/dev/ad4s1a Id Refs Address Size Name 1 14 0xc0400000 7053dc kernel 2 1 0xc0b06000 6424 snd_ich.ko 3 2 0xc0b0d000 3bf54 sound.ko 4 1 0xc0b49000 3219c if_myk.ko 5 2 0xc0b7c000 24d8 libmbpool.ko 6 1 0xc0b7f000 b538 if_wpi.ko 7 2 0xc0b8b000 2d60 firmware.ko 8 1 0xc0b8e000 2620 acpi_sony.ko 9 2 0xc0b91000 59f20 acpi.ko From owner-freebsd-acpi@FreeBSD.ORG Mon Nov 20 18:43:11 2006 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9A2CF16A526 for ; Mon, 20 Nov 2006 18:43:11 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A2AB43DAA for ; Mon, 20 Nov 2006 18:40:54 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from [10.0.1.114] (nat-outside.atlanta.corp.yahoo.com [63.172.193.57]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id kAKIest1077235; Mon, 20 Nov 2006 13:40:54 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Stepan Zastupov Date: Mon, 20 Nov 2006 12:12:06 -0500 User-Agent: KMail/1.9.1 References: <20061117172102.GA836@stepan.ispsystem.net> <200611171412.35214.john@baldwin.cx> <20061118033649.GA870@stepan.ispsystem.net> In-Reply-To: <20061118033649.GA870@stepan.ispsystem.net> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611201212.07578.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [66.23.211.162]); Mon, 20 Nov 2006 13:40:54 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2207/Mon Nov 20 10:09:00 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.9 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: acpi@freebsd.org Subject: Re: Add suspend/resume support for the bfe driver 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, 20 Nov 2006 18:43:11 -0000 On Friday 17 November 2006 22:42, Stepan Zastupov wrote: > On Fri, Nov 17, 2006 at 02:12:34PM -0500, John Baldwin wrote: > > Usually drivers don't detach on suspend. How about this patch instead: > > > > Index: if_bfe.c > > =================================================================== > > RCS file: /usr/cvs/src/sys/dev/bfe/if_bfe.c,v > > retrieving revision 1.40 > > diff -u -r1.40 if_bfe.c > > --- if_bfe.c 28 May 2006 20:35:39 -0000 1.40 > > +++ if_bfe.c 17 Nov 2006 19:11:47 -0000 > > @@ -87,6 +87,8 @@ > > static int bfe_probe (device_t); > > static int bfe_attach (device_t); > > static int bfe_detach (device_t); > > +static int bfe_suspend (device_t); > > +static int bfe_resume (device_t); > > static void bfe_release_resources (struct bfe_softc *); > > static void bfe_intr (void *); > > static void bfe_start (struct ifnet *); > > @@ -136,6 +138,8 @@ > > DEVMETHOD(device_attach, bfe_attach), > > DEVMETHOD(device_detach, bfe_detach), > > DEVMETHOD(device_shutdown, bfe_shutdown), > > + DEVMETHOD(device_suspend, bfe_suspend), > > + DEVMETHOD(device_resume, bfe_resume), > > > > /* bus interface */ > > DEVMETHOD(bus_print_child, bus_generic_print_child), > > @@ -480,6 +484,39 @@ > > } > > > > static int > > +bfe_suspend(device_t dev) > > +{ > > + struct bfe_softc *sc; > > + > > + sc = device_get_softc(dev); > > + BFE_LOCK(sc); > > + bfe_stop(sc); > > + BFE_UNLOCK(sc); > > + > > + return (0); > > +} > > + > > +static int > > +bfe_resume(device_t dev) > > +{ > > + struct bfe_softc *sc; > > + struct ifnet *ifp; > > + > > + sc = device_get_softc(dev); > > + ifp = sc->bfe_ifp; > > + BFE_LOCK(sc); > > + if (ifp->if_flags & IFF_UP) { > > + bfe_init_locked(sc); > > + if (ifp->if_drv_flags & IFF_DRV_RUNNING && > > + !IFQ_DRV_IS_EMPTY(&ifp->if_snd)) > > + bfe_start_locked(ifp); > > + } > > + BFE_UNLOCK(sc); > > + > > + return (0); > > +} > > + > > +static int > > bfe_miibus_readreg(device_t dev, int phy, int reg) > > { > > struct bfe_softc *sc; > > > > -- > > John Baldwin > No, system don't want to resume with it. I've tried the same variant > before I looked into the Linux kernel. How does it not work? If you do 'ifconfig bfe0 down ; ifconfig bfe0 up' after resume with the above patch does it then start working? -- John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Sat Nov 25 03:11:46 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2D02216A583 for ; Sat, 25 Nov 2006 03:11:46 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9927843D5C for ; Sat, 25 Nov 2006 03:11:00 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id kAP3BUn7046463 for ; Fri, 24 Nov 2006 20:11:31 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 24 Nov 2006 20:12:14 -0700 (MST) Message-Id: <20061124.201214.1656128345.imp@bsdimp.com> To: freebsd-acpi@freebsd.org From: "M. Warner Losh" X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Fri, 24 Nov 2006 20:11:31 -0700 (MST) Subject: How do I... 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, 25 Nov 2006 03:11:46 -0000 ... run a command when there's < 1% battery life left? Warner From owner-freebsd-acpi@FreeBSD.ORG Sat Nov 25 20:40:23 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9D70516A403 for ; Sat, 25 Nov 2006 20:40:23 +0000 (UTC) (envelope-from nate@root.org) Received: from root.org (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD98343D5D for ; Sat, 25 Nov 2006 20:39:33 +0000 (GMT) (envelope-from nate@root.org) Received: (qmail 88353 invoked from network); 25 Nov 2006 20:40:24 -0000 Received: from ppp-71-139-31-204.dsl.snfc21.pacbell.net (HELO ?10.0.5.59?) (nate-mail@71.139.31.204) by root.org with ESMTPA; 25 Nov 2006 20:40:24 -0000 Message-ID: <4568AA2F.4050602@root.org> Date: Sat, 25 Nov 2006 12:40:15 -0800 From: Nate Lawson User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: "M. Warner Losh" References: <20061124.201214.1656128345.imp@bsdimp.com> In-Reply-To: <20061124.201214.1656128345.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org Subject: Re: How do I... 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, 25 Nov 2006 20:40:23 -0000 M. Warner Losh wrote: > ... run a command when there's < 1% battery life left? > > Warner You add support here in acpi_cmbat.c: /* XXX If all batteries are critical, perhaps we should suspend. */ if (sc->bst.state & ACPI_BATT_STAT_CRITICAL) { if ((sc->flags & ACPI_BATT_STAT_CRITICAL) == 0) { sc->flags |= ACPI_BATT_STAT_CRITICAL; device_printf(dev, "critically low charge!\n"); } } Use the acpi_NotifyMumble function to send a value to devd. You probably want to make sure you're off AC power also since you may still have that crit state when plugged in. So read the value of AC status (see kern_power.c for how to do this) before sending the notify. -- Nate From owner-freebsd-acpi@FreeBSD.ORG Sat Nov 25 23:08:54 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 63BF716A403 for ; Sat, 25 Nov 2006 23:08:54 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id B319843D7C for ; Sat, 25 Nov 2006 23:08:03 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id kAPN8VIn098360; Sat, 25 Nov 2006 16:08:31 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 25 Nov 2006 16:09:17 -0700 (MST) Message-Id: <20061125.160917.1628359610.imp@bsdimp.com> To: nate@root.org From: "M. Warner Losh" In-Reply-To: <4568AA2F.4050602@root.org> References: <20061124.201214.1656128345.imp@bsdimp.com> <4568AA2F.4050602@root.org> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 25 Nov 2006 16:08:31 -0700 (MST) Cc: freebsd-acpi@freebsd.org Subject: Re: How do I... 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, 25 Nov 2006 23:08:54 -0000 In message: <4568AA2F.4050602@root.org> Nate Lawson writes: : M. Warner Losh wrote: : > ... run a command when there's < 1% battery life left? : > : > Warner : : You add support here in acpi_cmbat.c: : /* XXX If all batteries are critical, perhaps we should suspend. */ : if (sc->bst.state & ACPI_BATT_STAT_CRITICAL) { : if ((sc->flags & ACPI_BATT_STAT_CRITICAL) == 0) { : sc->flags |= ACPI_BATT_STAT_CRITICAL; : device_printf(dev, "critically low charge!\n"); : } : } : : Use the acpi_NotifyMumble function to send a value to devd. You : probably want to make sure you're off AC power also since you may still : have that crit state when plugged in. So read the value of AC status : (see kern_power.c for how to do this) before sending the notify. I was thinking of sending the critical message as well as for each % of battery life that changed. I just wanted to make sure that it wasn't being done already and i was captain clueless. Warner