aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajat Jain <rajatxjain@gmail.com>2014-06-26 14:58:55 -0400
committerBjorn Helgaas <bhelgaas@google.com>2014-07-05 13:38:26 -0400
commit6c1a32e06758ba1c997f81a3c41e780cfc77b3c2 (patch)
treee161765638a6dbefd8f12fc40aa11431e354eab3
parent2cc56f3028091578dcf0093cd00f1fee7a21515d (diff)
PCI: pciehp: Remove struct controller.no_cmd_complete
"no_cmd_complete" is only used once, and it duplicates read-only information we already have in the cached Slot Capabilities value. Remove the field and use the existing macro NO_CMD_CMPL() instead. [bhelgaas: changelog] Signed-off-by: Rajat Jain <rajatxjain@gmail.com> Signed-off-by: Rajat Jain <rajatjain@juniper.net> Signed-off-by: Guenter Roeck <groeck@juniper.net> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r--drivers/pci/hotplug/pciehp.h1
-rw-r--r--drivers/pci/hotplug/pciehp_hpc.c11
2 files changed, 1 insertions, 11 deletions
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h
index c496258cd9a7..9e5a9fbb93d7 100644
--- a/drivers/pci/hotplug/pciehp.h
+++ b/drivers/pci/hotplug/pciehp.h
@@ -96,7 +96,6 @@ struct controller {
96 struct timer_list poll_timer; 96 struct timer_list poll_timer;
97 unsigned long cmd_started; /* jiffies */ 97 unsigned long cmd_started; /* jiffies */
98 unsigned int cmd_busy:1; 98 unsigned int cmd_busy:1;
99 unsigned int no_cmd_complete:1;
100 unsigned int link_active_reporting:1; 99 unsigned int link_active_reporting:1;
101 unsigned int notification_enabled:1; 100 unsigned int notification_enabled:1;
102 unsigned int power_fault_detected; 101 unsigned int power_fault_detected;
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index a3a5c65def1c..f7c370993ab4 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -140,7 +140,7 @@ static void pcie_wait_cmd(struct controller *ctrl)
140 * If the controller does not generate notifications for command 140 * If the controller does not generate notifications for command
141 * completions, we never need to wait between writes. 141 * completions, we never need to wait between writes.
142 */ 142 */
143 if (ctrl->no_cmd_complete) 143 if (NO_CMD_CMPL(ctrl))
144 return; 144 return;
145 145
146 if (!ctrl->cmd_busy) 146 if (!ctrl->cmd_busy)
@@ -772,15 +772,6 @@ struct controller *pcie_init(struct pcie_device *dev)
772 init_waitqueue_head(&ctrl->queue); 772 init_waitqueue_head(&ctrl->queue);
773 dbg_ctrl(ctrl); 773 dbg_ctrl(ctrl);
774 774
775 /*
776 * Controller doesn't notify of command completion if the "No
777 * Command Completed Support" bit is set in Slot Capabilities.
778 * If set, it means the controller can accept hotplug commands
779 * with no delay between them.
780 */
781 if (NO_CMD_CMPL(ctrl))
782 ctrl->no_cmd_complete = 1;
783
784 /* Check if Data Link Layer Link Active Reporting is implemented */ 775 /* Check if Data Link Layer Link Active Reporting is implemented */
785 pcie_capability_read_dword(pdev, PCI_EXP_LNKCAP, &link_cap); 776 pcie_capability_read_dword(pdev, PCI_EXP_LNKCAP, &link_cap);
786 if (link_cap & PCI_EXP_LNKCAP_DLLLARC) { 777 if (link_cap & PCI_EXP_LNKCAP_DLLLARC) {