Lines Matching refs:edge_port
1562 static void handle_new_msr (struct edgeport_port *edge_port, __u8 msr) in handle_new_msr() argument
1569 icount = &edge_port->icount; in handle_new_msr()
1580 wake_up_interruptible (&edge_port->delta_msr_wait); in handle_new_msr()
1584 edge_port->shadow_msr = msr & 0xf0; in handle_new_msr()
1589 static void handle_new_lsr (struct edgeport_port *edge_port, int lsr_data, __u8 lsr, __u8 data) in handle_new_lsr() argument
1596 edge_port->shadow_lsr = lsr; in handle_new_lsr()
1607 if (lsr_data && edge_port->port->tty) { in handle_new_lsr()
1608 tty_insert_flip_char(edge_port->port->tty, data, 0); in handle_new_lsr()
1609 tty_flip_buffer_push(edge_port->port->tty); in handle_new_lsr()
1613 icount = &edge_port->icount; in handle_new_lsr()
1629 struct edgeport_port *edge_port; in edge_interrupt_callback() local
1670 edge_port = port->private; in edge_interrupt_callback()
1671 if (!edge_port) { in edge_interrupt_callback()
1682 edge_port->lsr_event = 1; in edge_interrupt_callback()
1683 edge_port->lsr_mask = lsr; in edge_interrupt_callback()
1687 handle_new_lsr (edge_port, 0, lsr, 0); in edge_interrupt_callback()
1696 handle_new_msr (edge_port, msr); in edge_interrupt_callback()
1709 struct edgeport_port *edge_port = (struct edgeport_port *)urb->context; in edge_bulk_in_callback() local
1718 if (port_paranoia_check (edge_port->port, __FUNCTION__)) in edge_bulk_in_callback()
1727 usb_clear_halt (edge_port->port->serial->dev, urb->pipe); in edge_bulk_in_callback()
1733 port_number = edge_port->port->number - edge_port->port->serial->minor; in edge_bulk_in_callback()
1735 if (edge_port->lsr_event) { in edge_bulk_in_callback()
1736 edge_port->lsr_event = 0; in edge_bulk_in_callback()
1738 __FUNCTION__, port_number, edge_port->lsr_mask, *data); in edge_bulk_in_callback()
1739 handle_new_lsr (edge_port, 1, edge_port->lsr_mask, *data); in edge_bulk_in_callback()
1745 tty = edge_port->port->tty; in edge_bulk_in_callback()
1749 if (edge_port->close_pending) { in edge_bulk_in_callback()
1764 edge_port->icount.rx += urb->actual_length; in edge_bulk_in_callback()
1769 urb->dev = edge_port->port->serial->dev; in edge_bulk_in_callback()
1809 struct edgeport_port *edge_port = (struct edgeport_port *)port->private; in edge_open() local
1823 if (edge_port == NULL) in edge_open()
1835 edge_port->uart_base = UMPMEM_BASE_UART1; in edge_open()
1836 edge_port->dma_address = UMPD_OEDB1_ADDRESS; in edge_open()
1839 edge_port->uart_base = UMPMEM_BASE_UART2; in edge_open()
1840 edge_port->dma_address = UMPD_OEDB2_ADDRESS; in edge_open()
1848 __FUNCTION__, port_number, edge_port->uart_base, edge_port->dma_address); in edge_open()
1852 memset (&(edge_port->icount), 0x00, sizeof(edge_port->icount)); in edge_open()
1853 init_waitqueue_head (&edge_port->delta_msr_wait); in edge_open()
1856 status = TIClearLoopBack (edge_port); in edge_open()
1868 edge_port->ump_read_timeout = max (20, ((transaction_timeout * 3) / 2) ); in edge_open()
1907 &edge_port->shadow_msr, // TransferBuffer in edge_open()
1912 dbg ("ShadowMSR 0x%X", edge_port->shadow_msr); in edge_open()
1914 edge_serial = edge_port->edge_serial; in edge_open()
1947 urb->context = edge_port; in edge_open()
1966 struct edgeport_port *edge_port; in edge_close() local
1980 edge_port = (struct edgeport_port *)port->private; in edge_close()
1981 if ((edge_serial == NULL) || (edge_port == NULL)) in edge_close()
1987 edge_port->close_pending = 1; in edge_close()
1990 TIChasePort (edge_port); in edge_close()
2004 --edge_port->edge_serial->num_ports_open; in edge_close()
2005 if (edge_port->edge_serial->num_ports_open <= 0) { in edge_close()
2008 edge_port->edge_serial->num_ports_open = 0; in edge_close()
2010 edge_port->close_pending = 0; in edge_close()
2019 struct edgeport_port *edge_port = port->private; in edge_write() local
2029 if (edge_port == NULL) in edge_write()
2031 if (edge_port->close_pending == 1) in edge_write()
2066 edge_port->icount.tx += count; in edge_write()
2073 struct edgeport_port *edge_port = (struct edgeport_port *)(port->private); in edge_write_room() local
2078 if (edge_port == NULL) in edge_write_room()
2080 if (edge_port->close_pending == 1) in edge_write_room()
2094 struct edgeport_port *edge_port = (struct edgeport_port *)(port->private); in edge_chars_in_buffer() local
2099 if (edge_port == NULL) in edge_chars_in_buffer()
2101 if (edge_port->close_pending == 1) in edge_chars_in_buffer()
2115 struct edgeport_port *edge_port = (struct edgeport_port *)(port->private); in edge_throttle() local
2121 if (edge_port == NULL) in edge_throttle()
2140 status = TIClearRts (edge_port); in edge_throttle()
2148 struct edgeport_port *edge_port = (struct edgeport_port *)(port->private); in edge_unthrottle() local
2154 if (edge_port == NULL) in edge_unthrottle()
2174 status = TISetRts (edge_port); in edge_unthrottle()
2185 static void change_port_settings (struct edgeport_port *edge_port, struct termios *old_termios) in change_port_settings() argument
2193 int port_number = edge_port->port->number - edge_port->port->serial->minor; in change_port_settings()
2195 dbg("%s - port %d", __FUNCTION__, edge_port->port->number); in change_port_settings()
2197 tty = edge_port->port->tty; in change_port_settings()
2321 status = TIWriteCommandSync (edge_port->port->serial->dev, in change_port_settings()
2339 struct edgeport_port *edge_port = (struct edgeport_port *)(port->private); in edge_set_termios() local
2369 if (edge_port == NULL) in edge_set_termios()
2373 change_port_settings (edge_port, old_termios); in edge_set_termios()
2378 static int set_modem_info (struct edgeport_port *edge_port, unsigned int cmd, unsigned int *value) in set_modem_info() argument
2380 unsigned int mcr = edge_port->shadow_mcr; in set_modem_info()
2415 edge_port->shadow_mcr = mcr; in set_modem_info()
2417 TIRestoreMCR (edge_port, mcr); in set_modem_info()
2422 static int get_modem_info (struct edgeport_port *edge_port, unsigned int *value) in get_modem_info() argument
2425 unsigned int msr = edge_port->shadow_msr; in get_modem_info()
2426 unsigned int mcr = edge_port->shadow_mcr; in get_modem_info()
2443 static int get_serial_info (struct edgeport_port *edge_port, struct serial_struct * retinfo) in get_serial_info() argument
2453 tmp.line = edge_port->port->serial->minor; in get_serial_info()
2454 tmp.port = edge_port->port->number; in get_serial_info()
2457 tmp.xmit_fifo_size = edge_port->port->bulk_out_size; in get_serial_info()
2473 struct edgeport_port *edge_port = (struct edgeport_port *)(port->private); in edge_ioctl() local
2494 return set_modem_info(edge_port, cmd, (unsigned int *) arg); in edge_ioctl()
2499 return get_modem_info(edge_port, (unsigned int *) arg); in edge_ioctl()
2504 return get_serial_info(edge_port, (struct serial_struct *) arg); in edge_ioctl()
2513 cprev = edge_port->icount; in edge_ioctl()
2515 interruptible_sleep_on(&edge_port->delta_msr_wait); in edge_ioctl()
2519 cnow = edge_port->icount; in edge_ioctl()
2536 port->number, edge_port->icount.rx, edge_port->icount.tx); in edge_ioctl()
2537 if (copy_to_user((void *)arg, &edge_port->icount, sizeof(edge_port->icount))) in edge_ioctl()
2547 struct edgeport_port *edge_port = (struct edgeport_port *)(port->private); in edge_break() local
2553 TIChasePort (edge_port); in edge_break()
2556 status = TISetBreak (edge_port); in edge_break()
2558 status = TIClearBreak (edge_port); in edge_break()
2569 struct edgeport_port *edge_port; in edge_startup() local
2594 edge_port = kmalloc (sizeof(struct edgeport_port), GFP_KERNEL); in edge_startup()
2595 if (edge_port == NULL) { in edge_startup()
2599 memset (edge_port, 0, sizeof(struct edgeport_port)); in edge_startup()
2600 edge_port->port = &serial->port[i]; in edge_startup()
2601 edge_port->edge_serial = edge_serial; in edge_startup()
2602 serial->port[i].private = edge_port; in edge_startup()