From: Wolfgang Grandegger <wg@grandegger.com>
To: ajneu <ajneu1@gmail.com>, linux-can@vger.kernel.org
Subject: Re: Bug? -- NEVER getting controller-problem{back-to-error-active}
Date: Mon, 20 Jun 2016 15:31:11 +0200 [thread overview]
Message-ID: <5767F01F.50700@grandegger.com> (raw)
In-Reply-To: <loom.20160620T145908-586@post.gmane.org>
Am 20.06.2016 um 15:00 schrieb ajneu:
> Wolfgang Grandegger <wg <at> grandegger.com> writes:
>
>>
>> Does the following patch fix both issues?
>>
>> diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_fd.c
> b/drivers/net/can/usb/peak_usb/pcan_usb_fd.c
>> index ce44a03..ca17ac2 100644
>> --- a/drivers/net/can/usb/peak_usb/pcan_usb_fd.c
>> +++ b/drivers/net/can/usb/peak_usb/pcan_usb_fd.c
>> <at> <at> -529,7 +529,7 <at> <at> static int
> pcan_usb_fd_decode_status(struct pcan_usb_fd_if *usb_if,
>> struct peak_usb_device *dev =
> usb_if->dev[pucan_stmsg_get_channel(sm)];
>> struct pcan_usb_fd_device *pdev =
>> container_of(dev, struct pcan_usb_fd_device, dev);
>> - enum can_state new_state = CAN_STATE_ERROR_ACTIVE;
>> + enum can_state new_state;
>> enum can_state rx_state, tx_state;
>> struct net_device *netdev = dev->netdev;
>> struct can_frame *cf;
>> <at> <at> -547,10 +547,7 <at> <at> static int
> pcan_usb_fd_decode_status(struct pcan_usb_fd_if *usb_if,
>> new_state = CAN_STATE_ERROR_WARNING;
>> } else {
>> /* no error bit (so, no error skb, back to active state) */
>> - dev->can.state = CAN_STATE_ERROR_ACTIVE;
>> - pdev->bec.txerr = 0;
>> - pdev->bec.rxerr = 0;
>> - return 0;
>> + new_state = CAN_STATE_ERROR_ACTIVE;
>> }
>>
>> /* state hasn't changed */
>>
>> Wolfgang.
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-can" in
>> the body of a message to majordomo <at> vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>>
>
>
> Hi Wolfgang,
>
> yes wonderful: you patch works (and solves both issues)!
> Will it be going into the mainline linux kernel?
I'm going to prepare a patch for mainline inclusion. Can I add your
"Tested-by: ajneu <ajneu1@gmail.com>"?
Wolfgang.
next prev parent reply other threads:[~2016-06-20 13:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-20 9:12 Bug? -- NEVER getting controller-problem{back-to-error-active} ajneu
2016-06-20 9:22 ` ajneu
2016-06-20 10:33 ` Wolfgang Grandegger
2016-06-20 12:41 ` ajneu
2016-06-20 13:00 ` ajneu
2016-06-20 13:31 ` Wolfgang Grandegger [this message]
2016-06-20 13:53 ` ajneu
2016-06-20 14:28 ` Wolfgang Grandegger
2016-06-21 8:29 ` Stephane Grosjean
2016-06-21 9:58 ` Wolfgang Grandegger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5767F01F.50700@grandegger.com \
--to=wg@grandegger.com \
--cc=ajneu1@gmail.com \
--cc=linux-can@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox