From: "Du, Changbin"
When activate a static object, we need make sure that the object is
tracked in the object tracker. If it is a non-static object, then
the activation illegal.
In previous implementation, each subsystem need take care of this in
their fixup callbacks. Actually we can put it in
From: "Du, Changbin"
When activate a static object, we need make sure that the object is
tracked in the object tracker. If it is a non-static object, then
the activation illegal.
In previous implementation, each subsystem need take care of this in
their fixup callbacks. Actually we can put it in
From: "Du, Changbin"
On most platforms, there is only one device controller available.
In this case, we desn't care the UDC's name. So let's ignore the
name by setting 'UDC' to 'any'. And also we can change UDC name
at any time if it is not binded (no need set to "" first).
Signed-off-by: Du, Ch
From: "Du, Changbin"
When I am configuring Gadget Configfs, I need found a exactly UDC name before
I can start my gadget. But, really I doesn't care about which UDC name is used,
because I have only controller. "any" is a good option.
Du, Changbin (2):
usb: configfs: allow UDC binding rule con
From: "Du, Changbin"
Add the usage of new binding mode 'any'.
$ echo any > UDC
Signed-off-by: Du, Changbin
Signed-off-by: Du, Changbin
---
Documentation/usb/gadget_configfs.txt | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Documentation/usb/gadget_configfs.txt
b/D
From: "Du, Changbin"
The dwc3 controller can't generate a disconnect event after it is
stopped. Thus gadget dissconnect callback is not invoked when do
soft dissconnect. Call dissconnect here to workaround this issue.
Note, most time we still see disconnect be called that because
it is invoked b
From: "Du, Changbin"
This patch add "-g, --git" option that tread FILE as git commits
expression. You can specify the git commit hash ID expressions,
then these commits from your git repository will be checked.
This feature allows you can check your patches but no need to
generate temporary patc
From: "Du, Changbin"
If debug_object_fixup() return non-zero when problem has been
fixed. But the code got it backwards, it taks 0 as fixup
successfully. So fix it.
Signed-off-by: Du, Changbin
---
lib/debugobjects.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/debugo
From: "Du, Changbin"
Update the return type to use bool instead of int, corresponding to
cheange (debugobjects: make fixup functions return bool instead of int)
Signed-off-by: Du, Changbin
---
kernel/workqueue.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff
From: "Du, Changbin"
Update the return type to use bool instead of int, corresponding to
cheange (debugobjects: make fixup functions return bool instead of int).
Signed-off-by: Du, Changbin
---
lib/percpu_counter.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/p
From: "Du, Changbin"
Update documentation creangponding to change(debugobjects: make
fixup functions return bool instead of int).
Signed-off-by: Du, Changbin
---
Documentation/DocBook/debugobjects.tmpl | 26 ++
1 file changed, 14 insertions(+), 12 deletions(-)
diff --g
From: "Du, Changbin"
Update the return type to use bool instead of int, corresponding to
cheange (debugobjects: make fixup functions return bool instead of int).
Signed-off-by: Du, Changbin
---
kernel/rcu/update.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel
From: "Du, Changbin"
Update the return type to use bool instead of int, corresponding to
cheange (debugobjects: make fixup functions return bool instead of int).
Signed-off-by: Du, Changbin
---
kernel/time/hrtimer.c | 18 +-
kernel/time/timer.c | 30 +++---
From: "Du, Changbin"
Hello,
I am going to introduce debugobjects infrastructure to USB subsystem.
But before this, I found the code of debugobjects could be improved.
This patchset will make fixup functions return bool type instead of
int. Because fixup only need report success or no. boolean is
From: "Du, Changbin"
The object debugging infrastructure core provides some fixup callbacks
for the subsystem who use it. These callbacks are called from the debug
code whenever a problem in debug_object_init is detected. And
debugobjects core suppose them returns 1 when the fixup was successful,
From: "Du, Changbin"
FIFO/Queue available space info can be used to debug dwc3 issues.
First we remove unnecessary checking for debugfs api call, then add
the new entry.
Du, Changbin (2):
usb: dwc3: make dwc3_debugfs_init return value be void
usb: dwc3: add debugfs node to dump FIFO/Queue av
From: "Du, Changbin"
Debugfs init failure is not so important. We can continue our job on
this failure. Also no break need for debugfs_create_file call failure.
Signed-off-by: Du, Changbin
---
v4:
Do not fail silently, but print error.
---
drivers/usb/dwc3/core.c| 10 +
drivers/
From: "Du, Changbin"
For DWC3 USB controller, the Global Debug Queue/FIFO Space Available
Register(GDBGFIFOSPACE) can be used to dump FIFO/Queue available space.
This can be used to check some special issues, like whether data is
successfully copied from memory to fifo when a trb is blocked.
Sig
From: "Du, Changbin"
dwc->regset is allocated on dwc3_debugfs_init, and should
be released on init failure or dwc3_debugfs_exit. Btw,
The line "dwc->root = NULL" is unnecessary, so remove it.
Signed-off-by: Du, Changbin
---
v3:
remove unnecessary if(!NULL) for free
v2:
Title changed;
free
From: "Du, Changbin"
dwc->regset is allocated on dwc3_debugfs_init, and should
be released on init failure or dwc3_debugfs_exit. Btw,
The line "dwc->root = NULL" is unnecessary, so remove it.
Signed-off-by: Du, Changbin
---
v2:
Title changed;
free dwc->regset on failure path.
---
drivers/
From: "Du, Changbin"
dwc->regset is allocated on dwc3_debugfs_init, and should
be released on dwc3_debugfs_exit.
Signed-off-by: Du, Changbin
---
This patch is seperated from patch set:
[PATCH v2 0/3] Improvement, fix and new entry for dwc3 debugfs
Because it is not related to other 2 patches.
From: "Du, Changbin"
FIFO/Queue available space info can be used to debug dwc3 issues.
First we remove unnecessary checking for debugfs api call, then add
the new entry.
changes from v2:
1. Remove commit "usb: dwc3: free dwc->regset on dwc3_debugfs_exit"
Du, Changbin (2):
usb: dwc3: make d
From: "Du, Changbin"
Debugfs init failure is not so important. We can continue our job on
this failure. Also no need to check debugfs_create_file call results.
Signed-off-by: Du, Changbin
---
changes from v2:
no changes
---
drivers/usb/dwc3/core.c| 10 +-
drivers/usb/dwc3/debug.
From: "Du, Changbin"
For DWC3 USB controller, the Global Debug Queue/FIFO Space Available
Register(GDBGFIFOSPACE) can be used to dump FIFO/Queue available space.
This can be used to check some special issues, like whether data is
successfully copied from memory to fifo when a trb is blocked.
Sig
From: "Du, Changbin"
For DWC3 USB controller, the Global Debug Queue/FIFO Space Available
Register(GDBGFIFOSPACE) can be used to dump FIFO/Queue available space.
This can be used to check some special issues, like whether data is
successfully copied from memory to fifo when a trb is blocked.
Sig
From: "Du, Changbin"
The first patch removed unnecessary checking for debugfs api call;
The second patch fix a memory leak issue;
The third patch add one new entry to debufs.
Du, Changbin (3):
usb: dwc3: make dwc3_debugfs_init return value be void
usb: dwc3: free dwc->regset on dwc3_debugfs_
From: "Du, Changbin"
Signed-off-by: Du, Changbin
---
drivers/usb/dwc3/debugfs.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/dwc3/debugfs.c b/drivers/usb/dwc3/debugfs.c
index 071b286..2d4f397 100644
--- a/drivers/usb/dwc3/debugfs.c
+++ b/drivers/usb/dwc3/debugfs.c
@@ -657,
From: "Du, Changbin"
Debugfs init failure is not so important. We can continue our job on
this failure. Also no need to check debugfs_create_file call results.
Signed-off-by: Du, Changbin
---
drivers/usb/dwc3/core.c| 10 +-
drivers/usb/dwc3/debug.h | 6 +++---
drivers/usb/dwc3/d
From: "Du, Changbin"
For DWC3 USB controller, the Global Debug Queue/FIFO Space Available
Register(GDBGFIFOSPACE) can be used to dump FIFO/Queue available space.
This can be used to check some special issues, like whether data is
successfully copied from memory to fifo when a trb is blocked.
Sig
From: "Du, Changbin"
Actually, the function only clean one trb. So rename the function.
Signed-off-by: Du, Changbin
---
drivers/usb/dwc3/gadget.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 3ac170f..f84be3d
From: "Du, Changbin"
This is a reworked patch based on reverted commit d8f00cd685f5 ("usb:
hub: do not clear BOS field during reset device").
The privious one caused double mem-free if run to re_enumerate label.
New patch title changed to distinguish from old one. And I have tested
it with memor
From: "Du, Changbin"
ffs_epfile_io and ffs_epfile_io_complete runs in different context, but
there is no synchronization between them.
consider the following scenario:
1) ffs_epfile_io interrupted by sigal while
wait_for_completion_interruptible
2) then ffs_epfile_io set ret to -EINTR
3) just be
From: "Du, Changbin"
acm, ecm, hid, ncm, phonet, rndis and uvc functions all have double
memory free issue. Set pointers to NULL after freed to avoid this.
Here explain how it happen on acm function, others has analogical case.
If acm_bind fails before allocate notification and acm->notify_req
From: "Du, Changbin"
If acm_bind fails before allocate notification and acm->notify_req is
not set to NULL after freed last time, double free will happen.
kernel BUG at mm/slub.c:3392!
invalid opcode: [#1] PREEMPT SMP
EIP is at kfree+0x172/0x180
Call Trace:
[<80c0e3b6>] ? usb_ep_autoconfig_
From: "Du, Changbin"
Queue a request to disabled ep doesn't make sense, and induce caller
make mistakes.
Here is a example for the android mtp gadget function driver. A mem
corruption can happen on below senario.
1) On disconnect, mtp driver disable its EPs,
2) During send_file_work and receive
From: "Du, Changbin"
Queue a request to disabled ep doesn't make sense, and induce caller
make mistakes.
Here is a example for the android mtp gadget function driver. A mem
corruption can happen on below senario.
1) On disconnect, mtp driver disable its EPs,
2) During send_file_work and receive
From: "Du, Changbin"
Queue a request to disabled ep doesn't make sense, and induce caller
make mistakes.
Here is a example for the android mtp gadget function driver. A mem
corruption can happen on below senario.
1) On disconnect, mtp driver disable its EPs,
2) During send_file_work and receive
From: "Du, Changbin"
When usb_ep_enable on a enabled ep, the configuration of the ep probably
has changed. In this scenario, the ep configuration in hw should be
reprogrammed by udc driver. Hence, it is better to return an error to
inform the caller.
Signed-off-by: Du, Changbin
---
change from
From: "Du, Changbin"
To stop an out endpoint, software should set sets the Global OUT NAK,
but not the Global Non-periodic IN NAK. This driver bug leads the out-ep
failed be in disabled state with below error.
dwc2_hsotg_ep_stop_xfr: timeout DOEPCTL.EPDisable
Signed-off-by: Du, Changbin
---
d
From: "Du, Changbin"
When usb_ep_enable on a enabled ep, the configuration of the ep probably
has changed. In this scenario, the ep configuration in hw should be
reprogrammed by udc driver. Hence, it is better to return an error to
inform the caller.
Signed-off-by: Du, Changbin
---
include/lin
From: "Du, Changbin"
Queue a request to disabled ep doesn't make sense, and induce caller
make mistakes.
Here is a example for the android mtp gadget function driver. A mem
corruption can happen on below senario.
1) On disconnect, mtp driver disable its EPs,
2) During send_file_work and receive
From: "Du, Changbin"
Enabling a already enabled ep is illegal, because the ep may has trbs
running. Reprogram the ep may break running transfer. So udc driver
must avoid this happening by return an error -EBUSY. Gadget function
driver also should avoid such things, but that is out of udc driver.
From: "Du, Changbin"
Queue a request to disabled ep doesn't make sense, and induce caller
make mistakes.
Here is a example for the android mtp gadget function driver. A mem
corruption can happen on below senario.
1) On disconnect, mtp driver disable its EPs,
2) During send_file_work and receive
From: "Du, Changbin"
With the first patch, enable a enabled ep will return -EBUSY.
The second patch forbid queuing on disabled ep to avoid panic.
Du, Changbin (2):
usb: dwc2: add ep enabled flag to avoid double enable/disable
usb: dwc2: forbid queuing request to a disabled ep
drivers/usb/d
2013/11/7 Joe Perches :
> On Thu, 2013-11-07 at 11:11 +0800, Changbin Du wrote:
>> 2013/11/1 Joe Perches :
>> match_ functions in lib/parser.c just do simple match, they
>> doesn't support wildcards.
>> So it's not useful for us.
>
> It's not meant
2013/11/1 Joe Perches :
> On Thu, 2013-10-31 at 15:52 -0700, Andrew Morton wrote:
>> On Mon, 28 Oct 2013 23:29:10 +0800 "Du, Changbin"
>> wrote:
> []
>> > +/* check if the string matches given pattern which includes wildcards */
>> > +static int match_pattern(const char *pattern, const char *stri
2013/11/1 Joe Perches :
> On Thu, 2013-10-31 at 15:52 -0700, Andrew Morton wrote:
>> On Mon, 28 Oct 2013 23:29:10 +0800 "Du, Changbin"
>> wrote:
> []
>> > +/* check if the string matches given pattern which includes wildcards */
>> > +static int match_pattern(const char *pattern, const char *stri
2013/10/30 Changbin Du :
> 2013/10/30 Joe Perches :
>> On Tue, 2013-10-29 at 21:33 +0800, Du, Changbin wrote:
>>> This patch add wildcard '*'(matches zero or more characters) and '?'
>>> (matches one character) support when qurying debug flags.
>
2013/10/30 Joe Perches :
> On Tue, 2013-10-29 at 21:33 +0800, Du, Changbin wrote:
>> This patch add wildcard '*'(matches zero or more characters) and '?'
>> (matches one character) support when qurying debug flags.
>
> Hi again. Some trivial notes and a possible logic error:
>
>> +/* check if the
2013/10/30 Marcel Holtmann :
> Hi Changbin,
>
>> This patch add wildcard '*'(matches zero or more characters) and '?'
>> (matches one character) support when qurying debug flags.
>>
>> Now we can open debug messages using keywords. eg:
>> 1. open debug logs in all usb drivers
>>echo "file drive
Hello, Joe,
Thanks for your comments. I will update the patch. And now I am trying
to remove all the two goto statements. Agree with you, we can use a
while statement instead.
I will send you the new patch for you to review when it's done.
2013/10/29 Joe Perches
>
> On Mon, 2013-10-28 at 23:29
Sean , many thanks for your help. I know much more about IR framwork
now. I'll try to
work out a patch to remove "allowed_protocols".
Thanks again!
[Du, Changbin]
2012/9/4 Sean Young :
> On Tue, Sep 04, 2012 at 11:06:07AM +0800, Changbin Du wrote:
>> >
> > mutex_lock(&ir_raw_handler_lock);
> > - list_for_each_entry(handler, &ir_raw_handler_list, list)
> > - handler->decode(raw->dev, ev);
> > + list_for_each_entry(handler, &ir_raw_handler_list, list) {
> > + /* use all p
601 - 653 of 653 matches
Mail list logo