From owner-freebsd-acpi@FreeBSD.ORG Sun Apr 3 00:59:02 2011 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 BD34A106566B for ; Sun, 3 Apr 2011 00:59:02 +0000 (UTC) (envelope-from nate@root.org) Received: from mail.rootlabs.com (rootlabs.com [208.72.84.106]) by mx1.freebsd.org (Postfix) with ESMTP id 9B2BB8FC08 for ; Sun, 3 Apr 2011 00:59:02 +0000 (UTC) Received: (Postfix invoked from local network); Sat, 2 Apr 2011 17:39:31 -0700 (PDT) Message-ID: <4D97C1C2.1090608@root.org> Date: Sat, 02 Apr 2011 17:39:30 -0700 From: Nate Lawson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: freebsd-acpi@freebsd.org References: <20110402112958.449d8624@shibato.opal.com> <20110402173444.6811f735@shibato.opal.com> In-Reply-To: <20110402173444.6811f735@shibato.opal.com> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: pci buses missing from suspend/resume powerstate 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, 03 Apr 2011 00:59:02 -0000 On 4/2/2011 2:34 PM, J.R. Oldroyd wrote: > On Sat, 2 Apr 2011 11:29:58 -0400, "J.R. Oldroyd" wrote: >> >> [suspend/resume of network cards] >> >> pcib0 >> pci0 >> hostb0 >> pcib1 >> pci1 >> vgapci0 >> vgapm0 >> scpm0 >> acpi_video0 >> drm0 >> hdac1 >> pcm2 >> pcib2 >> pci2 >> ath0 >> pcib3 >> pci3 >> re0 >> miibus0 >> rgephy0 >> ... > > I had been working from this: > > on suspend: > kernel: pci0:1:5:0: Transition from D0 to D3 # vgapci > kernel: pci0:1:5:1: Transition from D0 to D3 # hdac1 > kernel: pci0:2:0:0: Transition from D0 to D3 # ath0 > kernel: pci0:3:0:0: Transition from D0 to D3 # re0 > kernel: pci0:0:18:2: Transition from D0 to D3 # ohci0 > kernel: pci0:0:19:2: Transition from D0 to D3 # ohci1 > kernel: pci0:0:20:2: Transition from D0 to D3 # hdac0 > > but on resume, only: > kernel: pci0:0:18:2: Transition from D3 to D0 > kernel: pci0:0:19:2: Transition from D3 to D0 > > which had led me to think the buses were not being resumed. > > Looking further at this, two things come to light: > - they ARE being suspended using set_powerstate to D3, but > after the resume, their powerstate still shows as D0, so > set_powerstate is not being re-invoked to actually set D0 > again > - the PCI-PCI bridges pcib1, pcib2, pcib3 have hdrtype==1 and > so are also excluded from the set_powerstate (don't know if > that's OK or not) > > But, overriding those checks and forcing set_powerstate D0 to be invoked > for all devices still doesn't get ath0 or re0 working after the resume. > > I have an older but similar laptop model with the same configuration of > ath0 and re0 also on secondary PCI buses pci2 and pci3 and that one does > suspend/resume properly. But on the newer laptop: > > kernel: ath0: unable to reset hardware; hal status 3 > kernel: re0: reset never completed! > kernel: re0: PHY write failed > last message repeated 4 times > > So this problem is specific to this newer hardware. Perhaps related to > the PCI-PCI bridges? pcib2 and pcib3 are both devid=96xx1022... perhaps > some odd quirk handling is needed here? I suspect something in the ASL is different. -- Nate From owner-freebsd-acpi@FreeBSD.ORG Sun Apr 3 02:55:06 2011 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 F30D4106566C for ; Sun, 3 Apr 2011 02:55:05 +0000 (UTC) (envelope-from fbsd@opal.com) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) by mx1.freebsd.org (Postfix) with ESMTP id BB1298FC0C for ; Sun, 3 Apr 2011 02:55:05 +0000 (UTC) Received: from pool-141-154-217-103.bos.east.verizon.net ([141.154.217.103] helo=homobox.opal.com) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Q6DSz-000Mbd-67; Sun, 03 Apr 2011 02:55:05 +0000 Received: from opal.com (localhost [IPv6:::1]) (authenticated bits=0) by homobox.opal.com (8.14.4/8.14.4) with ESMTP id p332t2Ba050237 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 2 Apr 2011 22:55:03 -0400 (EDT) (envelope-from fbsd@opal.com) Received: from shibato.opal.com ([173.77.114.241] helo=shibato.opal.com) with IPv4:587 by opal.com; 2 Apr 2011 22:55:02 -0400 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 141.154.217.103 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18cnTccESR10x1XcvrgapRP Date: Sat, 2 Apr 2011 22:55:01 -0400 From: "J.R. Oldroyd" To: Nate Lawson Message-ID: <20110402225501.5d365725@shibato.opal.com> In-Reply-To: <4D97C1C2.1090608@root.org> References: <20110402112958.449d8624@shibato.opal.com> <20110402173444.6811f735@shibato.opal.com> <4D97C1C2.1090608@root.org> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; amd64-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org Subject: Re: pci buses missing from suspend/resume powerstate 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, 03 Apr 2011 02:55:06 -0000 On Sat, 02 Apr 2011 17:39:30 -0700, Nate Lawson wrote: > > I suspect something in the ASL is different. > The L305D suspends/resumes fine and all devices work after. On the L675D, ath0 and re0 are dead after resume. ASLs: http://opal.com/jr/toshiba_l305d/toshiba_l305d.dsdt http://opal.com/jr/toshiba_l305d/toshiba_l305d.devinfo pci0/pcib3/pci3/re0 pci0/pcib4/pci4/ath0 http://opal.com/jr/toshiba_l675d/toshiba_l675d.dsdt http://opal.com/jr/toshiba_l675d/toshiba_l675d.devinfo pci0/pcib2/pci2/ath0 pci0/pcib3/pci3/re0 -jr From owner-freebsd-acpi@FreeBSD.ORG Mon Apr 4 11:06:55 2011 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 F2073106567F for ; Mon, 4 Apr 2011 11:06:54 +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 C33F48FC28 for ; Mon, 4 Apr 2011 11:06:54 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p34B6saf028534 for ; Mon, 4 Apr 2011 11:06:54 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p34B6sYi028531 for freebsd-acpi@FreeBSD.org; Mon, 4 Apr 2011 11:06:54 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 4 Apr 2011 11:06:54 GMT Message-Id: <201104041106.p34B6sYi028531@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, 04 Apr 2011 11:06:55 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/154955 acpi [acpi] Keyboard or ACPI doesn't work on Lenovo S10-3 o kern/152438 acpi [acpi]: patch to acpi_asus(4) to add extra sysctls for o kern/152098 acpi [acpi] Lenovo T61p does not resume o i386/146715 acpi [acpi] Suspend works, resume not on a HP Probook 4510s o kern/145306 acpi [acpi]: Can't change brightness on HP ProBook 4510s o i386/144045 acpi [acpi] [panic] kernel trap with acpi enabled o i386/143798 acpi [acpi] shutdown problem with SiS K7S5A o kern/143420 acpi [acpi] ACPI issues with Toshiba o kern/142263 acpi [acpi] ACPI regression on Asus K8N7-E deluxe motherboa o kern/142009 acpi [acpi] [panic] Panic in AcpiNsGetAttachedObject o amd64/140751 acpi [acpi] BIOS resource allocation and FreeBSD ACPI in TO o kern/139088 acpi [acpi] ACPI Exception: AE_AML_INFINITE_LOOP error o amd64/138210 acpi [acpi] acer aspire 5536 ACPI problems (S3, brightness, o bin/137053 acpi [hang] FreeBSD 8.0 BETA2Compaq Mini 700 locks on boot o kern/137042 acpi [acpi] hp laptop's lcd not wakes up after suspend to r o i386/136008 acpi [acpi] Dell Vostro 1310 will not shutdown (Requires us o bin/135349 acpi [patch] teach acpidump(8) to disassemble arbitrary mem o kern/135070 acpi [acpi] [patch] BIOS resource allocation and FreeBSD AC o kern/132602 acpi [acpi] ACPI Problem with Intel SS4200: System does not o kern/130683 acpi [ACPI] shutdown hangs after syncing disks - ACPI race? o i386/129953 acpi [acpi] ACPI timeout (CDROM) with Shuttle X27D p kern/128634 acpi [patch] fix acpi_asus(4) in asus a6f laptop o kern/124412 acpi [acpi] power off error on Toshiba M40 laptop o kern/123039 acpi [acpi] ACPI AML_BUFFER_LIMIT errors during boot o kern/121504 acpi [patch] Correctly set hw.acpi.osname on certain machin f kern/119356 acpi [acpi]: i386 ACPI wakeup not work due resource exhaust o kern/119200 acpi [acpi] Lid close switch suspends CPU for 1 second on H o kern/116939 acpi [acpi] PCI-to-PCI misconfigured for bus three and can o i386/114562 acpi [acpi] cardbus is dead after s3 on Thinkpad T43 with a o kern/114165 acpi [acpi] Dell C810 - ACPI problem s kern/112544 acpi [acpi] [patch] Add High Precision Event Timer Driver f o kern/108695 acpi [acpi]: Fatal trap 9: general protection fault when in o kern/108488 acpi [acpi] ACPI-1304: *** Error: Method execution failed o kern/106924 acpi [acpi] ACPI resume returns g_vfs_done() errors and ker o kern/105537 acpi [acpi] problems in acpi on HP Compaq nc6320 o kern/102252 acpi acpi thermal does not work on Abit AW8D (intel 975) o i386/83018 acpi [install] Installer will not boot on Asus P4S8X BIOS 1 o kern/73823 acpi [request] acpi / power-on by timer support o i386/69750 acpi Boot without ACPI failed on ASUS L5 o kern/56024 acpi ACPI suspend drains battery while in S3 o i386/55661 acpi ACPI suspend/resume problem on ARMADA M700 41 problems total. From owner-freebsd-acpi@FreeBSD.ORG Wed Apr 6 20:00:59 2011 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 9235D106566C for ; Wed, 6 Apr 2011 20:00:59 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 669E78FC14 for ; Wed, 6 Apr 2011 20:00:59 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 033CE46B03; Wed, 6 Apr 2011 16:00:59 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 8DA318A027; Wed, 6 Apr 2011 16:00:58 -0400 (EDT) From: John Baldwin To: freebsd-acpi@freebsd.org Date: Wed, 6 Apr 2011 16:00:53 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <201103281406.27334.jhb@freebsd.org> In-Reply-To: <201103281406.27334.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201104061600.53572.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 06 Apr 2011 16:00:58 -0400 (EDT) Cc: =?utf-8?b?0JrRgdC10L3Qt9C+0LIg0JDQu9C10LrRgdC10Lk=?= Subject: Re: Atheros 9285 & Atheros AR8131 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, 06 Apr 2011 20:00:59 -0000 On Monday, March 28, 2011 2:06:27 pm John Baldwin wrote: > On Monday, March 28, 2011 12:46:02 pm =D0=9A=D1=81=D0=B5=D0=BD=D0=B7=D0= =BE=D0=B2 =D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9 wrote: > > 2011/3/29 Sergio de Almeida Lenzi > >=20 > > > > > > This is probably due to a problem FreeBSD has with ACPI initializati= on > > > sometimes wiping out the state in PCI-PCI bridges for resource window= s and not > > > gracefully recovering from that. I have some early work in progress = to > > > address this, but it will be a while before I have something ready for > > > testing. > > > > > > > > > it is the acer bios that is does not follow acpi standard... I have = the > > > same problem > > > in an old acer 5050 no solution still... I had to install linux in = that > > > notebook. > > > > > > My advice is not to buy acer... they are cheap any good... > > > > > > Well let's wait for the Baldwin fix.... > > > > > > > > maybe this can be corrected by editing the ASL? >=20 > We've never figured out what is zeroing the registers in the PCI-PCI brid= ges. > I suspect it is not something in the ASL, but is a side effect of some BI= OS > code that runs in SMM when ACPI is turned on. Ok, so I have a patch to rework how PCI-PCI bridges manage resources for devices. This patch applies to HEAD, no idea if it applies to older branch= es (likely not). You will need to add the option 'NEW_PCIB' to your kernel config after applying this patch. http://www.FreeBSD.org/~jhb/patches/pcib_new.patch =46or my local testing I used a hack to wipe out the PCI-PCI bridges in my test machine similar to what the BIOS does on these machines. The bridges all grew windows to match their original BIOS-assigned windows based on the BIOS-assigned resources in the BARs of the child devices. These patches should also let us allocate new resources from scratch for devices behind PCI-PCI bridges once we have better support for determining = what are valid PCI address ranges in the Host-PCI bridge drivers. =2D-=20 John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Wed Apr 6 21:51:41 2011 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 BB5D1106564A for ; Wed, 6 Apr 2011 21:51:41 +0000 (UTC) (envelope-from nate@root.org) Received: from mail.rootlabs.com (rootlabs.com [208.72.84.106]) by mx1.freebsd.org (Postfix) with ESMTP id 979DC8FC13 for ; Wed, 6 Apr 2011 21:51:41 +0000 (UTC) Received: (Postfix invoked from local network); Wed, 6 Apr 2011 14:51:40 -0700 (PDT) Message-ID: <4D9CE06C.3070002@root.org> Date: Wed, 06 Apr 2011 14:51:40 -0700 From: Nate Lawson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: freebsd-acpi@freebsd.org References: <201103281406.27334.jhb@freebsd.org> <201104061600.53572.jhb@freebsd.org> In-Reply-To: <201104061600.53572.jhb@freebsd.org> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: Atheros 9285 & Atheros AR8131 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, 06 Apr 2011 21:51:41 -0000 On 4/6/2011 1:00 PM, John Baldwin wrote: > On Monday, March 28, 2011 2:06:27 pm John Baldwin wrote: >> We've never figured out what is zeroing the registers in the PCI-PCI bridges. >> I suspect it is not something in the ASL, but is a side effect of some BIOS >> code that runs in SMM when ACPI is turned on. > > Ok, so I have a patch to rework how PCI-PCI bridges manage resources for > devices. This patch applies to HEAD, no idea if it applies to older branches > (likely not). You will need to add the option 'NEW_PCIB' to your kernel > config after applying this patch. > > http://www.FreeBSD.org/~jhb/patches/pcib_new.patch > > For my local testing I used a hack to wipe out the PCI-PCI bridges in my > test machine similar to what the BIOS does on these machines. The bridges > all grew windows to match their original BIOS-assigned windows based on the > BIOS-assigned resources in the BARs of the child devices. > > These patches should also let us allocate new resources from scratch for > devices behind PCI-PCI bridges once we have better support for determining what > are valid PCI address ranges in the Host-PCI bridge drivers. Wow, awesome work. This is really useful for fixing a common problem. Should bus_adjust_resource() be a DEVMETHOD or is this something that should be done automatically within rman_alloc_resource(), possibly based on a device flag? -- Nate From owner-freebsd-acpi@FreeBSD.ORG Wed Apr 6 22:43:30 2011 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 44561106564A for ; Wed, 6 Apr 2011 22:43:30 +0000 (UTC) (envelope-from lenzi.sergio@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id EF4B08FC0A for ; Wed, 6 Apr 2011 22:43:29 +0000 (UTC) Received: by ywf9 with SMTP id 9so878525ywf.13 for ; Wed, 06 Apr 2011 15:43:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:to:in-reply-to:references :content-type:date:message-id:mime-version:x-mailer; bh=Jhi/pbn2NVhBKQQ2zauunFgBsr47ShIztv3YdHKyM5A=; b=YF1np9bc67MTVL8EmClwQLY34jsYoBIF6CrWM4sSN+zLpuuXZsxWYJYx3snKa/2mbx JFqriGtV2J0hU9jqaMSbkdKgy0yyU/Ov6YlgD1yAzTDtigaMeK4BoByJ+b/vKoo0rgYx kqzP7+qxgvzVupKD1GP/+G6Wu8P+B1S/TKW08= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer; b=Q3S6TbPIbTMHgQi9O84koJf/qXF3liXWMIOtCnapqTqCtphW+SDOMUMSLnLIyfw5Yg ogyWJwWML42wM8ZznRSHdIu9l/2SSdydaEUxDDdiE7qbvSOg3/3HgVy7D0Qj8ZluCX2/ i0TztCMUip//sHzap0hp7Jvo04Z60FQPY0Uqc= Received: by 10.236.75.200 with SMTP id z48mr245025yhd.75.1302129808317; Wed, 06 Apr 2011 15:43:28 -0700 (PDT) Received: from [192.168.6.230] ([201.21.167.145]) by mx.google.com with ESMTPS id z10sm394278yhc.78.2011.04.06.15.43.25 (version=SSLv3 cipher=OTHER); Wed, 06 Apr 2011 15:43:27 -0700 (PDT) From: Sergio de Almeida Lenzi To: freebsd-acpi@freebsd.org In-Reply-To: <4D9CE06C.3070002@root.org> References: <201103281406.27334.jhb@freebsd.org> <201104061600.53572.jhb@freebsd.org> <4D9CE06C.3070002@root.org> Date: Wed, 06 Apr 2011 19:43:23 -0300 Message-ID: <1302129803.4201.7.camel@z6000.lenzicasa> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Atheros 9285 & Atheros AR8131 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, 06 Apr 2011 22:43:30 -0000 Great work Nate now I know I will have a chance for my notebook acer5050... I tested the patch in the 8.2 version 4bits and it worked (patch done) all exept for the ftd device (that does not have in the 8.2).. Thanks From owner-freebsd-acpi@FreeBSD.ORG Wed Apr 6 23:23:18 2011 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 405131065673 for ; Wed, 6 Apr 2011 23:23:18 +0000 (UTC) (envelope-from nate@root.org) Received: from mail.rootlabs.com (rootlabs.com [208.72.84.106]) by mx1.freebsd.org (Postfix) with ESMTP id 1DE358FC18 for ; Wed, 6 Apr 2011 23:23:17 +0000 (UTC) Received: (Postfix invoked from local network); Wed, 6 Apr 2011 16:23:16 -0700 (PDT) Message-ID: <4D9CF5E4.3020301@root.org> Date: Wed, 06 Apr 2011 16:23:16 -0700 From: Nate Lawson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: freebsd-acpi@freebsd.org References: <201103281406.27334.jhb@freebsd.org> <201104061600.53572.jhb@freebsd.org> <4D9CE06C.3070002@root.org> <1302129803.4201.7.camel@z6000.lenzicasa> In-Reply-To: <1302129803.4201.7.camel@z6000.lenzicasa> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: Atheros 9285 & Atheros AR8131 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, 06 Apr 2011 23:23:18 -0000 Don't thank me, thank John Baldwin. Glad it works! On 4/6/2011 3:43 PM, Sergio de Almeida Lenzi wrote: > Great work Nate > now I know I will have a chance for my notebook acer5050... > > I tested the patch in the 8.2 version 4bits and it worked (patch done) > all exept for the ftd device (that does not have in the 8.2).. > > Thanks From owner-freebsd-acpi@FreeBSD.ORG Thu Apr 7 16:22:54 2011 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 1CE7A1065674 for ; Thu, 7 Apr 2011 16:22:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E348E8FC0C for ; Thu, 7 Apr 2011 16:22:53 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 8348646B3C; Thu, 7 Apr 2011 12:22:53 -0400 (EDT) Received: from jhbmac.hudson-trading.com (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 09D588A01B; Thu, 7 Apr 2011 12:22:53 -0400 (EDT) Message-ID: <4D9DC1C6.4040700@FreeBSD.org> Date: Thu, 07 Apr 2011 09:53:10 -0400 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: Nate Lawson References: <201103281406.27334.jhb@freebsd.org> <201104061600.53572.jhb@freebsd.org> <4D9CE06C.3070002@root.org> In-Reply-To: <4D9CE06C.3070002@root.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Thu, 07 Apr 2011 12:22:53 -0400 (EDT) Cc: freebsd-acpi@freebsd.org Subject: Re: Atheros 9285 & Atheros AR8131 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, 07 Apr 2011 16:22:54 -0000 On 4/6/11 5:51 PM, Nate Lawson wrote: > On 4/6/2011 1:00 PM, John Baldwin wrote: >> On Monday, March 28, 2011 2:06:27 pm John Baldwin wrote: >>> We've never figured out what is zeroing the registers in the PCI-PCI bridges. >>> I suspect it is not something in the ASL, but is a side effect of some BIOS >>> code that runs in SMM when ACPI is turned on. >> >> Ok, so I have a patch to rework how PCI-PCI bridges manage resources for >> devices. This patch applies to HEAD, no idea if it applies to older branches >> (likely not). You will need to add the option 'NEW_PCIB' to your kernel >> config after applying this patch. >> >> http://www.FreeBSD.org/~jhb/patches/pcib_new.patch >> >> For my local testing I used a hack to wipe out the PCI-PCI bridges in my >> test machine similar to what the BIOS does on these machines. The bridges >> all grew windows to match their original BIOS-assigned windows based on the >> BIOS-assigned resources in the BARs of the child devices. >> >> These patches should also let us allocate new resources from scratch for >> devices behind PCI-PCI bridges once we have better support for determining what >> are valid PCI address ranges in the Host-PCI bridge drivers. > > Wow, awesome work. This is really useful for fixing a common problem. > > Should bus_adjust_resource() be a DEVMETHOD or is this something that > should be done automatically within rman_alloc_resource(), possibly > based on a device flag? Hmm, I had only thought of it as being a wrapper around rman_adjust_resource(). I'm not sure what you mean by adjusting it inside another method? Note that one of the reasons I have the current method is that different devices may have different restrictions on how resources can grow. For example, the PCI-PCI memory windows are aligned on 1MB boundaries and are allocated in 1MB chunks while the I/O port windows are aligned and allocated in 4K chunks. I also plan to make use of rman_adjust_resource() for PCI bus renumbering, but in that case resources would only grow at the end, etc. Given that, I want to keep the logic to determine which kind of adjustment to perform in the relevant driver rather than having rman attempt to use a generic algorithm for expanding a resource and associated rman used for suballocation (if that makes sense). -- John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Thu Apr 7 17:25:33 2011 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 780B3106567C for ; Thu, 7 Apr 2011 17:25:33 +0000 (UTC) (envelope-from nate@root.org) Received: from mail.rootlabs.com (rootlabs.com [208.72.84.106]) by mx1.freebsd.org (Postfix) with ESMTP id 5722B8FC15 for ; Thu, 7 Apr 2011 17:25:33 +0000 (UTC) Received: (Postfix invoked from local network); Thu, 7 Apr 2011 10:25:32 -0700 (PDT) Message-ID: <4D9DF38B.8050703@root.org> Date: Thu, 07 Apr 2011 10:25:31 -0700 From: Nate Lawson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: freebsd-acpi@freebsd.org References: <201103281406.27334.jhb@freebsd.org> <201104061600.53572.jhb@freebsd.org> <4D9CE06C.3070002@root.org> <4D9DC1C6.4040700@FreeBSD.org> In-Reply-To: <4D9DC1C6.4040700@FreeBSD.org> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: Atheros 9285 & Atheros AR8131 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, 07 Apr 2011 17:25:33 -0000 On 4/7/2011 6:53 AM, John Baldwin wrote: > On 4/6/11 5:51 PM, Nate Lawson wrote: >> Wow, awesome work. This is really useful for fixing a common problem. >> >> Should bus_adjust_resource() be a DEVMETHOD or is this something that >> should be done automatically within rman_alloc_resource(), possibly >> based on a device flag? > > Hmm, I had only thought of it as being a wrapper around > rman_adjust_resource(). I'm not sure what you mean by adjusting it > inside another method? Note that one of the reasons I have the current > method is that different devices may have different restrictions on how > resources can grow. For example, the PCI-PCI memory windows are aligned > on 1MB boundaries and are allocated in 1MB chunks while the I/O port > windows are aligned and allocated in 4K chunks. > > I also plan to make use of rman_adjust_resource() for PCI bus > renumbering, but in that case resources would only grow at the end, etc. > Given that, I want to keep the logic to determine which kind of > adjustment to perform in the relevant driver rather than having rman > attempt to use a generic algorithm for expanding a resource and > associated rman used for suballocation (if that makes sense). Yes, that makes sense. It's a question of complexity -- do you push a set of rules to rman and have it apply them? Or do you do the adjusting in the driver itself, which knows its own restrictions but may end up replicating some general purpose code for applying those restrictions? This seems great for now. I don't have any complaints, just musing about the future. -- Nate From owner-freebsd-acpi@FreeBSD.ORG Thu Apr 7 19:04:15 2011 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 38719106566B for ; Thu, 7 Apr 2011 19:04:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 0BB828FC08 for ; Thu, 7 Apr 2011 19:04:15 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 9C65B46B35; Thu, 7 Apr 2011 15:04:14 -0400 (EDT) Received: from jhbmac.hudson-trading.com (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 38A2A8A02A; Thu, 7 Apr 2011 15:04:14 -0400 (EDT) Message-ID: <4D9E0AAD.2010708@FreeBSD.org> Date: Thu, 07 Apr 2011 15:04:13 -0400 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: Nate Lawson References: <201103281406.27334.jhb@freebsd.org> <201104061600.53572.jhb@freebsd.org> <4D9CE06C.3070002@root.org> <4D9DC1C6.4040700@FreeBSD.org> <4D9DF38B.8050703@root.org> In-Reply-To: <4D9DF38B.8050703@root.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Thu, 07 Apr 2011 15:04:14 -0400 (EDT) Cc: freebsd-acpi@freebsd.org Subject: Re: Atheros 9285 & Atheros AR8131 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, 07 Apr 2011 19:04:15 -0000 On 4/7/11 1:25 PM, Nate Lawson wrote: > On 4/7/2011 6:53 AM, John Baldwin wrote: >> On 4/6/11 5:51 PM, Nate Lawson wrote: >>> Wow, awesome work. This is really useful for fixing a common problem. >>> >>> Should bus_adjust_resource() be a DEVMETHOD or is this something that >>> should be done automatically within rman_alloc_resource(), possibly >>> based on a device flag? >> >> Hmm, I had only thought of it as being a wrapper around >> rman_adjust_resource(). I'm not sure what you mean by adjusting it >> inside another method? Note that one of the reasons I have the current >> method is that different devices may have different restrictions on how >> resources can grow. For example, the PCI-PCI memory windows are aligned >> on 1MB boundaries and are allocated in 1MB chunks while the I/O port >> windows are aligned and allocated in 4K chunks. >> >> I also plan to make use of rman_adjust_resource() for PCI bus >> renumbering, but in that case resources would only grow at the end, etc. >> Given that, I want to keep the logic to determine which kind of >> adjustment to perform in the relevant driver rather than having rman >> attempt to use a generic algorithm for expanding a resource and >> associated rman used for suballocation (if that makes sense). > > Yes, that makes sense. It's a question of complexity -- do you push a > set of rules to rman and have it apply them? Or do you do the adjusting > in the driver itself, which knows its own restrictions but may end up > replicating some general purpose code for applying those restrictions? > > This seems great for now. I don't have any complaints, just musing about > the future. Ahh, ok. So far my current plans for other places using rmans don't involve the same set of rules. However, I would be happy for their to eventually be a more general version of pcib_grow_window() if we find a need for it in the future. I think you could have a helper function at that level of granularity perhaps. -- John Baldwin