Lines Matching refs:portdata
43 struct usb_wwan_port_private *portdata; in usb_wwan_send_setup() local
48 portdata = usb_get_serial_port_data(port); in usb_wwan_send_setup()
50 if (portdata->dtr_state) in usb_wwan_send_setup()
52 if (portdata->rts_state) in usb_wwan_send_setup()
72 struct usb_wwan_port_private *portdata; in usb_wwan_dtr_rts() local
80 portdata = usb_get_serial_port_data(port); in usb_wwan_dtr_rts()
82 portdata->rts_state = on; in usb_wwan_dtr_rts()
83 portdata->dtr_state = on; in usb_wwan_dtr_rts()
93 struct usb_wwan_port_private *portdata; in usb_wwan_tiocmget() local
95 portdata = usb_get_serial_port_data(port); in usb_wwan_tiocmget()
97 value = ((portdata->rts_state) ? TIOCM_RTS : 0) | in usb_wwan_tiocmget()
98 ((portdata->dtr_state) ? TIOCM_DTR : 0) | in usb_wwan_tiocmget()
99 ((portdata->cts_state) ? TIOCM_CTS : 0) | in usb_wwan_tiocmget()
100 ((portdata->dsr_state) ? TIOCM_DSR : 0) | in usb_wwan_tiocmget()
101 ((portdata->dcd_state) ? TIOCM_CAR : 0) | in usb_wwan_tiocmget()
102 ((portdata->ri_state) ? TIOCM_RNG : 0); in usb_wwan_tiocmget()
112 struct usb_wwan_port_private *portdata; in usb_wwan_tiocmset() local
115 portdata = usb_get_serial_port_data(port); in usb_wwan_tiocmset()
123 portdata->rts_state = 1; in usb_wwan_tiocmset()
125 portdata->dtr_state = 1; in usb_wwan_tiocmset()
128 portdata->rts_state = 0; in usb_wwan_tiocmset()
130 portdata->dtr_state = 0; in usb_wwan_tiocmset()
138 struct usb_wwan_port_private *portdata; in usb_wwan_write() local
146 portdata = usb_get_serial_port_data(port); in usb_wwan_write()
157 this_urb = portdata->out_urbs[i]; in usb_wwan_write()
158 if (test_and_set_bit(i, &portdata->out_busy)) { in usb_wwan_write()
160 portdata->tx_start_time[i] + 10 * HZ)) in usb_wwan_write()
170 clear_bit(i, &portdata->out_busy); in usb_wwan_write()
180 usb_anchor_urb(this_urb, &portdata->delayed); in usb_wwan_write()
190 clear_bit(i, &portdata->out_busy); in usb_wwan_write()
200 portdata->tx_start_time[i] = jiffies; in usb_wwan_write()
256 struct usb_wwan_port_private *portdata; in usb_wwan_outdat_callback() local
266 portdata = usb_get_serial_port_data(port); in usb_wwan_outdat_callback()
272 if (portdata->out_urbs[i] == urb) { in usb_wwan_outdat_callback()
274 clear_bit(i, &portdata->out_busy); in usb_wwan_outdat_callback()
283 struct usb_wwan_port_private *portdata; in usb_wwan_write_room() local
288 portdata = usb_get_serial_port_data(port); in usb_wwan_write_room()
291 this_urb = portdata->out_urbs[i]; in usb_wwan_write_room()
292 if (this_urb && !test_bit(i, &portdata->out_busy)) in usb_wwan_write_room()
304 struct usb_wwan_port_private *portdata; in usb_wwan_chars_in_buffer() local
309 portdata = usb_get_serial_port_data(port); in usb_wwan_chars_in_buffer()
312 this_urb = portdata->out_urbs[i]; in usb_wwan_chars_in_buffer()
315 if (this_urb && test_bit(i, &portdata->out_busy)) in usb_wwan_chars_in_buffer()
325 struct usb_wwan_port_private *portdata; in usb_wwan_open() local
331 portdata = usb_get_serial_port_data(port); in usb_wwan_open()
344 urb = portdata->in_urbs[i]; in usb_wwan_open()
367 struct usb_wwan_port_private *portdata) in unbusy_queued_urb() argument
372 if (urb == portdata->out_urbs[i]) { in unbusy_queued_urb()
373 clear_bit(i, &portdata->out_busy); in unbusy_queued_urb()
383 struct usb_wwan_port_private *portdata; in usb_wwan_close() local
387 portdata = usb_get_serial_port_data(port); in usb_wwan_close()
400 urb = usb_get_from_anchor(&portdata->delayed); in usb_wwan_close()
403 unbusy_queued_urb(urb, portdata); in usb_wwan_close()
408 usb_kill_urb(portdata->in_urbs[i]); in usb_wwan_close()
410 usb_kill_urb(portdata->out_urbs[i]); in usb_wwan_close()
442 struct usb_wwan_port_private *portdata; in usb_wwan_port_probe() local
450 portdata = kzalloc(sizeof(*portdata), GFP_KERNEL); in usb_wwan_port_probe()
451 if (!portdata) in usb_wwan_port_probe()
454 init_usb_anchor(&portdata->delayed); in usb_wwan_port_probe()
460 portdata->in_buffer[i] = buffer; in usb_wwan_port_probe()
466 portdata->in_urbs[i] = urb; in usb_wwan_port_probe()
473 portdata->out_buffer[i] = buffer; in usb_wwan_port_probe()
479 portdata->out_urbs[i] = urb; in usb_wwan_port_probe()
482 usb_set_serial_port_data(port, portdata); in usb_wwan_port_probe()
488 usb_free_urb(portdata->out_urbs[i]); in usb_wwan_port_probe()
489 kfree(portdata->out_buffer[i]); in usb_wwan_port_probe()
493 usb_free_urb(portdata->in_urbs[i]); in usb_wwan_port_probe()
494 free_page((unsigned long)portdata->in_buffer[i]); in usb_wwan_port_probe()
496 kfree(portdata); in usb_wwan_port_probe()
505 struct usb_wwan_port_private *portdata; in usb_wwan_port_remove() local
507 portdata = usb_get_serial_port_data(port); in usb_wwan_port_remove()
511 usb_free_urb(portdata->in_urbs[i]); in usb_wwan_port_remove()
512 free_page((unsigned long)portdata->in_buffer[i]); in usb_wwan_port_remove()
515 usb_free_urb(portdata->out_urbs[i]); in usb_wwan_port_remove()
516 kfree(portdata->out_buffer[i]); in usb_wwan_port_remove()
519 kfree(portdata); in usb_wwan_port_remove()
528 struct usb_wwan_port_private *portdata; in stop_urbs() local
532 portdata = usb_get_serial_port_data(port); in stop_urbs()
533 if (!portdata) in stop_urbs()
536 usb_kill_urb(portdata->in_urbs[j]); in stop_urbs()
538 usb_kill_urb(portdata->out_urbs[j]); in stop_urbs()
568 struct usb_wwan_port_private *portdata; in usb_wwan_submit_delayed_urbs() local
573 portdata = usb_get_serial_port_data(port); in usb_wwan_submit_delayed_urbs()
576 urb = usb_get_from_anchor(&portdata->delayed); in usb_wwan_submit_delayed_urbs()
585 unbusy_queued_urb(urb, portdata); in usb_wwan_submit_delayed_urbs()
603 struct usb_wwan_port_private *portdata; in usb_wwan_resume() local
615 portdata = usb_get_serial_port_data(port); in usb_wwan_resume()
633 urb = portdata->in_urbs[j]; in usb_wwan_resume()