From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757262Ab2FYOOS (ORCPT ); Mon, 25 Jun 2012 10:14:18 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:58405 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1757121Ab2FYOON (ORCPT ); Mon, 25 Jun 2012 10:14:13 -0400 Date: Mon, 25 Jun 2012 10:14:12 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Stephen Rothwell cc: Bjorn Helgaas , , , Greg Kroah-Hartman , Huang Ying , Zheng Yan Subject: Re: linux-next: manual merge of the pci tree with Linus' tree In-Reply-To: <20120625123108.06ef7f883a323df5221edc98@canb.auug.org.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 25 Jun 2012, Stephen Rothwell wrote: > Hi Bjorn, > > Today's linux-next merge of the pci tree got a conflict in > drivers/pci/pci.c between commit c2fb8a3fa255 ("USB: add > NO_D3_DURING_SLEEP flag and revert 151b61284776be2") from Linus' tree and > commit 448bd857d48e ("PCI/PM: add PCIe runtime D3cold support") from the > pci tree. > > I fixed it up (I think - see below) and can carry the fix as necessary. > -- > Cheers, > Stephen Rothwell sfr@canb.auug.org.au > > diff --cc drivers/pci/pci.c > index 77cb54a,3f8b74f..0000000 > --- a/drivers/pci/pci.c > +++ b/drivers/pci/pci.c > @@@ -1744,11 -1803,10 +1803,15 @@@ int pci_prepare_to_sleep(struct pci_de > if (target_state == PCI_POWER_ERROR) > return -EIO; > > + /* D3cold during system suspend/hibernate is not supported */ > + if (target_state > PCI_D3hot) > + target_state = PCI_D3hot; > + > + /* Some devices mustn't be in D3 during system sleep */ > + if (target_state == PCI_D3hot && > + (dev->dev_flags & PCI_DEV_FLAGS_NO_D3_DURING_SLEEP)) > + return 0; > + > pci_enable_wake(dev, target_state, device_may_wakeup(&dev->dev)); > > error = pci_set_power_state(dev, target_state); This looks right to me too. Alan Stern From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Stern Subject: Re: linux-next: manual merge of the pci tree with Linus' tree Date: Mon, 25 Jun 2012 10:14:12 -0400 (EDT) Message-ID: References: <20120625123108.06ef7f883a323df5221edc98@canb.auug.org.au> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: In-Reply-To: <20120625123108.06ef7f883a323df5221edc98@canb.auug.org.au> Sender: linux-kernel-owner@vger.kernel.org To: Stephen Rothwell Cc: Bjorn Helgaas , linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Huang Ying , Zheng Yan List-Id: linux-next.vger.kernel.org On Mon, 25 Jun 2012, Stephen Rothwell wrote: > Hi Bjorn, > > Today's linux-next merge of the pci tree got a conflict in > drivers/pci/pci.c between commit c2fb8a3fa255 ("USB: add > NO_D3_DURING_SLEEP flag and revert 151b61284776be2") from Linus' tree and > commit 448bd857d48e ("PCI/PM: add PCIe runtime D3cold support") from the > pci tree. > > I fixed it up (I think - see below) and can carry the fix as necessary. > -- > Cheers, > Stephen Rothwell sfr@canb.auug.org.au > > diff --cc drivers/pci/pci.c > index 77cb54a,3f8b74f..0000000 > --- a/drivers/pci/pci.c > +++ b/drivers/pci/pci.c > @@@ -1744,11 -1803,10 +1803,15 @@@ int pci_prepare_to_sleep(struct pci_de > if (target_state == PCI_POWER_ERROR) > return -EIO; > > + /* D3cold during system suspend/hibernate is not supported */ > + if (target_state > PCI_D3hot) > + target_state = PCI_D3hot; > + > + /* Some devices mustn't be in D3 during system sleep */ > + if (target_state == PCI_D3hot && > + (dev->dev_flags & PCI_DEV_FLAGS_NO_D3_DURING_SLEEP)) > + return 0; > + > pci_enable_wake(dev, target_state, device_may_wakeup(&dev->dev)); > > error = pci_set_power_state(dev, target_state); This looks right to me too. Alan Stern