Lines Matching defs:port

27  * Interface 1:	Diagnostics port, uses bulk only, do not submit urbs until the
28 * port is opened, as this have a huge impact on the network port
203 on which serial port it is used on. */
226 struct tty_port port;
267 /* Type of port */
527 /* converts mux value to a port spec value */
554 /* converts port spec value to a mux value */
555 static u32 hso_port_to_mux(int port)
559 switch (port & HSO_PORT_MASK) {
585 int i, port;
587 port = hso_mux_to_port(mux);
592 ((serial_table[i]->port_spec & HSO_PORT_MASK) == port)) {
1091 hso_dbg(0x8, "port %d\n", serial->minor);
1158 if (serial->port.count > 0) {
1174 /* read callback for Diag and CS port */
1197 if (serial->port.count == 0)
1234 /* open the requested serial port */
1244 hso_dbg(0x1, "Failed to open port\n");
1257 tty_port_tty_set(&serial->port, tty);
1259 /* check for port already opened, if not set the termios */
1260 serial->port.count++;
1261 if (serial->port.count == 1) {
1270 serial->port.count--;
1288 /* close the requested serial port */
1294 hso_dbg(0x1, "Closing serial port\n");
1308 serial->port.count--;
1310 if (serial->port.count <= 0) {
1311 serial->port.count = 0;
1312 tty_port_tty_set(&serial->port, NULL);
1324 /* close the requested serial port */
1390 if (serial->port.count)
1472 /* wIndex should be the USB interface number of the port to which the
1473 * notification applies, which should always be the Modem port.
1743 /* make a request (for reading and writing data to muxed serial port) */
1744 static int mux_device_request(struct hso_serial *serial, u8 type, u16 port,
1760 ctrl_req->wIndex = cpu_to_le16(hso_port_to_mux(port));
1779 hso_dbg(0x2, "%s command (%02x) len: %d, port: %d\n",
1781 ctrl_req->bRequestType, ctrl_req->wLength, port);
1827 /* used for muxed serial port callback (muxed serial read) */
1860 hso_dbg(0x1, "Pending read interrupt on port %d\n",
1864 serial->port.count > 0) {
1866 * port i */
1873 hso_dbg(0x1, "Already a read pending on port %d or port not open\n",
1885 /* called for writing to muxed serial port */
1899 /* write callback for Diag and CS port */
1920 tty_port_tty_wakeup(&serial->port);
1926 /* called for writing diag or CS serial port */
1950 /* callback after read or write on muxed serial port */
1985 tty_port_tty_wakeup(&serial->port);
1991 /* handle RX data for serial port */
2003 tty = tty_port_tty_get(&serial->port);
2012 count = tty_buffer_request_room(&serial->port, urb->actual_length);
2014 tty_insert_flip_string(&serial->port, urb->transfer_buffer,
2016 tty_flip_buffer_push(&serial->port);
2078 dev_dbg(&hso_dev->interface->dev, "HSO: Found %s port %s\n",
2142 /* If it is not the MUX port fill in and submit a bulk urb (already
2243 tty_port_destroy(&serial->port);
2251 tty_port_init(&serial->port);
2257 serial->parent->dev = tty_port_register_device_attr(&serial->port,
2610 struct usb_interface *interface, int port)
2617 hso_dev = hso_create_device(interface, port);
2628 if ((port & HSO_PORT_MASK) == HSO_PORT_MODEM) {
2697 int port,
2707 port_spec |= hso_mux_to_port(port);
2791 /* Gets the port spec for a certain interface */
2882 /* Get the interface/port specification from either driver_info or from
2897 /* Check if we need to switch to alt interfaces prior to port
3055 if (dev2ser(serial_table[i])->port.count) {
3108 tty_port_tty_hangup(&serial->port, false);
3179 /* interrupt urb needs to be submitted, used for serial read of muxed port */