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 <[email protected]>
---
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,
--
1.7.3.4
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 <[email protected]>
---
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
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 <[email protected]>
---
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
From: Tomoya MORINAGA <[email protected]>
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 <[email protected]>
Applied.
From: Tomoya MORINAGA <[email protected]>
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 <[email protected]>
Applied.
From: Tomoya MORINAGA <[email protected]>
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 <[email protected]>
Applied.
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 <[email protected]>
> ---
> 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.