[PATCH 7/7] pciehp: remove needless command completed interrupt setting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The pciehp driver doesn't need to set command completed interrupt
enable per command.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@xxxxxxxxxxxxxx>

---
 drivers/pci/hotplug/pciehp_hpc.c |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

Index: 20080617/drivers/pci/hotplug/pciehp_hpc.c
===================================================================
--- 20080617.orig/drivers/pci/hotplug/pciehp_hpc.c
+++ 20080617/drivers/pci/hotplug/pciehp_hpc.c
@@ -337,10 +337,6 @@ static int pcie_write_cmd(struct control
 
 	slot_ctrl &= ~mask;
 	slot_ctrl |= (cmd & mask);
-	/* Don't enable command completed if caller is changing it. */
-	if (!(mask & CMD_CMPL_INTR_ENABLE))
-		slot_ctrl |= CMD_CMPL_INTR_ENABLE;
-
 	ctrl->cmd_busy = 1;
 	smp_mb();
 	retval = pciehp_writew(ctrl, SLOTCTRL, slot_ctrl);
@@ -996,10 +992,10 @@ int pcie_enable_notification(struct cont
 	if (MRL_SENS(ctrl))
 		cmd |= MRL_DETECT_ENABLE;
 	if (!pciehp_poll_mode)
-		cmd |= HP_INTR_ENABLE;
+		cmd |= HP_INTR_ENABLE | CMD_CMPL_INTR_ENABLE;
 
-	mask = PRSN_DETECT_ENABLE | ATTN_BUTTN_ENABLE |
-		PWR_FAULT_DETECT_ENABLE | MRL_DETECT_ENABLE | HP_INTR_ENABLE;
+	mask = PRSN_DETECT_ENABLE | ATTN_BUTTN_ENABLE | MRL_DETECT_ENABLE |
+	       PWR_FAULT_DETECT_ENABLE | HP_INTR_ENABLE | CMD_CMPL_INTR_ENABLE;
 
 	if (pcie_write_cmd(ctrl, cmd, mask)) {
 		err("%s: Cannot enable software notification\n", __func__);


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux