static int usb_init_communication(struct link_device *ld, struct io_device *iod) { int err = 0; switch (iod->format) { case IPC_BOOT: ld->com_state = COM_BOOT; skb_queue_purge(&ld->sk_fmt_tx_q); break; case IPC_RAMDUMP: ld->com_state = COM_CRASH; break; case IPC_FMT: err = start_ipc(ld, iod); break; case IPC_RFS: case IPC_RAW: default: ld->com_state = COM_ONLINE; break; } mif_debug("com_state = %d\n", ld->com_state); return err; }
static int usb_init_communication(struct link_device *ld, struct io_device *iod) { struct task_struct *task = get_current(); char str[TASK_COMM_LEN]; mif_info("%d:%s\n", task->pid, get_task_comm(str, task)); /* Send IPC Start ASCII 'a' */ if (iod->id == 0x1) return start_ipc(ld, iod); return 0; }