keyspan_pda.c (f43dc23d5ea91fca257be02138a255f02d98e806) keyspan_pda.c (d14fc1a74e846d7851f24fc9519fe87dc12a1231)
1/*
2 * USB Keyspan PDA / Xircom / Entregra Converter driver
3 *
4 * Copyright (C) 1999 - 2001 Greg Kroah-Hartman <greg@kroah.com>
5 * Copyright (C) 1999, 2000 Brian Warner <warner@lothar.com>
6 * Copyright (C) 2000 Al Borchers <borchers@steinerpoint.com>
7 *
8 * This program is free software; you can redistribute it and/or modify

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

674 if (serial->dev) {
675 if (on)
676 keyspan_pda_set_modem_info(serial, (1<<7) | (1<< 2));
677 else
678 keyspan_pda_set_modem_info(serial, 0);
679 }
680}
681
1/*
2 * USB Keyspan PDA / Xircom / Entregra Converter driver
3 *
4 * Copyright (C) 1999 - 2001 Greg Kroah-Hartman <greg@kroah.com>
5 * Copyright (C) 1999, 2000 Brian Warner <warner@lothar.com>
6 * Copyright (C) 2000 Al Borchers <borchers@steinerpoint.com>
7 *
8 * This program is free software; you can redistribute it and/or modify

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

674 if (serial->dev) {
675 if (on)
676 keyspan_pda_set_modem_info(serial, (1<<7) | (1<< 2));
677 else
678 keyspan_pda_set_modem_info(serial, 0);
679 }
680}
681
682static int keyspan_pda_carrier_raised(struct usb_serial_port *port)
683{
684 struct usb_serial *serial = port->serial;
685 unsigned char modembits;
686
682
687 /* If we can read the modem status and the DCD is low then
688 carrier is not raised yet */
689 if (keyspan_pda_get_modem_info(serial, &modembits) >= 0) {
690 if (!(modembits & (1>>6)))
691 return 0;
692 }
693 /* Carrier raised, or we failed (eg disconnected) so
694 progress accordingly */
695 return 1;
696}
697
698
699static int keyspan_pda_open(struct tty_struct *tty,
700 struct usb_serial_port *port)
701{
702 struct usb_serial *serial = port->serial;
703 u8 *room;
704 int rc = 0;
705 struct keyspan_pda_private *priv;
706

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

876 .owner = THIS_MODULE,
877 .name = "keyspan_pda",
878 },
879 .description = "Keyspan PDA",
880 .usb_driver = &keyspan_pda_driver,
881 .id_table = id_table_std,
882 .num_ports = 1,
883 .dtr_rts = keyspan_pda_dtr_rts,
683static int keyspan_pda_open(struct tty_struct *tty,
684 struct usb_serial_port *port)
685{
686 struct usb_serial *serial = port->serial;
687 u8 *room;
688 int rc = 0;
689 struct keyspan_pda_private *priv;
690

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

860 .owner = THIS_MODULE,
861 .name = "keyspan_pda",
862 },
863 .description = "Keyspan PDA",
864 .usb_driver = &keyspan_pda_driver,
865 .id_table = id_table_std,
866 .num_ports = 1,
867 .dtr_rts = keyspan_pda_dtr_rts,
884 .carrier_raised = keyspan_pda_carrier_raised,
885 .open = keyspan_pda_open,
886 .close = keyspan_pda_close,
887 .write = keyspan_pda_write,
888 .write_room = keyspan_pda_write_room,
889 .write_bulk_callback = keyspan_pda_write_bulk_callback,
890 .read_int_callback = keyspan_pda_rx_interrupt,
891 .chars_in_buffer = keyspan_pda_chars_in_buffer,
892 .throttle = keyspan_pda_rx_throttle,

--- 72 unchanged lines hidden ---
868 .open = keyspan_pda_open,
869 .close = keyspan_pda_close,
870 .write = keyspan_pda_write,
871 .write_room = keyspan_pda_write_room,
872 .write_bulk_callback = keyspan_pda_write_bulk_callback,
873 .read_int_callback = keyspan_pda_rx_interrupt,
874 .chars_in_buffer = keyspan_pda_chars_in_buffer,
875 .throttle = keyspan_pda_rx_throttle,

--- 72 unchanged lines hidden ---