/drivers/net/can/mscan/ |
D | mscan.c | 192 u32 can_id; in mscan_start_xmit() local 227 rtr = frame->can_id & CAN_RTR_FLAG; in mscan_start_xmit() 230 if (frame->can_id & CAN_EFF_FLAG) { in mscan_start_xmit() 231 can_id = (frame->can_id & CAN_EFF_MASK) in mscan_start_xmit() 234 can_id |= 1 << MSCAN_EFF_RTR_SHIFT; in mscan_start_xmit() 235 out_be16(®s->tx.idr3_2, can_id); in mscan_start_xmit() 237 can_id >>= 16; in mscan_start_xmit() 239 can_id = (can_id & 0x7) | ((can_id << 2) & 0xffe0) in mscan_start_xmit() 242 can_id = (frame->can_id & CAN_SFF_MASK) in mscan_start_xmit() 245 can_id |= 1 << MSCAN_SFF_RTR_SHIFT; in mscan_start_xmit() [all …]
|
/drivers/net/can/ |
D | xilinx_can.c | 560 if (cf->can_id & CAN_EFF_FLAG) { in xcan_write_frame() 562 id = ((cf->can_id & CAN_EFF_MASK) << XCAN_IDR_ID2_SHIFT) & in xcan_write_frame() 564 id |= (((cf->can_id & CAN_EFF_MASK) >> in xcan_write_frame() 573 if (cf->can_id & CAN_RTR_FLAG) in xcan_write_frame() 578 id = ((cf->can_id & CAN_SFF_MASK) << XCAN_IDR_ID1_SHIFT) & in xcan_write_frame() 581 if (cf->can_id & CAN_RTR_FLAG) in xcan_write_frame() 621 if (!(cf->can_id & CAN_RTR_FLAG)) { in xcan_write_frame() 767 cf->can_id = (id_xcan & XCAN_IDR_ID1_MASK) >> 3; in xcan_rx() 768 cf->can_id |= (id_xcan & XCAN_IDR_ID2_MASK) >> in xcan_rx() 770 cf->can_id |= CAN_EFF_FLAG; in xcan_rx() [all …]
|
D | at91_can.c | 302 static inline u32 at91_can_id_to_reg_mid(canid_t can_id) in at91_can_id_to_reg_mid() argument 306 if (can_id & CAN_EFF_FLAG) in at91_can_id_to_reg_mid() 307 reg_mid = (can_id & CAN_EFF_MASK) | AT91_MID_MIDE; in at91_can_id_to_reg_mid() 309 reg_mid = (can_id & CAN_SFF_MASK) << 18; in at91_can_id_to_reg_mid() 468 reg_mid = at91_can_id_to_reg_mid(cf->can_id); in at91_start_xmit() 469 reg_mcr = ((cf->can_id & CAN_RTR_FLAG) ? AT91_MCR_MRTR : 0) | in at91_start_xmit() 553 cf->can_id |= CAN_ERR_CRTL; in at91_rx_overflow_err() 578 cf->can_id = ((reg_mid >> 0) & CAN_EFF_MASK) | CAN_EFF_FLAG; in at91_read_mb() 580 cf->can_id = (reg_mid >> 18) & CAN_SFF_MASK; in at91_read_mb() 586 cf->can_id |= CAN_RTR_FLAG; in at91_read_mb() [all …]
|
D | janz-ican3.c | 915 cf->can_id |= CAN_RTR_FLAG; in ican3_to_can_frame() 917 cf->can_id |= desc->data[0] << 3; in ican3_to_can_frame() 918 cf->can_id |= (desc->data[1] & 0xe0) >> 5; in ican3_to_can_frame() 924 cf->can_id |= CAN_RTR_FLAG; in ican3_to_can_frame() 927 cf->can_id |= CAN_EFF_FLAG; in ican3_to_can_frame() 928 cf->can_id |= desc->data[2] << 21; /* 28-21 */ in ican3_to_can_frame() 929 cf->can_id |= desc->data[3] << 13; /* 20-13 */ in ican3_to_can_frame() 930 cf->can_id |= desc->data[4] << 5; /* 12-5 */ in ican3_to_can_frame() 931 cf->can_id |= (desc->data[5] & 0xf8) >> 3; in ican3_to_can_frame() 933 cf->can_id |= desc->data[2] << 3; /* 10-3 */ in ican3_to_can_frame() [all …]
|
D | slcan.c | 155 cf.can_id = CAN_RTR_FLAG; in slc_bump() 165 cf.can_id = CAN_RTR_FLAG; in slc_bump() 168 cf.can_id |= CAN_EFF_FLAG; in slc_bump() 182 cf.can_id |= tmpid; in slc_bump() 191 if (!(cf.can_id & CAN_RTR_FLAG)) { in slc_bump() 257 canid_t id = cf->can_id; in slc_encaps() 261 if (cf->can_id & CAN_RTR_FLAG) in slc_encaps() 267 if (cf->can_id & CAN_EFF_FLAG) { in slc_encaps() 283 pos += (cf->can_id & CAN_EFF_FLAG) ? SLC_EFF_ID_LEN : SLC_SFF_ID_LEN; in slc_encaps() 288 if (!(cf->can_id & CAN_RTR_FLAG)) { in slc_encaps()
|
D | grcan.c | 643 cf.can_id |= CAN_ERR_BUSOFF; in grcan_err() 650 cf.can_id |= CAN_ERR_CRTL; in grcan_err() 661 cf.can_id |= CAN_ERR_CRTL; in grcan_err() 670 cf.can_id |= CAN_ERR_CRTL; in grcan_err() 686 cf.can_id |= CAN_ERR_RESTARTED; in grcan_err() 711 cf.can_id |= CAN_ERR_CRTL; in grcan_err() 747 if (cf.can_id) { in grcan_err() 755 skb_cf->can_id |= cf.can_id; in grcan_err() 1198 cf->can_id = ((slot[0] & GRCAN_MSG_EID) in grcan_receive() 1200 cf->can_id |= CAN_EFF_FLAG; in grcan_receive() [all …]
|
D | pch_can.c | 497 cf->can_id |= CAN_ERR_BUSOFF; in pch_can_error() 509 cf->can_id |= CAN_ERR_CRTL; in pch_can_error() 521 cf->can_id |= CAN_ERR_CRTL; in pch_can_error() 543 cf->can_id |= CAN_ERR_ACK; in pch_can_error() 622 cf->can_id |= CAN_ERR_CRTL; in pch_can_rx_msg_lost() 677 cf->can_id = id | CAN_EFF_FLAG; in pch_can_rx_normal() 680 cf->can_id = id; in pch_can_rx_normal() 684 cf->can_id |= CAN_RTR_FLAG; in pch_can_rx_normal() 905 if (cf->can_id & CAN_EFF_FLAG) { in pch_xmit() 906 iowrite32(cf->can_id & 0xffff, &priv->regs->ifregs[1].id1); in pch_xmit() [all …]
|
/drivers/net/can/softing/ |
D | softing_main.c | 80 if (cf->can_id & CAN_RTR_FLAG) in softing_netdev_start_xmit() 82 if (cf->can_id & CAN_EFF_FLAG) in softing_netdev_start_xmit() 88 *ptr++ = (cf->can_id >> 0); in softing_netdev_start_xmit() 89 *ptr++ = (cf->can_id >> 8); in softing_netdev_start_xmit() 90 if (cf->can_id & CAN_EFF_FLAG) { in softing_netdev_start_xmit() 91 *ptr++ = (cf->can_id >> 16); in softing_netdev_start_xmit() 92 *ptr++ = (cf->can_id >> 24); in softing_netdev_start_xmit() 97 if (!(cf->can_id & CAN_RTR_FLAG)) in softing_netdev_start_xmit() 169 msg.can_id = CAN_ERR_FLAG | CAN_ERR_CRTL; in softing_handle_1() 220 msg.can_id = CAN_ERR_FLAG; in softing_handle_1() [all …]
|
/drivers/net/can/peak_canfd/ |
D | peak_canfd.c | 307 cf->can_id = le32_to_cpu(msg->can_id); in pucan_handle_can_rx() 311 cf->can_id |= CAN_EFF_FLAG; in pucan_handle_can_rx() 314 cf->can_id |= CAN_RTR_FLAG; in pucan_handle_can_rx() 369 cf->can_id |= CAN_ERR_BUSOFF; in pucan_handle_status() 376 cf->can_id |= CAN_ERR_CRTL; in pucan_handle_status() 389 cf->can_id |= CAN_ERR_CRTL; in pucan_handle_status() 435 cf->can_id |= CAN_ERR_CRTL; in pucan_handle_cache_critical() 676 if (cf->can_id & CAN_EFF_FLAG) { in peak_canfd_start_xmit() 678 msg->can_id = cpu_to_le32(cf->can_id & CAN_EFF_MASK); in peak_canfd_start_xmit() 680 msg->can_id = cpu_to_le32(cf->can_id & CAN_SFF_MASK); in peak_canfd_start_xmit() [all …]
|
/drivers/net/can/usb/kvaser_usb/ |
D | kvaser_usb_hydra.c | 1107 cf->can_id |= CAN_ERR_RESTARTED; in kvaser_usb_hydra_error_frame() 1128 cf->can_id |= CAN_ERR_BUSERROR; in kvaser_usb_hydra_error_frame() 1158 cf->can_id |= CAN_ERR_BUSERROR; in kvaser_usb_hydra_one_shot_fail() 1162 cf->can_id |= CAN_ERR_ACK; in kvaser_usb_hydra_one_shot_fail() 1164 cf->can_id |= CAN_ERR_LOSTARB; in kvaser_usb_hydra_one_shot_fail() 1258 cf->can_id = le32_to_cpu(cmd->rx_can.id); in kvaser_usb_hydra_rx_msg_std() 1260 if (cf->can_id & KVASER_USB_HYDRA_EXTENDED_FRAME_ID) { in kvaser_usb_hydra_rx_msg_std() 1261 cf->can_id &= CAN_EFF_MASK; in kvaser_usb_hydra_rx_msg_std() 1262 cf->can_id |= CAN_EFF_FLAG; in kvaser_usb_hydra_rx_msg_std() 1264 cf->can_id &= CAN_SFF_MASK; in kvaser_usb_hydra_rx_msg_std() [all …]
|
D | kvaser_usb_leaf.c | 562 if (cf->can_id & CAN_EFF_FLAG) { in kvaser_usb_leaf_frame_to_cmd() 564 cmd->u.tx_can.data[0] = (cf->can_id >> 24) & 0x1f; in kvaser_usb_leaf_frame_to_cmd() 565 cmd->u.tx_can.data[1] = (cf->can_id >> 18) & 0x3f; in kvaser_usb_leaf_frame_to_cmd() 566 cmd->u.tx_can.data[2] = (cf->can_id >> 14) & 0x0f; in kvaser_usb_leaf_frame_to_cmd() 567 cmd->u.tx_can.data[3] = (cf->can_id >> 6) & 0xff; in kvaser_usb_leaf_frame_to_cmd() 568 cmd->u.tx_can.data[4] = cf->can_id & 0x3f; in kvaser_usb_leaf_frame_to_cmd() 571 cmd->u.tx_can.data[0] = (cf->can_id >> 6) & 0x1f; in kvaser_usb_leaf_frame_to_cmd() 572 cmd->u.tx_can.data[1] = cf->can_id & 0x3f; in kvaser_usb_leaf_frame_to_cmd() 578 if (cf->can_id & CAN_RTR_FLAG) in kvaser_usb_leaf_frame_to_cmd() 908 cf->can_id |= CAN_ERR_RESTARTED; in kvaser_usb_leaf_tx_acknowledge() [all …]
|
/drivers/net/can/dev/ |
D | length.c | 76 else if (cf->can_id & CAN_RTR_FLAG) in can_skb_get_frame_len() 82 if (cf->can_id & CAN_EFF_FLAG) in can_skb_get_frame_len() 87 if (cf->can_id & CAN_EFF_FLAG) in can_skb_get_frame_len()
|
/drivers/net/can/usb/ |
D | mcba_usb.c | 331 if (cf->can_id & CAN_EFF_FLAG) { in mcba_usb_start_xmit() 337 sid |= (cf->can_id & 0x1ffc0000) >> 13; in mcba_usb_start_xmit() 339 sid |= (cf->can_id & 0x30000) >> 16; in mcba_usb_start_xmit() 343 put_unaligned_be16(cf->can_id & 0xffff, &usb_msg.eid); in mcba_usb_start_xmit() 348 put_unaligned_be16((cf->can_id & CAN_SFF_MASK) << 5, in mcba_usb_start_xmit() 357 if (cf->can_id & CAN_RTR_FLAG) in mcba_usb_start_xmit() 437 cf->can_id = CAN_EFF_FLAG; in mcba_usb_process_can() 440 cf->can_id |= (sid & 0xffe0) << 13; in mcba_usb_process_can() 442 cf->can_id |= (sid & 3) << 16; in mcba_usb_process_can() 444 cf->can_id |= get_unaligned_be16(&msg->eid); in mcba_usb_process_can() [all …]
|
D | usb_8dev.c | 364 cf->can_id |= CAN_ERR_PROT; in usb_8dev_rx_err_msg() 369 cf->can_id |= CAN_ERR_BUSOFF; in usb_8dev_rx_err_msg() 376 cf->can_id |= CAN_ERR_CRTL; in usb_8dev_rx_err_msg() 380 cf->can_id |= CAN_ERR_PROT | CAN_ERR_BUSERROR; in usb_8dev_rx_err_msg() 390 cf->can_id |= CAN_ERR_ACK; in usb_8dev_rx_err_msg() 474 cf->can_id = be32_to_cpu(msg->id); in usb_8dev_rx_can_msg() 478 cf->can_id |= CAN_EFF_FLAG; in usb_8dev_rx_can_msg() 481 cf->can_id |= CAN_RTR_FLAG; in usb_8dev_rx_can_msg() 635 if (cf->can_id & CAN_RTR_FLAG) in usb_8dev_start_xmit() 638 if (cf->can_id & CAN_EFF_FLAG) in usb_8dev_start_xmit() [all …]
|
D | ems_usb.c | 310 cf->can_id = le32_to_cpu(msg->msg.can_msg.id); in ems_usb_rx_can_msg() 315 cf->can_id |= CAN_EFF_FLAG; in ems_usb_rx_can_msg() 319 cf->can_id |= CAN_RTR_FLAG; in ems_usb_rx_can_msg() 345 cf->can_id |= CAN_ERR_BUSOFF; in ems_usb_rx_err() 365 cf->can_id |= CAN_ERR_PROT | CAN_ERR_BUSERROR; in ems_usb_rx_err() 388 cf->can_id |= CAN_ERR_CRTL; in ems_usb_rx_err() 393 cf->can_id |= CAN_ERR_CRTL; in ems_usb_rx_err() 769 msg->msg.can_msg.id = cpu_to_le32(cf->can_id & CAN_ERR_MASK); in ems_usb_start_xmit() 772 if (cf->can_id & CAN_RTR_FLAG) { in ems_usb_start_xmit() 773 msg->type = cf->can_id & CAN_EFF_FLAG ? in ems_usb_start_xmit() [all …]
|
/drivers/net/can/spi/ |
D | hi311x.c | 267 if (frame->can_id & CAN_EFF_FLAG) { in hi3110_hw_tx() 269 buf[HI3110_FIFO_ID_OFF] = (frame->can_id & CAN_EFF_MASK) >> 21; in hi3110_hw_tx() 271 (((frame->can_id & CAN_EFF_MASK) >> 13) & 0xe0) | in hi3110_hw_tx() 273 (((frame->can_id & CAN_EFF_MASK) >> 15) & 0x07); in hi3110_hw_tx() 275 (frame->can_id & CAN_EFF_MASK) >> 7; in hi3110_hw_tx() 277 ((frame->can_id & CAN_EFF_MASK) << 1) | in hi3110_hw_tx() 278 ((frame->can_id & CAN_RTR_FLAG) ? 1 : 0); in hi3110_hw_tx() 289 buf[HI3110_FIFO_ID_OFF] = (frame->can_id & CAN_SFF_MASK) >> 3; in hi3110_hw_tx() 291 ((frame->can_id & CAN_SFF_MASK) << 5) | in hi3110_hw_tx() 292 ((frame->can_id & CAN_RTR_FLAG) ? (1 << 4) : 0); in hi3110_hw_tx() [all …]
|
D | mcp251x.c | 644 exide = (frame->can_id & CAN_EFF_FLAG) ? 1 : 0; /* Extended ID Enable */ in mcp251x_hw_tx() 646 sid = (frame->can_id & CAN_EFF_MASK) >> 18; in mcp251x_hw_tx() 648 sid = frame->can_id & CAN_SFF_MASK; /* Standard ID */ in mcp251x_hw_tx() 649 eid = frame->can_id & CAN_EFF_MASK; /* Extended ID */ in mcp251x_hw_tx() 650 rtr = (frame->can_id & CAN_RTR_FLAG) ? 1 : 0; /* Remote transmission */ in mcp251x_hw_tx() 714 frame->can_id = CAN_EFF_FLAG; in mcp251x_hw_rx() 715 frame->can_id |= in mcp251x_hw_rx() 725 frame->can_id |= CAN_RTR_FLAG; in mcp251x_hw_rx() 728 frame->can_id = in mcp251x_hw_rx() 732 frame->can_id |= CAN_RTR_FLAG; in mcp251x_hw_rx() [all …]
|
/drivers/net/can/usb/etas_es58x/ |
D | es58x_core.h | 646 if (cf->can_id & CAN_EFF_FLAG) in es58x_get_raw_can_id() 647 return cf->can_id & CAN_EFF_MASK; in es58x_get_raw_can_id() 649 return cf->can_id & CAN_SFF_MASK; in es58x_get_raw_can_id() 663 if (cf->can_id & CAN_EFF_FLAG) in es58x_get_flags() 672 } else if (cf->can_id & CAN_RTR_FLAG) in es58x_get_flags() 684 canid_t can_id, enum es58x_flag es58x_flags, u8 dlc);
|
D | es581_4.h | 77 __le32 can_id; member 112 __le32 can_id; member 124 __le32 can_id; member
|
D | es58x_fd.h | 128 __le32 can_id; member 143 __le32 can_id; member 163 __le32 can_id; member
|
/drivers/net/can/rcar/ |
D | rcar_can.c | 239 cf->can_id |= CAN_ERR_CRTL; in rcar_can_error() 247 cf->can_id |= CAN_ERR_BUSERROR | CAN_ERR_PROT; in rcar_can_error() 283 cf->can_id |= CAN_ERR_ACK; in rcar_can_error() 338 cf->can_id |= CAN_ERR_BUSOFF; in rcar_can_error() 349 cf->can_id |= CAN_ERR_CRTL; in rcar_can_error() 360 cf->can_id |= CAN_ERR_PROT; in rcar_can_error() 602 if (cf->can_id & CAN_EFF_FLAG) /* Extended frame format */ in rcar_can_start_xmit() 603 data = (cf->can_id & CAN_EFF_MASK) | RCAR_CAN_IDE; in rcar_can_start_xmit() 605 data = (cf->can_id & CAN_SFF_MASK) << RCAR_CAN_SID_SHIFT; in rcar_can_start_xmit() 607 if (cf->can_id & CAN_RTR_FLAG) { /* Remote transmission request */ in rcar_can_start_xmit() [all …]
|
/drivers/net/can/usb/peak_usb/ |
D | pcan_usb_pro.c | 533 can_frame->can_id = le32_to_cpu(rx->id); in pcan_usb_pro_handle_canmsg() 537 can_frame->can_id |= CAN_EFF_FLAG; in pcan_usb_pro_handle_canmsg() 540 can_frame->can_id |= CAN_RTR_FLAG; in pcan_usb_pro_handle_canmsg() 619 can_frame->can_id |= CAN_ERR_BUSOFF; in pcan_usb_pro_handle_error() 625 can_frame->can_id |= CAN_ERR_CRTL; in pcan_usb_pro_handle_error() 631 can_frame->can_id |= CAN_ERR_CRTL; in pcan_usb_pro_handle_error() 642 can_frame->can_id |= CAN_ERR_PROT; in pcan_usb_pro_handle_error() 649 can_frame->can_id |= CAN_ERR_CRTL; in pcan_usb_pro_handle_error() 769 if ((cf->can_id & CAN_RTR_FLAG) || (cf->len == 0)) in pcan_usb_pro_encode_msg() 779 if (cf->can_id & CAN_EFF_FLAG) in pcan_usb_pro_encode_msg() [all …]
|
D | pcan_usb.c | 472 cf->can_id |= CAN_ERR_CRTL; in pcan_usb_decode_error() 504 } else if (cf && (cf->can_id & CAN_ERR_CRTL)) { in pcan_usb_decode_error() 647 cf->can_id = can_id_flags >> 3 | CAN_EFF_FLAG; in pcan_usb_decode_data() 654 cf->can_id = can_id_flags >> 5; in pcan_usb_decode_data() 670 cf->can_id |= CAN_RTR_FLAG; in pcan_usb_decode_data() 758 u32 can_id_flags = cf->can_id & CAN_ERR_MASK; in pcan_usb_encode_msg() 769 if (cf->can_id & CAN_RTR_FLAG) in pcan_usb_encode_msg() 773 if (cf->can_id & CAN_EFF_FLAG) { in pcan_usb_encode_msg() 803 if (!(cf->can_id & CAN_RTR_FLAG)) { in pcan_usb_encode_msg()
|
/drivers/net/can/ifi_canfd/ |
D | ifi_canfd.c | 294 cf->can_id = id; in ifi_canfd_read_fifo() 303 cf->can_id |= CAN_RTR_FLAG; in ifi_canfd_read_fifo() 369 frame->can_id |= CAN_ERR_CRTL; in ifi_canfd_handle_lost_msg() 404 cf->can_id |= CAN_ERR_PROT | CAN_ERR_BUSERROR; in ifi_canfd_handle_lec_err() 501 cf->can_id |= CAN_ERR_CRTL; in ifi_canfd_handle_state_change() 510 cf->can_id |= CAN_ERR_CRTL; in ifi_canfd_handle_state_change() 519 cf->can_id |= CAN_ERR_BUSOFF; in ifi_canfd_handle_state_change() 887 if (cf->can_id & CAN_EFF_FLAG) { in ifi_canfd_start_xmit() 888 txid = cf->can_id & CAN_EFF_MASK; in ifi_canfd_start_xmit() 900 txid = cf->can_id & CAN_SFF_MASK; in ifi_canfd_start_xmit() [all …]
|
/drivers/net/can/cc770/ |
D | cc770.c | 394 id = cf->can_id; in cc770_tx() 395 rtr = cf->can_id & CAN_RTR_FLAG ? 0 : MSGCFG_DIR; in cc770_tx() 470 cf->can_id = CAN_RTR_FLAG; in cc770_rx() 472 cf->can_id |= CAN_EFF_FLAG; in cc770_rx() 488 cf->can_id = id; in cc770_rx() 522 cf->can_id |= CAN_ERR_BUSOFF; in cc770_err() 527 cf->can_id |= CAN_ERR_CRTL; in cc770_err() 542 cf->can_id |= CAN_ERR_PROT; in cc770_err() 550 cf->can_id |= CAN_ERR_ACK; in cc770_err() 552 cf->can_id |= CAN_ERR_PROT; in cc770_err()
|