Home
last modified time | relevance | path

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

/drivers/net/can/
Dat91_can.c375 struct can_berr_counter *bec) in at91_get_berr_counter() argument
380 bec->rxerr = reg_ecr & 0xff; in at91_get_berr_counter()
381 bec->txerr = reg_ecr >> 16; in at91_get_berr_counter()
884 struct can_berr_counter bec; in at91_irq_err_state() local
886 at91_get_berr_counter(dev, &bec); in at91_irq_err_state()
901 cf->data[1] = (bec.txerr > bec.rxerr) ? in at91_irq_err_state()
917 cf->data[1] = (bec.txerr > bec.rxerr) ? in at91_irq_err_state()
990 struct can_berr_counter bec; in at91_get_state_by_bec() local
993 err = at91_get_berr_counter(dev, &bec); in at91_get_state_by_bec()
997 if (bec.txerr < 96 && bec.rxerr < 96) in at91_get_state_by_bec()
[all …]
Dflexcan.c439 struct can_berr_counter *bec) in __flexcan_get_berr_counter() argument
445 bec->txerr = (reg >> 0) & 0xff; in __flexcan_get_berr_counter()
446 bec->rxerr = (reg >> 8) & 0xff; in __flexcan_get_berr_counter()
452 struct can_berr_counter *bec) in flexcan_get_berr_counter() argument
465 err = __flexcan_get_berr_counter(dev, bec); in flexcan_get_berr_counter()
596 struct can_berr_counter bec; in flexcan_poll_state() local
606 __flexcan_get_berr_counter(dev, &bec); in flexcan_poll_state()
609 rx_state = bec.rxerr >= bec.txerr ? new_state : 0; in flexcan_poll_state()
610 tx_state = bec.rxerr <= bec.txerr ? new_state : 0; in flexcan_poll_state()
Djanz-ican3.c224 struct can_berr_counter bec; member
1139 mod->bec.rxerr = msg->data[5]; in ican3_handle_inquiry()
1140 mod->bec.txerr = msg->data[6]; in ican3_handle_inquiry()
1713 struct can_berr_counter *bec) in ican3_get_berr_counter() argument
1727 bec->rxerr = mod->bec.rxerr; in ican3_get_berr_counter()
1728 bec->txerr = mod->bec.txerr; in ican3_get_berr_counter()
Ddev.c990 struct can_berr_counter bec = { }; in can_fill_info() local
1010 !priv->do_get_berr_counter(dev, &bec) && in can_fill_info()
1011 nla_put(skb, IFLA_CAN_BERR_COUNTER, sizeof(bec), &bec)) || in can_fill_info()
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()
Dbfin_can.c328 struct can_berr_counter *bec) in bfin_can_get_berr_counter() argument
335 bec->txerr = cec >> 8; in bfin_can_get_berr_counter()
336 bec->rxerr = cec; in bfin_can_get_berr_counter()
Drcar_can.c721 struct can_berr_counter *bec) in rcar_can_get_berr_counter() argument
729 bec->txerr = readb(&priv->regs->tecr); in rcar_can_get_berr_counter()
730 bec->rxerr = readb(&priv->regs->recr); in rcar_can_get_berr_counter()
Dti_hecc.c453 struct can_berr_counter *bec) in ti_hecc_get_berr_counter() argument
457 bec->txerr = hecc_read(priv, HECC_CANTEC); in ti_hecc_get_berr_counter()
458 bec->rxerr = hecc_read(priv, HECC_CANREC); in ti_hecc_get_berr_counter()
Dxilinx_can.c1095 struct can_berr_counter *bec) in xcan_get_berr_counter() argument
1108 bec->txerr = priv->read_reg(priv, XCAN_ECR_OFFSET) & XCAN_ECR_TEC_MASK; in xcan_get_berr_counter()
1109 bec->rxerr = ((priv->read_reg(priv, XCAN_ECR_OFFSET) & in xcan_get_berr_counter()
Dpch_can.c1168 struct can_berr_counter *bec) in pch_can_get_berr_counter() argument
1173 bec->txerr = errc & PCH_TEC; in pch_can_get_berr_counter()
1174 bec->rxerr = (errc & PCH_REC) >> 8; in pch_can_get_berr_counter()
Dgrcan.c451 struct can_berr_counter *bec) in grcan_get_berr_counter() argument
457 bec->txerr = (status & GRCAN_STAT_TXERRCNT) >> GRCAN_STAT_TXERRCNT_BIT; in grcan_get_berr_counter()
458 bec->rxerr = (status & GRCAN_STAT_RXERRCNT) >> GRCAN_STAT_RXERRCNT_BIT; in grcan_get_berr_counter()
/drivers/net/can/usb/peak_usb/
Dpcan_usb_fd.c71 struct can_berr_counter bec; member
564 pdev->bec.txerr = 0; in pcan_usb_fd_decode_status()
565 pdev->bec.rxerr = 0; in pcan_usb_fd_decode_status()
573 tx_state = (pdev->bec.txerr >= pdev->bec.rxerr) ? new_state : 0; in pcan_usb_fd_decode_status()
574 rx_state = (pdev->bec.txerr <= pdev->bec.rxerr) ? new_state : 0; in pcan_usb_fd_decode_status()
612 pdev->bec.txerr = er->tx_err_cnt; in pcan_usb_fd_decode_error()
613 pdev->bec.rxerr = er->rx_err_cnt; in pcan_usb_fd_decode_error()
828 pdev->bec.txerr = 0; in pcan_usb_fd_start()
829 pdev->bec.rxerr = 0; in pcan_usb_fd_start()
836 struct can_berr_counter *bec) in pcan_usb_fd_get_berr_counter() argument
[all …]
Dpcan_usb_core.h76 struct can_berr_counter *bec);
/drivers/net/can/c_can/
Dc_can.c694 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()
903 struct can_berr_counter bec; in c_can_handle_state_change() local
930 __c_can_get_berr_counter(dev, &bec); in c_can_handle_state_change()
939 cf->data[1] = (bec.txerr > bec.rxerr) ? in c_can_handle_state_change()
942 cf->data[6] = bec.txerr; in c_can_handle_state_change()
943 cf->data[7] = bec.rxerr; in c_can_handle_state_change()
[all …]
/drivers/net/can/m_can/
Dm_can.c525 struct can_berr_counter *bec) in __m_can_get_berr_counter() argument
531 bec->rxerr = (ecr & ECR_REC_MASK) >> ECR_REC_SHIFT; in __m_can_get_berr_counter()
532 bec->txerr = ecr & ECR_TEC_MASK; in __m_can_get_berr_counter()
538 struct can_berr_counter *bec) in m_can_get_berr_counter() argument
553 __m_can_get_berr_counter(dev, bec); in m_can_get_berr_counter()
568 struct can_berr_counter bec; in m_can_handle_state_change() local
598 __m_can_get_berr_counter(dev, &bec); in m_can_handle_state_change()
604 cf->data[1] = (bec.txerr > bec.rxerr) ? in m_can_handle_state_change()
607 cf->data[6] = bec.txerr; in m_can_handle_state_change()
608 cf->data[7] = bec.rxerr; in m_can_handle_state_change()
[all …]
/drivers/net/can/usb/
Dusb_8dev.c146 struct can_berr_counter bec; member
460 priv->bec.txerr = txerr; in usb_8dev_rx_err_msg()
461 priv->bec.rxerr = rxerr; in usb_8dev_rx_err_msg()
731 struct can_berr_counter *bec) in usb_8dev_get_berr_counter() argument
735 bec->txerr = priv->bec.txerr; in usb_8dev_get_berr_counter()
736 bec->rxerr = priv->bec.rxerr; in usb_8dev_get_berr_counter()
Desd_usb2.c225 struct can_berr_counter bec; member
305 priv->bec.txerr = txerr; in esd_usb2_rx_event()
306 priv->bec.rxerr = rxerr; in esd_usb2_rx_event()
968 struct can_berr_counter *bec) in esd_usb2_get_berr_counter() argument
972 bec->txerr = priv->bec.txerr; in esd_usb2_get_berr_counter()
973 bec->rxerr = priv->bec.rxerr; in esd_usb2_get_berr_counter()
Dkvaser_usb.c487 struct can_berr_counter bec; member
915 priv->bec.txerr = es->txerr; in kvaser_usb_rx_error_update_can_state()
916 priv->bec.rxerr = es->rxerr; in kvaser_usb_rx_error_update_can_state()
1030 if (es->txerr != priv->bec.txerr) { in kvaser_usbcan_conditionally_rx_error()
1034 if (es->rxerr != priv->bec.rxerr) { in kvaser_usbcan_conditionally_rx_error()
1895 struct can_berr_counter *bec) in kvaser_usb_get_berr_counter() argument
1899 *bec = priv->bec; in kvaser_usb_get_berr_counter()
/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()
/drivers/net/can/mscan/
Dmscan.c537 struct can_berr_counter *bec) in mscan_get_berr_counter() argument
542 bec->txerr = in_8(&regs->cantxerr); in mscan_get_berr_counter()
543 bec->rxerr = in_8(&regs->canrxerr); in mscan_get_berr_counter()
/drivers/net/can/cc770/
Dcc770.c383 struct can_berr_counter *bec) in cc770_get_berr_counter() argument
387 bec->txerr = cc770_read_reg(priv, tx_error_counter); in cc770_get_berr_counter()
388 bec->rxerr = cc770_read_reg(priv, rx_error_counter); in cc770_get_berr_counter()