Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • include
  • linux
  • can
  • dev.h
Find file BlameHistoryPermalink
  • Oliver Hartkopp's avatar
    can: fix handling of unmodifiable configuration options · dd128a3a
    Oliver Hartkopp authored Mar 21, 2016
    commit bb208f14 upstream.
    
    As described in 'can: m_can: tag current CAN FD controllers as non-ISO'
    (6cfda7fb
    
    ) it is possible to define fixed configuration options by
    setting the according bit in 'ctrlmode' and clear it in 'ctrlmode_supported'.
    This leads to the incovenience that the fixed configuration bits can not be
    passed by netlink even when they have the correct values (e.g. non-ISO, FD).
    
    This patch fixes that issue and not only allows fixed set bit values to be set
    again but now requires(!) to provide these fixed values at configuration time.
    A valid CAN FD configuration consists of a nominal/arbitration bittiming, a
    data bittiming and a control mode with CAN_CTRLMODE_FD set - which is now
    enforced by a new can_validate() function. This fix additionally removed the
    inconsistency that was prohibiting the support of 'CANFD-only' controller
    drivers, like the RCar CAN FD.
    
    For this reason a new helper can_set_static_ctrlmode() has been introduced to
    provide a proper interface to handle static enabled CAN controller options.
    
    Reported-by: default avatarRamesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
    Signed-off-by: default avatarOliver Hartkopp <socketcan@hartkopp.net>
    Reviewed-by: default avatarRamesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
    Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
    dd128a3a
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7