This patch removes unnecessary cmd_busy member from struct
controller. Read command status register instead of using cmd_busy.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
u32 cap_offset;
unsigned long mmio_base;
unsigned long mmio_size;
u32 cap_offset;
unsigned long mmio_base;
unsigned long mmio_size;
rc = shpc_poll_ctrl_busy(ctrl);
else
rc = wait_event_interruptible_timeout(ctrl->queue,
rc = shpc_poll_ctrl_busy(ctrl);
else
rc = wait_event_interruptible_timeout(ctrl->queue,
- !ctrl->cmd_busy, timeout);
+ !is_ctrl_busy(ctrl), timeout);
if (!rc && is_ctrl_busy(ctrl)) {
retval = -EIO;
err("Command not completed in 1000 msec\n");
if (!rc && is_ctrl_busy(ctrl)) {
retval = -EIO;
err("Command not completed in 1000 msec\n");
retval = -EINTR;
info("Command was interrupted by a signal\n");
}
retval = -EINTR;
info("Command was interrupted by a signal\n");
}
/* To make sure the Controller Busy bit is 0 before we send out the
* command.
*/
/* To make sure the Controller Busy bit is 0 before we send out the
* command.
*/
- slot->ctrl->cmd_busy = 1;
shpc_writew(ctrl, CMD, temp_word);
/*
shpc_writew(ctrl, CMD, temp_word);
/*
serr_int &= ~SERR_INTR_RSVDZ_MASK;
shpc_writel(ctrl, SERR_INTR_ENABLE, serr_int);
serr_int &= ~SERR_INTR_RSVDZ_MASK;
shpc_writel(ctrl, SERR_INTR_ENABLE, serr_int);
wake_up_interruptible(&ctrl->queue);
}
wake_up_interruptible(&ctrl->queue);
}