Skip to content

Commit d3c70a9

Browse files
gustavoSNPSLorenzo Pieralisi
authored andcommitted
PCI: Update xxx_pcie_ep_raise_irq() and pci_epc_raise_irq() signatures
Change {cdns, dra7xx, artpec6, dw, rockchip}_pcie_ep_raise_irq() and pci_epc_raise_irq() signature, namely the interrupt_num variable type from u8 to u16 to accommodate 2048 maximum MSI-X interrupts. Signed-off-by: Gustavo Pimentel <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Acked-by: Alan Douglas <[email protected]> Acked-by: Shawn Lin <[email protected]> Acked-by: Jesper Nilsson <[email protected]> Acked-by: Joao Pinto <[email protected]> Acked-by: Kishon Vijay Abraham I <[email protected]>
1 parent 8963106 commit d3c70a9

File tree

9 files changed

+15
-14
lines changed

9 files changed

+15
-14
lines changed

drivers/pci/controller/dwc/pci-dra7xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ static void dra7xx_pcie_raise_msi_irq(struct dra7xx_pcie *dra7xx,
370370
}
371371

372372
static int dra7xx_pcie_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
373-
enum pci_epc_irq_type type, u8 interrupt_num)
373+
enum pci_epc_irq_type type, u16 interrupt_num)
374374
{
375375
struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
376376
struct dra7xx_pcie *dra7xx = to_dra7xx_pcie(pci);

drivers/pci/controller/dwc/pcie-artpec6.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ static void artpec6_pcie_ep_init(struct dw_pcie_ep *ep)
427427
}
428428

429429
static int artpec6_pcie_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
430-
enum pci_epc_irq_type type, u8 interrupt_num)
430+
enum pci_epc_irq_type type, u16 interrupt_num)
431431
{
432432
struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
433433

drivers/pci/controller/dwc/pcie-designware-ep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ static int dw_pcie_ep_set_msi(struct pci_epc *epc, u8 func_no, u8 encode_int)
242242
}
243243

244244
static int dw_pcie_ep_raise_irq(struct pci_epc *epc, u8 func_no,
245-
enum pci_epc_irq_type type, u8 interrupt_num)
245+
enum pci_epc_irq_type type, u16 interrupt_num)
246246
{
247247
struct dw_pcie_ep *ep = epc_get_drvdata(epc);
248248

drivers/pci/controller/dwc/pcie-designware-plat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ static void dw_plat_pcie_ep_init(struct dw_pcie_ep *ep)
8181

8282
static int dw_plat_pcie_ep_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
8383
enum pci_epc_irq_type type,
84-
u8 interrupt_num)
84+
u16 interrupt_num)
8585
{
8686
struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
8787

drivers/pci/controller/dwc/pcie-designware.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ enum dw_pcie_as_type {
191191
struct dw_pcie_ep_ops {
192192
void (*ep_init)(struct dw_pcie_ep *ep);
193193
int (*raise_irq)(struct dw_pcie_ep *ep, u8 func_no,
194-
enum pci_epc_irq_type type, u8 interrupt_num);
194+
enum pci_epc_irq_type type, u16 interrupt_num);
195195
};
196196

197197
struct dw_pcie_ep {

drivers/pci/controller/pcie-cadence-ep.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,8 @@ static int cdns_pcie_ep_send_msi_irq(struct cdns_pcie_ep *ep, u8 fn,
363363
}
364364

365365
static int cdns_pcie_ep_raise_irq(struct pci_epc *epc, u8 fn,
366-
enum pci_epc_irq_type type, u8 interrupt_num)
366+
enum pci_epc_irq_type type,
367+
u16 interrupt_num)
367368
{
368369
struct cdns_pcie_ep *ep = epc_get_drvdata(epc);
369370

drivers/pci/controller/pcie-rockchip-ep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ static int rockchip_pcie_ep_send_msi_irq(struct rockchip_pcie_ep *ep, u8 fn,
472472

473473
static int rockchip_pcie_ep_raise_irq(struct pci_epc *epc, u8 fn,
474474
enum pci_epc_irq_type type,
475-
u8 interrupt_num)
475+
u16 interrupt_num)
476476
{
477477
struct rockchip_pcie_ep *ep = epc_get_drvdata(epc);
478478

drivers/pci/endpoint/pci-epc-core.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ EXPORT_SYMBOL_GPL(pci_epc_start);
131131
* pci_epc_raise_irq() - interrupt the host system
132132
* @epc: the EPC device which has to interrupt the host
133133
* @func_no: the endpoint function number in the EPC device
134-
* @type: specify the type of interrupt; legacy or MSI
135-
* @interrupt_num: the MSI interrupt number
134+
* @type: specify the type of interrupt; legacy, MSI or MSI-X
135+
* @interrupt_num: the MSI or MSI-X interrupt number
136136
*
137-
* Invoke to raise an MSI or legacy interrupt
137+
* Invoke to raise an legacy, MSI or MSI-X interrupt
138138
*/
139139
int pci_epc_raise_irq(struct pci_epc *epc, u8 func_no,
140-
enum pci_epc_irq_type type, u8 interrupt_num)
140+
enum pci_epc_irq_type type, u16 interrupt_num)
141141
{
142142
int ret;
143143
unsigned long flags;

include/linux/pci-epc.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ enum pci_epc_irq_type {
3535
* MSI-X capability register
3636
* @get_msix: ops to get the number of MSI-X interrupts allocated by the RC
3737
* from the MSI-X capability register
38-
* @raise_irq: ops to raise a legacy or MSI interrupt
38+
* @raise_irq: ops to raise a legacy, MSI or MSI-X interrupt
3939
* @start: ops to start the PCI link
4040
* @stop: ops to stop the PCI link
4141
* @owner: the module owner containing the ops
@@ -56,7 +56,7 @@ struct pci_epc_ops {
5656
int (*set_msix)(struct pci_epc *epc, u8 func_no, u16 interrupts);
5757
int (*get_msix)(struct pci_epc *epc, u8 func_no);
5858
int (*raise_irq)(struct pci_epc *epc, u8 func_no,
59-
enum pci_epc_irq_type type, u8 interrupt_num);
59+
enum pci_epc_irq_type type, u16 interrupt_num);
6060
int (*start)(struct pci_epc *epc);
6161
void (*stop)(struct pci_epc *epc);
6262
struct module *owner;
@@ -154,7 +154,7 @@ int pci_epc_get_msi(struct pci_epc *epc, u8 func_no);
154154
int pci_epc_set_msix(struct pci_epc *epc, u8 func_no, u16 interrupts);
155155
int pci_epc_get_msix(struct pci_epc *epc, u8 func_no);
156156
int pci_epc_raise_irq(struct pci_epc *epc, u8 func_no,
157-
enum pci_epc_irq_type type, u8 interrupt_num);
157+
enum pci_epc_irq_type type, u16 interrupt_num);
158158
int pci_epc_start(struct pci_epc *epc);
159159
void pci_epc_stop(struct pci_epc *epc);
160160
struct pci_epc *pci_epc_get(const char *epc_name);

0 commit comments

Comments
 (0)