linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] powerpc/PCI: Use PCI_UNKNOWN for unknown power state
@ 2013-05-20 23:19 Bjorn Helgaas
  2013-05-20 23:19 ` [PATCH 2/2] sparc/PCI: " Bjorn Helgaas
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Bjorn Helgaas @ 2013-05-20 23:19 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, David S. Miller
  Cc: sparclinux, Rafael J. Wysocki, linuxppc-dev, linux-pci

Previously we initialized dev->current_state to 4 (PCI_D3cold), but I think
we wanted PCI_UNKNOWN (5) here based on the comment and the fact that the
generic version of this code, pci_setup_device(), uses PCI_UNKNOWN.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 arch/powerpc/kernel/pci_of_scan.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c
index 2a67e9b..d2d407d 100644
--- a/arch/powerpc/kernel/pci_of_scan.c
+++ b/arch/powerpc/kernel/pci_of_scan.c
@@ -165,7 +165,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
 	pr_debug("    class: 0x%x\n", dev->class);
 	pr_debug("    revision: 0x%x\n", dev->revision);
 
-	dev->current_state = 4;		/* unknown power state */
+	dev->current_state = PCI_UNKNOWN;	/* unknown power state */
 	dev->error_state = pci_channel_io_normal;
 	dev->dma_mask = 0xffffffff;
 

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] sparc/PCI: Use PCI_UNKNOWN for unknown power state
  2013-05-20 23:19 [PATCH 1/2] powerpc/PCI: Use PCI_UNKNOWN for unknown power state Bjorn Helgaas
@ 2013-05-20 23:19 ` Bjorn Helgaas
  2013-05-21  1:51   ` David Miller
  2013-05-20 23:26 ` [PATCH 1/2] powerpc/PCI: " Bjorn Helgaas
  2013-05-20 23:42 ` Benjamin Herrenschmidt
  2 siblings, 1 reply; 6+ messages in thread
From: Bjorn Helgaas @ 2013-05-20 23:19 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, David S. Miller
  Cc: sparclinux, Rafael J. Wysocki, linuxppc-dev, linux-pci

Previously we initialized dev->current_state to 4 (PCI_D3cold), but I think
we wanted PCI_UNKNOWN (5) here based on the comment and the fact that the
generic version of this code, pci_setup_device(), uses PCI_UNKNOWN.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 arch/sparc/kernel/pci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index baf4366..972892a 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -327,7 +327,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
 	if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE)
 		pci_set_master(dev);
 
-	dev->current_state = 4;		/* unknown power state */
+	dev->current_state = PCI_UNKNOWN;	/* unknown power state */
 	dev->error_state = pci_channel_io_normal;
 	dev->dma_mask = 0xffffffff;
 

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] powerpc/PCI: Use PCI_UNKNOWN for unknown power state
  2013-05-20 23:19 [PATCH 1/2] powerpc/PCI: Use PCI_UNKNOWN for unknown power state Bjorn Helgaas
  2013-05-20 23:19 ` [PATCH 2/2] sparc/PCI: " Bjorn Helgaas
@ 2013-05-20 23:26 ` Bjorn Helgaas
  2013-05-20 23:42 ` Benjamin Herrenschmidt
  2 siblings, 0 replies; 6+ messages in thread
From: Bjorn Helgaas @ 2013-05-20 23:26 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, David S. Miller
  Cc: sparclinux, Rafael J. Wysocki, linuxppc-dev,
	linux-pci@vger.kernel.org

On Mon, May 20, 2013 at 5:19 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> Previously we initialized dev->current_state to 4 (PCI_D3cold), but I think
> we wanted PCI_UNKNOWN (5) here based on the comment and the fact that the
> generic version of this code, pci_setup_device(), uses PCI_UNKNOWN.
>
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> ---
>  arch/powerpc/kernel/pci_of_scan.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c
> index 2a67e9b..d2d407d 100644
> --- a/arch/powerpc/kernel/pci_of_scan.c
> +++ b/arch/powerpc/kernel/pci_of_scan.c
> @@ -165,7 +165,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
>         pr_debug("    class: 0x%x\n", dev->class);
>         pr_debug("    revision: 0x%x\n", dev->revision);
>
> -       dev->current_state = 4;         /* unknown power state */
> +       dev->current_state = PCI_UNKNOWN;       /* unknown power state */

If you're interested in the archaeology of this, I think it was first
introduced by 4267292b0 in 2005 for powerpc and subsequently copied
into sparc by a2fb23af1 in 2007.

Prior to the addition of PCI_UNKNOWN, pci_setup_device() set
current_state to 4, so I think 4267292b0 probably just copied that
code before 3fe9d19f9 added PCI_UNKNOWN and changed the initialization
in pci_setup_device().

