* [PATCH 2/3] pch_can: fix rmmod issue
2011-02-08 9:29 [PATCH 1/3] pch_can: fix 800k comms issue Tomoya MORINAGA
@ 2011-02-08 9:29 ` Tomoya MORINAGA
2011-02-09 0:37 ` David Miller
2011-02-08 9:29 ` [PATCH 3/3] pch_can: fix module reload issue with MSI Tomoya MORINAGA
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Tomoya MORINAGA @ 2011-02-08 9:29 UTC (permalink / raw)
To: wg, socketcan-core, netdev, linux-kernel
Cc: qi.wang, yong.y.wang, andrew.chih.howe.khor, joel.clark,
kok.howg.ewe, toshiharu-linux, Tomoya MORINAGA
Currently, when rmmod pch_can, kernel failure occurs.
The cause is pci_iounmap executed before pch_can_reset.
Thus pci_iounmap moves after pch_can_reset.
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
---
drivers/net/can/pch_can.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
index 9b171d1..342d514 100644
--- a/drivers/net/can/pch_can.c
+++ b/drivers/net/can/pch_can.c
@@ -959,13 +959,13 @@ static void __devexit pch_can_remove(struct pci_dev *pdev)
struct pch_can_priv *priv = netdev_priv(ndev);
unregister_candev(priv->ndev);
- pci_iounmap(pdev, priv->regs);
if (priv->use_msi)
pci_disable_msi(priv->dev);
pci_release_regions(pdev);
pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
pch_can_reset(priv);
+ pci_iounmap(pdev, priv->regs);
free_candev(priv->ndev);
}
--
1.7.3.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] pch_can: fix rmmod issue
2011-02-08 9:29 ` [PATCH 2/3] pch_can: fix rmmod issue Tomoya MORINAGA
@ 2011-02-09 0:37 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2011-02-09 0:37 UTC (permalink / raw)
To: tomoya-linux
Cc: wg, socketcan-core, netdev, linux-kernel, qi.wang, yong.y.wang,
andrew.chih.howe.khor, joel.clark, kok.howg.ewe, toshiharu-linux
From: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Date: Tue, 8 Feb 2011 18:29:02 +0900
> Currently, when rmmod pch_can, kernel failure occurs.
> The cause is pci_iounmap executed before pch_can_reset.
> Thus pci_iounmap moves after pch_can_reset.
>
> Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/3] pch_can: fix module reload issue with MSI
2011-02-08 9:29 [PATCH 1/3] pch_can: fix 800k comms issue Tomoya MORINAGA
2011-02-08 9:29 ` [PATCH 2/3] pch_can: fix rmmod issue Tomoya MORINAGA
@ 2011-02-08 9:29 ` Tomoya MORINAGA
2011-02-09 0:37 ` David Miller
2011-02-09 0:37 ` [PATCH 1/3] pch_can: fix 800k comms issue David Miller
2011-02-09 19:21 ` Wolfgang Grandegger
3 siblings, 1 reply; 7+ messages in thread
From: Tomoya MORINAGA @ 2011-02-08 9:29 UTC (permalink / raw)
To: wg, socketcan-core, netdev, linux-kernel
Cc: qi.wang, yong.y.wang, andrew.chih.howe.khor, joel.clark,
kok.howg.ewe, toshiharu-linux, Tomoya MORINAGA
Currently, in case reload pch_can,
pch_can not to be able to catch interrupt.
The cause is bus-master is not set in pch_can.
Thus, add enabling bus-master processing.
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
---
drivers/net/can/pch_can.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
index 342d514..7d8bc12 100644
--- a/drivers/net/can/pch_can.c
+++ b/drivers/net/can/pch_can.c
@@ -1238,6 +1238,7 @@ static int __devinit pch_can_probe(struct pci_dev *pdev,
priv->use_msi = 0;
} else {
netdev_err(ndev, "PCH CAN opened with MSI\n");
+ pci_set_master(pdev);
priv->use_msi = 1;
}
--
1.7.3.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] pch_can: fix module reload issue with MSI
2011-02-08 9:29 ` [PATCH 3/3] pch_can: fix module reload issue with MSI Tomoya MORINAGA
@ 2011-02-09 0:37 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2011-02-09 0:37 UTC (permalink / raw)
To: tomoya-linux
Cc: wg, socketcan-core, netdev, linux-kernel, qi.wang, yong.y.wang,
andrew.chih.howe.khor, joel.clark, kok.howg.ewe, toshiharu-linux
From: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Date: Tue, 8 Feb 2011 18:29:03 +0900
> Currently, in case reload pch_can,
> pch_can not to be able to catch interrupt.
>
> The cause is bus-master is not set in pch_can.
> Thus, add enabling bus-master processing.
>
> Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] pch_can: fix 800k comms issue
2011-02-08 9:29 [PATCH 1/3] pch_can: fix 800k comms issue Tomoya MORINAGA
2011-02-08 9:29 ` [PATCH 2/3] pch_can: fix rmmod issue Tomoya MORINAGA
2011-02-08 9:29 ` [PATCH 3/3] pch_can: fix module reload issue with MSI Tomoya MORINAGA
@ 2011-02-09 0:37 ` David Miller
2011-02-09 19:21 ` Wolfgang Grandegger
3 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2011-02-09 0:37 UTC (permalink / raw)
To: tomoya-linux
Cc: wg, socketcan-core, netdev, linux-kernel, qi.wang, yong.y.wang,
andrew.chih.howe.khor, joel.clark, kok.howg.ewe, toshiharu-linux
From: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Date: Tue, 8 Feb 2011 18:29:01 +0900
> Currently, 800k comms fails since prop_seg set zero.
> (EG20T PCH CAN register of prop_seg must be set more than 1)
> To prevent prop_seg set to zero, change tseg2_min 1 to 2.
>
> Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] pch_can: fix 800k comms issue
2011-02-08 9:29 [PATCH 1/3] pch_can: fix 800k comms issue Tomoya MORINAGA
` (2 preceding siblings ...)
2011-02-09 0:37 ` [PATCH 1/3] pch_can: fix 800k comms issue David Miller
@ 2011-02-09 19:21 ` Wolfgang Grandegger
3 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Grandegger @ 2011-02-09 19:21 UTC (permalink / raw)
To: Tomoya MORINAGA
Cc: socketcan-core, netdev, linux-kernel, andrew.chih.howe.khor,
qi.wang, yong.y.wang, toshiharu-linux, kok.howg.ewe, joel.clark
Hi Tomoya,
On 02/08/2011 10:29 AM, Tomoya MORINAGA wrote:
> Currently, 800k comms fails since prop_seg set zero.
> (EG20T PCH CAN register of prop_seg must be set more than 1)
> To prevent prop_seg set to zero, change tseg2_min 1 to 2.
>
> Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
> ---
> drivers/net/can/pch_can.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
> index c42e972..9b171d1 100644
> --- a/drivers/net/can/pch_can.c
> +++ b/drivers/net/can/pch_can.c
> @@ -187,7 +187,7 @@ static struct can_bittiming_const pch_can_bittiming_const = {
> .name = KBUILD_MODNAME,
> .tseg1_min = 1,
> .tseg1_max = 16,
> - .tseg2_min = 1,
> + .tseg2_min = 2,
> .tseg2_max = 8,
> .sjw_max = 4,
> .brp_min = 1,
I just realized that this fix is wrong. You wanted to set tseg1_min to 2
(and not tseg2_min). Could you please send a patch?
Thanks,
Wolfgang.
^ permalink raw reply [flat|nested] 7+ messages in thread