/kernel/linux/linux-5.10/drivers/net/can/usb/peak_usb/ |
D | pcan_usb.c | 128 struct can_berr_counter bec; member 541 cf->data[1] = (mc->pdev->bec.txerr > mc->pdev->bec.rxerr) ? in pcan_usb_decode_error() 544 cf->data[6] = mc->pdev->bec.txerr; in pcan_usb_decode_error() 545 cf->data[7] = mc->pdev->bec.rxerr; in pcan_usb_decode_error() 552 cf->data[1] = (mc->pdev->bec.txerr > mc->pdev->bec.rxerr) ? in pcan_usb_decode_error() 555 cf->data[6] = mc->pdev->bec.txerr; in pcan_usb_decode_error() 556 cf->data[7] = mc->pdev->bec.rxerr; in pcan_usb_decode_error() 566 mc->pdev->bec.txerr = 0; in pcan_usb_decode_error() 567 mc->pdev->bec.rxerr = 0; in pcan_usb_decode_error() 583 cf->data[6] = mc->pdev->bec.txerr; in pcan_usb_decode_error() [all …]
|
D | pcan_usb_fd.c | 63 struct can_berr_counter bec; member 556 pdev->bec.txerr = 0; in pcan_usb_fd_decode_status() 557 pdev->bec.rxerr = 0; in pcan_usb_fd_decode_status() 565 tx_state = (pdev->bec.txerr >= pdev->bec.rxerr) ? new_state : 0; in pcan_usb_fd_decode_status() 566 rx_state = (pdev->bec.txerr <= pdev->bec.rxerr) ? new_state : 0; in pcan_usb_fd_decode_status() 603 pdev->bec.txerr = er->tx_err_cnt; in pcan_usb_fd_decode_error() 604 pdev->bec.rxerr = er->rx_err_cnt; in pcan_usb_fd_decode_error() 818 pdev->bec.txerr = 0; in pcan_usb_fd_start() 819 pdev->bec.rxerr = 0; in pcan_usb_fd_start() 826 struct can_berr_counter *bec) in pcan_usb_fd_get_berr_counter() argument [all …]
|
D | pcan_usb_core.h | 70 struct can_berr_counter *bec);
|
/kernel/linux/linux-5.10/drivers/net/can/ |
D | kvaser_pciefd.c | 265 struct can_berr_counter bec; member 649 can->bec.txerr = 0; in kvaser_pciefd_bus_on() 650 can->bec.rxerr = 0; in kvaser_pciefd_bus_on() 909 struct can_berr_counter *bec) in kvaser_pciefd_get_berr_counter() argument 913 bec->rxerr = can->bec.rxerr; in kvaser_pciefd_get_berr_counter() 914 bec->txerr = can->bec.txerr; in kvaser_pciefd_get_berr_counter() 956 can->bec.txerr = 0; in kvaser_pciefd_setup_can_ctrls() 957 can->bec.rxerr = 0; in kvaser_pciefd_setup_can_ctrls() 1247 struct can_berr_counter *bec, in kvaser_pciefd_packet_to_state() argument 1255 else if (bec->txerr >= 255 || bec->rxerr >= 255) in kvaser_pciefd_packet_to_state() [all …]
|
D | at91_can.c | 371 struct can_berr_counter *bec) in at91_get_berr_counter() argument 376 bec->rxerr = reg_ecr & 0xff; in at91_get_berr_counter() 377 bec->txerr = reg_ecr >> 16; in at91_get_berr_counter() 880 struct can_berr_counter bec; in at91_irq_err_state() local 882 at91_get_berr_counter(dev, &bec); in at91_irq_err_state() 897 cf->data[1] = (bec.txerr > bec.rxerr) ? in at91_irq_err_state() 914 cf->data[1] = (bec.txerr > bec.rxerr) ? in at91_irq_err_state() 988 struct can_berr_counter bec; in at91_get_state_by_bec() local 991 err = at91_get_berr_counter(dev, &bec); in at91_get_state_by_bec() 995 if (bec.txerr < 96 && bec.rxerr < 96) in at91_get_state_by_bec() [all …]
|
D | flexcan.c | 718 struct can_berr_counter *bec) in __flexcan_get_berr_counter() argument 724 bec->txerr = (reg >> 0) & 0xff; in __flexcan_get_berr_counter() 725 bec->rxerr = (reg >> 8) & 0xff; in __flexcan_get_berr_counter() 731 struct can_berr_counter *bec) in flexcan_get_berr_counter() argument 742 err = __flexcan_get_berr_counter(dev, bec); in flexcan_get_berr_counter() 871 struct can_berr_counter bec; in flexcan_irq_state() local 883 __flexcan_get_berr_counter(dev, &bec); in flexcan_irq_state() 886 rx_state = bec.rxerr >= bec.txerr ? new_state : 0; in flexcan_irq_state() 887 tx_state = bec.rxerr <= bec.txerr ? new_state : 0; in flexcan_irq_state()
|
D | janz-ican3.c | 237 struct can_berr_counter bec; member 1183 mod->bec.rxerr = msg->data[5]; in ican3_handle_inquiry() 1184 mod->bec.txerr = msg->data[6]; in ican3_handle_inquiry() 1795 struct can_berr_counter *bec) in ican3_get_berr_counter() argument 1809 bec->rxerr = mod->bec.rxerr; in ican3_get_berr_counter() 1810 bec->txerr = mod->bec.txerr; in ican3_get_berr_counter()
|
D | sun4i_can.c | 294 struct can_berr_counter *bec) in sun4ican_get_berr_counter() argument 308 bec->txerr = errors & 0xFF; in sun4ican_get_berr_counter() 309 bec->rxerr = (errors >> 16) & 0xFF; in sun4ican_get_berr_counter()
|
/kernel/linux/linux-5.10/drivers/net/can/peak_canfd/ |
D | peak_canfd.c | 330 priv->bec.txerr = msg->tx_err_cnt; in pucan_handle_error() 331 priv->bec.rxerr = msg->rx_err_cnt; in pucan_handle_error() 377 cf->data[1] = (priv->bec.txerr > priv->bec.rxerr) ? in pucan_handle_status() 380 cf->data[6] = priv->bec.txerr; in pucan_handle_status() 381 cf->data[7] = priv->bec.rxerr; in pucan_handle_status() 390 cf->data[1] = (priv->bec.txerr > priv->bec.rxerr) ? in pucan_handle_status() 393 cf->data[6] = priv->bec.txerr; in pucan_handle_status() 394 cf->data[7] = priv->bec.rxerr; in pucan_handle_status() 438 cf->data[6] = priv->bec.txerr; in pucan_handle_cache_critical() 439 cf->data[7] = priv->bec.rxerr; in pucan_handle_cache_critical() [all …]
|
D | peak_canfd_user.h | 20 struct can_berr_counter bec; /* rx/tx err counters */ member
|
/kernel/linux/linux-5.10/drivers/net/can/usb/kvaser_usb/ |
D | kvaser_usb_hydra.c | 870 const struct can_berr_counter *bec, in kvaser_usb_hydra_bus_status_to_can_state() argument 878 if (bec->txerr >= 128 || bec->rxerr >= 128) { in kvaser_usb_hydra_bus_status_to_can_state() 881 bec->txerr, bec->rxerr); in kvaser_usb_hydra_bus_status_to_can_state() 883 } else if (bec->txerr >= 96 || bec->rxerr >= 96) { in kvaser_usb_hydra_bus_status_to_can_state() 893 const struct can_berr_counter *bec) in kvaser_usb_hydra_update_state() argument 903 kvaser_usb_hydra_bus_status_to_can_state(priv, bus_status, bec, in kvaser_usb_hydra_update_state() 920 tx_state = (bec->txerr >= bec->rxerr) ? in kvaser_usb_hydra_update_state() 922 rx_state = (bec->txerr <= bec->rxerr) ? in kvaser_usb_hydra_update_state() 946 cf->data[6] = bec->txerr; in kvaser_usb_hydra_update_state() 947 cf->data[7] = bec->rxerr; in kvaser_usb_hydra_update_state() [all …]
|
D | kvaser_usb.h | 113 struct can_berr_counter bec; member 168 struct can_berr_counter *bec);
|
D | kvaser_usb_leaf.c | 1025 priv->bec.txerr = es->txerr; in kvaser_usb_leaf_rx_error_update_can_state() 1026 priv->bec.rxerr = es->rxerr; in kvaser_usb_leaf_rx_error_update_can_state() 1159 if (es->txerr != priv->bec.txerr) { in kvaser_usb_leaf_usbcan_conditionally_rx_error() 1163 if (es->rxerr != priv->bec.rxerr) { in kvaser_usb_leaf_usbcan_conditionally_rx_error() 1782 struct can_berr_counter *bec) in kvaser_usb_leaf_get_berr_counter() argument 1786 *bec = priv->bec; in kvaser_usb_leaf_get_berr_counter()
|
/kernel/linux/linux-5.10/drivers/net/can/usb/ |
D | mcba_usb.c | 80 struct can_berr_counter bec; member 514 priv->bec.txerr = msg->tx_err_cnt; in mcba_usb_process_ka_can() 515 priv->bec.rxerr = msg->rx_err_cnt; in mcba_usb_process_ka_can() 520 else if ((priv->bec.txerr > MCBA_CAN_STATE_ERR_PSV_TH) || in mcba_usb_process_ka_can() 521 (priv->bec.rxerr > MCBA_CAN_STATE_ERR_PSV_TH)) in mcba_usb_process_ka_can() 524 else if ((priv->bec.txerr > MCBA_CAN_STATE_WRN_TH) || in mcba_usb_process_ka_can() 525 (priv->bec.rxerr > MCBA_CAN_STATE_WRN_TH)) in mcba_usb_process_ka_can() 758 struct can_berr_counter *bec) in mcba_net_get_berr_counter() argument 762 bec->txerr = priv->bec.txerr; in mcba_net_get_berr_counter() 763 bec->rxerr = priv->bec.rxerr; in mcba_net_get_berr_counter()
|
D | usb_8dev.c | 135 struct can_berr_counter bec; member 450 priv->bec.txerr = txerr; in usb_8dev_rx_err_msg() 451 priv->bec.rxerr = rxerr; in usb_8dev_rx_err_msg() 717 struct can_berr_counter *bec) in usb_8dev_get_berr_counter() argument 721 bec->txerr = priv->bec.txerr; in usb_8dev_get_berr_counter() 722 bec->rxerr = priv->bec.rxerr; in usb_8dev_get_berr_counter()
|
D | esd_usb2.c | 213 struct can_berr_counter bec; member 301 priv->bec.txerr = txerr; in esd_usb2_rx_event() 302 priv->bec.rxerr = rxerr; in esd_usb2_rx_event() 961 struct can_berr_counter *bec) in esd_usb2_get_berr_counter() argument 965 bec->txerr = priv->bec.txerr; in esd_usb2_get_berr_counter() 966 bec->rxerr = priv->bec.rxerr; in esd_usb2_get_berr_counter()
|
/kernel/linux/linux-5.10/drivers/net/can/c_can/ |
D | c_can.c | 685 struct can_berr_counter *bec) in __c_can_get_berr_counter() argument 691 bec->rxerr = (reg_err_counter & ERR_CNT_REC_MASK) >> in __c_can_get_berr_counter() 693 bec->txerr = reg_err_counter & ERR_CNT_TEC_MASK; in __c_can_get_berr_counter() 699 struct can_berr_counter *bec) in c_can_get_berr_counter() argument 705 err = __c_can_get_berr_counter(dev, bec); in c_can_get_berr_counter() 894 struct can_berr_counter bec; in c_can_handle_state_change() local 924 __c_can_get_berr_counter(dev, &bec); in c_can_handle_state_change() 934 cf->data[6] = bec.txerr; in c_can_handle_state_change() 935 cf->data[7] = bec.rxerr; in c_can_handle_state_change() 940 cf->data[1] = (bec.txerr > bec.rxerr) ? in c_can_handle_state_change() [all …]
|
/kernel/linux/linux-5.10/drivers/net/can/ifi_canfd/ |
D | ifi_canfd.c | 441 struct can_berr_counter *bec) in ifi_canfd_get_berr_counter() argument 447 bec->rxerr = (err >> IFI_CANFD_ERROR_RX_OFFSET) & in ifi_canfd_get_berr_counter() 449 bec->txerr = (err >> IFI_CANFD_ERROR_TX_OFFSET) & in ifi_canfd_get_berr_counter() 462 struct can_berr_counter bec; in ifi_canfd_handle_state_change() local 496 ifi_canfd_get_berr_counter(ndev, &bec); in ifi_canfd_handle_state_change() 502 cf->data[1] = (bec.txerr > bec.rxerr) ? in ifi_canfd_handle_state_change() 505 cf->data[6] = bec.txerr; in ifi_canfd_handle_state_change() 506 cf->data[7] = bec.rxerr; in ifi_canfd_handle_state_change() 512 if (bec.txerr > 127) in ifi_canfd_handle_state_change() 514 cf->data[6] = bec.txerr; in ifi_canfd_handle_state_change() [all …]
|
/kernel/linux/linux-5.10/drivers/net/can/m_can/ |
D | m_can.c | 599 struct can_berr_counter *bec) in __m_can_get_berr_counter() argument 605 bec->rxerr = (ecr & ECR_REC_MASK) >> ECR_REC_SHIFT; in __m_can_get_berr_counter() 606 bec->txerr = (ecr & ECR_TEC_MASK) >> ECR_TEC_SHIFT; in __m_can_get_berr_counter() 634 struct can_berr_counter *bec) in m_can_get_berr_counter() argument 643 __m_can_get_berr_counter(dev, bec); in m_can_get_berr_counter() 657 struct can_berr_counter bec; in m_can_handle_state_change() local 687 __m_can_get_berr_counter(dev, &bec); in m_can_handle_state_change() 693 cf->data[1] = (bec.txerr > bec.rxerr) ? in m_can_handle_state_change() 696 cf->data[6] = bec.txerr; in m_can_handle_state_change() 697 cf->data[7] = bec.rxerr; in m_can_handle_state_change() [all …]
|
/kernel/linux/linux-5.10/drivers/net/can/spi/mcp251xfd/ |
D | mcp251xfd-core.c | 1098 struct can_berr_counter *bec) in __mcp251xfd_get_berr_counter() argument 1109 bec->txerr = 256; in __mcp251xfd_get_berr_counter() 1111 bec->txerr = FIELD_GET(MCP251XFD_REG_TREC_TEC_MASK, trec); in __mcp251xfd_get_berr_counter() 1112 bec->rxerr = FIELD_GET(MCP251XFD_REG_TREC_REC_MASK, trec); in __mcp251xfd_get_berr_counter() 1118 struct can_berr_counter *bec) in mcp251xfd_get_berr_counter() argument 1130 *bec = priv->bec; in mcp251xfd_get_berr_counter() 1134 return __mcp251xfd_get_berr_counter(ndev, bec); in mcp251xfd_get_berr_counter() 1736 err = __mcp251xfd_get_berr_counter(priv->ndev, &priv->bec); in mcp251xfd_handle_cerrif() 1748 struct can_berr_counter bec; in mcp251xfd_handle_cerrif() local 1750 err = mcp251xfd_get_berr_counter(priv->ndev, &bec); in mcp251xfd_handle_cerrif() [all …]
|
/kernel/linux/linux-5.10/drivers/net/can/sja1000/ |
D | sja1000.c | 265 struct can_berr_counter *bec) in sja1000_get_berr_counter() argument 269 bec->txerr = priv->read_reg(priv, SJA1000_TXERR); in sja1000_get_berr_counter() 270 bec->rxerr = priv->read_reg(priv, SJA1000_RXERR); in sja1000_get_berr_counter()
|
/kernel/linux/linux-5.10/drivers/net/can/mscan/ |
D | mscan.c | 527 struct can_berr_counter *bec) in mscan_get_berr_counter() argument 532 bec->txerr = in_8(®s->cantxerr); in mscan_get_berr_counter() 533 bec->rxerr = in_8(®s->canrxerr); in mscan_get_berr_counter()
|
/kernel/linux/linux-5.10/drivers/net/can/dev/ |
D | dev.c | 1168 struct can_berr_counter bec = { }; in can_fill_info() local 1188 !priv->do_get_berr_counter(dev, &bec) && in can_fill_info() 1189 nla_put(skb, IFLA_CAN_BERR_COUNTER, sizeof(bec), &bec)) || in can_fill_info()
|
/kernel/linux/linux-5.10/include/linux/can/ |
D | dev.h | 70 struct can_berr_counter *bec);
|
/kernel/linux/linux-5.10/drivers/net/can/cc770/ |
D | cc770.c | 375 struct can_berr_counter *bec) in cc770_get_berr_counter() argument 379 bec->txerr = cc770_read_reg(priv, tx_error_counter); in cc770_get_berr_counter() 380 bec->rxerr = cc770_read_reg(priv, rx_error_counter); in cc770_get_berr_counter()
|