Re: [PATCH ipaq.c 2/3] Kernel option for comport selection

Andre Spahlinger <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
Sorry for long response time.
No problem to "eliminate" the changelog and DRIVER_VERSION part.
I?ve no clue for a self-explanatory name for the module parameter. On
the linux machine the interface(s) are called
ttyUSBx. On PocketPC devices they are natively called COMx. So this
could be a name or mobile_com to indicate
that the interface of the mobile device is meant. The value depends on
the device you use, so it is difficult to limit it to a value.
No clue if there are devices around with more than two endpoint pairs.
Its possible to limit the value to 1 with the restriction that
future devices may not work. I found no way to read out of the device
how much endpoints it have.

Cheers


or something like this?
Greg KH schrieb:
> On Mon, Feb 26, 2007 at 01:49:35PM +0100, Andre Spahlinger wrote:
>   
>> Add a kernel option to select the usb endpoint pair to communicate with
>> the device.
>> This patch is from the synce project.
>>
>> diff -uprN a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c
>> --- a/drivers/usb/serial/ipaq.c    Tue Feb 20 06:34:32 2007
>> +++ b/drivers/usb/serial/ipaq.c    Fri Feb 23 09:31:21 2007
>> @@ -9,6 +9,15 @@
>>   *    the Free Software Foundation; either version 2 of the License, or
>>   *    (at your option) any later version.
>>   *
>> + * (11/09/2004) Pascal
>> + * Added vendor and product id for MiTAC Mio 168 which is also sold as
>> + * Yakumo PDA delta 300 GPS and bluemedia PDA 255.
>> + * Use modprobe ipaq ttyUSB=1 for them.
>> + *
>> + * (18/11/2003) Olivier
>> + * Added insmod options to specify the ttyUSB port for new iPAQ
>> + * Use modprobe ipaq ttyUSB=1 or ttyUSB=0
>> + *
>>     
>
> Don't add new change log entries to the file, the real change log for
> the whole kernel will show this information.  Otherwise it gets very
> large very quickly and is a mess.
>
>   
>>   * (12/12/2002) ganesh
>>   *     Added support for practically all devices supported by ActiveSync
>>   *     on Windows. Thanks to Wes Cilldhaire
>> <[email protected]>.
>> @@ -64,7 +73,7 @@
>>   * Version Information
>>   */
>>  
>> -#define DRIVER_VERSION "v0.5"
>> +#define DRIVER_VERSION "v2.6.13.3.SynCE.1"
>>     
>
> That's a pretty big version update for such a small patch :)
>
>   
>>  #define DRIVER_AUTHOR "Ganesh Varadarajan <[email protected]>"
>>  #define DRIVER_DESC "USB PocketPC PDA driver"
>>  
>> @@ -72,6 +81,7 @@ static __u16 product, vendor;
>>  static int debug;
>>  static int connect_retries = KP_RETRIES;
>>  static int initial_wait;
>> +static int ttyUSB = 0;
>>  
>>  /* Function prototypes for an ipaq */
>>  static int  ipaq_open (struct usb_serial_port *port, struct file *filp);
>> @@ -950,7 +960,13 @@ static int __init ipaq_init(void)
>>          ipaq_id_table[0].idVendor = vendor;
>>          ipaq_id_table[0].idProduct = product;
>>      }
>> +
>> +    ipaq_device.num_bulk_in = ttyUSB + 1;
>> +    ipaq_device.num_bulk_out = ttyUSB + 1;
>> +    ipaq_device.num_ports = ttyUSB + 1;
>> +
>>      retval = usb_register(&ipaq_driver);
>> +    dbg("%s - iPAQ module configured for port ttyUSB%d", __FUNCTION__,
>> ttyUSB);
>>     
>
> Your patch is line-wrapped :(
>
> And I really don't see how this is going to work.  What happens if I put
> "4" as this port number?  That will just be wrong, right?
>
> I think the confusion is in the name for this parameter, try naming it
> something that has nothing to do with the minor number and that might
> make more sense to everyone (especially me.)
>
> thanks,
>
> greg k-h
>
>   


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.