# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.428 -> 1.429 # drivers/usb/serial/Config.in 1.11 -> 1.12 # drivers/usb/serial/ipaq.h 1.1 -> 1.2 # Documentation/usb/usb-serial.txt 1.7 -> 1.8 # drivers/usb/serial/ipaq.c 1.2 -> 1.3 # drivers/usb/serial/Config.help 1.1 -> 1.2 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/02/27 ganesh@tuxtop.vxindia.veritas.com 1.429 # usb ipaq driver: # Added support for the HP Jornada. # -------------------------------------------- # diff -Nru a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt --- a/Documentation/usb/usb-serial.txt Wed Feb 27 15:44:44 2002 +++ b/Documentation/usb/usb-serial.txt Wed Feb 27 15:44:44 2002 @@ -95,12 +95,13 @@ Kroah-Hartman at greg@kroah.com -Compaq iPAQ driver +Compaq iPAQ and HP Jornada driver - This driver can be used to connect to Compaq iPAQ PDAs running - Windows CE 3.0 using a USB autosync cable. It has been tested only on - the Compaq H3135. It should work with the H3600 and later models too. - It may work with other CE based handhelds as well. + This driver can be used to connect to Compaq iPAQ and HP Jornada PDAs + running Windows CE 3.0 or PocketPC 2002 using a USB cable/cradle. It + has been tested only on the Compaq H3135, but is rumoured to work on + with the H3600 and later models as well as the Jornada 548 and 568. + With minor modifications, it may work for other CE based handhelds too. The driver presents a serial interface (usually on /dev/ttyUSB0) over which one may run ppp and establish a TCP/IP link to the iPAQ. Once this @@ -109,11 +110,14 @@ kbytes/sec for download/upload to the iPAQ. The driver works intermittently with the usb-uhci driver but quite - reliably with the uhci driver. Make sure you have the right driver - loaded - usb-uhci is often the default. + reliably with the uhci driver. However, performance is much better + with usb-uhci. It does not seem to work with ohci at all. You must setup hotplug to invoke pppd as soon as the iPAQ is connected. - A ppp script like the one below may be used: + A ppp script like the one below should be kept in the file + /etc/hotplug/usb/ipaq Remember to chmod +x. Make sure there are no + options in /etc/ppp/options or ~/.ppprc which conflict with the ones + given below. #!/bin/bash @@ -133,7 +137,7 @@ On connecting the cable, you should see the usual "Device Connected", "User Authenticated" messages flash by on your iPAQ. Once connected, you can use Win CE programs like ftpView, Pocket Outlook from the iPAQ - and other synce utilities from the Linux side. Remember to enable IP + and xcerdisp, synce utilities from the Linux side. Remember to enable IP forwarding. To use Pocket IE, follow the instructions given at diff -Nru a/drivers/usb/serial/Config.help b/drivers/usb/serial/Config.help --- a/drivers/usb/serial/Config.help Wed Feb 27 15:44:44 2002 +++ b/drivers/usb/serial/Config.help Wed Feb 27 15:44:44 2002 @@ -40,9 +40,10 @@ module, say M here and read . CONFIG_USB_SERIAL_IPAQ - Say Y here if you want to connect to your Compaq iPAQ running - Windows CE 3.0 using a USB autosync cable. For information on using - the driver, read . + Say Y here if you want to connect to your Compaq iPAQ or HP Jornada + 548/568 running Windows CE 3.0 or PocketPC 2002 using a USB + cradle/cable. For information on using the driver, + read . This code is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). diff -Nru a/drivers/usb/serial/Config.in b/drivers/usb/serial/Config.in --- a/drivers/usb/serial/Config.in Wed Feb 27 15:44:44 2002 +++ b/drivers/usb/serial/Config.in Wed Feb 27 15:44:44 2002 @@ -15,7 +15,7 @@ dep_tristate ' USB Empeg empeg-car Mark I/II Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_EMPEG $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL dep_tristate ' USB FTDI Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_FTDI_SIO $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL dep_tristate ' USB Handspring Visor / Palm m50x / Sony Clie Driver' CONFIG_USB_SERIAL_VISOR $CONFIG_USB_SERIAL -dep_tristate ' USB Compaq iPAQ Driver' CONFIG_USB_SERIAL_IPAQ $CONFIG_USB_SERIAL +dep_tristate ' USB Compaq iPAQ / HP Jornada Driver' CONFIG_USB_SERIAL_IPAQ $CONFIG_USB_SERIAL dep_tristate ' USB IR Dongle Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_IR $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL dep_tristate ' USB Inside Out Edgeport Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_EDGEPORT $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL dep_tristate ' USB Keyspan PDA Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_KEYSPAN_PDA $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL diff -Nru a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c --- a/drivers/usb/serial/ipaq.c Wed Feb 27 15:44:44 2002 +++ b/drivers/usb/serial/ipaq.c Wed Feb 27 15:44:44 2002 @@ -1,7 +1,7 @@ /* * USB Compaq iPAQ driver * - * Copyright (C) 2001 + * Copyright (C) 2001 - 2002 * Ganesh Varadarajan * * This program is free software; you can redistribute it and/or modify @@ -9,6 +9,9 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * + * (25/2/2002) ganesh + * Added support for the HP Jornada 548 and 568. Completely untested. + * Thanks to info from Heath Robinson and Arieh Davidoff. */ #include @@ -39,9 +42,9 @@ /* * Version Information */ -#define DRIVER_VERSION "v0.1" +#define DRIVER_VERSION "v0.2" #define DRIVER_AUTHOR "Ganesh Varadarajan " -#define DRIVER_DESC "USB Compaq iPAQ driver" +#define DRIVER_DESC "USB Compaq iPAQ, HP Jornada driver" /* Function prototypes for an ipaq */ static int ipaq_open (struct usb_serial_port *port, struct file *filp); @@ -61,7 +64,9 @@ static __devinitdata struct usb_device_id ipaq_id_table [] = { - { USB_DEVICE(IPAQ_VENDOR_ID, IPAQ_PRODUCT_ID) }, + { USB_DEVICE(COMPAQ_VENDOR_ID, COMPAQ_IPAQ_ID) }, + { USB_DEVICE(HP_VENDOR_ID, HP_JORNADA_548_ID) }, + { USB_DEVICE(HP_VENDOR_ID, HP_JORNADA_568_ID) }, { } /* Terminating entry */ }; @@ -72,7 +77,7 @@ owner: THIS_MODULE, name: "Compaq iPAQ", id_table: ipaq_id_table, - num_interrupt_in: 0, + num_interrupt_in: NUM_DONT_CARE, num_bulk_in: 1, num_bulk_out: 1, num_ports: 1, @@ -104,8 +109,6 @@ dbg(__FUNCTION__ " - port %d", port->number); - down(&port->sem); - ++port->open_count; if (port->open_count == 1) { @@ -193,8 +196,6 @@ } } - up(&port->sem); - return result; enomem: @@ -219,8 +220,6 @@ serial = get_usb_serial(port, __FUNCTION__); if (!serial) return; - - down (&port->sem); --port->open_count; @@ -238,8 +237,6 @@ port->open_count = 0; } - up (&port->sem); - /* Uncomment the following line if you want to see some statistics in your syslog */ /* info ("Bytes In = %d Bytes Out = %d", bytes_in, bytes_out); */ } diff -Nru a/drivers/usb/serial/ipaq.h b/drivers/usb/serial/ipaq.h --- a/drivers/usb/serial/ipaq.h Wed Feb 27 15:44:44 2002 +++ b/drivers/usb/serial/ipaq.h Wed Feb 27 15:44:44 2002 @@ -1,7 +1,7 @@ /* * USB Compaq iPAQ driver * - * Copyright (C) 2001 + * Copyright (C) 2001 - 2002 * Ganesh Varadarajan * * This program is free software; you can redistribute it and/or modify @@ -16,8 +16,12 @@ #define __LINUX_USB_SERIAL_IPAQ_H -#define IPAQ_VENDOR_ID 0x049f -#define IPAQ_PRODUCT_ID 0x0003 +#define COMPAQ_VENDOR_ID 0x049f +#define COMPAQ_IPAQ_ID 0x0003 + +#define HP_VENDOR_ID 0x003f +#define HP_JORNADA_548_ID 0x1016 +#define HP_JORNADA_568_ID 0x1116 /* * Since we can't queue our bulk write urbs (don't know why - it just