>         dev->error_state = pci_channel_io_normal;
>         dev->dma_mask = 0xffffffff;
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] powerpc/PCI: Use PCI_UNKNOWN for unknown power state
  2013-05-20 23:19 [PATCH 1/2] powerpc/PCI: Use PCI_UNKNOWN for unknown power state Bjorn Helgaas
  2013-05-20 23:19 ` [PATCH 2/2] sparc/PCI: " Bjorn Helgaas
  2013-05-20 23:26 ` [PATCH 1/2] powerpc/PCI: " Bjorn Helgaas
@ 2013-05-20 23:42 ` Benjamin Herrenschmidt
  2013-05-20 23:45   ` Bjorn Helgaas
  2 siblings, 1 reply; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2013-05-20 23:42 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, Rafael J. Wysocki, Paul Mackerras, sparclinux,
	linuxppc-dev, David S. Miller

On Mon, 2013-05-20 at 17:19 -0600, Bjorn Helgaas wrote:
> Previously we initialized dev->current_state to 4 (PCI_D3cold), but I think
> we wanted PCI_UNKNOWN (5) here based on the comment and the fact that the
> generic version of this code, pci_setup_device(), uses PCI_UNKNOWN.
> 
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> ---

Ack. Do you send to Linus or should I ?

Thanks.

Cheers,
Ben.

>  arch/powerpc/kernel/pci_of_scan.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c
> index 2a67e9b..d2d407d 100644
> --- a/arch/powerpc/kernel/pci_of_scan.c
> +++ b/arch/powerpc/kernel/pci_of_scan.c
> @@ -165,7 +165,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
>  	pr_debug("    class: 0x%x\n", dev->class);
>  	pr_debug("    revision: 0x%x\n", dev->revision);
>  
> -	dev->current_state = 4;		/* unknown power state */
> +	dev->current_state = PCI_UNKNOWN;	/* unknown power state */
>  	dev->error_state = pci_channel_io_normal;
>  	dev->dma_mask = 0xffffffff;
>  

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] powerpc/PCI: Use PCI_UNKNOWN for unknown power state
  2013-05-20 23:42 ` Benjamin Herrenschmidt
@ 2013-05-20 23:45   ` Bjorn Helgaas
  0 siblings, 0 replies; 6+ messages in thread
From: Bjorn Helgaas @ 2013-05-20 23:45 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: linux-pci@vger.kernel.org, Rafael J. Wysocki, Paul Mackerras,
	sparclinux, linuxppc-dev, David S. Miller

On Mon, May 20, 2013 at 5:42 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> On Mon, 2013-05-20 at 17:19 -0600, Bjorn Helgaas wrote:
>> Previously we initialized dev->current_state to 4 (PCI_D3cold), but I think
>> we wanted PCI_UNKNOWN (5) here based on the comment and the fact that the
>> generic version of this code, pci_setup_device(), uses PCI_UNKNOWN.
>>
>> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
>> ---
>
> Ack. Do you send to Linus or should I ?

I'll add your ack and take care of it.

>>  arch/powerpc/kernel/pci_of_scan.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c
>> index 2a67e9b..d2d407d 100644
>> --- a/arch/powerpc/kernel/pci_of_scan.c
>> +++ b/arch/powerpc/kernel/pci_of_scan.c
>> @@ -165,7 +165,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
>>       pr_debug("    class: 0x%x\n", dev->class);
>>       pr_debug("    revision: 0x%x\n", dev->revision);
>>
>> -     dev->current_state = 4;         /* unknown power state */
>> +     dev->current_state = PCI_UNKNOWN;       /* unknown power state */
>>       dev->error_state = pci_channel_io_normal;
>>       dev->dma_mask = 0xffffffff;
>>
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] sparc/PCI: Use PCI_UNKNOWN for unknown power state
  2013-05-20 23:19 ` [PATCH 2/2] sparc/PCI: " Bjorn Helgaas
@ 2013-05-21  1:51   ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2013-05-21  1:51 UTC (permalink / raw)
  To: bhelgaas; +Cc: rjw, paulus, linux-pci, sparclinux, linuxppc-dev

From: Bjorn Helgaas <bhelgaas@google.com>
Date: Mon, 20 May 2013 17:19:16 -0600

> Previously we initialized dev->current_state to 4 (PCI_D3cold), but I think
> we wanted PCI_UNKNOWN (5) here based on the comment and the fact that the
> generic version of this code, pci_setup_device(), uses PCI_UNKNOWN.
> 
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-05-21  1:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-20 23:19 [PATCH 1/2] powerpc/PCI: Use PCI_UNKNOWN for unknown power state Bjorn Helgaas
2013-05-20 23:19 ` [PATCH 2/2] sparc/PCI: " Bjorn Helgaas
2013-05-21  1:51   ` David Miller
2013-05-20 23:26 ` [PATCH 1/2] powerpc/PCI: " Bjorn Helgaas
2013-05-20 23:42 ` Benjamin Herrenschmidt
2013-05-20 23:45   ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).