Lines Matching refs:iforce_usb

12 struct iforce_usb {  struct
25 struct iforce_usb *iforce_usb = container_of(iforce, struct iforce_usb, in __iforce_usb_xmit() argument
36 ((char *)iforce_usb->out->transfer_buffer)[0] = iforce->xmit.buf[iforce->xmit.tail]; in __iforce_usb_xmit()
41 iforce_usb->out->transfer_buffer_length = n + 1; in __iforce_usb_xmit()
42 iforce_usb->out->dev = iforce_usb->usbdev; in __iforce_usb_xmit()
49 memcpy(iforce_usb->out->transfer_buffer + 1, in __iforce_usb_xmit()
53 memcpy(iforce_usb->out->transfer_buffer + 1 + c, in __iforce_usb_xmit()
59 n=usb_submit_urb(iforce_usb->out, GFP_ATOMIC); in __iforce_usb_xmit()
61 dev_warn(&iforce_usb->intf->dev, in __iforce_usb_xmit()
80 struct iforce_usb *iforce_usb = container_of(iforce, struct iforce_usb, in iforce_usb_get_id() local
89 status = usb_control_msg(iforce_usb->usbdev, in iforce_usb_get_id()
90 usb_rcvctrlpipe(iforce_usb->usbdev, 0), in iforce_usb_get_id()
96 dev_err(&iforce_usb->intf->dev, in iforce_usb_get_id()
112 struct iforce_usb *iforce_usb = container_of(iforce, struct iforce_usb, in iforce_usb_start_io() local
115 if (usb_submit_urb(iforce_usb->irq, GFP_KERNEL)) in iforce_usb_start_io()
123 struct iforce_usb *iforce_usb = container_of(iforce, struct iforce_usb, in iforce_usb_stop_io() local
126 usb_kill_urb(iforce_usb->irq); in iforce_usb_stop_io()
127 usb_kill_urb(iforce_usb->out); in iforce_usb_stop_io()
139 struct iforce_usb *iforce_usb = urb->context; in iforce_usb_irq() local
140 struct iforce *iforce = &iforce_usb->iforce; in iforce_usb_irq()
141 struct device *dev = &iforce_usb->intf->dev; in iforce_usb_irq()
161 iforce_process_packet(iforce, iforce_usb->data_in[0], in iforce_usb_irq()
162 iforce_usb->data_in + 1, urb->actual_length - 1); in iforce_usb_irq()
173 struct iforce_usb *iforce_usb = urb->context; in iforce_usb_out() local
174 struct iforce *iforce = &iforce_usb->iforce; in iforce_usb_out()
177 dev_dbg(&iforce_usb->intf->dev, "urb->status %d, exiting\n", in iforce_usb_out()
194 struct iforce_usb *iforce_usb; in iforce_usb_probe() local
210 iforce_usb = kzalloc(sizeof(*iforce_usb), GFP_KERNEL); in iforce_usb_probe()
211 if (!iforce_usb) in iforce_usb_probe()
214 iforce_usb->irq = usb_alloc_urb(0, GFP_KERNEL); in iforce_usb_probe()
215 if (!iforce_usb->irq) in iforce_usb_probe()
218 iforce_usb->out = usb_alloc_urb(0, GFP_KERNEL); in iforce_usb_probe()
219 if (!iforce_usb->out) in iforce_usb_probe()
222 iforce_usb->iforce.xport_ops = &iforce_usb_xport_ops; in iforce_usb_probe()
224 iforce_usb->usbdev = dev; in iforce_usb_probe()
225 iforce_usb->intf = intf; in iforce_usb_probe()
227 usb_fill_int_urb(iforce_usb->irq, dev, in iforce_usb_probe()
229 iforce_usb->data_in, sizeof(iforce_usb->data_in), in iforce_usb_probe()
230 iforce_usb_irq, iforce_usb, epirq->bInterval); in iforce_usb_probe()
232 usb_fill_int_urb(iforce_usb->out, dev, in iforce_usb_probe()
234 iforce_usb->data_out, sizeof(iforce_usb->data_out), in iforce_usb_probe()
235 iforce_usb_out, iforce_usb, epout->bInterval); in iforce_usb_probe()
237 err = iforce_init_device(&intf->dev, BUS_USB, &iforce_usb->iforce); in iforce_usb_probe()
241 usb_set_intfdata(intf, iforce_usb); in iforce_usb_probe()
245 if (iforce_usb) { in iforce_usb_probe()
246 usb_free_urb(iforce_usb->irq); in iforce_usb_probe()
247 usb_free_urb(iforce_usb->out); in iforce_usb_probe()
248 kfree(iforce_usb); in iforce_usb_probe()
256 struct iforce_usb *iforce_usb = usb_get_intfdata(intf); in iforce_usb_disconnect() local
260 input_unregister_device(iforce_usb->iforce.dev); in iforce_usb_disconnect()
262 usb_free_urb(iforce_usb->irq); in iforce_usb_disconnect()
263 usb_free_urb(iforce_usb->out); in iforce_usb_disconnect()
265 kfree(iforce_usb); in iforce_usb_disconnect()