Lines Matching refs:portdata
335 struct sierra_port_private *portdata;
343 portdata = usb_get_serial_port_data(port);
345 if (portdata->dtr_state)
347 if (portdata->rts_state)
396 struct sierra_port_private *portdata;
399 portdata = usb_get_serial_port_data(port);
401 value = ((portdata->rts_state) ? TIOCM_RTS : 0) |
402 ((portdata->dtr_state) ? TIOCM_DTR : 0) |
403 ((portdata->cts_state) ? TIOCM_CTS : 0) |
404 ((portdata->dsr_state) ? TIOCM_DSR : 0) |
405 ((portdata->dcd_state) ? TIOCM_CAR : 0) |
406 ((portdata->ri_state) ? TIOCM_RNG : 0);
415 struct sierra_port_private *portdata;
417 portdata = usb_get_serial_port_data(port);
420 portdata->rts_state = 1;
422 portdata->dtr_state = 1;
425 portdata->rts_state = 0;
427 portdata->dtr_state = 0;
445 struct sierra_port_private *portdata = usb_get_serial_port_data(port);
459 spin_lock(&portdata->lock);
460 --portdata->outstanding_urbs;
461 spin_unlock(&portdata->lock);
473 struct sierra_port_private *portdata;
486 portdata = usb_get_serial_port_data(port);
490 spin_lock_irqsave(&portdata->lock, flags);
492 portdata->outstanding_urbs);
493 if (portdata->outstanding_urbs > portdata->num_out_urbs) {
494 spin_unlock_irqrestore(&portdata->lock, flags);
498 portdata->outstanding_urbs++;
500 portdata->outstanding_urbs);
501 spin_unlock_irqrestore(&portdata->lock, flags);
505 spin_lock_irqsave(&portdata->lock, flags);
506 portdata->outstanding_urbs--;
507 spin_unlock_irqrestore(&portdata->lock, flags);
540 usb_anchor_urb(urb, &portdata->delayed);
544 usb_anchor_urb(urb, &portdata->active);
570 spin_lock_irqsave(&portdata->lock, flags);
571 --portdata->outstanding_urbs;
573 portdata->outstanding_urbs);
574 spin_unlock_irqrestore(&portdata->lock, flags);
632 struct sierra_port_private *portdata = usb_get_serial_port_data(port);
636 urb, port, portdata);
658 old_dcd_state = portdata->dcd_state;
659 portdata->cts_state = 1;
660 portdata->dcd_state = ((signals & 0x01) ? 1 : 0);
661 portdata->dsr_state = ((signals & 0x02) ? 1 : 0);
662 portdata->ri_state = ((signals & 0x08) ? 1 : 0);
666 old_dcd_state && !portdata->dcd_state)
691 struct sierra_port_private *portdata = usb_get_serial_port_data(port);
698 spin_lock_irqsave(&portdata->lock, flags);
699 if (portdata->outstanding_urbs > (portdata->num_out_urbs * 2) / 3) {
700 spin_unlock_irqrestore(&portdata->lock, flags);
704 spin_unlock_irqrestore(&portdata->lock, flags);
712 struct sierra_port_private *portdata = usb_get_serial_port_data(port);
714 for (i = 0; i < portdata->num_in_urbs; i++)
715 usb_kill_urb(portdata->in_urbs[i]);
726 struct sierra_port_private *portdata = usb_get_serial_port_data(port);
729 for (i = 0; i < portdata->num_in_urbs; i++) {
730 urb = portdata->in_urbs[i];
799 struct sierra_port_private *portdata;
804 portdata = usb_get_serial_port_data(port);
806 portdata->rts_state = 0;
807 portdata->dtr_state = 0;
818 portdata->opened = 0;
825 for (i = 0; i < portdata->num_in_urbs; i++) {
826 sierra_release_urb(portdata->in_urbs[i]);
827 portdata->in_urbs[i] = NULL;
834 struct sierra_port_private *portdata;
842 portdata = usb_get_serial_port_data(port);
847 portdata->rts_state = 1;
848 portdata->dtr_state = 1;
852 for (i = 0; i < portdata->num_in_urbs; i++) {
856 portdata->in_urbs[i] = urb;
874 portdata->opened = 1;
885 struct sierra_port_private *portdata;
887 portdata = usb_get_serial_port_data(port);
888 portdata->rts_state = on;
889 portdata->dtr_state = on;
902 struct sierra_port_private *portdata;
919 portdata = kzalloc(sizeof(*portdata), GFP_KERNEL);
920 if (!portdata) {
926 spin_lock_init(&portdata->lock);
927 init_usb_anchor(&portdata->active);
928 init_usb_anchor(&portdata->delayed);
931 portdata->num_out_urbs = N_OUT_URB;
932 portdata->num_in_urbs = N_IN_URB;
941 portdata->num_out_urbs = N_OUT_URB_HM;
942 portdata->num_in_urbs = N_IN_URB_HM;
949 portdata->num_out_urbs = N_OUT_URB_HM;
950 portdata->num_in_urbs = N_IN_URB_HM;
955 ifnum,portdata->num_in_urbs, portdata->num_out_urbs );
957 usb_set_serial_port_data(port, portdata);
967 struct sierra_port_private *portdata;
975 portdata = usb_get_serial_port_data(port);
976 if (!portdata)
978 kfree(portdata);
987 struct sierra_port_private *portdata;
992 portdata = usb_get_serial_port_data(port);
994 usb_kill_anchored_urbs(&portdata->active);
1025 struct sierra_port_private *portdata;
1033 portdata = usb_get_serial_port_data(port);
1035 while ((urb = usb_get_from_anchor(&portdata->delayed))) {
1036 usb_anchor_urb(urb, &portdata->active);
1042 usb_scuttle_anchored_urbs(&portdata->delayed);
1047 if (portdata->opened) {