• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/drivers/usb/serial/

Lines Matching defs:tdev

189 static int ti_command_out_sync(struct ti_device *tdev, __u8 command,
191 static int ti_command_in_sync(struct ti_device *tdev, __u8 command,
194 static int ti_write_byte(struct ti_device *tdev, unsigned long addr,
197 static int ti_download_firmware(struct ti_device *tdev,
409 struct ti_device *tdev;
422 tdev = kzalloc(sizeof(struct ti_device), GFP_KERNEL);
423 if (tdev == NULL) {
427 sema_init(&tdev->td_open_close_sem, 1);
428 tdev->td_serial = serial;
429 usb_set_serial_data(serial, tdev);
433 tdev->td_is_3410 = 1;
434 dbg("%s - device type is %s", __FUNCTION__, tdev->td_is_3410 ? "3410" : "5052");
439 if (tdev->td_is_3410)
440 status = ti_download_firmware(tdev, ti_fw_3410,
443 status = ti_download_firmware(tdev, ti_fw_5052,
449 if (tdev->td_is_3410) {
486 tport->tp_tdev = tdev;
501 kfree(tdev);
510 struct ti_device *tdev = usb_get_serial_data(serial);
524 kfree(tdev);
532 struct ti_device *tdev;
547 tdev = tport->tp_tdev;
550 if (down_interruptible(&tdev->td_open_close_sem))
565 if (tdev->td_open_port_count == 0) {
567 urb = tdev->td_serial->port[0]->interrupt_in_urb;
574 urb->context = tdev;
586 status = ti_command_out_sync(tdev, TI_OPEN_PORT,
594 status = ti_command_out_sync(tdev, TI_START_PORT,
602 status = ti_command_out_sync(tdev, TI_PURGE_PORT,
608 status = ti_command_out_sync(tdev, TI_PURGE_PORT,
621 status = ti_command_out_sync(tdev, TI_OPEN_PORT,
629 status = ti_command_out_sync(tdev, TI_START_PORT,
655 ++tdev->td_open_port_count;
660 if (tdev->td_open_port_count == 0)
663 up(&tdev->td_open_close_sem);
671 struct ti_device *tdev;
679 tdev = usb_get_serial_data(port->serial);
681 if (tdev == NULL || tport == NULL)
695 status = ti_command_out_sync(tdev, TI_CLOSE_PORT,
701 do_up = !down_interruptible(&tdev->td_open_close_sem);
709 up(&tdev->td_open_close_sem);
1104 struct ti_device *tdev = (struct ti_device *)urb->context;
1106 struct usb_serial *serial = tdev->td_serial;
1125 tdev->td_urb_error = 1;
1129 tdev->td_urb_error = 1;
1371 struct ti_device *tdev = tport->tp_tdev;
1385 status = ti_command_in_sync(tdev, TI_GET_PORT_STATUS,
1487 struct ti_device *tdev = tport->tp_tdev;
1497 tdev->td_urb_error = 0;
1504 || tdev->td_urb_error
1525 && !(tport->tp_lsr&TI_LSR_TX_EMPTY) && !tdev->td_urb_error
1572 static int ti_command_out_sync(struct ti_device *tdev, __u8 command,
1577 status = usb_control_msg(tdev->td_serial->dev,
1578 usb_sndctrlpipe(tdev->td_serial->dev, 0), command,
1592 static int ti_command_in_sync(struct ti_device *tdev, __u8 command,
1597 status = usb_control_msg(tdev->td_serial->dev,
1598 usb_rcvctrlpipe(tdev->td_serial->dev, 0), command,
1612 static int ti_write_byte(struct ti_device *tdev, unsigned long addr,
1618 struct device *dev = &tdev->td_serial->dev->dev;
1637 status = ti_command_out_sync(tdev, TI_WRITE_DATA, TI_RAM_PORT, 0,
1649 static int ti_download_firmware(struct ti_device *tdev,
1659 struct usb_device *dev = tdev->td_serial->dev;
1662 tdev->td_serial->port[0]->bulk_out_endpointAddress);