Lines Matching defs:sdev

133 	struct stub_device *sdev = priv->sdev;
141 usb_lock_device(sdev->udev);
142 err = usb_set_configuration(sdev->udev, config);
143 usb_unlock_device(sdev->udev);
145 dev_err(&sdev->udev->dev, "can't set config #%d, error %d\n",
153 struct stub_device *sdev = priv->sdev;
157 if (usb_lock_device_for_reset(sdev->udev, NULL) < 0) {
161 usb_reset_device(sdev->udev);
162 usb_unlock_device(sdev->udev);
204 static int stub_recv_cmd_unlink(struct stub_device *sdev,
211 spin_lock_irqsave(&sdev->priv_lock, flags);
213 list_for_each_entry(priv, &sdev->priv_init, list) {
235 spin_unlock_irqrestore(&sdev->priv_lock, flags);
272 stub_enqueue_ret_unlink(sdev, pdu->base.seqnum, 0);
274 spin_unlock_irqrestore(&sdev->priv_lock, flags);
279 static int valid_request(struct stub_device *sdev, struct usbip_header *pdu)
281 struct usbip_device *ud = &sdev->ud;
284 if (pdu->base.devid == sdev->devid) {
296 static struct stub_priv *stub_priv_alloc(struct stub_device *sdev,
300 struct usbip_device *ud = &sdev->ud;
303 spin_lock_irqsave(&sdev->priv_lock, flags);
307 dev_err(&sdev->udev->dev, "alloc stub_priv\n");
308 spin_unlock_irqrestore(&sdev->priv_lock, flags);
314 priv->sdev = sdev;
320 list_add_tail(&priv->list, &sdev->priv_init);
322 spin_unlock_irqrestore(&sdev->priv_lock, flags);
327 static int get_pipe(struct stub_device *sdev, struct usbip_header *pdu)
329 struct usb_device *udev = sdev->udev;
373 dev_err(&sdev->udev->dev,
386 dev_err(&sdev->udev->dev, "CMD_SUBMIT: invalid epnum %d\n", epnum);
455 static void stub_recv_cmd_submit(struct stub_device *sdev,
459 struct usbip_device *ud = &sdev->ud;
460 struct usb_device *udev = sdev->udev;
466 int pipe = get_pipe(sdev, pdu);
480 priv = stub_priv_alloc(sdev, pdu);
633 struct stub_device *sdev = container_of(ud, struct stub_device, ud);
634 struct device *dev = &sdev->udev->dev;
653 if (!valid_request(sdev, &pdu)) {
661 stub_recv_cmd_unlink(sdev, &pdu);
665 stub_recv_cmd_submit(sdev, &pdu);