Re: [ndctl PATCH] papr: Check for command type in papr_xlat_firmware_status()

2020-07-21 Thread Verma, Vishal L
On Wed, 2020-07-22 at 07:29 +0530, Vaibhav Jain wrote: > Vishal Verma writes: > > > > > static int papr_xlat_firmware_status(struct ndctl_cmd *cmd) > > > { > > > - const struct nd_pkg_pdsm *pcmd = to_pdsm(cmd); > > > - > > > - return pcmd->cmd_status; > > > + return (cmd->type == ND_CMD_CALL)

Re: [ndctl PATCH] papr: Check for command type in papr_xlat_firmware_status()

2020-07-21 Thread Vaibhav Jain
Vishal Verma writes: >> static int papr_xlat_firmware_status(struct ndctl_cmd *cmd) >> { >> -const struct nd_pkg_pdsm *pcmd = to_pdsm(cmd); >> - >> -return pcmd->cmd_status; >> +return (cmd->type == ND_CMD_CALL) ? to_pdsm(cmd)->cmd_status : 0; > > Is this correct? -- for non

Re: [ndctl PATCH] papr: Check for command type in papr_xlat_firmware_status()

2020-07-21 Thread Vishal Verma
On Tue, 2020-07-21 at 17:13 +0530, Vaibhav Jain wrote: > We recently discovered intermittent failures while reading label-area > of PAPR-NVDimms and the command 'read-labels' would in such a case > generated empty output like below: > > $ sudo ndctl read-labels -j nmem0 > [ > ] > read 0 nmem > >

[ndctl PATCH] papr: Check for command type in papr_xlat_firmware_status()

2020-07-21 Thread Vaibhav Jain
We recently discovered intermittent failures while reading label-area of PAPR-NVDimms and the command 'read-labels' would in such a case generated empty output like below: $ sudo ndctl read-labels -j nmem0 [ ] read 0 nmem Upon investigation we found that this was caused by a spurious error code