[Skiboot] [PATCH 6/6] phb4: Fix reading wrong size registers in EEH dump
Andrew Donnellan
andrew.donnellan at au1.ibm.com
Thu Aug 10 18:22:52 AEST 2017
On 10/08/17 16:58, Russell Currey wrote:
> These registers are supposed to be 16bit, and it makes part of the
> register dump misleading.
>
> Signed-off-by: Russell Currey <ruscur at russell.cc>
> ---
> hw/phb4.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/hw/phb4.c b/hw/phb4.c
> index d13ab8c3..4c7bfe3b 100644
> --- a/hw/phb4.c
> +++ b/hw/phb4.c
> @@ -1906,7 +1906,7 @@ static void phb4_read_phb_status(struct phb4 *p,
> static void phb4_eeh_dump_regs(struct phb4 *p)
> {
> struct OpalIoPhb4ErrorData *s;
> - uint32_t reg;
> + uint16_t reg;
> unsigned int i;
>
> if (!verbose_eeh)
> @@ -1929,9 +1929,9 @@ static void phb4_eeh_dump_regs(struct phb4 *p)
> PHBERR(p, " uncorrErrorStatus = %08x\n", s->uncorrErrorStatus);
>
> /* Two non OPAL API registers that are useful */
> - phb4_pcicfg_read32(&p->phb, 0, p->ecap + PCICAP_EXP_DEVCTL, ®);
> + phb4_pcicfg_read16(&p->phb, 0, p->ecap + PCICAP_EXP_DEVCTL, ®);
> PHBERR(p, " devctl = %08x\n", reg);
> - phb4_pcicfg_read32(&p->phb, 0, p->ecap + PCICAP_EXP_DEVSTAT,
> + phb4_pcicfg_read16(&p->phb, 0, p->ecap + PCICAP_EXP_DEVSTAT,
> ®);
> PHBERR(p, " devStat = %08x\n", reg);
Do these need to be changed to %04x?
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com IBM Australia Limited
More information about the Skiboot
mailing list