Skip to content

Commit 8a8034e

Browse files
author
Fox Snowpatch
committed
1 parent 182544a commit 8a8034e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

arch/powerpc/kernel/rtas_pci.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ int rtas_pci_dn_read_config(struct pci_dn *pdn, int where, int size, u32 *val)
5757
if (pdn->edev && pdn->edev->pe &&
5858
(pdn->edev->pe->state & EEH_PE_CFG_BLOCKED))
5959
return PCIBIOS_SET_FAILED;
60+
61+
if (pdn->edev && pdn->edev->mode & EEH_DEV_REMOVED)
62+
return PCIBIOS_SET_FAILED;
6063
#endif
6164

6265
addr = rtas_config_addr(pdn->busno, pdn->devfn, where);
@@ -108,6 +111,9 @@ int rtas_pci_dn_write_config(struct pci_dn *pdn, int where, int size, u32 val)
108111
if (pdn->edev && pdn->edev->pe &&
109112
(pdn->edev->pe->state & EEH_PE_CFG_BLOCKED))
110113
return PCIBIOS_SET_FAILED;
114+
115+
if (pdn->edev && pdn->edev->mode & EEH_DEV_REMOVED)
116+
return PCIBIOS_SET_FAILED;
111117
#endif
112118

113119
addr = rtas_config_addr(pdn->busno, pdn->devfn, where);

0 commit comments

Comments
 (0)