[haiku-commits] Re: haiku: hrev44370 - src/add-ons/kernel/drivers/ports/usb_serial

  • From: François Revol <revol@xxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 25 Jul 2012 12:40:36 +0200

On 25/07/2012 12:31, Siarzhuk Zharski wrote:
> kallisti5@xxxxxxxxxxx писал 21.07.2012 05:24:
>> hrev44370 adds 1 changeset to branch 'master'
>> old head: 667fd4d0eaf904b3928d52c740e0bbc7bdc88f86
>> new head: 5ba5e31f8a59cb5f3299edd7af256d0fb4db12aa
>>
>>
>> ----------------------------------------------------------------------------
>>
>>
>> 5ba5e31: usb_serial: clean up usb device identification
>>
>>   * Update FTDI, KLSI, Prolific, and Silicon drivers to share a
>>     common structural layout for device identification.
>>   * More flexible and cleaner than massive switch case statements.
> 
> I think you shouild use even more effective binsearch-driven way
> introduced in the usb_asix
> (src/add-ons/kernel/drivers/network/usb_asix/Driver.cpp#35) or
> usb_davicom drivers. There are myriads of FTDI devices and their's count
> will grown. Look, for example to the devices list at
> http://sis4be.cvs.sourceforge.net/viewvc/sis4be/usb_serial/driver.c?revision=1.32&view=markup.
> IMO iterating through more than 300 entries is not a good solution. ;-)
> 

Ideally those drivers would be converted to the device manager API and
it would be left to it to do the ID matching in a generalized way...

but that's probably post-R1.

François.

Other related posts: