[PATCH linux dev-4.10 v3 30/31] drivers/hwmon/occ: Remove repeated ops for OCC command in progress
Andrew Jeffery
andrew at aj.id.au
Fri Oct 6 10:38:04 AEDT 2017
On Thu, 2017-10-05 at 14:24 -0500, Eddie James wrote:
> From: "Edward A. James" <eajames at us.ibm.com>
>
> This is now handled in the occ driver.
>
> Signed-off-by: Edward A. James <eajames at us.ibm.com>
Reviewed-by: Andrew Jeffery <andrew at aj.id.au>
> ---
> drivers/hwmon/occ/p9_sbe.c | 14 +-------------
> 1 file changed, 1 insertion(+), 13 deletions(-)
>
> diff --git a/drivers/hwmon/occ/p9_sbe.c b/drivers/hwmon/occ/p9_sbe.c
> index 2d50a94..c7e0d9c 100644
> --- a/drivers/hwmon/occ/p9_sbe.c
> +++ b/drivers/hwmon/occ/p9_sbe.c
> @@ -26,14 +26,10 @@ struct p9_sbe_occ {
> static int p9_sbe_occ_send_cmd(struct occ *occ, u8 *cmd)
> {
> int rc, error;
> - unsigned long start;
> struct occ_client *client;
> struct occ_response *resp = &occ->resp;
> struct p9_sbe_occ *p9_sbe_occ = to_p9_sbe_occ(occ);
>
> - start = jiffies;
> -
> -retry:
> client = occ_drv_open(p9_sbe_occ->sbe, 0);
> if (!client) {
> rc = -ENODEV;
> @@ -52,15 +48,7 @@ static int p9_sbe_occ_send_cmd(struct occ *occ, u8 *cmd)
>
> switch (resp->return_status) {
> case RESP_RETURN_CMD_IN_PRG:
> - if (time_after(jiffies,
> - start + msecs_to_jiffies(OCC_TIMEOUT_MS)))
> - rc = -EALREADY;
> - else {
> - set_current_state(TASK_INTERRUPTIBLE);
> - schedule_timeout(msecs_to_jiffies(OCC_CMD_IN_PRG_MS));
> -
> - goto retry;
> - }
> + rc = -ETIMEDOUT;
> break;
> case RESP_RETURN_SUCCESS:
> occ_reset_error(occ);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20171006/128ff67a/attachment.sig>
More information about the openbmc
mailing list