rx_size, &read_size,200); usb_mark_last_busy(i2400mu->usb_dev);switch(result) {case0:if(read_size ==0)gotoretry;/* ZLP, just resubmit */skb_put(rx_skb, read_size);break;case-EPIPE:/* * Stall -- maybe the device is choking with our * requests. Clear it and give it some ...
如果usb的第i个port处于resume或reset状态,则hub中busy_bits中第i个位置1;如果busy_bits中第i个位置1,则退过当前port;event_bits中第0位用来表示hub本身是否产生local power status change和是否产生过流,其它的各位用来表示hub下各个port状态是否发生变化,这些状态包括: ConnectStatusChange 连接状态发生变化,PortEnab...
resubmit_int_urb:/*check if it is already submitted in resume*/if(!dev->inturb->anchor) { usb_mark_last_busy(udev); usb_anchor_urb(dev->inturb, &dev->rx_submitted); status =usb_submit_urb(dev->inturb, GFP_ATOMIC);if(status) { usb_unanchor_urb(dev->inturb);if(status != -...
"can't device_add, error %d\n", err); goto fail; } (void) usb_create_ep_devs(&udev->dev, &udev->ep0, udev); usb_mark_last_busy(udev); pm_runtime_put_sync_autosuspend(&udev->dev); return err; fail: usb_set_device_state(udev, USB_STATE_NOTATTACHED); pm_runtime_disable(&...
usb_mark_last_busy(us->pusb_dev); } /* lock access to the state */ scsi_lock(host); /* was the command aborted? */ //命令abort了 if (srb->result == DID_ABORT << 16) { SkipForAbort: usb_stor_dbg(us, "scsi command aborted\n"); ...
usb_mark_last_busy 等等, 其实就是操作sysfs的一些文件节点的实际函数动作。 8. 动态电源管理和系统电源管理之间的联系 (Interaction between dynamic PM and system PM) 1). 当系统休眠时, 可能设备早就auto suspend了... 所以对于该外设就继续保持休眠就可以了, 但唤醒的动作需要定义, 是否要去唤醒该auto su...
(&udev->dev, &udev->ep0, udev); 86 usb_mark_last_busy(udev); 87 pm_runtime_put_sync_autosuspend(&udev->dev); 88 return err; 89 90 fail: 91 usb_set_device_state(udev, USB_STATE_NOTATTACHED); 92 pm_runtime_disable(&udev->dev); 93 pm_runtime_set_suspended(&udev->dev); ...
源码在/drivers/input/touchscreen/usbtouchscreen.c中 static int __init usbtouch_init(void) //入口函数 { return usb_register(&usbtouch_driver); //注册usb触摸屏驱动 } module_init(usbtouch_init); 看usbtouch_driver的定义 static struct usb_driver usbtouch_driver = { ...
usb_mark_last_busy(acm->dev); @@ -649,7 +659,8 @@ static void acm_port_dtr_rts(struct tty_port *port, int raise) res = acm_set_control(acm, val); if (res && (acm->ctrl_caps & USB_CDC_CAP_LINE)) dev_err(&acm->control->dev, "failed to set dtr/rts\n"); /* This ...
usb_mark_last_busy(acm->dev); set_bit(rb->index, &acm->urbs_in_error_delay); set_bit(ACM_ERROR_DELAY, &acm->flags); cooldown = true; break; default: dev_dbg(&acm->data->dev, "%s - nonzero urb status received: %d\n", @@ -532,11 +519,9 @@ static void acm_read_bulk...