Commit 6aa562c2 authored by Kenji Kaneshige's avatar Kenji Kaneshige Committed by Greg Kroah-Hartman

shpchp: remove unnecessary cmd_busy member from struct controller

This patch removes unnecessary cmd_busy member from struct
controller. Read command status register instead of using cmd_busy.
Signed-off-by: default avatarKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: default avatarKristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d1729cce
...@@ -103,7 +103,6 @@ struct controller { ...@@ -103,7 +103,6 @@ struct controller {
u32 cap_offset; u32 cap_offset;
unsigned long mmio_base; unsigned long mmio_base;
unsigned long mmio_size; unsigned long mmio_size;
volatile int cmd_busy;
}; };
......
...@@ -339,7 +339,7 @@ static inline int shpc_wait_cmd(struct controller *ctrl) ...@@ -339,7 +339,7 @@ static inline int shpc_wait_cmd(struct controller *ctrl)
rc = shpc_poll_ctrl_busy(ctrl); rc = shpc_poll_ctrl_busy(ctrl);
else else
rc = wait_event_interruptible_timeout(ctrl->queue, rc = wait_event_interruptible_timeout(ctrl->queue,
!ctrl->cmd_busy, timeout); !is_ctrl_busy(ctrl), timeout);
if (!rc && is_ctrl_busy(ctrl)) { if (!rc && is_ctrl_busy(ctrl)) {
retval = -EIO; retval = -EIO;
err("Command not completed in 1000 msec\n"); err("Command not completed in 1000 msec\n");
...@@ -347,7 +347,6 @@ static inline int shpc_wait_cmd(struct controller *ctrl) ...@@ -347,7 +347,6 @@ static inline int shpc_wait_cmd(struct controller *ctrl)
retval = -EINTR; retval = -EINTR;
info("Command was interrupted by a signal\n"); info("Command was interrupted by a signal\n");
} }
ctrl->cmd_busy = 0;
return retval; return retval;
} }
...@@ -378,7 +377,6 @@ static int shpc_write_cmd(struct slot *slot, u8 t_slot, u8 cmd) ...@@ -378,7 +377,6 @@ static int shpc_write_cmd(struct slot *slot, u8 t_slot, u8 cmd)
/* To make sure the Controller Busy bit is 0 before we send out the /* To make sure the Controller Busy bit is 0 before we send out the
* command. * command.
*/ */
slot->ctrl->cmd_busy = 1;
shpc_writew(ctrl, CMD, temp_word); shpc_writew(ctrl, CMD, temp_word);
/* /*
...@@ -928,7 +926,6 @@ static irqreturn_t shpc_isr(int irq, void *dev_id) ...@@ -928,7 +926,6 @@ static irqreturn_t shpc_isr(int irq, void *dev_id)
serr_int &= ~SERR_INTR_RSVDZ_MASK; serr_int &= ~SERR_INTR_RSVDZ_MASK;
shpc_writel(ctrl, SERR_INTR_ENABLE, serr_int); shpc_writel(ctrl, SERR_INTR_ENABLE, serr_int);
ctrl->cmd_busy = 0;
wake_up_interruptible(&ctrl->queue); wake_up_interruptible(&ctrl->queue);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment