hso.c (aa1262b3876ec5249ff464618a7dcd46b3ca54e2) hso.c (6aad04f21374633bd8cecf25024553d1e11a9522)
1/******************************************************************************
2 *
3 * Driver for Option High Speed Mobile Devices.
4 *
5 * Copyright (C) 2008 Option International
6 * Filip Aben <f.aben@option.com>
7 * Denis Joseph Barrow <d.barow@option.com>
8 * Jan Dumon <j.dumon@option.com>

--- 1911 unchanged lines hidden (view full) ---

1920 serial->tx_data, serial->tx_data_count);
1921}
1922
1923/* write callback for Diag and CS port */
1924static void hso_std_serial_write_bulk_callback(struct urb *urb)
1925{
1926 struct hso_serial *serial = urb->context;
1927 int status = urb->status;
1/******************************************************************************
2 *
3 * Driver for Option High Speed Mobile Devices.
4 *
5 * Copyright (C) 2008 Option International
6 * Filip Aben <f.aben@option.com>
7 * Denis Joseph Barrow <d.barow@option.com>
8 * Jan Dumon <j.dumon@option.com>

--- 1911 unchanged lines hidden (view full) ---

1920 serial->tx_data, serial->tx_data_count);
1921}
1922
1923/* write callback for Diag and CS port */
1924static void hso_std_serial_write_bulk_callback(struct urb *urb)
1925{
1926 struct hso_serial *serial = urb->context;
1927 int status = urb->status;
1928 struct tty_struct *tty;
1929
1930 /* sanity check */
1931 if (!serial) {
1932 D1("serial == NULL");
1933 return;
1934 }
1935
1936 spin_lock(&serial->serial_lock);
1937 serial->tx_urb_used = 0;
1938 spin_unlock(&serial->serial_lock);
1939 if (status) {
1940 handle_usb_error(status, __func__, serial->parent);
1941 return;
1942 }
1943 hso_put_activity(serial->parent);
1928
1929 /* sanity check */
1930 if (!serial) {
1931 D1("serial == NULL");
1932 return;
1933 }
1934
1935 spin_lock(&serial->serial_lock);
1936 serial->tx_urb_used = 0;
1937 spin_unlock(&serial->serial_lock);
1938 if (status) {
1939 handle_usb_error(status, __func__, serial->parent);
1940 return;
1941 }
1942 hso_put_activity(serial->parent);
1944 tty = tty_port_tty_get(&serial->port);
1945 if (tty) {
1946 tty_wakeup(tty);
1947 tty_kref_put(tty);
1948 }
1943 tty_port_tty_wakeup(&serial->port);
1949 hso_kick_transmit(serial);
1950
1951 D1(" ");
1952}
1953
1954/* called for writing diag or CS serial port */
1955static int hso_std_serial_write_data(struct hso_serial *serial)
1956{

--- 46 unchanged lines hidden (view full) ---

2003 if (req->bRequestType ==
2004 (USB_DIR_IN | USB_TYPE_OPTION_VENDOR | USB_RECIP_INTERFACE)) {
2005 /* response to a read command */
2006 serial->rx_urb_filled[0] = 1;
2007 spin_lock(&serial->serial_lock);
2008 put_rxbuf_data_and_resubmit_ctrl_urb(serial);
2009 spin_unlock(&serial->serial_lock);
2010 } else {
1944 hso_kick_transmit(serial);
1945
1946 D1(" ");
1947}
1948
1949/* called for writing diag or CS serial port */
1950static int hso_std_serial_write_data(struct hso_serial *serial)
1951{

--- 46 unchanged lines hidden (view full) ---

1998 if (req->bRequestType ==
1999 (USB_DIR_IN | USB_TYPE_OPTION_VENDOR | USB_RECIP_INTERFACE)) {
2000 /* response to a read command */
2001 serial->rx_urb_filled[0] = 1;
2002 spin_lock(&serial->serial_lock);
2003 put_rxbuf_data_and_resubmit_ctrl_urb(serial);
2004 spin_unlock(&serial->serial_lock);
2005 } else {
2011 struct tty_struct *tty = tty_port_tty_get(&serial->port);
2012 hso_put_activity(serial->parent);
2006 hso_put_activity(serial->parent);
2013 if (tty) {
2014 tty_wakeup(tty);
2015 tty_kref_put(tty);
2016 }
2007 tty_port_tty_wakeup(&serial->port);
2017 /* response to a write command */
2018 hso_kick_transmit(serial);
2019 }
2020}
2021
2022/* handle RX data for serial port */
2023static int put_rxbuf_data(struct urb *urb, struct hso_serial *serial)
2024{

--- 1327 unchanged lines hidden ---
2008 /* response to a write command */
2009 hso_kick_transmit(serial);
2010 }
2011}
2012
2013/* handle RX data for serial port */
2014static int put_rxbuf_data(struct urb *urb, struct hso_serial *serial)
2015{

--- 1327 unchanged lines hidden ---