ip link set can0 up type can - crash in kernel

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

ip link set can0 up type can - crash in kernel

2,427件の閲覧回数
fatalfeel
Contributor V

in Target terminal input command

root@matrix_io:/ # ip link set can0 up type can

crash in linux kernel

0 件の賞賛
返信
2 返答(返信)

1,982件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi jesse

for flexcan configuaration one can look at i.MX6 Sabre AI dts:

arch/arm/boot/dts/imx6qdl-sabreauto.dtsi

http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/tree/arch/arm/boot/dts/imx6qdl-sabreauto.dts... 

and check sect.5.1 Build configurations attached Yocto Guide.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

1,982件の閲覧回数
fatalfeel
Contributor V

in myandroid/kernel_imx/drivers/net/can/dev.c

static int can_validate(struct nlattr *tb[], struct nlattr *data[])
{
    bool is_can_fd = false;

    /* begin: issue #: prevent  crash */
    if( data != NULL ) //add this can prevent from crash
    {
        if (data[IFLA_CAN_CTRLMODE]) {
            struct can_ctrlmode *cm = nla_data(data[IFLA_CAN_CTRLMODE]);

            is_can_fd = cm->flags & cm->mask & CAN_CTRLMODE_FD;
        }

        if (is_can_fd) {
            if (!data[IFLA_CAN_BITTIMING] || !data[IFLA_CAN_DATA_BITTIMING])
                return -EOPNOTSUPP;
        }

        if (data[IFLA_CAN_DATA_BITTIMING]) {
            if (!is_can_fd || !data[IFLA_CAN_BITTIMING])
                return -EOPNOTSUPP;
        }

        return 0;
    }

    return -ENODATA;
    /* end: issue #: prevent  crash */
}

0 件の賞賛
返信