Lines Matching refs:esr
158 u32 esr; /* 0x18 - error status */ member
466 static void bxcan_handle_state_change(struct net_device *ndev, u32 esr) in bxcan_handle_state_change() argument
476 if (!(esr & (BXCAN_ESR_EWGF | BXCAN_ESR_EPVF | BXCAN_ESR_BOFF))) in bxcan_handle_state_change()
479 bec.txerr = FIELD_GET(BXCAN_ESR_TEC_MASK, esr); in bxcan_handle_state_change()
480 bec.rxerr = FIELD_GET(BXCAN_ESR_REC_MASK, esr); in bxcan_handle_state_change()
482 if (esr & BXCAN_ESR_BOFF) in bxcan_handle_state_change()
484 else if (esr & BXCAN_ESR_EPVF) in bxcan_handle_state_change()
486 else if (esr & BXCAN_ESR_EWGF) in bxcan_handle_state_change()
517 static void bxcan_handle_bus_err(struct net_device *ndev, u32 esr) in bxcan_handle_bus_err() argument
524 lec_code = FIELD_GET(BXCAN_ESR_LEC_MASK, esr); in bxcan_handle_bus_err()
607 u32 msr, esr; in bxcan_state_change_isr() local
613 esr = readl(®s->esr); in bxcan_state_change_isr()
614 bxcan_handle_state_change(ndev, esr); in bxcan_state_change_isr()
617 bxcan_handle_bus_err(ndev, esr); in bxcan_state_change_isr()
702 bxcan_rmw(priv, ®s->esr, BXCAN_ESR_LEC_MASK, in bxcan_chip_start()
916 u32 esr; in bxcan_get_berr_counter() local
923 esr = readl(®s->esr); in bxcan_get_berr_counter()
924 bec->txerr = FIELD_GET(BXCAN_ESR_TEC_MASK, esr); in bxcan_get_berr_counter()
925 bec->rxerr = FIELD_GET(BXCAN_ESR_REC_MASK, esr); in bxcan_get_berr_counter()