Commit 8c670784 authored by Scott Cytacki's avatar Scott Cytacki Committed by Greg Kroah-Hartman

[PATCH] USB: kyocera 7135 patch

Here is a patch based on 2.6.7-rc2 that makes the Kyocera 7135 work.
The Kyocera appears to have the same setup as the Trio.  Its endpoints
are laid out like this:

> >>>type                  address
> >>>usb bulk out:         0x01
> >>>usb interrupt in:     0x82
> >>>usb bulk out:         0x03
> >>>usb bulk in:          0x84
The last two are the ones used for the syncing communication.

So the patch adds the ids for the kyocera and makes the treo_attach
function handle the kyocera too.  I also changed the comment; it appears
there was an error in the original comment about the treo:

Joe Nardelli wrote:
> Actually, the comment isn't quite right for Treos either (oops).  It
> should read:
>
> ...
> 1st bulk in endpoint to communicate with the 2nd bulk out endpoint
> ...
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent b39c9f7e
...@@ -247,6 +247,8 @@ static struct usb_device_id id_table [] = { ...@@ -247,6 +247,8 @@ static struct usb_device_id id_table [] = {
.driver_info = (kernel_ulong_t)&palm_os_4_probe }, .driver_info = (kernel_ulong_t)&palm_os_4_probe },
{ USB_DEVICE(ACEECA_VENDOR_ID, ACEECA_MEZ1000_ID), { USB_DEVICE(ACEECA_VENDOR_ID, ACEECA_MEZ1000_ID),
.driver_info = (kernel_ulong_t)&palm_os_4_probe }, .driver_info = (kernel_ulong_t)&palm_os_4_probe },
{ USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_7135_ID),
.driver_info = (kernel_ulong_t)&palm_os_4_probe },
{ }, /* optional parameter entry */ { }, /* optional parameter entry */
{ } /* Terminating entry */ { } /* Terminating entry */
}; };
...@@ -290,6 +292,7 @@ static struct usb_device_id id_table_combined [] = { ...@@ -290,6 +292,7 @@ static struct usb_device_id id_table_combined [] = {
{ USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_SPH_I500_ID) }, { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_SPH_I500_ID) },
{ USB_DEVICE(GARMIN_VENDOR_ID, GARMIN_IQUE_3600_ID) }, { USB_DEVICE(GARMIN_VENDOR_ID, GARMIN_IQUE_3600_ID) },
{ USB_DEVICE(ACEECA_VENDOR_ID, ACEECA_MEZ1000_ID) }, { USB_DEVICE(ACEECA_VENDOR_ID, ACEECA_MEZ1000_ID) },
{ USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_7135_ID) },
{ }, /* optional parameter entry */ { }, /* optional parameter entry */
{ } /* Terminating entry */ { } /* Terminating entry */
}; };
...@@ -795,7 +798,7 @@ static int palm_os_4_probe (struct usb_serial *serial, const struct usb_device_i ...@@ -795,7 +798,7 @@ static int palm_os_4_probe (struct usb_serial *serial, const struct usb_device_i
dev_err(dev, "%s - error %d getting connection info\n", dev_err(dev, "%s - error %d getting connection info\n",
__FUNCTION__, retval); __FUNCTION__, retval);
else else
usb_serial_debug_data (__FILE__, __FUNCTION__, 0x14, transfer_buffer); usb_serial_debug_data (__FILE__, __FUNCTION__, retval, transfer_buffer);
kfree (transfer_buffer); kfree (transfer_buffer);
return 0; return 0;
...@@ -881,18 +884,19 @@ static int treo_attach (struct usb_serial *serial) ...@@ -881,18 +884,19 @@ static int treo_attach (struct usb_serial *serial)
/* Only do this endpoint hack for the Handspring devices with /* Only do this endpoint hack for the Handspring devices with
* interrupt in endpoints, which for now are the Treo devices. */ * interrupt in endpoints, which for now are the Treo devices. */
if ((serial->dev->descriptor.idVendor != HANDSPRING_VENDOR_ID) || if (!((serial->dev->descriptor.idVendor == HANDSPRING_VENDOR_ID) ||
(serial->dev->descriptor.idVendor == KYOCERA_VENDOR_ID)) ||
(serial->num_interrupt_in == 0)) (serial->num_interrupt_in == 0))
return 0; return 0;
dbg("%s", __FUNCTION__); dbg("%s", __FUNCTION__);
/* /*
* It appears that Treos want to use the 1st interrupt endpoint to * It appears that Treos and Kyoceras want to use the
* communicate with the 2nd bulk out endpoint, so let's swap the 1st * 1st bulk in endpoint to communicate with the 2nd bulk out endpoint,
* and 2nd bulk in and interrupt endpoints. Note that swapping the * so let's swap the 1st and 2nd bulk in and interrupt endpoints.
* bulk out endpoints would break lots of apps that want to communicate * Note that swapping the bulk out endpoints would break lots of
* on the second port. * apps that want to communicate on the second port.
*/ */
#define COPY_PORT(dest, src) \ #define COPY_PORT(dest, src) \
dest->read_urb = src->read_urb; \ dest->read_urb = src->read_urb; \
......
...@@ -55,6 +55,9 @@ ...@@ -55,6 +55,9 @@
#define ACEECA_VENDOR_ID 0x4766 #define ACEECA_VENDOR_ID 0x4766
#define ACEECA_MEZ1000_ID 0x0001 #define ACEECA_MEZ1000_ID 0x0001
#define KYOCERA_VENDOR_ID 0x0C88
#define KYOCERA_7135_ID 0x0021
/**************************************************************************** /****************************************************************************
* Handspring Visor Vendor specific request codes (bRequest values) * Handspring Visor Vendor specific request codes (bRequest values)
* A big thank you to Handspring for providing the following information. * A big thank you to Handspring for providing the following information.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment