On Wed, Jun 07, 2006 at 04:53:33PM -0300, Luiz Fernando N. Capitulino wrote:
> 
>  Hi Sergei,
> 
> On Wed, 07 Jun 2006 21:54:16 +0400
> Sergei Organov <[EMAIL PROTECTED]> wrote:
> 
> | Would it be a welcome contribution if I try to split the "generic" into,
> | say, usb-serial-core and usb-serial-generic, the latter being really
> | tiny at the beginning, and then improve it for speed? I've actually done
> | it (speed improvement for bulk transfers) one time for 2.4.x, but at
> | that time interface to the tty layer was not suitable for high-speed
> | transfers and therefore my code had quite a few ugly kludges and finally
> | I wasn't able to match raw USB bulk speeds anyway. Now, AFAIK, the tty
> | layer interface has been improved and I hope to have better experience.
> 
>  Yes, it was.
> 
>  Considering the current design, one thing I'd like to have is the generic
> code completely decoupled from the usbserial module, ie, a real
> usbserial-generic module.
> 
>  This would also force us to kill the fix_up_generic() function.
> I don't like the way it works, IMHO, it's C black magic, and it
> can lead to trouble.

How?  It works like other kernel functions, if you don't define your own
function pointer, it defaults to the "generic" one.

I created the fix_up_generic() function to make it easier than doing the
check on every test for the different function pointers.  One test at
module load time is better than a test for every time write() is called
:)

>  Would be better to have usbserial-generic only exporting the
> generic methods, then driver authors would assign by hand the methods
> he (or she) wants to use (yes, nothing automatic).

What happens if they don't set up the proper functions?  We should
default back to the "generic" ones then, otherwise bad things can
happen.

Think of it as inheriting from a base C++ class, and it will become more
comfortable :)

thanks,

greg k-h


_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to