* [PATCH 0/2] PCI: pciehp: Remove unused interrupt stuff
@ 2015-08-04 23:59 Bjorn Helgaas
2015-08-04 23:59 ` [PATCH 1/2] PCI: pciehp: Remove unused interrupt events Bjorn Helgaas
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2015-08-04 23:59 UTC (permalink / raw)
To: linux-pci
These are pretty trivial; they just remove some unused interrupt things.
---
Bjorn Helgaas (2):
PCI: pciehp: Remove unused interrupt events
PCI: pciehp: Remove ignored MRL sensor interrupt events
drivers/pci/hotplug/pciehp.h | 14 ++++----------
drivers/pci/hotplug/pciehp_hpc.c | 17 +++--------------
2 files changed, 7 insertions(+), 24 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] PCI: pciehp: Remove unused interrupt events
2015-08-04 23:59 [PATCH 0/2] PCI: pciehp: Remove unused interrupt stuff Bjorn Helgaas
@ 2015-08-04 23:59 ` Bjorn Helgaas
2015-08-04 23:59 ` [PATCH 2/2] PCI: pciehp: Remove ignored MRL sensor " Bjorn Helgaas
2015-08-10 22:07 ` [PATCH 0/2] PCI: pciehp: Remove unused interrupt stuff Bjorn Helgaas
2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2015-08-04 23:59 UTC (permalink / raw)
To: linux-pci
The list of interrupt events (INT_BUTTON_IGNORE, INT_PRESENCE_ON, etc.) was
copied from other hotplug drivers, but pciehp doesn't use them all.
Remove the interrupt events that aren't used by pciehp.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/pci/hotplug/pciehp.h | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h
index 57cd132..aca84e1 100644
--- a/drivers/pci/hotplug/pciehp.h
+++ b/drivers/pci/hotplug/pciehp.h
@@ -101,18 +101,14 @@ struct controller {
unsigned int power_fault_detected;
};
-#define INT_BUTTON_IGNORE 0
#define INT_PRESENCE_ON 1
#define INT_PRESENCE_OFF 2
#define INT_SWITCH_CLOSE 3
#define INT_SWITCH_OPEN 4
#define INT_POWER_FAULT 5
-#define INT_POWER_FAULT_CLEAR 6
-#define INT_BUTTON_PRESS 7
-#define INT_BUTTON_RELEASE 8
-#define INT_BUTTON_CANCEL 9
-#define INT_LINK_UP 10
-#define INT_LINK_DOWN 11
+#define INT_BUTTON_PRESS 6
+#define INT_LINK_UP 7
+#define INT_LINK_DOWN 8
#define STATIC_STATE 0
#define BLINKINGON_STATE 1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] PCI: pciehp: Remove ignored MRL sensor interrupt events
2015-08-04 23:59 [PATCH 0/2] PCI: pciehp: Remove unused interrupt stuff Bjorn Helgaas
2015-08-04 23:59 ` [PATCH 1/2] PCI: pciehp: Remove unused interrupt events Bjorn Helgaas
@ 2015-08-04 23:59 ` Bjorn Helgaas
2015-08-10 22:07 ` [PATCH 0/2] PCI: pciehp: Remove unused interrupt stuff Bjorn Helgaas
2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2015-08-04 23:59 UTC (permalink / raw)
To: linux-pci
We queued interrupt events for the MRL being opened or closed, but the code
in interrupt_event_handler() that handles these events ignored them.
Stop enabling MRL interrupts and remove the ignored events.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/pci/hotplug/pciehp.h | 10 ++++------
drivers/pci/hotplug/pciehp_hpc.c | 17 +++--------------
2 files changed, 7 insertions(+), 20 deletions(-)
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h
index aca84e1..62d6fe6 100644
--- a/drivers/pci/hotplug/pciehp.h
+++ b/drivers/pci/hotplug/pciehp.h
@@ -103,12 +103,10 @@ struct controller {
#define INT_PRESENCE_ON 1
#define INT_PRESENCE_OFF 2
-#define INT_SWITCH_CLOSE 3
-#define INT_SWITCH_OPEN 4
-#define INT_POWER_FAULT 5
-#define INT_BUTTON_PRESS 6
-#define INT_LINK_UP 7
-#define INT_LINK_DOWN 8
+#define INT_POWER_FAULT 3
+#define INT_BUTTON_PRESS 4
+#define INT_LINK_UP 5
+#define INT_LINK_DOWN 6
#define STATIC_STATE 0
#define BLINKINGON_STATE 1
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index 8f3d3cf..5c24e93 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -543,7 +543,7 @@ static irqreturn_t pcie_isr(int irq, void *dev_id)
struct pci_dev *dev;
struct slot *slot = ctrl->slot;
u16 detected, intr_loc;
- u8 open, present;
+ u8 present;
bool link;
/*
@@ -561,7 +561,7 @@ static irqreturn_t pcie_isr(int irq, void *dev_id)
}
detected &= (PCI_EXP_SLTSTA_ABP | PCI_EXP_SLTSTA_PFD |
- PCI_EXP_SLTSTA_MRLSC | PCI_EXP_SLTSTA_PDC |
+ PCI_EXP_SLTSTA_PDC |
PCI_EXP_SLTSTA_CC | PCI_EXP_SLTSTA_DLLSC);
detected &= ~intr_loc;
intr_loc |= detected;
@@ -594,15 +594,6 @@ static irqreturn_t pcie_isr(int irq, void *dev_id)
if (!(intr_loc & ~PCI_EXP_SLTSTA_CC))
return IRQ_HANDLED;
- /* Check MRL Sensor Changed */
- if (intr_loc & PCI_EXP_SLTSTA_MRLSC) {
- pciehp_get_latch_status(slot, &open);
- ctrl_info(ctrl, "Latch %s on Slot(%s)\n",
- open ? "open" : "close", slot_name(slot));
- pciehp_queue_interrupt_event(slot, open ? INT_SWITCH_OPEN :
- INT_SWITCH_CLOSE);
- }
-
/* Check Attention Button Pressed */
if (intr_loc & PCI_EXP_SLTSTA_ABP) {
ctrl_info(ctrl, "Button pressed on Slot(%s)\n",
@@ -662,13 +653,11 @@ void pcie_enable_notification(struct controller *ctrl)
cmd |= PCI_EXP_SLTCTL_ABPE;
else
cmd |= PCI_EXP_SLTCTL_PDCE;
- if (MRL_SENS(ctrl))
- cmd |= PCI_EXP_SLTCTL_MRLSCE;
if (!pciehp_poll_mode)
cmd |= PCI_EXP_SLTCTL_HPIE | PCI_EXP_SLTCTL_CCIE;
mask = (PCI_EXP_SLTCTL_PDCE | PCI_EXP_SLTCTL_ABPE |
- PCI_EXP_SLTCTL_MRLSCE | PCI_EXP_SLTCTL_PFDE |
+ PCI_EXP_SLTCTL_PFDE |
PCI_EXP_SLTCTL_HPIE | PCI_EXP_SLTCTL_CCIE |
PCI_EXP_SLTCTL_DLLSCE);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] PCI: pciehp: Remove unused interrupt stuff
2015-08-04 23:59 [PATCH 0/2] PCI: pciehp: Remove unused interrupt stuff Bjorn Helgaas
2015-08-04 23:59 ` [PATCH 1/2] PCI: pciehp: Remove unused interrupt events Bjorn Helgaas
2015-08-04 23:59 ` [PATCH 2/2] PCI: pciehp: Remove ignored MRL sensor " Bjorn Helgaas
@ 2015-08-10 22:07 ` Bjorn Helgaas
2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2015-08-10 22:07 UTC (permalink / raw)
To: linux-pci
On Tue, Aug 04, 2015 at 06:59:09PM -0500, Bjorn Helgaas wrote:
> These are pretty trivial; they just remove some unused interrupt things.
>
> ---
>
> Bjorn Helgaas (2):
> PCI: pciehp: Remove unused interrupt events
> PCI: pciehp: Remove ignored MRL sensor interrupt events
I applied these to pci/hotplug for v4.3.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-08-10 22:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-04 23:59 [PATCH 0/2] PCI: pciehp: Remove unused interrupt stuff Bjorn Helgaas
2015-08-04 23:59 ` [PATCH 1/2] PCI: pciehp: Remove unused interrupt events Bjorn Helgaas
2015-08-04 23:59 ` [PATCH 2/2] PCI: pciehp: Remove ignored MRL sensor " Bjorn Helgaas
2015-08-10 22:07 ` [PATCH 0/2] PCI: pciehp: Remove unused interrupt stuff Bjorn Helgaas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.