Hello Greg Kroah-Hartman:
in drivers/usb/core/message.c:
at line 943, status is kmalloc ( sizeof u16 )
at line 952, assign the value of status to data
at line 953, free status.
it is better to let "u16 status" instead of "u16 *status = kmalloc...".
thanks.
gchen.
940 int usb_get_st
于 2012年12月06日 19:01, Peter Stuge 写道:
> Chen Gang wrote:
>> it is better to let "u16 status" instead of "u16 *status = kmalloc...".
> .
>> 940 int usb_get_status(struct usb_device *dev, int type, int target, void
>> *data)
>> 941 {
>> 94
于 2012年12月06日 19:32, Oliver Neukum 写道:
> On Thursday 06 December 2012 18:51:25 Chen Gang wrote:
>> Hello Greg Kroah-Hartman:
>>
>> in drivers/usb/core/message.c:
>> at line 943, status is kmalloc ( sizeof u16 )
>> at line 952, assign the value of status to d
Hello Oliver Neukum:
in drivers/usb/core/config.c, for function usb_get_configuration:
if processing failed at line 694, we will goto err2 (line 755..759)
in this condition, we do not free dev-config and dev->rawdescriptors.
after checking another relative source code, it seems not an iss
于 2012年12月06日 23:50, Alan Stern 写道:
> On Thu, 6 Dec 2012, Chen Gang wrote:
>> in drivers/usb/core/config.c, for function usb_get_configuration:
>>
>> if processing failed at line 694, we will goto err2 (line 755..759)
>> in this condition, we do not free dev-con
Hello Greg Kroah-Hartman:
in drivers/usb/renesas_usbhs/mod_host.c, in function usbhsh_queue_done:
get ureq from pkt, by using the macro usbhsh_pkt_to_ureq (at line 637)
pkt is the sub-object of ureq (line 73..76, line 157..158)
free ureq, by calling function usbhsh_ureq_free (at
ok, thanks.
:-)
gchen.
于 2012年12月07日 23:18, Alan Stern 写道:
> On Fri, 7 Dec 2012, Chen Gang wrote:
>
>> but I still not quite be sure, please help checking (total 3 steps, below).
>>
>> thanks.
>>
>> --
于 2012年12月07日 23:03, Greg KH 写道:
> On Fri, Dec 07, 2012 at 08:42:25PM +0800, Chen Gang wrote:
>> Hello Greg Kroah-Hartman:
>>
>> in drivers/usb/renesas_usbhs/mod_host.c, in function usbhsh_queue_done:
>>
>> get ureq from pkt, by using the macro usbhsh_pkt_to_
me as Reported-by in your patch.
need not cc to me:
I am not reviewer, so I am not suitable to review another maintainers
patch
else
it is my duty to send the relative patch (although it seems not a good idea)
thanks.
gchen.
>
> Best regards
> ---
> Kuninori Morimoto
Hello Alan Stern:
in drivers/usb/host/uhci-debug.c, for function uhci_sprint_schedule:
we are not check the len of buf (not like another static functions in this
file).
the buffer len is MAX_OUTPUT: 64 * 1024 (line 491, line 517)
the buffer may not be enough:
we may loop UHCI_NUM
jord...@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
--
Chen Gang
Asianux Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hello Alan Stern:
in drivers/usb/host/ohci-q.c, function finish_urb:
when we finish call urb_free_priv, we not set urb->hcpriv = NULL (line 46)
urb_free_priv call kfree for urb_priv (which is urb->hcpriv, line 29)
within finish_urb, we not set urb->hcpriv = NULL (line 43..81)
in d
though I do not think it is a
good idea).
excuse me, please wait some days (at least, I need construct the
relative environments for testing).
thanks.
--
Chen Gang
Asianux Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the bo
于 2012年12月16日 01:04, Alan Stern 写道:
> On Sat, 15 Dec 2012, Chen Gang wrote:
>
>> > Hello Alan Stern:
>> >
>> > in drivers/usb/host/ohci-q.c, function finish_urb:
>> > when we finish call urb_free_priv, we not set urb->hcpriv = NULL (line
&
于 2012年12月17日 09:37, Chen Gang 写道:
> 于 2012年12月16日 01:04, Alan Stern 写道:
>> Also, don't forget that the first think usb_hcd_giveback_urb does is
>> set urb->hcpriv to NULL.
>>
>
> in finish_urb:
> when call usb_hcd_giveback_urb, need unloc
he next time the URB is submitted
> and usb_hcd_link_urb_to_ep is called.
it is true for ohci_urb_dequeue.
how about finish_unlinks and takeback_td in drives/usb/host/ohci-q.c ?
(they also can call finish_urb).
--
Chen Gang
Asianux Corporation
--
To unsubscribe from this list: send the
于 2012年12月17日 23:27, Alan Stern 写道:
> On Mon, 17 Dec 2012, Chen Gang wrote:
>
>> 于 2012年12月17日 11:08, Alan Stern 写道:
>>> It is pretty much as I explained in my previous email.
>>>
>>> finish_urb calls usb_free_priv while holding the lock. Then whil
于 2012年12月17日 23:27, Alan Stern 写道:
> On Mon, 17 Dec 2012, Chen Gang wrote:
>
>> 于 2012年12月17日 11:08, Alan Stern 写道:
>>> It is pretty much as I explained in my previous email.
>>>
>>> finish_urb calls usb_free_priv while holding the lock. Then whil
although we can not say it is surely a bug.
it is better to set urb->hcpriv = NULL, after finish calling urb_free_priv.
before kfree urb_priv, better to judge whether urb_priv == NULL, firstly.
Signed-off-by: Chen Gang
---
drivers/usb/host/ohci-q.c |7 ++-
1 file changed
; + return;
>> > +
>> > + last = urb_priv->length - 1;
> Please don't do this. If urb_priv is NULL, that's a bug. We want it
> to cause a visible error, not silently fail.
>
good idea ! (for private use, it is a good idea)
I'll sen
although we can not say it is surely a bug.
it is better to set urb->hcpriv = NULL, after finish calling urb_free_priv.
Signed-off-by: Chen Gang
---
drivers/usb/host/ohci-q.c |1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c
in
use wc -c to get the count of output contents, then judge whether match
the MAX_OUTPUT.
if you have additional completions, please tell me.
I will start the implementation when get your reply.
Regards.
--
Chen Gang
Asianux Corporation
--
To unsubscribe from this list: send th
: Chen Gang
---
drivers/usb/host/uhci-debug.c | 140 +
drivers/usb/host/uhci-hcd.c |4 +-
drivers/usb/host/uhci-q.c |2 +-
3 files changed, 102 insertions(+), 44 deletions(-)
diff --git a/drivers/usb/host/uhci-debug.c b/drivers/usb/host/uhci
uhci_to_hcd(uhci)->self.bandwidth_int_reqs,
>> uhci_to_hcd(uhci)->self.bandwidth_isoc_reqs);
>> if (debug <= 1)
>> -return out - buf;
>> +goto tail;
>>
>> out += sprintf(out, "Frame List\
contents not seperated in second line.
Signed-off-by: Chen Gang
---
drivers/usb/host/uhci-debug.c | 178 +++--
drivers/usb/host/uhci-hcd.c | 31 ---
drivers/usb/host/uhci-q.c |2 +-
3 files changed, 136 insertions(+), 75 deletions(-)
diff --git
道:
> Hello.
>
> On 11-03-2013 14:14, Chen Gang wrote:
>
>>since parameter driver has been deleted, also need delete relative
>> comments.
>> relative
>
>You probably meant "related" in both cases?
ok, th
Hello Felipe Balbi:
I have communicate with related member of net2272 and net2280.
net2272 and net2280 belong to PLX Tech Corporation.
they say: "PLX is not longer maintain these drivers".
(it means: they can not help us to test this patch).
please see the FWD mail at the botto
于 2013年03月14日 23:07, Alan Stern 写道:
> I have a net2280. Which patch do you want me to test? The two of you
> have come up with two different versions.
thank Alan very much, thank Felipe, too.
:-)
--
Chen Gang
Asianux Corporation
--
To unsubscribe from this list: send th
when suspend, it need check 'udev->actconfig'.
so when process failure, also need check it.
Signed-off-by: Chen Gang
---
drivers/usb/core/driver.c | 10 ++
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/d
On 2013年04月01日 22:58, Alan Stern wrote:
> Thanks for spotting this.
>
> Acked-by: Alan Stern
thank you too.
--
Chen Gang
Asianux Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
Mor
ilure.
the original related commit is:
commit 0de9a7024e7ae62512d080c7e2beb59d82958cd5
Author: Oliver Neukum
Date: Fri Mar 16 20:28:28 2007 +0100
Signed-off-by: Chen Gang
---
drivers/usb/serial/mos7840.c | 15 ++-
1 files changed, 10 insertions(+), 5 deletions(-)
dif
? (the related patch is below)
:-)
On 2013年04月01日 11:50, Chen Gang wrote:
>
> inside the 'for' looping:
> the return value 'rv' may override if not have a check in time.
>
> next checking, outside the 'for' looping:
> can not find fail
On 2013年04月03日 16:31, Oliver Neukum wrote:
> correct but dirty. A boolean and a comment would be nice.
ok, thanks.
I will send patch v3.
--
Chen Gang
Asianux Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a mess
the failure, and not stop servicing the
other ports just because there is an error in another port.
Signed-off-by: Chen Gang
Signed-off-by: Oliver Neukum
---
drivers/usb/serial/mos7840.c | 12 +---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/serial/
On 2013年04月03日 17:25, Chen Gang wrote:
> inside the 'for' looping:
> the return value 'rv' may override if not have a check in time.
>
> the next checking (outside the 'for' looping):
> can not find failure which generated during the &
On 2013年04月06日 15:34, Chen Gang wrote:
> On 2013年04月03日 17:25, Chen Gang wrote:
>> inside the 'for' looping:
>> the return value 'rv' may override if not have a check in time.
>>
>> the next checking (outside the 'for' looping):
&g
t-in.o: In function `omap3_evm_init':
arch/arm/mach-omap2/board-omap3evm.c:703: undefined reference to
`usb_nop_xceiv_register'
Signed-off-by: Chen Gang
---
include/linux/usb/usb_phy_gen_xceiv.h |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git
Hello Maintainers:
Please help check this patch, when you have time.
Thanks.
On 10/23/2013 05:55 PM, Chen Gang wrote:
> When CONFIG_NOP_USB_XCEIV is as 'm', usb_nop_xceiv_register() will be
> exported when the related module is loaded. So for built-in source
> code, still nee
On 11/15/2013 02:37 AM, Tony Lindgren wrote:
> * Chen Gang [131023 02:57]:
>> When CONFIG_NOP_USB_XCEIV is as 'm', usb_nop_xceiv_register() will be
>> exported when the related module is loaded. So for built-in source
>> code, still need use the empty one.
>>
ismatch in
reference from the variable .LM2953 to the variable .init.text:_cdc_do_config
The function .LM2953() references
the variable __init _cdc_do_config.
This is often because .LM2953 lacks a __init
annotation or the annotation of _cdc_do_config is wrong.
Signed-off-by: Chen Gang
---
dri
Hello Alan Stern
When you have time, could you help checking this patch ?
welcome any reasonable rejections, too.
thanks.
gchen.
于 2013年01月19日 07:37, Greg KH 写道:
> On Sat, Jan 12, 2013 at 11:18:03PM +0800, Chen Gang wrote:
>>
>> for function uhci_sprint_schedule:
&g
for NUL terminated string, better notice '\0' in the end.
Signed-off-by: Chen Gang
---
drivers/usb/gadget/uvc_v4l2.c |6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/gadget/uvc_v4l2.c b/drivers/usb/gadget/uvc_v4l2.c
index 2ca9386..a9934c7 10
hin 80 bondary.
for me, I think it is better to seperate it into multiple lines.
if you do not think so, please tell me, I will restore, thanks.
and also thank you for your details checking.
--
Chen Gang
Asianux Corporation
--
To unsubscribe from this list: send the line "un
于 2013年01月23日 09:00, Laurent Pinchart 写道:
> Thank you for the patch. I've applied it to my tree.
thanks.
--
Chen Gang
Asianux Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More major
PATCH 1/2: check buffer length to avoid memory overflow
PATCH 2/2: beautify source code
"PATCH 2/2" is made based on "PATCH 1/2"
please apply "PATCH 1/2" firstly, and then apply "PATCH 2/2"
total stat (2 patches together):
---
drivers/usb/host/uhci-debug.c | 178
it like this:
at first, make enough room for buffering the exceeding contents
judge the contents which written whether bigger than buffer length
if bigger (the exceeding contents will be in the exceeding buffer)
break current work flow, and return.
Signed-off-by: Chen Gang
get rid of the line breaks in string constants.
let comments within 80 with limitation.
delete ' \' at the end of a statement.
Signed-off-by: Chen Gang
---
drivers/usb/host/uhci-debug.c | 28
drivers/usb/host/uhci-hcd.
于 2013年01月24日 00:34, Alan Stern 写道:
> Here you could just get rid of the second *** on each line. Or put the
> "7 ports max" into parentheses and get rid of all the ***'s.
>
> Alan Stern
thank you, I will send [PATCH 2/2 v2].
--
Chen Gang
Asianux Corporation
get rid of the line breaks in string constants.
let comments within 80 with limitation.
delete ' \' at the end of a statement.
Signed-off-by: Chen Gang
---
drivers/usb/host/uhci-debug.c | 28
drivers/usb/host/uhci-hcd.
于 2013年01月25日 05:59, Greg KH 写道:
> This patch was line-wrapped and trailing spaces dropped, making it
> impossible to apply. I edited it by hand to get it to work, but please
> be more careful in the future.
thank you very much.
I should notice, next time.
--
Chen Gang
for NUL terminated string, better notice '\0' in the end.
Signed-off-by: Chen Gang
---
drivers/usb/gadget/f_uvc.c |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/gadget/f_uvc.c b/drivers/usb/gadget/f_uvc.c
index 5b62987..92efd6e 100644
--- a/d
for NUL terminated string, better notice '\0' in the end.
Signed-off-by: Chen Gang
---
drivers/usb/core/devio.c |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index b78fbe2..4a863fd 100644
--- a/driver
convert to new style
commit 4cf5e00b055ba5e4f3852e477a2a4346730ea283
Author: Felipe Balbi
Date: Mon Oct 10 10:37:17 2011 +0300
usb: gadget: net2280: convert to new style
Signed-off-by: Chen Gang
---
drivers/usb/gadget/net2272.c |4
drivers/usb/gadget/net2280.c
于 2013年03月02日 03:47, Laurent Pinchart 写道:
> I've taken the patch in my tree.
>
> I've just sent a consolidated series of most pending UVC gadget patches to
> the
> list, and I will send you a pull request as soon as I receive a Tested-by.
thanks
--
Chen Gang
times but you can remove the for loop if you want:
thank you for your information, they are valuable to me.
--
Chen Gang
Asianux Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
于 2013年03月04日 01:35, Laurent Pinchart 写道:
> On Sunday 03 March 2013 01:23:46 Felipe Balbi wrote:
>> > On Fri, Mar 01, 2013 at 08:47:34PM +0100, Laurent Pinchart wrote:
>>> > > On Wednesday 27 February 2013 10:26:23 Felipe Balbi wrote:
>>>> > > > On
lcome additional suggestions or completions.
thanks
:-)
--
Chen Gang
Asianux Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
since parameter driver has been deleted, also need delete relative comments.
relative commit number is d93e2600d80fc41ccf339b4a2843a3007d479907
Signed-off-by: Chen Gang
---
drivers/usb/gadget/s3c-hsudc.c |1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/usb
y my suggestion above and run the same test again?
after reference the commit: d93e2600d80fc41ccf339b4a2843a3007d479907
it seems udc_start and udc_stop will have effect,
so not need call driver->disconnect()
is it correct ?
thanks.
--
Chen Gang
Asianux Corporation
--
To unsubscr
于 2013年03月11日 18:17, Chen Gang 写道:
> 于 2013年03月04日 22:35, Felipe Balbi 写道:
>> since stop_activity() also gets called from RESET interrupt, and in that
>> case we need to call driver->disconnect(). Can you make a simple test
>> that would take current code and issue a dev
since commit d93e260 (usb: gadget: s3c-hsudc: use udc_start and udc_stop
functions) the 'driver' parameter has been deleted from
s3c_hsudc_stop_activity() but its documentation was left outdated. This
patch deletes the comment since it makes no sense anymore.
Signed-off-by:
于 2013年03月11日 18:21, Felipe Balbi 写道:
> in case of net2272.c and net2280.c, they call stop_activity() also from
> disconnect and reset interrupt handlers, in that case the gadget driver
> needs to know about the disconnect.
I guess your meaning is:
for net2272.c and net2280.c, we still need
于 2013年03月11日 18:50, Felipe Balbi 写道:
> On Mon, Mar 11, 2013 at 06:42:25PM +0800, Chen Gang wrote:
>> > if I can not find other members to help us, I will try to find another
>> > ways.
> code inspection works most of the time.
>
excuse me, my English is not qui
ed code block. If the 2 patches can pass checking, we also need
check the other related code blocks.
Diff stat:
---
drivers/usb/class/usbtmc.c | 22 --
1 files changed, 16 insertions(+), 6 deletions(-)
Thanks.
--
Chen Gang
--
To unsubscribe from this list: send the line
The variable 'actual' is only used in "checking 'buffer[1]'" code
block, so need move it into, or it may not be initialized.
Signed-off-by: Chen Gang
---
drivers/usb/class/usbtmc.c | 14 --
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git
The variable 'n' is initialized before "goto usbtmc_clear_check_status"
looping, and used in inside "do ... while" looping,
So it may be not less than 'USBTMC_MAX_READS_TO_CLEAR_BULK_IN', need
add related checking for it before the looping "do ... wh
Hello Maintainers:
Please help check this patch when you have time, thanks.
BTW: this uninitialized variable warning may not be found by gcc
compiler (which a gcc bug exists almost 10 years).
Thanks.
On 07/02/2013 12:06 PM, Chen Gang wrote:
> The variable 'actual' is only used
Hello Maintainers:
Please help check this patch when you have time.
Thanks.
On 07/11/2013 09:08 AM, Chen Gang wrote:
> Hello Maintainers:
>
> Please help check this patch when you have time, thanks.
>
> BTW: this uninitialized variable warning may not be found by gcc
> com
gt;
> I can, if someone will resend it so I can apply it :)
>
This patch you have already applied (applied this patch in 2014-09-24),
so I need not resend it.
Thank all of you for your work.
Thanks.
--
Chen Gang
Open, share, and attitude like air, water, and life which God blessed
--
To
function 'musb_indexed_ep_select':
drivers/usb/musb/musb_regs.h:458:32: error: 'USB_INDEX' undeclared (first use
in this function)
#define MUSB_INDEX USB_OFFSET(USB_INDEX) /* 8 bit */
^
Signed-off-by: Chen Gang
---
drivers/usb/musb/Kc
On 4/4/15 06:03, Richard Weinberger wrote:
> On Fri, Apr 3, 2015 at 11:51 PM, Chen Gang
> wrote:
>> Under blackfin, only bf527, bf548 and bf609 may use musb. The related
>> error with allmodconfig:
>>
>> CC [M] drivers/usb/misc/trancevibrator.o
>> In
On 4/4/15 17:54, Greg Kroah-Hartman wrote:
> On Sat, Apr 04, 2015 at 05:51:21AM +0800, Chen Gang wrote:
>> Under blackfin, only bf527, bf548 and bf609 may use musb. The related
>> error with allmodconfig:
>>
>> CC [M] drivers/usb/misc/trancevibrator.o
>>
On 4/5/15 16:29, Greg Kroah-Hartman wrote:
> On Sun, Apr 05, 2015 at 06:33:44AM +0800, Chen Gang wrote:
>> On 4/4/15 17:54, Greg Kroah-Hartman wrote:
>>> On Sat, Apr 04, 2015 at 05:51:21AM +0800, Chen Gang wrote:
>>>> Under blackfin, only bf527, bf548 and bf609 may us
=implicit-function-declaration]
irq = irq_of_parse_and_map(dn, 0);
^
Signed-off-by: Chen Gang
---
drivers/usb/host/ehci-xilinx-of.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/ehci-xilinx-of.c
b/drivers/usb/host/ehci-xilinx-of.c
index fe57710..a232836 100644
--- a
Hello Maintainers:
Please help check this patch, when you have time.
Thanks.
On 09/08/2014 01:20 PM, Michal Simek wrote:
> On 09/03/2014 05:50 PM, Chen Gang wrote:
>> Need include it for irq_of_parse_and_map(), the related error with
>> allmodconfig under microblaze:
>>
x/list.h:8,
from include/linux/module.h:9,
from drivers/net/usb/sr9700.c:13:
./arch/xtensa/include/asm/processor.h:190:0: note: this is the location of
the previous definition
#define RSR(v,sr) __asm__ __volatile__ ("rsr %0,"__stringify(sr) : "=a"(v));
thanks again.
--
Chen Gang
Flying Transformer
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On 07/19/2013 12:43 PM, Ming Lei wrote:
> Hi Chen Gang,
>
> On Fri, Jul 19, 2013 at 12:21 PM, Chen Gang wrote:
>> Hello Maintainers:
>>
>> Please help check this patch when you have time.
>
> Looks your patch is correct, and I think Greg will handle
> y
78 matches
Mail list logo