This is to fix the below error build: drivers/net/can/flexcan.c:1637:30: error: 'flexcan_irq' undeclared (first use in this function) DEBUG: 1637 | err = request_irq(dev->irq, flexcan_irq, IRQF_SHARED, dev->name, dev); 1637 | err = request_irq(dev->irq, flexcan_irq, IRQF_SHARED, dev->name, dev); DEBUG: | ^~~~~~~~~~~ | ^~~~~~~~~~~
It is caused by wrong merging the upstream commit cd9f13c59461351d with this branch. cd9f13c59461351d(can: flexcan: flexcan_chip_start(): fix erroneous flexcan_transceiver_enable() during bus-off recovery). Now added the missing part for this patch. Signed-off-by: Xulin Sun <[email protected]> --- drivers/net/can/flexcan.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) mode change 100644 => 100755 drivers/net/can/flexcan.c diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c old mode 100644 new mode 100755 index aab53c3dae02..650165745fbe --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -1578,6 +1578,10 @@ static int flexcan_open(struct net_device *dev) if (err) goto out_runtime_put; + err = flexcan_transceiver_enable(priv); + if (err) + goto out_close; + for (i = 0; i < priv->devtype_data->n_irqs; i++) for (j = 0; j < M; j++) if (priv->devtype_data->irqs[i].handler_mask & BIT(j)) { @@ -1634,10 +1638,6 @@ static int flexcan_open(struct net_device *dev) if (err) goto out_free_irq; - err = request_irq(dev->irq, flexcan_irq, IRQF_SHARED, dev->name, dev); - if (err) - goto out_transceiver_disable; - priv->mb_size = sizeof(struct flexcan_mb) + CAN_MAX_DLEN; priv->mb_count = (sizeof(priv->regs->mb[0]) / priv->mb_size) + (sizeof(priv->regs->mb[1]) / priv->mb_size); @@ -1697,6 +1697,8 @@ static int flexcan_open(struct net_device *dev) BIT(last % M)) free_irq(priv->irq_nos[last / M], dev); + flexcan_transceiver_disable(priv); + out_close: close_candev(dev); out_runtime_put: pm_runtime_put(priv->dev); @@ -1720,6 +1722,8 @@ static int flexcan_close(struct net_device *dev) if (priv->devtype_data->irqs[i].handler_mask & BIT(j)) free_irq(priv->irq_nos[i], dev); + flexcan_transceiver_disable(priv); + close_candev(dev); pm_runtime_put(priv->dev); -- 2.17.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#9204): https://lists.yoctoproject.org/g/linux-yocto/message/9204 Mute This Topic: https://lists.yoctoproject.org/mt/78626665/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
