Lines Matching refs:can
220 struct can_priv can; /* must be the first member */ member
237 if (priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING) in ifi_canfd_irq_enable()
392 priv->can.can_stats.bus_error++; in ifi_canfd_handle_lec_err()
483 priv->can.can_stats.error_warning++; in ifi_canfd_handle_state_change()
484 priv->can.state = CAN_STATE_ERROR_ACTIVE; in ifi_canfd_handle_state_change()
488 priv->can.can_stats.error_warning++; in ifi_canfd_handle_state_change()
489 priv->can.state = CAN_STATE_ERROR_WARNING; in ifi_canfd_handle_state_change()
493 priv->can.can_stats.error_passive++; in ifi_canfd_handle_state_change()
494 priv->can.state = CAN_STATE_ERROR_PASSIVE; in ifi_canfd_handle_state_change()
498 priv->can.state = CAN_STATE_BUS_OFF; in ifi_canfd_handle_state_change()
500 priv->can.can_stats.bus_off++; in ifi_canfd_handle_state_change()
553 (priv->can.state != CAN_STATE_ERROR_ACTIVE)) { in ifi_canfd_handle_state_errors()
560 (priv->can.state != CAN_STATE_ERROR_WARNING)) { in ifi_canfd_handle_state_errors()
567 (priv->can.state != CAN_STATE_ERROR_PASSIVE)) { in ifi_canfd_handle_state_errors()
574 (priv->can.state != CAN_STATE_BUS_OFF)) { in ifi_canfd_handle_state_errors()
598 if (priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING) in ifi_canfd_poll()
671 const struct can_bittiming *bt = &priv->can.bittiming; in ifi_canfd_set_bittiming()
672 const struct can_bittiming *dbt = &priv->can.data_bittiming; in ifi_canfd_set_bittiming()
767 if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY) in ifi_canfd_start()
770 if (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK) in ifi_canfd_start()
773 if ((priv->can.ctrlmode & CAN_CTRLMODE_FD) && in ifi_canfd_start()
774 !(priv->can.ctrlmode & CAN_CTRLMODE_FD_NON_ISO)) in ifi_canfd_start()
777 if (!(priv->can.ctrlmode & CAN_CTRLMODE_FD)) in ifi_canfd_start()
780 priv->can.state = CAN_STATE_ERROR_ACTIVE; in ifi_canfd_start()
813 priv->can.state = CAN_STATE_STOPPED; in ifi_canfd_stop()
914 if ((priv->can.ctrlmode & CAN_CTRLMODE_FD) && can_is_canfd_skb(skb)) { in ifi_canfd_start_xmit()
999 priv->can.state = CAN_STATE_STOPPED; in ifi_canfd_plat_probe()
1001 priv->can.clock.freq = readl(addr + IFI_CANFD_CANCLOCK); in ifi_canfd_plat_probe()
1003 priv->can.bittiming_const = &ifi_canfd_bittiming_const; in ifi_canfd_plat_probe()
1004 priv->can.data_bittiming_const = &ifi_canfd_bittiming_const; in ifi_canfd_plat_probe()
1005 priv->can.do_set_mode = ifi_canfd_set_mode; in ifi_canfd_plat_probe()
1006 priv->can.do_get_berr_counter = ifi_canfd_get_berr_counter; in ifi_canfd_plat_probe()
1009 priv->can.ctrlmode = CAN_CTRLMODE_FD; in ifi_canfd_plat_probe()
1012 priv->can.ctrlmode_supported = CAN_CTRLMODE_LOOPBACK | in ifi_canfd_plat_probe()
1028 priv->base, ndev->irq, priv->can.clock.freq); in ifi_canfd_plat_probe()