Lines Matching refs:port

3  *   Controls the Moschip 7720 usb to dual port serial convertor
63 /* This structure holds all of the local serial port information */
70 struct usb_serial_port *port; /* loop back to the owner */
118 __u8 shadowECR; /* parallel port regs... */
131 THR, /* serial port regs */
143 DPR, /* parallel port regs */
148 SP2_REG, /* serial port 2 (7720 only) */
194 else if (reg >= DPR) /* parallel port reg (7715 only) */
197 else /* serial port reg */
204 * not specific to a particular serial port.
226 * ignored for registers that are not specific to a particular serial port.
277 * port callback had to be deferred because the disconnect mutex could not be
333 /* callback for parallel port control urbs submitted asynchronously */
426 * This is the the common top part of all parallel port callback operations that
428 * that avoids two scenarios: (1) a port operation is called after usbserial
431 * not called the release function yet because someone has a serial port open.
444 /* release fn called, port struct destroyed */
465 * This is the the common bottom part of all parallel port functions that send
689 * Allocate and initialize parallel port control struct, initialize
690 * the parallel port hardware device, and register with the parport subsystem.
696 /* allocate and initialize parallel port control struct */
713 /* cycle parallel port reset bit */
777 * Byte 1 IIR Port 1 (port.number is 0)
778 * Byte 2 IIR Port 2 (port.number is 1)
869 * Byte 2: DSR parallel port
878 if (!(iir & 0x01)) { /* serial port interrupt pending */
895 struct usb_serial_port *port = urb->context;
896 struct mos7715_parport *mos_parport = port->serial->private;
920 struct usb_serial_port *port;
929 port = urb->context;
935 tty = tty_port_tty_get(&port->port);
942 if (port->read_urb->status != -EINPROGRESS) {
943 retval = usb_submit_urb(port->read_urb, GFP_ATOMIC);
972 tty = tty_port_tty_get(&mos7720_port->port->port);
1007 static int mos7720_open(struct tty_struct *tty, struct usb_serial_port *port)
1018 serial = port->serial;
1020 mos7720_port = usb_get_serial_port_data(port);
1024 usb_clear_halt(serial->dev, port->write_urb->pipe);
1025 usb_clear_halt(serial->dev, port->read_urb->pipe);
1033 dev_err(&port->dev, "No more urbs???\n");
1040 dev_err(&port->dev,
1067 port_number = port->number - port->serial->minor;
1088 data = data | (port->number - port->serial->minor + 1);
1098 response = usb_submit_urb(port->read_urb, GFP_KERNEL);
1100 dev_err(&port->dev, "%s - Error %d submitting read urb\n",
1106 /* initialize our port settings */
1109 /* send a open port command */
1118 * bytes of data we currently have outstanding in the port (data that has
1119 * been written, but hasn't made it out the port yet)
1126 struct usb_serial_port *port = tty->driver_data;
1133 mos7720_port = usb_get_serial_port_data(port);
1148 static void mos7720_close(struct usb_serial_port *port)
1156 serial = port->serial;
1158 mos7720_port = usb_get_serial_port_data(port);
1173 /* While closing port, shutdown all bulk read, write *
1176 usb_kill_urb(port->write_urb);
1178 usb_kill_urb(port->read_urb);
1184 write_mos_reg(serial, port->number - port->serial->minor,
1186 write_mos_reg(serial, port->number - port->serial->minor,
1197 struct usb_serial_port *port = tty->driver_data;
1204 serial = port->serial;
1206 mos7720_port = usb_get_serial_port_data(port);
1216 write_mos_reg(serial, port->number - port->serial->minor,
1223 * bytes of data we can accept for a specific port.
1224 * If successful, we return the amount of room that we have for this port
1229 struct usb_serial_port *port = tty->driver_data;
1236 mos7720_port = usb_get_serial_port_data(port);
1253 static int mos7720_write(struct tty_struct *tty, struct usb_serial_port *port,
1268 serial = port->serial;
1270 mos7720_port = usb_get_serial_port_data(port);
1297 dev_err_console(port, "%s no more kernel memory...\n",
1305 usb_serial_debug_data(debug, &port->dev, __func__, transfer_size,
1311 port->bulk_out_endpointAddress),
1318 dev_err_console(port, "%s - usb_submit_urb(write bulk) failed "
1331 struct usb_serial_port *port = tty->driver_data;
1335 dbg("%s- port %d", __func__, port->number);
1337 mos7720_port = usb_get_serial_port_data(port);
1343 dbg("port not opened");
1352 status = mos7720_write(tty, port, &stop_char, 1);
1360 write_mos_reg(port->serial, port->number - port->serial->minor,
1369 struct usb_serial_port *port = tty->driver_data;
1370 struct moschip_port *mos7720_port = usb_get_serial_port_data(port);
1377 dbg("%s - port not opened", __func__);
1386 status = mos7720_write(tty, port, &start_char, 1);
1394 write_mos_reg(port->serial, port->number - port->serial->minor,
1405 struct usb_serial_port *port;
1412 port = mos7720_port->port;
1413 serial = port->serial;
1419 port_number = port->number - port->serial->minor;
1528 * specified port.
1533 struct usb_serial_port *port;
1542 port = mos7720_port->port;
1543 serial = port->serial;
1547 number = port->number - port->serial->minor;
1548 dbg("%s - port = %d, baud = %d", __func__, port->number, baudrate);
1553 dev_err(&port->dev, "%s - bad baud rate\n", __func__);
1581 struct usb_serial_port *port;
1596 port = mos7720_port->port;
1597 serial = port->serial;
1598 port_number = port->number - port->serial->minor;
1600 dbg("%s - port %d", __func__, port->number);
1603 dbg("%s - port not opened", __func__);
1692 * serial port, in SP1/2_CONTROL_REG */
1693 if (port->number)
1727 if (port->read_urb->status != -EINPROGRESS) {
1728 status = usb_submit_urb(port->read_urb, GFP_ATOMIC);
1741 struct usb_serial_port *port, struct ktermios *old_termios)
1748 serial = port->serial;
1750 mos7720_port = usb_get_serial_port_data(port);
1756 dbg("%s - port not opened", __func__);
1772 dbg("%s - port %d", __func__, port->number);
1774 /* change the port settings to the new ones specified */
1777 if (port->read_urb->status != -EINPROGRESS) {
1778 status = usb_submit_urb(port->read_urb, GFP_ATOMIC);
1798 struct usb_serial_port *port = tty->driver_data;
1801 int port_number = port->number - port->serial->minor;
1806 read_mos_reg(port->serial, port_number, LSR, &data);
1820 struct usb_serial_port *port = tty->driver_data;
1821 struct moschip_port *mos7720_port = usb_get_serial_port_data(port);
1826 dbg("%s - port %d", __func__, port->number);
1846 struct usb_serial_port *port = tty->driver_data;
1847 struct moschip_port *mos7720_port = usb_get_serial_port_data(port);
1849 dbg("%s - port %d", __func__, port->number);
1869 write_mos_reg(port->serial, port->number - port->serial->minor,
1878 struct usb_serial_port *port = tty->driver_data;
1882 mos7720_port = usb_get_serial_port_data(port);
1898 port->number, icount->rx, icount->tx);
1908 struct usb_serial_port *port;
1913 port = (struct usb_serial_port *)mos7720_port->port;
1941 write_mos_reg(port->serial, port->number - port->serial->minor,
1958 tmp.line = mos7720_port->port->serial->minor;
1959 tmp.port = mos7720_port->port->number;
1975 struct usb_serial_port *port = tty->driver_data;
1980 mos7720_port = usb_get_serial_port_data(port);
1984 dbg("%s - port %d, cmd = 0x%x", __func__, port->number, cmd);
1988 dbg("%s (%d) TIOCSERGETLSR", __func__, port->number);
1996 __func__, port->number);
2001 dbg("%s (%d) TIOCGSERIAL", __func__, port->number);
2006 dbg("%s (%d) TIOCMIWAIT", __func__, port->number);
2051 * port, and the second for the serial port. Because the usbserial core
2054 * port 0 point to the serial port. However, both moschip devices use a
2056 * further down), and this endpoint was assigned to port 0. So after
2057 * the swap, we must copy the interrupt endpoint elements from port 1
2058 * (as newly assigned) to port 0, and null out port 1 pointers.
2061 struct usb_serial_port *tmp = serial->port[0];
2062 serial->port[0] = serial->port[1];
2063 serial->port[1] = tmp;
2064 serial->port[0]->interrupt_in_urb = tmp->interrupt_in_urb;
2065 serial->port[0]->interrupt_in_buffer = tmp->interrupt_in_buffer;
2066 serial->port[0]->interrupt_in_endpointAddress =
2068 serial->port[1]->interrupt_in_urb = NULL;
2069 serial->port[1]->interrupt_in_buffer = NULL;
2073 /* set up serial port private structures */
2081 /* Initialize all port interrupt end point to port 0 int
2084 serial->port[i]->interrupt_in_endpointAddress =
2085 serial->port[0]->interrupt_in_endpointAddress;
2087 mos7720_port->port = serial->port[i];
2088 usb_set_serial_port_data(serial->port[i], mos7720_port);
2090 dbg("port number is %d", serial->port[i]->number);
2100 ret_val = usb_submit_urb(serial->port[0]->interrupt_in_urb, GFP_KERNEL);
2125 /* close the parallel port */
2134 /* prevent NULL ptr dereference in port callbacks */
2162 /* free private structure allocated for serial port */
2164 kfree(usb_get_serial_port_data(serial->port[i]));
2179 .description = "Moschip 2 port adapter",