/linux-6.1.9/drivers/net/can/ |
D | kvaser_pciefd.c | 261 struct can_berr_counter bec; member 640 can->bec.txerr = 0; in kvaser_pciefd_bus_on() 641 can->bec.rxerr = 0; in kvaser_pciefd_bus_on() 899 struct can_berr_counter *bec) in kvaser_pciefd_get_berr_counter() argument 903 bec->rxerr = can->bec.rxerr; in kvaser_pciefd_get_berr_counter() 904 bec->txerr = can->bec.txerr; in kvaser_pciefd_get_berr_counter() 952 can->bec.txerr = 0; in kvaser_pciefd_setup_can_ctrls() 953 can->bec.rxerr = 0; in kvaser_pciefd_setup_can_ctrls() 1235 struct can_berr_counter *bec, in kvaser_pciefd_packet_to_state() argument 1243 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() 872 struct can_berr_counter bec; in at91_irq_err_state() local 874 at91_get_berr_counter(dev, &bec); in at91_irq_err_state() 888 cf->data[1] = (bec.txerr > bec.rxerr) ? in at91_irq_err_state() 904 cf->data[1] = (bec.txerr > bec.rxerr) ? in at91_irq_err_state() 975 struct can_berr_counter bec; in at91_get_state_by_bec() local 978 err = at91_get_berr_counter(dev, &bec); in at91_get_state_by_bec() 982 if (bec.txerr < 96 && bec.rxerr < 96) in at91_get_state_by_bec() [all …]
|
D | janz-ican3.c | 238 struct can_berr_counter bec; member 1184 mod->bec.rxerr = msg->data[5]; in ican3_handle_inquiry() 1185 mod->bec.txerr = msg->data[6]; in ican3_handle_inquiry() 1804 struct can_berr_counter *bec) in ican3_get_berr_counter() argument 1818 bec->rxerr = mod->bec.rxerr; in ican3_get_berr_counter() 1819 bec->txerr = mod->bec.txerr; in ican3_get_berr_counter()
|
D | sun4i_can.c | 305 struct can_berr_counter *bec) in sun4ican_get_berr_counter() argument 319 bec->txerr = errors & 0xFF; in sun4ican_get_berr_counter() 320 bec->rxerr = (errors >> 16) & 0xFF; in sun4ican_get_berr_counter()
|
/linux-6.1.9/drivers/net/can/peak_canfd/ |
D | peak_canfd.c | 331 priv->bec.txerr = msg->tx_err_cnt; in pucan_handle_error() 332 priv->bec.rxerr = msg->rx_err_cnt; in pucan_handle_error() 378 cf->data[1] = (priv->bec.txerr > priv->bec.rxerr) ? in pucan_handle_status() 381 cf->data[6] = priv->bec.txerr; in pucan_handle_status() 382 cf->data[7] = priv->bec.rxerr; in pucan_handle_status() 391 cf->data[1] = (priv->bec.txerr > priv->bec.rxerr) ? in pucan_handle_status() 394 cf->data[6] = priv->bec.txerr; in pucan_handle_status() 395 cf->data[7] = priv->bec.rxerr; in pucan_handle_status() 437 cf->data[6] = priv->bec.txerr; in pucan_handle_cache_critical() 438 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
|
/linux-6.1.9/drivers/net/can/usb/kvaser_usb/ |
D | kvaser_usb_hydra.c | 892 const struct can_berr_counter *bec, in kvaser_usb_hydra_bus_status_to_can_state() argument 900 if (bec->txerr >= 128 || bec->rxerr >= 128) { in kvaser_usb_hydra_bus_status_to_can_state() 903 bec->txerr, bec->rxerr); in kvaser_usb_hydra_bus_status_to_can_state() 905 } else if (bec->txerr >= 96 || bec->rxerr >= 96) { in kvaser_usb_hydra_bus_status_to_can_state() 915 const struct can_berr_counter *bec) in kvaser_usb_hydra_update_state() argument 924 kvaser_usb_hydra_bus_status_to_can_state(priv, bus_status, bec, in kvaser_usb_hydra_update_state() 941 tx_state = (bec->txerr >= bec->rxerr) ? in kvaser_usb_hydra_update_state() 943 rx_state = (bec->txerr <= bec->rxerr) ? in kvaser_usb_hydra_update_state() 968 cf->data[6] = bec->txerr; in kvaser_usb_hydra_update_state() 969 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 | 1021 priv->bec.txerr = es->txerr; in kvaser_usb_leaf_rx_error_update_can_state() 1022 priv->bec.rxerr = es->rxerr; in kvaser_usb_leaf_rx_error_update_can_state() 1154 if (es->txerr != priv->bec.txerr) { in kvaser_usb_leaf_usbcan_conditionally_rx_error() 1158 if (es->rxerr != priv->bec.rxerr) { in kvaser_usb_leaf_usbcan_conditionally_rx_error() 1778 struct can_berr_counter *bec) in kvaser_usb_leaf_get_berr_counter() argument 1782 *bec = priv->bec; in kvaser_usb_leaf_get_berr_counter()
|
/linux-6.1.9/drivers/net/can/usb/peak_usb/ |
D | pcan_usb.c | 135 struct can_berr_counter bec; member 484 new_state = ((mc->pdev->bec.txerr >= 128) || in pcan_usb_decode_error() 485 (mc->pdev->bec.rxerr >= 128)) ? in pcan_usb_decode_error() 495 (mc->pdev->bec.txerr >= mc->pdev->bec.rxerr) ? in pcan_usb_decode_error() 498 (mc->pdev->bec.txerr <= mc->pdev->bec.rxerr) ? in pcan_usb_decode_error() 510 cf->data[6] = mc->pdev->bec.txerr; in pcan_usb_decode_error() 511 cf->data[7] = mc->pdev->bec.rxerr; in pcan_usb_decode_error() 543 pdev->bec.rxerr = mc->ptr[1]; in pcan_usb_handle_bus_evt() 544 pdev->bec.txerr = mc->ptr[2]; in pcan_usb_handle_bus_evt() 820 struct can_berr_counter *bec) in pcan_usb_get_berr_counter() argument [all …]
|
D | pcan_usb_fd.c | 72 struct can_berr_counter bec; member 574 pdev->bec.txerr = 0; in pcan_usb_fd_decode_status() 575 pdev->bec.rxerr = 0; in pcan_usb_fd_decode_status() 583 tx_state = (pdev->bec.txerr >= pdev->bec.rxerr) ? new_state : 0; in pcan_usb_fd_decode_status() 584 rx_state = (pdev->bec.txerr <= pdev->bec.rxerr) ? new_state : 0; in pcan_usb_fd_decode_status() 618 pdev->bec.txerr = er->tx_err_cnt; in pcan_usb_fd_decode_error() 619 pdev->bec.rxerr = er->rx_err_cnt; in pcan_usb_fd_decode_error() 839 pdev->bec.txerr = 0; in pcan_usb_fd_start() 840 pdev->bec.rxerr = 0; in pcan_usb_fd_start() 847 struct can_berr_counter *bec) in pcan_usb_fd_get_berr_counter() argument [all …]
|
D | pcan_usb_core.h | 72 struct can_berr_counter *bec);
|
/linux-6.1.9/drivers/net/can/usb/ |
D | mcba_usb.c | 79 struct can_berr_counter bec; member 508 priv->bec.txerr = msg->tx_err_cnt; in mcba_usb_process_ka_can() 509 priv->bec.rxerr = msg->rx_err_cnt; in mcba_usb_process_ka_can() 514 else if ((priv->bec.txerr > MCBA_CAN_STATE_ERR_PSV_TH) || in mcba_usb_process_ka_can() 515 (priv->bec.rxerr > MCBA_CAN_STATE_ERR_PSV_TH)) in mcba_usb_process_ka_can() 518 else if ((priv->bec.txerr > MCBA_CAN_STATE_WRN_TH) || in mcba_usb_process_ka_can() 519 (priv->bec.rxerr > MCBA_CAN_STATE_WRN_TH)) in mcba_usb_process_ka_can() 750 struct can_berr_counter *bec) in mcba_net_get_berr_counter() argument 754 bec->txerr = priv->bec.txerr; in mcba_net_get_berr_counter() 755 bec->rxerr = priv->bec.rxerr; in mcba_net_get_berr_counter()
|
D | usb_8dev.c | 132 struct can_berr_counter bec; member 448 priv->bec.txerr = txerr; in usb_8dev_rx_err_msg() 449 priv->bec.rxerr = rxerr; in usb_8dev_rx_err_msg() 707 struct can_berr_counter *bec) in usb_8dev_get_berr_counter() argument 711 bec->txerr = priv->bec.txerr; in usb_8dev_get_berr_counter() 712 bec->rxerr = priv->bec.rxerr; in usb_8dev_get_berr_counter()
|
D | esd_usb.c | 220 struct can_berr_counter bec; member 307 priv->bec.txerr = txerr; in esd_usb_rx_event() 308 priv->bec.rxerr = rxerr; in esd_usb_rx_event() 958 struct can_berr_counter *bec) in esd_usb_get_berr_counter() argument 962 bec->txerr = priv->bec.txerr; in esd_usb_get_berr_counter() 963 bec->rxerr = priv->bec.rxerr; in esd_usb_get_berr_counter()
|
/linux-6.1.9/drivers/net/can/ctucanfd/ |
D | ctucanfd_base.c | 784 static void ctucan_get_rec_tec(struct ctucan_priv *priv, struct can_berr_counter *bec) in ctucan_get_rec_tec() argument 788 bec->rxerr = FIELD_GET(REG_REC_REC_VAL, err_ctrs); in ctucan_get_rec_tec() 789 bec->txerr = FIELD_GET(REG_REC_TEC_VAL, err_ctrs); in ctucan_get_rec_tec() 807 struct can_berr_counter bec; in ctucan_err_interrupt() local 811 ctucan_get_rec_tec(priv, &bec); in ctucan_err_interrupt() 817 __func__, isr, bec.rxerr, bec.txerr, in ctucan_err_interrupt() 851 cf->data[1] = (bec.rxerr > 127) ? in ctucan_err_interrupt() 854 cf->data[6] = bec.txerr; in ctucan_err_interrupt() 855 cf->data[7] = bec.rxerr; in ctucan_err_interrupt() 862 cf->data[1] |= (bec.txerr > bec.rxerr) ? in ctucan_err_interrupt() [all …]
|
/linux-6.1.9/drivers/net/can/c_can/ |
D | c_can_main.c | 694 struct can_berr_counter *bec) in __c_can_get_berr_counter() argument 700 bec->rxerr = (reg_err_counter & ERR_CNT_REC_MASK) >> in __c_can_get_berr_counter() 702 bec->txerr = reg_err_counter & ERR_CNT_TEC_MASK; in __c_can_get_berr_counter() 708 struct can_berr_counter *bec) in c_can_get_berr_counter() argument 714 err = __c_can_get_berr_counter(dev, bec); in c_can_get_berr_counter() 917 struct can_berr_counter bec; in c_can_handle_state_change() local 947 __c_can_get_berr_counter(dev, &bec); in c_can_handle_state_change() 956 cf->data[6] = bec.txerr; in c_can_handle_state_change() 957 cf->data[7] = bec.rxerr; in c_can_handle_state_change() 962 cf->data[1] = (bec.txerr > bec.rxerr) ? in c_can_handle_state_change() [all …]
|
/linux-6.1.9/drivers/net/can/ifi_canfd/ |
D | ifi_canfd.c | 437 struct can_berr_counter *bec) in ifi_canfd_get_berr_counter() argument 443 bec->rxerr = (err >> IFI_CANFD_ERROR_RX_OFFSET) & in ifi_canfd_get_berr_counter() 445 bec->txerr = (err >> IFI_CANFD_ERROR_TX_OFFSET) & in ifi_canfd_get_berr_counter() 457 struct can_berr_counter bec; in ifi_canfd_handle_state_change() local 491 ifi_canfd_get_berr_counter(ndev, &bec); in ifi_canfd_handle_state_change() 497 cf->data[1] = (bec.txerr > bec.rxerr) ? in ifi_canfd_handle_state_change() 500 cf->data[6] = bec.txerr; in ifi_canfd_handle_state_change() 501 cf->data[7] = bec.rxerr; in ifi_canfd_handle_state_change() 507 if (bec.txerr > 127) in ifi_canfd_handle_state_change() 509 cf->data[6] = bec.txerr; in ifi_canfd_handle_state_change() [all …]
|
/linux-6.1.9/drivers/net/can/m_can/ |
D | m_can.c | 660 struct can_berr_counter *bec) in __m_can_get_berr_counter() argument 666 bec->rxerr = FIELD_GET(ECR_REC_MASK, ecr); in __m_can_get_berr_counter() 667 bec->txerr = FIELD_GET(ECR_TEC_MASK, ecr); in __m_can_get_berr_counter() 687 struct can_berr_counter *bec) in m_can_get_berr_counter() argument 696 __m_can_get_berr_counter(dev, bec); in m_can_get_berr_counter() 709 struct can_berr_counter bec; in m_can_handle_state_change() local 740 __m_can_get_berr_counter(dev, &bec); in m_can_handle_state_change() 746 cf->data[1] = (bec.txerr > bec.rxerr) ? in m_can_handle_state_change() 749 cf->data[6] = bec.txerr; in m_can_handle_state_change() 750 cf->data[7] = bec.rxerr; in m_can_handle_state_change() [all …]
|
/linux-6.1.9/drivers/net/can/spi/mcp251xfd/ |
D | mcp251xfd-core.c | 823 struct can_berr_counter *bec) in __mcp251xfd_get_berr_counter() argument 834 bec->txerr = 256; in __mcp251xfd_get_berr_counter() 836 bec->txerr = FIELD_GET(MCP251XFD_REG_TREC_TEC_MASK, trec); in __mcp251xfd_get_berr_counter() 837 bec->rxerr = FIELD_GET(MCP251XFD_REG_TREC_REC_MASK, trec); in __mcp251xfd_get_berr_counter() 843 struct can_berr_counter *bec) in mcp251xfd_get_berr_counter() argument 855 *bec = priv->bec; in mcp251xfd_get_berr_counter() 859 return __mcp251xfd_get_berr_counter(ndev, bec); in mcp251xfd_get_berr_counter() 1085 err = __mcp251xfd_get_berr_counter(priv->ndev, &priv->bec); in mcp251xfd_handle_cerrif() 1097 struct can_berr_counter bec; in mcp251xfd_handle_cerrif() local 1099 err = mcp251xfd_get_berr_counter(priv->ndev, &bec); in mcp251xfd_handle_cerrif() [all …]
|
/linux-6.1.9/drivers/net/can/dev/ |
D | netlink.c | 508 struct can_berr_counter bec = { }; in can_fill_info() local 529 !priv->do_get_berr_counter(dev, &bec) && in can_fill_info() 530 nla_put(skb, IFLA_CAN_BERR_COUNTER, sizeof(bec), &bec)) || in can_fill_info()
|
/linux-6.1.9/drivers/net/can/flexcan/ |
D | flexcan-core.c | 707 struct can_berr_counter *bec) in __flexcan_get_berr_counter() argument 713 bec->txerr = (reg >> 0) & 0xff; in __flexcan_get_berr_counter() 714 bec->rxerr = (reg >> 8) & 0xff; in __flexcan_get_berr_counter() 720 struct can_berr_counter *bec) in flexcan_get_berr_counter() argument 729 err = __flexcan_get_berr_counter(dev, bec); in flexcan_get_berr_counter() 858 struct can_berr_counter bec; in flexcan_irq_state() local 870 __flexcan_get_berr_counter(dev, &bec); in flexcan_irq_state() 873 rx_state = bec.rxerr >= bec.txerr ? new_state : 0; in flexcan_irq_state() 874 tx_state = bec.rxerr <= bec.txerr ? new_state : 0; in flexcan_irq_state()
|
/linux-6.1.9/drivers/net/can/sja1000/ |
D | sja1000.c | 267 struct can_berr_counter *bec) in sja1000_get_berr_counter() argument 271 bec->txerr = priv->read_reg(priv, SJA1000_TXERR); in sja1000_get_berr_counter() 272 bec->rxerr = priv->read_reg(priv, SJA1000_RXERR); in sja1000_get_berr_counter()
|
/linux-6.1.9/drivers/net/can/mscan/ |
D | mscan.c | 529 struct can_berr_counter *bec) in mscan_get_berr_counter() argument 534 bec->txerr = in_8(®s->cantxerr); in mscan_get_berr_counter() 535 bec->rxerr = in_8(®s->canrxerr); in mscan_get_berr_counter()
|
/linux-6.1.9/include/linux/can/ |
D | dev.h | 86 struct can_berr_counter *bec);
|