浏览代码

[POWERPC] Remove gratuitous reads from powermac pci config space methods

The powermac pci configuration space write methods read 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 macrisc_write_config,
u3_ht_write_config, and u4_pcie_write_config.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Nathan Lynch 18 年之前
父节点
当前提交
0f7f2fb85a
共有 1 个文件被更改,包括 0 次插入9 次删除
  1. 0 9
      arch/powerpc/platforms/powermac/pci.c

+ 0 - 9
arch/powerpc/platforms/powermac/pci.c

@@ -209,15 +209,12 @@ static int macrisc_write_config(struct pci_bus *bus, unsigned int devfn,
 	switch (len) {
 	switch (len) {
 	case 1:
 	case 1:
 		out_8(addr, val);
 		out_8(addr, val);
-		(void) in_8(addr);
 		break;
 		break;
 	case 2:
 	case 2:
 		out_le16(addr, val);
 		out_le16(addr, val);
-		(void) in_le16(addr);
 		break;
 		break;
 	default:
 	default:
 		out_le32(addr, val);
 		out_le32(addr, val);
-		(void) in_le32(addr);
 		break;
 		break;
 	}
 	}
 	return PCIBIOS_SUCCESSFUL;
 	return PCIBIOS_SUCCESSFUL;
@@ -440,15 +437,12 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn,
 	switch (len) {
 	switch (len) {
 	case 1:
 	case 1:
 		out_8(addr, val);
 		out_8(addr, val);
-		(void) in_8(addr);
 		break;
 		break;
 	case 2:
 	case 2:
 		out_le16(addr, val);
 		out_le16(addr, val);
-		(void) in_le16(addr);
 		break;
 		break;
 	default:
 	default:
 		out_le32((u32 __iomem *)addr, val);
 		out_le32((u32 __iomem *)addr, val);
-		(void) in_le32(addr);
 		break;
 		break;
 	}
 	}
 	return PCIBIOS_SUCCESSFUL;
 	return PCIBIOS_SUCCESSFUL;
@@ -545,15 +539,12 @@ static int u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn,
 	switch (len) {
 	switch (len) {
 	case 1:
 	case 1:
 		out_8(addr, val);
 		out_8(addr, val);
-		(void) in_8(addr);
 		break;
 		break;
 	case 2:
 	case 2:
 		out_le16(addr, val);
 		out_le16(addr, val);
-		(void) in_le16(addr);
 		break;
 		break;
 	default:
 	default:
 		out_le32(addr, val);
 		out_le32(addr, val);
-		(void) in_le32(addr);
 		break;
 		break;
 	}
 	}
 	return PCIBIOS_SUCCESSFUL;
 	return PCIBIOS_SUCCESSFUL;