[Skiboot] [PATCH 6/9] phb4: Fix MMIO enable with fence recovery

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri Oct 20 23:56:22 AEDT 2017


On Fri, 2017-10-20 at 22:59 +1100, Michael Neuling wrote:
> PHB fatal error recovery needs MMIO enabled otherwise the PHB will
> freeze the PE once the driver starts accessing the device again.

I don't understand the patch and how it relates to the above changelog.

You seem to be forcing any write to the PCI command register to set
those 2 bits. It feels to me like the real problem might be in the
callers ... How come are those 2 bits cleared and not restored
properly by Linux ?

> Signed-off-by: Michael Neuling <mikey at neuling.org>
> ---
>  hw/phb4.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/phb4.c b/hw/phb4.c
> index 0170e43a89..0841136cc7 100644
> --- a/hw/phb4.c
> +++ b/hw/phb4.c
> @@ -421,7 +421,7 @@ static int64_t phb4_rc_write(struct phb4 *p, uint32_t offset, uint8_t sz,
>  		break;
>  	default:
>  		/* Workaround PHB config space enable */
> -		if ((p->rev == PHB4_REV_NIMBUS_DD10) && (reg == PCI_CFG_CMD))
> +		if (reg == PCI_CFG_CMD)
>  			val |= PCI_CFG_CMD_MEM_EN | PCI_CFG_CMD_BUS_MASTER_EN;
>  		PHBLOGCFG(p, "000 CFG%02d Wr %02x=%08x\n", 8 * sz, reg, val);
>  		if (use_asb)


More information about the Skiboot mailing list