RE: [PATCH 2/2]linux-usb:optimize to match the Huawei USB storage devices and support new switch command

Fangxiaozhi (Franko)
2013-01-04T07:31:10Z

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 3056 bytes --]

Dear Matthew:

> -----Original Message-----
> From: Matthew Dharm [mailto:mdharm-usb@one-eyed-alien.net]
> Sent: Wednesday, December 19, 2012 11:41 PM
> To: Sebastian Andrzej Siewior
> Cc: Fangxiaozhi (Franko); linux-usb@vger.kernel.org;
> linux-kernel@vger.kernel.org; Xueguiying (Zihan); Linlei (Lei Lin);
> greg@kroah.com; Yili (Neil); Wangyuhua (Roger, Credit); Huqiao; balbi@ti.com
> Subject: Re: [PATCH 2/2]linux-usb:optimize to match the Huawei USB storage
> devices and support new switch command
>
> On Wed, Dec 19, 2012 at 12:34 AM, Sebastian Andrzej Siewior
> <sebastian@breakpoint.cc> wrote:
> > On Wed, Dec 19, 2012 at 03:13:32AM +0000, Fangxiaozhi (Franko) wrote:
> >> > And shouldn't you read something from the us->recv_bulk_pipe after
> >> > that?
> >> Well, because our device will re-connect to switch the ports if it
> receives the command.
> >> So it is not necessary to read the response of the command.
> >
> > Hmm. I guess this for Matthew / Greg to decide, I don't insist on anything.
> > Maybe a comment would be nice because now it looks, atleast to me,
> > that something is missing.
>
> I think an unusual situation like that deserves a comment that explains that the
> device is about to disconnect / reconnect, so reading status is not necessary.
You mean that we have to add some comment in the source code,
to explain why we don't read the response. Right?

>
> I am also concerned about the error of using &bcbw instead of bcbw. I doubt
> this code would have worked with that typo in place. How was this patch
> tested?
>
> Also, the dongles_pid function is really just a different implementation of the
> unusual_devs.h table. I think that it is much easier for people to add new
> entries to the table, rather than edit your code, when new dongles are released.
> BUT, your code includes many more PIDs than the table did. Again, how was
> this tested for the new PIDs covered?
In the dongles_pid function, we have check all the product IDs for our dongles, which is assigned for all of our Mobile Broadband products in our company. So the product ID of our new dongle in future, will also be included in this list.
In our lab, we can configure our dongle firmware to support all of these product ID. We have test them(cover all the product ID), and this function works fine.

>At a minimum, some comment in
> dongles_pid is required to highlight this area of code for possible future
> expansion as new devices are released.
As far as I know, the product ID list in dongles_pid function includes all. We will not add any other product ID for our dongle. So we need not update the product ID list in dongles_pid function in future.
However, I also will add the comment to highlight the area of code, as your advice did.
>
> Matt
>
> --
> Matthew Dharm
> Maintainer, USB Mass Storage driver for Linux

Best Regards,
Franko Fang
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éÝ¶\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dÊ‡Ú™ë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