Skip to content

can: c_can: add support to 64 message objects

Dario Binacchi linux-can lkml netdev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest6 patches 3 repliesIn review
  2. v36 patches 16 repliesSuperseded
  3. v26 patches 9 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v16 patches2 repliesSuperseded

Changes in v4 from the cover letter

- Restore IF_RX interface.
- Add a comment to clarify why IF_RX interface is used instead of IF_TX.
- Use GENMASK() for setting msg_obj_rx_mask.
- Use BIT() for setting single bits and GENMASK() for setting masks.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6can: c_can: remove unused codedrivers/net/can/c_can/c_can.c drivers/net/can/c_can/c_can.h+1 -60 replies
2/6can: c_can: fix indentationdrivers/net/can/c_can/c_can.c+1 -10 replies
3/6can: c_can: add a comment about IF_RX interface's usedrivers/net/can/c_can/c_can.c+6 -00 replies
4/6can: c_can: use 32-bit write to set arbitration registerdrivers/net/can/c_can/c_can.c+1 -20 replies
5/6can: c_can: prepare to up the message objects numberdrivers/net/can/c_can/c_can.c drivers/net/can/c_can/c_can.h drivers/net/can/c_can/c_can_pci.c +1 more+43 -342 replies
6/6can: c_can: add support to 64 message objectsdrivers/net/can/c_can/c_can.c drivers/net/can/c_can/c_can.h drivers/net/can/c_can/c_can_pci.c +1 more+30 -170 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/6] can: c_can: add support to 64 message objects

The D_CAN controller supports up to 128 messages. Until now the driver only managed 32 messages although Sitara processors and DRA7 SOC can handle 64.

The series was tested on a beaglebone board.

Note:
I have not changed the type of tx_field (belonging to the c_can_priv structure) to atomic64_t because I think the atomic_t type has size of at least 32 bits on x86 and arm, which is enough to handle 64 messages.
http://marc.info/?l=linux-can&m=139746476821294&w=2 reports the results of tests performed just on x86 and arm architectures.

Changes in v4:
- Restore IF_RX interface.
- Add a comment to clarify why IF_RX interface is used instead of IF_TX.
- Use GENMASK() for setting msg_obj_rx_mask.
- Use BIT() for setting single bits and GENMASK() for setting masks.

Changes in v3:
- Use unsigned int instead of int as type of the msg_obj_* fields in the c_can_priv structure.
- Replace (u64)1 with 1UL in msg_obj_rx_mask setting.
- Use unsigned int instead of int as type of the msg_obj_num field in c_can_driver_data and c_can_pci_data structures.

Changes in v2:
- Fix compiling error reported by kernel test robot.
- Add Reported-by tag.
- Pass larger size to alloc_candev() routine to avoid an additional memory allocation/deallocation.
- Add message objects number to PCI driver data.

Dario Binacchi (6):
can: c_can: remove unused code
can: c_can: fix indentation
can: c_can: add a comment about IF_RX interface's use
can: c_can: use 32-bit write to set arbitration register
can: c_can: prepare to up the message objects number
can: c_can: add support to 64 message objects

 drivers/net/can/c_can/c_can.c          | 90 ++++++++++++++++----------
 drivers/net/can/c_can/c_can.h          | 32 ++++-----
 drivers/net/can/c_can/c_can_pci.c      |  6 +-
 drivers/net/can/c_can/c_can_platform.c |  6 +-
 4 files changed, 78 insertions(+), 56 deletions(-)
Signature · 1 line
2.17.1