Hi,

This is an effort to provide a CAN transceiver subsystem for use with
socketcan.
The goal is to allow different functions of different CAN transceivers
to nicely cooperate with socketCAN devices, without socketCAN devices
needing to know thing of their corresponding transceivers.

I did take these arguments into account during developing this:
1) the intrusion in socketcan device code should be minimal.
2) the registration of CAN transceivers should be optional, not required
3) CAN transceiver core should provide meaningfull defaults for
functions that the particular transceiver does not support.
4) the matching of transceivers to net_devices should be predictable
5) beside the regular device scheme, a board with on-board transceiver
should not depend on transceiver core device matching. It should easily
pre-match a transceiver to a net device.


I'll shortly describe the changes:
1) a new class is made: can-transceiver.
2) this class receives net_device register/unregister notifications.
3) this class will match netdevs to transceivers. The matching itself is
   done with the netdevice's parent name (like sja1000_platform.0)
   These names are not changed by using udev or similar, whereas ifnames
   like 'can0' can.
4) The match between transceiver & net device can change during device
   lifetime.
5) a can_transceiver_alert entry is provided that could handle common
   transceiver fault handling. Currently, I sends a can_frame upstream,
   and brings down the iface.
6) A new bit in error can_frame's can_id is occupied to indicate
   CAN transceiver notifications.

I probably forgot to tell a lot more :-).
Probably, the locking is not yet correct (I still must run with
      PROVE_LOCKING).
At least, it can act as a starting point.

Kurt
_______________________________________________
Socketcan-core mailing list
Socketcan-core@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to