phb4: Disable device config space access when fenced
On DD2 you can't access device config space when fenced, so just
disable access whenever we are fenced.
@@ -430,6 +430,8 @@ static int64_t phb4_pcicfg_read(struct phb4 *p, uint32_t bdfn,
if (p->flags & PHB4_AIB_FENCED) {
if (!(p->flags & PHB4_CFG_USE_ASB))
return OPAL_HARDWARE;
+ if (bdfn != 0)
+ return OPAL_HARDWARE;
use_asb = true;
} else if ((p->flags & PHB4_CFG_BLOCKED) && bdfn != 0) {
return OPAL_HARDWARE;
@@ -521,6 +523,8 @@ static int64_t phb4_pcicfg_write(struct phb4 *p, uint32_t bdfn,
if (p->flags & PHB4_AIB_FENCED) {
if (!(p->flags & PHB4_CFG_USE_ASB))
return OPAL_HARDWARE;
+ if (bdfn != 0)
+ return OPAL_HARDWARE;
use_asb = true;
} else if ((p->flags & PHB4_CFG_BLOCKED) && bdfn != 0) {
return OPAL_HARDWARE;
