Home
last modified time | relevance | path

Searched refs:bec (Results 1 – 25 of 34) sorted by relevance

12

/kernel/linux/linux-5.10/drivers/net/can/usb/peak_usb/
Dpcan_usb.c128 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 …]
Dpcan_usb_fd.c63 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 …]
Dpcan_usb_core.h70 struct can_berr_counter *bec);
/kernel/linux/linux-5.10/drivers/net/can/
Dkvaser_pciefd.c265 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 …]
Dat91_can.c371 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 …]
Dflexcan.c718 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()
Djanz-ican3.c237 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()
Dsun4i_can.c294 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/
Dpeak_canfd.c330 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 …]
Dpeak_canfd_user.h20 struct can_berr_counter bec; /* rx/tx err counters */ member
/kernel/linux/linux-5.10/drivers/net/can/usb/kvaser_usb/
Dkvaser_usb_hydra.c870 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 …]
Dkvaser_usb.h113 struct can_berr_counter bec; member
168 struct can_berr_counter *bec);
Dkvaser_usb_leaf.c1025 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/
Dmcba_usb.c80 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()
Dusb_8dev.c135 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()
Desd_usb2.c213 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/
Dc_can.c685 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/
Difi_canfd.c441 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/
Dm_can.c599 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/
Dmcp251xfd-core.c1098 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/
Dsja1000.c265 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/
Dmscan.c527 struct can_berr_counter *bec) in mscan_get_berr_counter() argument
532 bec->txerr = in_8(&regs->cantxerr); in mscan_get_berr_counter()
533 bec->rxerr = in_8(&regs->canrxerr); in mscan_get_berr_counter()
/kernel/linux/linux-5.10/drivers/net/can/dev/
Ddev.c1168 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/
Ddev.h70 struct can_berr_counter *bec);
/kernel/linux/linux-5.10/drivers/net/can/cc770/
Dcc770.c375 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()

12