Lines Matching defs:usb_if

73 	struct pcan_usb_fd_if	*usb_if;
180 return pdev->usb_if;
196 struct pcan_ufd_fw_info *fw_info = &pdev->usb_if->fw_info;
460 struct pcan_usb_fd_if *usb_if = pcan_usb_fd_dev_if(dev);
462 err = pcan_usb_fd_read_fwinfo(dev, &usb_if->fw_info);
466 *can_ch_id = le32_to_cpu(usb_if->fw_info.dev_id[dev->ctrl_idx]);
491 struct pcan_ufd_fw_info *fw_info = &pdev->usb_if->fw_info;
528 static int pcan_usb_fd_decode_canmsg(struct pcan_usb_fd_if *usb_if,
538 if (pucan_msg_get_channel(rm) >= ARRAY_SIZE(usb_if->dev))
541 dev = usb_if->dev[pucan_msg_get_channel(rm)];
588 static int pcan_usb_fd_decode_status(struct pcan_usb_fd_if *usb_if,
600 if (pucan_stmsg_get_channel(sm) >= ARRAY_SIZE(usb_if->dev))
603 dev = usb_if->dev[pucan_stmsg_get_channel(sm)];
650 static int pcan_usb_fd_decode_error(struct pcan_usb_fd_if *usb_if,
657 if (pucan_ermsg_get_channel(er) >= ARRAY_SIZE(usb_if->dev))
660 dev = usb_if->dev[pucan_ermsg_get_channel(er)];
671 static int pcan_usb_fd_decode_overrun(struct pcan_usb_fd_if *usb_if,
680 if (pufd_omsg_get_channel(ov) >= ARRAY_SIZE(usb_if->dev))
683 dev = usb_if->dev[pufd_omsg_get_channel(ov)];
704 static void pcan_usb_fd_decode_ts(struct pcan_usb_fd_if *usb_if,
710 if (usb_if->cm_ignore_count > 0)
711 usb_if->cm_ignore_count--;
713 peak_usb_set_ts_now(&usb_if->time_ref, le32_to_cpu(ts->ts_low));
719 struct pcan_usb_fd_if *usb_if = pcan_usb_fd_dev_if(dev);
750 err = pcan_usb_fd_decode_canmsg(usb_if, rx_msg);
756 pcan_usb_fd_decode_ts(usb_if, rx_msg);
760 err = pcan_usb_fd_decode_error(usb_if, rx_msg);
766 err = pcan_usb_fd_decode_status(usb_if, rx_msg);
772 err = pcan_usb_fd_decode_overrun(usb_if, rx_msg);
871 if (pdev->usb_if->dev_opened_count == 0) {
873 peak_usb_init_time_ref(&pdev->usb_if->time_ref,
882 pdev->usb_if->dev_opened_count++;
921 if (pdev->usb_if->dev_opened_count == 1)
925 pdev->usb_if->dev_opened_count--;
941 pdev->usb_if = kzalloc(sizeof(*pdev->usb_if), GFP_KERNEL);
942 if (!pdev->usb_if)
952 pdev->usb_if->cm_ignore_count = 5;
954 fw_info = &pdev->usb_if->fw_info;
1007 pdev->usb_if = ppdev->usb_if;
1014 fw_info = &pdev->usb_if->fw_info;
1017 pdev->usb_if->dev[dev->ctrl_idx] = dev;
1019 le32_to_cpu(pdev->usb_if->fw_info.dev_id[dev->ctrl_idx]);
1052 kfree(pdev->usb_if);
1077 if (pdev->usb_if->dev_opened_count > 0)
1099 kfree(pdev->usb_if);