* [PATCH] remove gratuitous reads from pasemi pci config space methods
@ 2007-08-09 21:37 Nathan Lynch
2007-08-11 23:57 ` Olof Johansson
0 siblings, 1 reply; 2+ messages in thread
From: Nathan Lynch @ 2007-08-09 21:37 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Olof Johansson, Paul Mackerras
The pasemi pci configuration space write method reads the written
location immediately after the write is performed, presumably in order
to flush the write. However, configuration space writes are not
allowed to be posted, making these reads gratuitous. Furthermore,
this behavior potentially causes us to violate the PCI PM spec when
changing between e.g. D0 and D3 states, because a delay of up to 10ms
may be required before the OS accesses configuration space after the
write which initiates the transition.
Remove the unnecessary reads from pa_pxp_write_config.
Signed-off-by: Nathan Lynch <ntl@pobox.com>
---
arch/powerpc/platforms/pasemi/pci.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c
index ab1f5f6..f7da373 100644
--- a/arch/powerpc/platforms/pasemi/pci.c
+++ b/arch/powerpc/platforms/pasemi/pci.c
@@ -107,15 +107,12 @@ static int pa_pxp_write_config(struct pci_bus *bus, unsigned int devfn,
switch (len) {
case 1:
out_8(addr, val);
- (void) in_8(addr);
break;
case 2:
out_le16(addr, val);
- (void) in_le16(addr);
break;
default:
out_le32(addr, val);
- (void) in_le32(addr);
break;
}
return PCIBIOS_SUCCESSFUL;
--
1.5.2.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] remove gratuitous reads from pasemi pci config space methods
2007-08-09 21:37 [PATCH] remove gratuitous reads from pasemi pci config space methods Nathan Lynch
@ 2007-08-11 23:57 ` Olof Johansson
0 siblings, 0 replies; 2+ messages in thread
From: Olof Johansson @ 2007-08-11 23:57 UTC (permalink / raw)
To: Nathan Lynch; +Cc: linuxppc-dev, Paul Mackerras
On Thu, Aug 09, 2007 at 04:37:27PM -0500, Nathan Lynch wrote:
> The pasemi pci configuration space write method reads the written
> location immediately after the write is performed, presumably in order
> to flush the write. However, configuration space writes are not
> allowed to be posted, making these reads gratuitous. Furthermore,
> this behavior potentially causes us to violate the PCI PM spec when
> changing between e.g. D0 and D3 states, because a delay of up to 10ms
> may be required before the OS accesses configuration space after the
> write which initiates the transition.
>
> Remove the unnecessary reads from pa_pxp_write_config.
Thanks!
> Signed-off-by: Nathan Lynch <ntl@pobox.com>
Acked-by: Olof Johansson <olof@lixom.net>
-Olof
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-11 23:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-09 21:37 [PATCH] remove gratuitous reads from pasemi pci config space methods Nathan Lynch
2007-08-11 23:57 ` Olof Johansson
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).