Lines Matching refs:es

821 						 const struct kvaser_usb_error_summary *es,  in kvaser_usb_rx_error_update_can_state()  argument
828 netdev_dbg(priv->netdev, "Error status: 0x%02x\n", es->status); in kvaser_usb_rx_error_update_can_state()
832 if (es->status & (M16C_STATE_BUS_OFF | M16C_STATE_BUS_RESET)) in kvaser_usb_rx_error_update_can_state()
834 else if (es->status & M16C_STATE_BUS_PASSIVE) in kvaser_usb_rx_error_update_can_state()
836 else if (es->status & M16C_STATE_BUS_ERROR) { in kvaser_usb_rx_error_update_can_state()
839 if ((es->txerr >= 128) || (es->rxerr >= 128)) in kvaser_usb_rx_error_update_can_state()
841 else if ((es->txerr >= 96) || (es->rxerr >= 96)) in kvaser_usb_rx_error_update_can_state()
848 if (!es->status) in kvaser_usb_rx_error_update_can_state()
852 tx_state = (es->txerr >= es->rxerr) ? new_state : 0; in kvaser_usb_rx_error_update_can_state()
853 rx_state = (es->txerr <= es->rxerr) ? new_state : 0; in kvaser_usb_rx_error_update_can_state()
866 if (es->leaf.error_factor) { in kvaser_usb_rx_error_update_can_state()
872 if (es->usbcan.error_state & USBCAN_ERROR_STATE_TX_ERROR) in kvaser_usb_rx_error_update_can_state()
874 if (es->usbcan.error_state & USBCAN_ERROR_STATE_RX_ERROR) in kvaser_usb_rx_error_update_can_state()
876 if (es->usbcan.error_state & USBCAN_ERROR_STATE_BUSERROR) { in kvaser_usb_rx_error_update_can_state()
882 priv->bec.txerr = es->txerr; in kvaser_usb_rx_error_update_can_state()
883 priv->bec.rxerr = es->rxerr; in kvaser_usb_rx_error_update_can_state()
887 const struct kvaser_usb_error_summary *es) in kvaser_usb_rx_error() argument
895 if (es->channel >= dev->nchannels) { in kvaser_usb_rx_error()
897 "Invalid channel number (%d)\n", es->channel); in kvaser_usb_rx_error()
901 priv = dev->nets[es->channel]; in kvaser_usb_rx_error()
915 kvaser_usb_rx_error_update_can_state(priv, es, &tmp_cf); in kvaser_usb_rx_error()
926 if (es->status & in kvaser_usb_rx_error()
943 if (es->leaf.error_factor) { in kvaser_usb_rx_error()
946 if (es->leaf.error_factor & M16C_EF_ACKE) in kvaser_usb_rx_error()
948 if (es->leaf.error_factor & M16C_EF_CRCE) in kvaser_usb_rx_error()
950 if (es->leaf.error_factor & M16C_EF_FORME) in kvaser_usb_rx_error()
952 if (es->leaf.error_factor & M16C_EF_STFE) in kvaser_usb_rx_error()
954 if (es->leaf.error_factor & M16C_EF_BITE0) in kvaser_usb_rx_error()
956 if (es->leaf.error_factor & M16C_EF_BITE1) in kvaser_usb_rx_error()
958 if (es->leaf.error_factor & M16C_EF_TRE) in kvaser_usb_rx_error()
963 if (es->usbcan.error_state & USBCAN_ERROR_STATE_BUSERROR) { in kvaser_usb_rx_error()
969 cf->data[6] = es->txerr; in kvaser_usb_rx_error()
970 cf->data[7] = es->rxerr; in kvaser_usb_rx_error()
981 struct kvaser_usb_error_summary *es) in kvaser_usbcan_conditionally_rx_error() argument
987 channel = es->channel; in kvaser_usbcan_conditionally_rx_error()
997 if (es->txerr != priv->bec.txerr) { in kvaser_usbcan_conditionally_rx_error()
998 es->usbcan.error_state |= USBCAN_ERROR_STATE_TX_ERROR; in kvaser_usbcan_conditionally_rx_error()
1001 if (es->rxerr != priv->bec.rxerr) { in kvaser_usbcan_conditionally_rx_error()
1002 es->usbcan.error_state |= USBCAN_ERROR_STATE_RX_ERROR; in kvaser_usbcan_conditionally_rx_error()
1005 if ((es->status & M16C_STATE_BUS_ERROR) && in kvaser_usbcan_conditionally_rx_error()
1006 !(es->usbcan.other_ch_status & M16C_STATE_BUS_ERROR)) { in kvaser_usbcan_conditionally_rx_error()
1007 es->usbcan.error_state |= USBCAN_ERROR_STATE_BUSERROR; in kvaser_usbcan_conditionally_rx_error()
1012 kvaser_usb_rx_error(dev, es); in kvaser_usbcan_conditionally_rx_error()
1018 struct kvaser_usb_error_summary es = { }; in kvaser_usbcan_rx_error() local
1023 es.channel = msg->u.usbcan.chip_state_event.channel; in kvaser_usbcan_rx_error()
1024 es.status = msg->u.usbcan.chip_state_event.status; in kvaser_usbcan_rx_error()
1025 es.txerr = msg->u.usbcan.chip_state_event.tx_errors_count; in kvaser_usbcan_rx_error()
1026 es.rxerr = msg->u.usbcan.chip_state_event.rx_errors_count; in kvaser_usbcan_rx_error()
1027 kvaser_usbcan_conditionally_rx_error(dev, &es); in kvaser_usbcan_rx_error()
1031 es.channel = 0; in kvaser_usbcan_rx_error()
1032 es.status = msg->u.usbcan.error_event.status_ch0; in kvaser_usbcan_rx_error()
1033 es.txerr = msg->u.usbcan.error_event.tx_errors_count_ch0; in kvaser_usbcan_rx_error()
1034 es.rxerr = msg->u.usbcan.error_event.rx_errors_count_ch0; in kvaser_usbcan_rx_error()
1035 es.usbcan.other_ch_status = in kvaser_usbcan_rx_error()
1037 kvaser_usbcan_conditionally_rx_error(dev, &es); in kvaser_usbcan_rx_error()
1043 es.channel = 1; in kvaser_usbcan_rx_error()
1044 es.status = msg->u.usbcan.error_event.status_ch1; in kvaser_usbcan_rx_error()
1045 es.txerr = msg->u.usbcan.error_event.tx_errors_count_ch1; in kvaser_usbcan_rx_error()
1046 es.rxerr = msg->u.usbcan.error_event.rx_errors_count_ch1; in kvaser_usbcan_rx_error()
1047 es.usbcan.other_ch_status = in kvaser_usbcan_rx_error()
1049 kvaser_usbcan_conditionally_rx_error(dev, &es); in kvaser_usbcan_rx_error()
1062 struct kvaser_usb_error_summary es = { }; in kvaser_leaf_rx_error() local
1066 es.channel = msg->u.leaf.error_event.channel; in kvaser_leaf_rx_error()
1067 es.status = msg->u.leaf.error_event.status; in kvaser_leaf_rx_error()
1068 es.txerr = msg->u.leaf.error_event.tx_errors_count; in kvaser_leaf_rx_error()
1069 es.rxerr = msg->u.leaf.error_event.rx_errors_count; in kvaser_leaf_rx_error()
1070 es.leaf.error_factor = msg->u.leaf.error_event.error_factor; in kvaser_leaf_rx_error()
1073 es.channel = msg->u.leaf.log_message.channel; in kvaser_leaf_rx_error()
1074 es.status = msg->u.leaf.log_message.data[0]; in kvaser_leaf_rx_error()
1075 es.txerr = msg->u.leaf.log_message.data[2]; in kvaser_leaf_rx_error()
1076 es.rxerr = msg->u.leaf.log_message.data[3]; in kvaser_leaf_rx_error()
1077 es.leaf.error_factor = msg->u.leaf.log_message.data[1]; in kvaser_leaf_rx_error()
1080 es.channel = msg->u.leaf.chip_state_event.channel; in kvaser_leaf_rx_error()
1081 es.status = msg->u.leaf.chip_state_event.status; in kvaser_leaf_rx_error()
1082 es.txerr = msg->u.leaf.chip_state_event.tx_errors_count; in kvaser_leaf_rx_error()
1083 es.rxerr = msg->u.leaf.chip_state_event.rx_errors_count; in kvaser_leaf_rx_error()
1084 es.leaf.error_factor = 0; in kvaser_leaf_rx_error()
1092 kvaser_usb_rx_error(dev, &es); in kvaser_leaf_rx_error()