aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2006-09-28 18:51:36 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-10-18 14:36:11 -0400
commit6aa562c248e05db993e4a5f405f899c0cfabb7f2 (patch)
treee2d2fca823131f0d33fb7015d35016576fc33d31
parentd1729ccecd7ba9ceb6dca1c973dbfd87041d0637 (diff)
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: 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>
-rw-r--r--drivers/pci/hotplug/shpchp.h1
-rw-r--r--drivers/pci/hotplug/shpchp_hpc.c5
2 files changed, 1 insertions, 5 deletions
diff --git a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h
index c7103ac5cd06..7e7d490622e1 100644
--- a/drivers/pci/hotplug/shpchp.h
+++ b/drivers/pci/hotplug/shpchp.h
@@ -103,7 +103,6 @@ struct controller {
103 u32 cap_offset; 103 u32 cap_offset;
104 unsigned long mmio_base; 104 unsigned long mmio_base;
105 unsigned long mmio_size; 105 unsigned long mmio_size;
106 volatile int cmd_busy;
107}; 106};
108 107
109 108
diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c
index 4826dd158deb..bbe450f098e6 100644
--- a/drivers/pci/hotplug/shpchp_hpc.c
+++ b/drivers/pci/hotplug/shpchp_hpc.c
@@ -339,7 +339,7 @@ static inline int shpc_wait_cmd(struct controller *ctrl)
339 rc = shpc_poll_ctrl_busy(ctrl); 339 rc = shpc_poll_ctrl_busy(ctrl);
340 else 340 else
341 rc = wait_event_interruptible_timeout(ctrl->queue, 341 rc = wait_event_interruptible_timeout(ctrl->queue,
342 !ctrl->cmd_busy, timeout); 342 !is_ctrl_busy(ctrl), timeout);
343 if (!rc && is_ctrl_busy(ctrl)) { 343 if (!rc && is_ctrl_busy(ctrl)) {
344 retval = -EIO; 344 retval = -EIO;
345 err("Command not completed in 1000 msec\n"); 345 err("Command not completed in 1000 msec\n");
@@ -347,7 +347,6 @@ static inline int shpc_wait_cmd(struct controller *ctrl)
347 retval = -EINTR; 347 retval = -EINTR;
348 info("Command was interrupted by a signal\n"); 348 info("Command was interrupted by a signal\n");
349 } 349 }
350 ctrl->cmd_busy = 0;
351 350
352 return retval; 351 return retval;
353} 352}
@@ -378,7 +377,6 @@ static int shpc_write_cmd(struct slot *slot, u8 t_slot, u8 cmd)
378 /* To make sure the Controller Busy bit is 0 before we send out the 377 /* To make sure the Controller Busy bit is 0 before we send out the
379 * command. 378 * command.
380 */ 379 */
381 slot->ctrl->cmd_busy = 1;
382 shpc_writew(ctrl, CMD, temp_word); 380 shpc_writew(ctrl, CMD, temp_word);
383 381
384 /* 382 /*
@@ -928,7 +926,6 @@ static irqreturn_t shpc_isr(int irq, void *dev_id)
928 serr_int &= ~SERR_INTR_RSVDZ_MASK; 926 serr_int &= ~SERR_INTR_RSVDZ_MASK;
929 shpc_writel(ctrl, SERR_INTR_ENABLE, serr_int); 927 shpc_writel(ctrl, SERR_INTR_ENABLE, serr_int);
930 928
931 ctrl->cmd_busy = 0;
932 wake_up_interruptible(&ctrl->queue); 929 wake_up_interruptible(&ctrl->queue);
933 } 930 }
934 931