linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Wolfgang Grandegger <wg@grandegger.com>
Cc: linux-can@vger.kernel.org, bhupesh.sharma@st.com, tomoya.rohm@gmail.com
Subject: Re: [RFC 0/6] pch_can/c_can: fix races and add PCH support to c_can
Date: Mon, 26 Nov 2012 09:47:40 +0100	[thread overview]
Message-ID: <50B32CAC.4050501@pengutronix.de> (raw)
In-Reply-To: <1353918186-4234-1-git-send-email-wg@grandegger.com>

[-- Attachment #1: Type: text/plain, Size: 2171 bytes --]

On 11/26/2012 09:23 AM, Wolfgang Grandegger wrote:
> Hello,
> 
> as you might have already realized, Michael has reported problems with
> the PCH_CAN driver. With his help we try to fix these issues and add
> PCH PCI support to the C_CAN driver replacing the PCH_CAN driver sooner
> than later. Here follows my current patch stack for the records. When
> Michael's tests are successful, I'm going to post final patches.
> 
> For Michael I have prepared out-of-tree driver sources allowing to
> easily build the drivers also for older 3.x kernel versions. More
> tester are welcome.
> 
> As also pointed out by Casper, the problems are obvisouly due to races
> with stop and wakeup of the netif tx queue, managing tx_next and
> concurrent register accesses. For the moment I have fixed the races by
> adding "spin[un]lock_irqsave/restore" but, thinking more about it,
> "spinlock_bh" should be enough to protect against softirq context.
> 
> With the C_CAN driver I realized some other minor issues:
> 
> - The C/D_CAN type handling is common code and could go to
>   alloc_c_can_dev() or register_c_can_dev().
> 
> Comments are welcome.

Please make the patches based on linux-can-next/for-davem

Marc
> 
> Wolfgang.
> 
> Wolfgang Grandegger (6):
>   pch_can: add spinlock to protect tx objects
>   c_can: add spinlock to protect tx and rx objects
>   c_can: add optional reset callback
>   c_can_pci: introduce board specific PCI bar
>   c_can_pci: enable PCI bus master only for MSI
>   c_can_pci: add support for PCH CAN on Intel EG20T PCH
> 
>  drivers/net/can/c_can/c_can.c     |   24 ++++++++++++++++-
>  drivers/net/can/c_can/c_can.h     |    2 ++
>  drivers/net/can/c_can/c_can_pci.c |   54 ++++++++++++++++++++++++++++++++++---
>  drivers/net/can/pch_can.c         |   11 ++++++++
>  4 files changed, 87 insertions(+), 4 deletions(-)
> 


-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]

  parent reply	other threads:[~2012-11-26  8:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-26  8:23 [RFC 0/6] pch_can/c_can: fix races and add PCH support to c_can Wolfgang Grandegger
2012-11-26  8:23 ` [RFC 1/6] pch_can: add spinlock to protect tx objects Wolfgang Grandegger
2012-11-26  8:23 ` [RFC 2/6] c_can: add spinlock to protect tx and rx objects Wolfgang Grandegger
2012-11-26  8:23 ` [RFC 3/6] c_can: add optional reset callback Wolfgang Grandegger
2012-11-26  8:23 ` [RFC 4/6] c_can_pci: introduce board specific PCI bar Wolfgang Grandegger
2012-11-26  8:23 ` [RFC 5/6] c_can_pci: enable PCI bus master only for MSI Wolfgang Grandegger
2012-11-26  8:23 ` [RFC 6/6] c_can_pci: add support for PCH CAN on Intel EG20T PCH Wolfgang Grandegger
2012-11-26  8:47 ` Marc Kleine-Budde [this message]
2012-11-26  8:50   ` [RFC 0/6] pch_can/c_can: fix races and add PCH support to c_can Wolfgang Grandegger
2012-11-26  8:59     ` Marc Kleine-Budde
2012-11-26  9:20       ` 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=50B32CAC.4050501@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=bhupesh.sharma@st.com \
    --cc=linux-can@vger.kernel.org \
    --cc=tomoya.rohm@gmail.com \
    --cc=wg@grandegger.com \
    /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;
as well as URLs for NNTP newsgroup(s).