linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/6] pch_can/c_can: fix races and add PCH support to c_can
@ 2012-11-26  8:23 Wolfgang Grandegger
  2012-11-26  8:23 ` [RFC 1/6] pch_can: add spinlock to protect tx objects Wolfgang Grandegger
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Wolfgang Grandegger @ 2012-11-26  8:23 UTC (permalink / raw)
  To: linux-can; +Cc: bhupesh.sharma, tomoya.rohm, Wolfgang Grandegger

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.

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(-)

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-11-26  9:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [RFC 0/6] pch_can/c_can: fix races and add PCH support to c_can Marc Kleine-Budde
2012-11-26  8:50   ` Wolfgang Grandegger
2012-11-26  8:59     ` Marc Kleine-Budde
2012-11-26  9:20       ` Wolfgang Grandegger

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).