Re: [PATCH v2 2/2] opticon: use generic code where possible

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alon Ziv
Date: Monday, October 25, 2010 - 12:48 pm

Hi Johan,


Thanks for the review.

Please see my replies below.


On 10/25/2010 01:11 PM, Johan Hovold wrote:

Removed.

Right...
I considered doing it differently (which would require more code--I
would need to track the outstanding control URBs, and would need a
callback to free the kmalloc()ed setup packet). In the end, I left it as
blocking because the actual protocol used by the OPN2001 is very light
on writes (in fact, it never writes anything without waiting for a
response, and its longest outgoing message is
limited to 70 bytes).

Good question, actually...
(I remembered a control packet cannot transfer more than 64B, but my
memory was wrong)
 
Will do.
Ditto.

It was never really there...
The old code used to set rts without the lock, and only read with the
lock--quite meaningless. And since there is only a single writer and a
single reader (and the data type is inherently atomic), I see no reason
for locking.
Actually--no, I did not benchmark. I just looked at various other
drivers, saw the numbers are all over the map, and pulled a number out
of my (metaphorical) hat.
And anyway--the actual device I am using (OPN2001) does not use the
bulk-out at all.
So I'll change to 256, but I still won't be able to prove it right (or
wrong).

Thanks again,
-az
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH v2 0/2] Further cleanups to opticon driver, Alon Ziv, (Sat Oct 23, 11:43 am)
Re: [PATCH v2 2/2] opticon: use generic code where possible, Alon Ziv, (Mon Oct 25, 12:48 pm)