aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/layerscape/patches-4.14
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/layerscape/patches-4.14')
-rw-r--r--target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch2
-rw-r--r--target/linux/layerscape/patches-4.14/301-arch-support-layerscape.patch2
-rw-r--r--target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch55
-rw-r--r--target/linux/layerscape/patches-4.14/809-flexcan-support-layerscape.patch13
-rw-r--r--target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch75
5 files changed, 61 insertions, 86 deletions
diff --git a/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch b/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch
index 512d323ac6..49e528402c 100644
--- a/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch
@@ -580,7 +580,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
void __kfree_skb(struct sk_buff *skb);
extern struct kmem_cache *skbuff_head_cache;
-@@ -3297,6 +3298,7 @@ static inline void skb_free_datagram_loc
+@@ -3313,6 +3314,7 @@ static inline void skb_free_datagram_loc
}
int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags);
int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len);
diff --git a/target/linux/layerscape/patches-4.14/301-arch-support-layerscape.patch b/target/linux/layerscape/patches-4.14/301-arch-support-layerscape.patch
index a2766a46b2..e8b730f95c 100644
--- a/target/linux/layerscape/patches-4.14/301-arch-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.14/301-arch-support-layerscape.patch
@@ -285,7 +285,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
#define PAGE_NONE __pgprot(((_PAGE_DEFAULT) & ~PTE_VALID) | PTE_PROT_NONE | PTE_RDONLY | PTE_NG | PTE_PXN | PTE_UXN)
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
-@@ -377,6 +377,11 @@ static inline int pmd_protnone(pmd_t pmd
+@@ -360,6 +360,11 @@ static inline int pmd_protnone(pmd_t pmd
__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE) | PTE_PXN | PTE_UXN)
#define pgprot_writecombine(prot) \
__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN)
diff --git a/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch b/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch
index 70bc3b32aa..34a86b56bb 100644
--- a/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch
@@ -217,7 +217,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
}
static void __dwc3_set_mode(struct work_struct *work)
-@@ -766,6 +810,96 @@ static void dwc3_core_setup_global_contr
+@@ -765,6 +809,96 @@ static void dwc3_core_setup_global_contr
static int dwc3_core_get_phy(struct dwc3 *dwc);
static int dwc3_core_ulpi_init(struct dwc3 *dwc);
@@ -314,7 +314,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
/**
* dwc3_core_init - Low-level initialization of DWC3 Core
* @dwc: Pointer to our controller context structure
-@@ -828,6 +962,8 @@ static int dwc3_core_init(struct dwc3 *d
+@@ -827,6 +961,8 @@ static int dwc3_core_init(struct dwc3 *d
/* Adjust Frame Length */
dwc3_frame_length_adjustment(dwc);
@@ -323,7 +323,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
usb_phy_set_suspend(dwc->usb2_phy, 0);
usb_phy_set_suspend(dwc->usb3_phy, 0);
ret = phy_power_on(dwc->usb2_generic_phy);
-@@ -871,6 +1007,22 @@ static int dwc3_core_init(struct dwc3 *d
+@@ -870,6 +1006,22 @@ static int dwc3_core_init(struct dwc3 *d
dwc3_writel(dwc->regs, DWC3_GUCTL1, reg);
}
@@ -346,7 +346,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
return 0;
err4:
-@@ -1074,6 +1226,8 @@ static void dwc3_get_properties(struct d
+@@ -1073,6 +1225,8 @@ static void dwc3_get_properties(struct d
&hird_threshold);
dwc->usb3_lpm_capable = device_property_read_bool(dev,
"snps,usb3_lpm_capable");
@@ -355,7 +355,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
dwc->disable_scramble_quirk = device_property_read_bool(dev,
"snps,disable_scramble_quirk");
-@@ -1106,8 +1260,16 @@ static void dwc3_get_properties(struct d
+@@ -1105,8 +1259,16 @@ static void dwc3_get_properties(struct d
dwc->dis_tx_ipgap_linecheck_quirk = device_property_read_bool(dev,
"snps,dis-tx-ipgap-linecheck-quirk");
@@ -372,9 +372,9 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
device_property_read_u8(dev, "snps,tx_de_emphasis",
&tx_de_emphasis);
device_property_read_string(dev, "snps,hsphy_interface",
-@@ -1115,6 +1277,9 @@ static void dwc3_get_properties(struct d
- device_property_read_u32(dev, "snps,quirk-frame-length-adjustment",
- &dwc->fladj);
+@@ -1117,6 +1279,9 @@ static void dwc3_get_properties(struct d
+ dwc->dis_metastability_quirk = device_property_read_bool(dev,
+ "snps,dis_metastability_quirk");
+ dwc->host_vbus_glitches = device_property_read_bool(dev,
+ "snps,host-vbus-glitches");
@@ -382,7 +382,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
dwc->lpm_nyet_threshold = lpm_nyet_threshold;
dwc->tx_de_emphasis = tx_de_emphasis;
-@@ -1365,12 +1530,14 @@ static int dwc3_resume_common(struct dwc
+@@ -1367,12 +1532,14 @@ static int dwc3_resume_common(struct dwc
switch (dwc->dr_mode) {
case USB_DR_MODE_PERIPHERAL:
@@ -473,21 +473,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
* @disable_scramble_quirk: set if we enable the disable scramble quirk
* @u2exit_lfps_quirk: set if we enable u2exit lfps quirk
* @u2ss_inp3_quirk: set if we enable P3 OK for U2/SS Inactive quirk
-@@ -869,6 +908,13 @@ struct dwc3_scratchpad_array {
- * 1 - -3.5dB de-emphasis
- * 2 - No de-emphasis
- * 3 - Reserved
-+ * @disable_devinit_u1u2_quirk: disable device-initiated U1/U2 request.
-+ * @quirk_reverse_in_out: prevent tx fifo reverse the data direction
-+ * @quirk_stop_transfer_in_block: prevent block transmission from being
-+ * interrupted
-+ * @quirk_stop_ep_in_u1: replace stop commad with disable slot command
-+ * @host-vbus-glitches: set to avoid vbus glitch during
-+ * xhci reset.
- * @imod_interval: set the interrupt moderation interval in 250ns
- * increments or 0 to disable.
- */
-@@ -921,6 +967,12 @@ struct dwc3 {
+@@ -922,6 +961,12 @@ struct dwc3 {
enum usb_phy_interface hsphy_mode;
u32 fladj;
@@ -500,7 +486,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
u32 irq_gadget;
u32 nr_scratch;
u32 u1u2;
-@@ -1005,6 +1057,7 @@ struct dwc3 {
+@@ -1006,6 +1051,7 @@ struct dwc3 {
unsigned setup_packet_pending:1;
unsigned three_stage_setup:1;
unsigned usb3_lpm_capable:1;
@@ -508,7 +494,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
unsigned disable_scramble_quirk:1;
unsigned u2exit_lfps_quirk:1;
-@@ -1024,6 +1077,11 @@ struct dwc3 {
+@@ -1025,6 +1071,11 @@ struct dwc3 {
unsigned tx_de_emphasis_quirk:1;
unsigned tx_de_emphasis:2;
@@ -518,8 +504,8 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
+ unsigned quirk_stop_ep_in_u1:1;
+ unsigned host_vbus_glitches:1;
- u16 imod_interval;
- };
+ unsigned dis_metastability_quirk:1;
+
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -391,7 +391,7 @@ static int dwc3_ep0_handle_u1(struct dwc
@@ -542,7 +528,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
reg &= ~DWC3_DCTL_INITU2ENA;
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
-@@ -3210,6 +3210,7 @@ int dwc3_gadget_init(struct dwc3 *dwc)
+@@ -3211,6 +3211,7 @@ int dwc3_gadget_init(struct dwc3 *dwc)
{
int ret;
int irq;
@@ -550,7 +536,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
irq = dwc3_gadget_get_irq(dwc);
if (irq < 0) {
-@@ -3288,6 +3289,12 @@ int dwc3_gadget_init(struct dwc3 *dwc)
+@@ -3290,6 +3291,12 @@ int dwc3_gadget_init(struct dwc3 *dwc)
dwc3_gadget_set_speed(&dwc->gadget, dwc->maximum_speed);
@@ -754,15 +740,6 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
/* DR has been stopped in usb_gadget_unregister_driver() */
remove_proc_file();
-@@ -2569,7 +2579,7 @@ static int fsl_udc_remove(struct platfor
- dma_pool_destroy(udc_controller->td_pool);
- free_irq(udc_controller->irq, udc_controller);
- iounmap(dr_regs);
-- if (pdata->operating_mode == FSL_USB2_DR_DEVICE)
-+ if (res && (pdata->operating_mode == FSL_USB2_DR_DEVICE))
- release_mem_region(res->start, resource_size(res));
-
- /* free udc --wait for the release() finished */
--- a/drivers/usb/gadget/udc/fsl_usb2_udc.h
+++ b/drivers/usb/gadget/udc/fsl_usb2_udc.h
@@ -20,6 +20,10 @@
diff --git a/target/linux/layerscape/patches-4.14/809-flexcan-support-layerscape.patch b/target/linux/layerscape/patches-4.14/809-flexcan-support-layerscape.patch
index a52b8b5167..75a6d97adb 100644
--- a/target/linux/layerscape/patches-4.14/809-flexcan-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.14/809-flexcan-support-layerscape.patch
@@ -470,7 +470,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
/* On Vybrid, disable memory error detection interrupts
* and freeze mode.
-@@ -1011,16 +1028,16 @@ static int flexcan_chip_start(struct net
+@@ -1011,17 +1028,17 @@ static int flexcan_chip_start(struct net
* and Correction of Memory Errors" to write to
* MECR register
*/
@@ -485,6 +485,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
reg_mecr &= ~FLEXCAN_MECR_ECRWRDIS;
- flexcan_write(reg_mecr, &regs->mecr);
+ priv->write(reg_mecr, &regs->mecr);
+ reg_mecr |= FLEXCAN_MECR_ECCDIS;
reg_mecr &= ~(FLEXCAN_MECR_NCEFAFRZ | FLEXCAN_MECR_HANCEI_MSK |
FLEXCAN_MECR_FANCEI_MSK);
- flexcan_write(reg_mecr, &regs->mecr);
@@ -492,7 +493,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
}
err = flexcan_transceiver_enable(priv);
-@@ -1036,14 +1053,14 @@ static int flexcan_chip_start(struct net
+@@ -1037,14 +1054,14 @@ static int flexcan_chip_start(struct net
/* enable interrupts atomically */
disable_irq(dev->irq);
@@ -511,7 +512,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
return 0;
-@@ -1068,10 +1085,10 @@ static void flexcan_chip_stop(struct net
+@@ -1069,10 +1086,10 @@ static void flexcan_chip_stop(struct net
flexcan_chip_disable(priv);
/* Disable all interrupts */
@@ -526,7 +527,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
flexcan_transceiver_disable(priv);
priv->can.state = CAN_STATE_STOPPED;
-@@ -1186,26 +1203,26 @@ static int register_flexcandev(struct ne
+@@ -1187,26 +1204,26 @@ static int register_flexcandev(struct ne
err = flexcan_chip_disable(priv);
if (err)
goto out_disable_per;
@@ -558,7 +559,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
if (!(reg & FLEXCAN_MCR_FEN)) {
netdev_err(dev, "Could not enable RX FIFO, unsupported core\n");
err = -ENODEV;
-@@ -1233,8 +1250,12 @@ static void unregister_flexcandev(struct
+@@ -1234,8 +1251,12 @@ static void unregister_flexcandev(struct
static const struct of_device_id flexcan_of_match[] = {
{ .compatible = "fsl,imx6q-flexcan", .data = &fsl_imx6q_devtype_data, },
{ .compatible = "fsl,imx28-flexcan", .data = &fsl_imx28_devtype_data, },
@@ -571,7 +572,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
{ /* sentinel */ },
};
MODULE_DEVICE_TABLE(of, flexcan_of_match);
-@@ -1314,6 +1335,21 @@ static int flexcan_probe(struct platform
+@@ -1315,6 +1336,21 @@ static int flexcan_probe(struct platform
dev->flags |= IFF_ECHO;
priv = netdev_priv(dev);
diff --git a/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch b/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch
index 88f38df746..781333356a 100644
--- a/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch
@@ -286,15 +286,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
enum pci_barno {
BAR_0,
BAR_1,
-@@ -92,6 +103,7 @@ struct pci_endpoint_test {
- void __iomem *bar[6];
- struct completion irq_raised;
- int last_irq;
-+ int num_irqs;
- /* mutex to protect the ioctls */
- struct mutex mutex;
- struct miscdevice miscdev;
-@@ -102,7 +114,7 @@ struct pci_endpoint_test {
+@@ -103,7 +114,7 @@ struct pci_endpoint_test {
struct pci_endpoint_test_data {
enum pci_barno test_reg_bar;
size_t alignment;
@@ -303,7 +295,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
};
static inline u32 pci_endpoint_test_readl(struct pci_endpoint_test *test,
-@@ -146,6 +158,100 @@ static irqreturn_t pci_endpoint_test_irq
+@@ -147,6 +158,100 @@ static irqreturn_t pci_endpoint_test_irq
return IRQ_HANDLED;
}
@@ -404,7 +396,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
static bool pci_endpoint_test_bar(struct pci_endpoint_test *test,
enum pci_barno barno)
{
-@@ -178,6 +284,9 @@ static bool pci_endpoint_test_legacy_irq
+@@ -179,6 +284,9 @@ static bool pci_endpoint_test_legacy_irq
{
u32 val;
@@ -414,7 +406,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_COMMAND,
COMMAND_RAISE_LEGACY_IRQ);
val = wait_for_completion_timeout(&test->irq_raised,
-@@ -189,20 +298,24 @@ static bool pci_endpoint_test_legacy_irq
+@@ -190,20 +298,24 @@ static bool pci_endpoint_test_legacy_irq
}
static bool pci_endpoint_test_msi_irq(struct pci_endpoint_test *test,
@@ -443,9 +435,9 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
return true;
return false;
-@@ -226,10 +339,18 @@ static bool pci_endpoint_test_copy(struc
- u32 src_crc32;
- u32 dst_crc32;
+@@ -230,10 +342,18 @@ static bool pci_endpoint_test_copy(struc
+ if (size > SIZE_MAX - alignment)
+ goto err;
+ if (size > SIZE_MAX - alignment)
+ goto err;
@@ -463,7 +455,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
ret = false;
goto err;
}
-@@ -255,7 +376,7 @@ static bool pci_endpoint_test_copy(struc
+@@ -259,7 +379,7 @@ static bool pci_endpoint_test_copy(struc
orig_dst_addr = dma_alloc_coherent(dev, size + alignment,
&orig_dst_phys_addr, GFP_KERNEL);
if (!orig_dst_addr) {
@@ -472,7 +464,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
ret = false;
goto err_orig_src_addr;
}
-@@ -277,8 +398,10 @@ static bool pci_endpoint_test_copy(struc
+@@ -281,8 +401,10 @@ static bool pci_endpoint_test_copy(struc
pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_SIZE,
size);
@@ -484,9 +476,9 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
wait_for_completion(&test->irq_raised);
-@@ -311,10 +434,18 @@ static bool pci_endpoint_test_write(stru
- size_t alignment = test->alignment;
- u32 crc32;
+@@ -318,10 +440,18 @@ static bool pci_endpoint_test_write(stru
+ if (size > SIZE_MAX - alignment)
+ goto err;
+ if (size > SIZE_MAX - alignment)
+ goto err;
@@ -504,7 +496,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
ret = false;
goto err;
}
-@@ -341,8 +472,10 @@ static bool pci_endpoint_test_write(stru
+@@ -348,8 +478,10 @@ static bool pci_endpoint_test_write(stru
pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_SIZE, size);
@@ -516,9 +508,9 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
wait_for_completion(&test->irq_raised);
-@@ -369,10 +502,18 @@ static bool pci_endpoint_test_read(struc
- size_t alignment = test->alignment;
- u32 crc32;
+@@ -379,10 +511,18 @@ static bool pci_endpoint_test_read(struc
+ if (size > SIZE_MAX - alignment)
+ goto err;
+ if (size > SIZE_MAX - alignment)
+ goto err;
@@ -536,7 +528,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
ret = false;
goto err;
}
-@@ -393,8 +534,10 @@ static bool pci_endpoint_test_read(struc
+@@ -403,8 +543,10 @@ static bool pci_endpoint_test_read(struc
pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_SIZE, size);
@@ -548,7 +540,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
wait_for_completion(&test->irq_raised);
-@@ -407,6 +550,38 @@ err:
+@@ -417,6 +559,38 @@ err:
return ret;
}
@@ -587,7 +579,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
static long pci_endpoint_test_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
-@@ -426,7 +601,8 @@ static long pci_endpoint_test_ioctl(stru
+@@ -436,7 +610,8 @@ static long pci_endpoint_test_ioctl(stru
ret = pci_endpoint_test_legacy_irq(test);
break;
case PCITEST_MSI:
@@ -597,7 +589,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
break;
case PCITEST_WRITE:
ret = pci_endpoint_test_write(test, arg);
-@@ -437,6 +613,12 @@ static long pci_endpoint_test_ioctl(stru
+@@ -447,6 +622,12 @@ static long pci_endpoint_test_ioctl(stru
case PCITEST_COPY:
ret = pci_endpoint_test_copy(test, arg);
break;
@@ -610,7 +602,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
}
ret:
-@@ -452,9 +634,7 @@ static const struct file_operations pci_
+@@ -462,9 +643,7 @@ static const struct file_operations pci_
static int pci_endpoint_test_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
@@ -620,7 +612,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
int id;
char name[20];
enum pci_barno bar;
-@@ -476,12 +656,15 @@ static int pci_endpoint_test_probe(struc
+@@ -486,12 +665,15 @@ static int pci_endpoint_test_probe(struc
test->alignment = 0;
test->pdev = pdev;
@@ -637,7 +629,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
}
init_completion(&test->irq_raised);
-@@ -501,35 +684,21 @@ static int pci_endpoint_test_probe(struc
+@@ -511,36 +693,21 @@ static int pci_endpoint_test_probe(struc
pci_set_master(pdev);
@@ -645,6 +637,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
- irq = pci_alloc_irq_vectors(pdev, 1, 32, PCI_IRQ_MSI);
- if (irq < 0)
- dev_err(dev, "failed to get MSI interrupts\n");
+- test->num_irqs = irq;
- }
+ if (!pci_endpoint_test_alloc_irq_vectors(test, irq_type))
+ goto err_disable_irq;
@@ -684,7 +677,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
}
test->base = test->bar[test_reg_bar];
-@@ -545,24 +714,31 @@ static int pci_endpoint_test_probe(struc
+@@ -556,24 +723,31 @@ static int pci_endpoint_test_probe(struc
id = ida_simple_get(&pci_endpoint_test_ida, 0, 0, GFP_KERNEL);
if (id < 0) {
err = id;
@@ -720,20 +713,23 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
err_ida_remove:
ida_simple_remove(&pci_endpoint_test_ida, id);
-@@ -571,9 +747,10 @@ err_iounmap:
- if (test->bar[bar])
+@@ -583,11 +757,13 @@ err_iounmap:
pci_iounmap(pdev, test->bar[bar]);
}
+
+- for (i = 0; i < irq; i++)
+- devm_free_irq(dev, pdev->irq + i, test);
+ pci_endpoint_test_release_irq(test);
--err_disable_msi:
-- pci_disable_msi(pdev);
+ err_disable_msi:
+ pci_disable_msi(pdev);
++
+err_disable_irq:
+ pci_endpoint_test_free_irq_vectors(test);
pci_release_regions(pdev);
err_disable_pdev:
-@@ -595,12 +772,16 @@ static void pci_endpoint_test_remove(str
+@@ -610,14 +786,15 @@ static void pci_endpoint_test_remove(str
return;
misc_deregister(&test->miscdev);
@@ -743,15 +739,16 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
if (test->bar[bar])
pci_iounmap(pdev, test->bar[bar]);
}
+- for (i = 0; i < test->num_irqs; i++)
+- devm_free_irq(&pdev->dev, pdev->irq + i, test);
- pci_disable_msi(pdev);
+
+ pci_endpoint_test_release_irq(test);
+ pci_endpoint_test_free_irq_vectors(test);
-+
pci_release_regions(pdev);
pci_disable_device(pdev);
}
-@@ -608,6 +789,7 @@ static void pci_endpoint_test_remove(str
+@@ -625,6 +802,7 @@ static void pci_endpoint_test_remove(str
static const struct pci_device_id pci_endpoint_test_tbl[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_DRA74x) },
{ PCI_DEVICE(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_DRA72x) },