Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Nov 2014 17:20:01 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, Dmitry Chagin <dchagin@freebsd.org>
Subject:   Re: svn commit: r274635 - head/sys/dev/pci
Message-ID:  <201411181720.01235.jhb@freebsd.org>
In-Reply-To: <CAJ-Vmo=7x0Ut5nZyYMtpKCNin0ovbdFSXBTLTL7sr%2BJxnR2GTA@mail.gmail.com>
References:  <201411172025.sAHKPLMl055666@svn.freebsd.org> <2245618.H2SPKlpWdS@ralph.baldwin.cx> <CAJ-Vmo=7x0Ut5nZyYMtpKCNin0ovbdFSXBTLTL7sr%2BJxnR2GTA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, November 17, 2014 6:17:25 pm Adrian Chadd wrote:
> On 17 November 2014 14:45, John Baldwin <jhb@freebsd.org> wrote:
> > On Monday, November 17, 2014 08:25:21 PM Dmitry Chagin wrote:
> >> Author: dchagin
> >> Date: Mon Nov 17 20:25:21 2014
> >> New Revision: 274635
> >> URL: https://svnweb.freebsd.org/changeset/base/274635
> >>
> >> Log:
> >>   Use the correct device as the power_for_sleep() method
> >>   always pass request up to parent bridge.
> >>
> >>   Reviewed by:        jhb
> >>   MFC after:  1 week
> >>   xMFC:               r274386,r274397
> >
> > Hmm, I had misread this diff as being another instance of what Adrian had
> > found.  I think this is actually not correct.  The parent of a pci device
> > ('dev' here) is a pciX device.  pciX devices do not implement the
> > PCIB_POWER_FOR_SLEEP method from pcib_if.m, so this probably just broke
> > Adrian's Asus laptop as now it will always use D3 again and ignore _SxD.
> >
> > You said that this change fixed your laptop, yes?  Did it work before Adrian's
> > change in r274386 and break afterwards?
> 
> Hm, it doesn't cascade up to the parent of dev if it's called?

No, not all kobj methods do this.  In this case this is a pcib_if method, so
it is an interface supported by PCI bridge devices only.  PCI bus devices
aren't bridges, so they don't implement it.  Similarly, pcib devices don't
implement pci_if.m methods either.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411181720.01235.jhb>