[RFC PATCH] [media] rc: filter out not allowed protocols when decoding

2012-08-31 Thread Du, Changbin
From: Du, Changbin changbin...@gmail.com Each rc-raw device has a property allowed_protos stored in structure ir_raw_event_ctrl. But it didn't work because all decoders would be called when decoding. This path makes only allowed protocol decoders been invoked. Signed-off-by: Du, Changbin

Re: [Resend PATCH] media: rc: ati_remote.c: code style and compile warning fixing

2012-07-06 Thread Du Changbin
support for the Lola remote contributed by: *Seth Cohn sethc...@yahoo.com + * Jul 2012: Du, Changbin changbin...@gmail.com + *Code style and compile warning fixing You shouldn't be changing the driver's authorship just due to codingstyle and warning fixes. Btw

[PATCH v2] [media] rc: ati_remote.c: code style fixing

2012-07-07 Thread Du, Changbin
From: Du, Changbin changbin...@gmail.com changes: 1. wrap some lines that are longer than 80 characters. 2. remove local function prototype declarations which do not need. 3. replace TAB character with a space character in function comments. Signed

[Resend PATCH v2] usb: gadget: s3c-hsotg: fix core reset timeout failure

2012-07-23 Thread Du, Changbin
From: Du, Changbin changbin...@gmail.com The timeout values were 1000 and timeout issue occured many times on my s3c6410 Soc based board (mostly when booting whith USB cable not connected). This patch increase the values to 1 to guarantee the success of reset. Having set timeout to 1, I

[PATCH] dynamic_debug: add wildcard support to filter files/functions/modules

2013-07-25 Thread Du, Changbin
From: Du, Changbin changbin...@gmail.com 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 drivers/usb/* +p debugfs

[PATCH v5 0/3] add wildcard support for dynamic debug

2013-11-16 Thread Du, Changbin
From: Du, Changbin changbin...@gmail.com These patches are to make it easier to filter kernel debug logs which we want. Whith wildcard support, below command can enable all usb debug logs: #echo file drivers/usb/* +p debugfs/dynamic_debug/control This patch only enables two wildcard

[PATCH v5 1/3] lib/parser.c: add match_wildcard function

2013-11-16 Thread Du, Changbin
From: Du, Changbin changbin...@gmail.com match_wildcard function is a simple implementation of wildcard matching algorithm. It only supports two usual wildcardes: '*' - matches zero or more characters '?' - matches one character This algorithm is safe since it's of non-recursion. Signed

[PATCH v5 2/3] dynamic_debug: add wildcard support to filter files/functions/modules

2013-11-16 Thread Du, Changbin
From: Du, Changbin changbin...@gmail.com 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 drivers/usb/* +p debugfs

[PATCH v5 3/3] dynamic-debug-howto.txt: update since new wildcard support

2013-11-16 Thread Du, Changbin
From: Du, Changbin changbin...@gmail.com Add the usage of using new feature wildcard support. Signed-off-by: Du, Changbin changbin...@gmail.com --- Documentation/dynamic-debug-howto.txt | 9 + 1 file changed, 9 insertions(+) diff --git a/Documentation/dynamic-debug-howto.txt b

[PATCH v3] dynamic_debug: add wildcard support to filter files/functions/modules

2013-10-29 Thread Du, Changbin
From: Du, Changbin changbin...@gmail.com 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 drivers/usb/* +p debugfs

[PATCH v4 1/2] dynamic_debug: add wildcard support to filter files/functions/modules

2013-10-30 Thread Du, Changbin
From: Du, Changbin changbin...@gmail.com 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 drivers/usb/* +p debugfs

[PATCH v4 2/2] dynamic-debug-howto.txt: update since new wildcard support

2013-10-30 Thread Du, Changbin
From: Du, Changbin changbin...@gmail.com Add the usage of using new feature wildcard support. Signed-off-by: Du, Changbin changbin...@gmail.com --- Documentation/dynamic-debug-howto.txt | 9 + 1 file changed, 9 insertions(+) diff --git a/Documentation/dynamic-debug-howto.txt b

[PATCH v2] dynamic_debug: add wildcard support to filter files/functions/modules

2013-10-28 Thread Du, Changbin
From: Du, Changbin changbin...@gmail.com 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 drivers/usb/* +p debugfs

RE: [DISCUSSION] USB device remote wakeup is not working for S3 case

2014-12-22 Thread Du, Changbin
issue and may be better place it on userspace. I have no better idea :) . Alan Stern Regards Du, Changbin -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

[DISCUSSION] USB device remote wakeup is not working for S3 case

2014-12-18 Thread Du, Changbin
When I am checking usb remote wakeup code, I found that usb remote wakeup will not work after system going to S3 sate and I confirmed with my PC. During enumeration, usb device will be set as wakeup capable by usb_set_device_state if it supports. Whether usb driver send

RE: [DISCUSSION] USB device remote wakeup is not working for S3 case

2014-12-18 Thread Du, Changbin
mouse, you can write a udev script to do it as shown above. Alan Stern Could we also enable wakeup for usb mouse? Or is there any concern to enable it? Per my opinion, most people may expect clicking mouse can awake system. Regards, Du, Changbin -- To unsubscribe from this list: send the line

RE: [PATCH] workqueue: detect uninitated work_struct and BUG() if true

2015-03-10 Thread Du, Changbin
-Original Message- From: Tejun Heo [mailto:hte...@gmail.com] On Behalf Of Tejun Heo Sent: Monday, March 9, 2015 2:23 PM To: Du, Changbin Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] workqueue: detect uninitated work_struct and BUG() if true @@ -1295,6 +1295,9 @@ static

[PATCH] workqueue: detect uninitated work_struct and BUG() if true

2015-03-08 Thread Du, Changbin
From cdebb88ac0fb3f900ef28f28ccb4a12159c295db Mon Sep 17 00:00:00 2001 From: Du, Changbin changbin...@gmail.com Date: Mon, 9 Mar 2015 12:06:43 +0800 Subject: [PATCH] workqueue: detect uninitated work_struct and BUG() if true Recently I encounter a driver issue that caused by missing initializing

[PATCH v2] usb: gadget: composite: enable BESL support

2015-04-28 Thread Du, Changbin
must be enabled if LPM is enabled. This helps with USB30CV TD 9.21 LPM L1 Suspend Resume Test. Cc: sta...@vger.kernel.org # 3.1+: a661593: usb: enable BESL support Signed-off-by: Felipe Balbi ba...@ti.com Signed-off-by: Du, Changbin changbin...@intel.com --- Hi, This patch was introduced on v3.18

RE: [PATCH] usb: gadget: composite: enable BESL support

2015-04-28 Thread Du, Changbin
, don't consider only your project, think about the kernel/stable releases as a whole. BTW, that should be v3.1+, the + tells the Stable team that from v3.1 forward, all kernels need the backport. Signed-off-by: Felipe Balbi ba...@ti.com Signed-off-by: Du, Changbin changbin...@intel.com

[PATCH v3] usb: gadget: composite: enable BESL support

2015-04-29 Thread Du, Changbin
for Link Power Management (USB2-LPM-Errata-final.pdf), BESL must be enabled if LPM is enabled. This helps with USB30CV TD 9.21 LPM L1 Suspend Resume Test. Signed-off-by: Felipe Balbi ba...@ti.com Signed-off-by: Du, Changbin changbin...@intel.com --- Hi, This patch was introduced on v3.18. However

[PATCH v4] usb: gadget: composite: enable BESL support

2015-04-29 Thread Du, Changbin
for Link Power Management (USB2-LPM-Errata-final.pdf), BESL must be enabled if LPM is enabled. This helps with USB30CV TD 9.21 LPM L1 Suspend Resume Test. Cc: sta...@vger.kernel.org # 3.1+ Signed-off-by: Felipe Balbi ba...@ti.com Signed-off-by: Du, Changbin changbin...@intel.com --- Hi, This patch

[PATCH] usb: gadget: composite: enable BESL support

2015-04-28 Thread Du, Changbin
must be enabled if LPM is enabled. This helps with USB30CV TD 9.21 LPM L1 Suspend Resume Test. Cc: sta...@vger.kernel.org # 3.14 Signed-off-by: Felipe Balbi ba...@ti.com Signed-off-by: Du, Changbin changbin...@intel.com --- Hi, This patch was introduced on v3.18. However the issue fixed already

[PATCH v2] usb/gadget: make composite gadget meet usb compliance for vbus draw

2015-07-27 Thread Du, Changbin
From 08df419517694c4dd9ff328f5644b46a99c2999e Mon Sep 17 00:00:00 2001 From: Du, Changbin changbin...@intel.com Date: Thu, 23 Jul 2015 20:08:04 +0800 Subject: [PATCH v2] usb/gadget: make composite gadget meet usb compliance for vbus draw USB-IF compliance requirement limits the vbus current

RE: [PATCH] usb/gadget: make composite gadget meet usb compliance for vbus draw

2015-07-27 Thread Du, Changbin
From: Andrzej Pietrasiewicz [mailto:andrze...@samsung.com] Hi, What I mean is that in my opinion it should be done in a separate patch, because the newly introduced USB_VBUS_DRAW_SUSPEND is not used anywhere else in your patch. The meaning of this change is use a symbolic name rather

[PATCH] usb/gadget: make composite gadget meet usb compliance for vbus draw

2015-07-23 Thread Du, Changbin
From 0a8e0d63a9887735c6782d7b0c15c2c1fdf1952a Mon Sep 17 00:00:00 2001 From: Du, Changbin changbin...@intel.com Date: Thu, 23 Jul 2015 20:08:04 +0800 Subject: [PATCH] usb/gadget: make composite gadget meet usb compliance for vbus draw USB-IF compliance requirement limits the vbus current

RE: [PATCH] usb/gadget: make composite gadget meet usb compliance for vbus draw

2015-07-23 Thread Du, Changbin
Thanks, Pietrasiewicz. From: Andrzej Pietrasiewicz [mailto:andrze...@samsung.com] W dniu 23.07.2015 o 14:34, Du, Changbin pisze: From 0a8e0d63a9887735c6782d7b0c15c2c1fdf1952a Mon Sep 17 00:00:00 void composite_disconnect(struct usb_gadget *gadget) { struct usb_composite_dev

RE: [PATCH] usb/gadget: make composite gadget meet usb compliance for vbus draw

2015-07-24 Thread Du, Changbin
Thanks for explanation. I am agree with you that separate changes into two patches. Will send out new patch soon. Regards Du, Changbin From: Andrzej Pietrasiewicz [mailto:andrze...@samsung.com] Hi, W dniu 24.07.2015 o 06:11, Du, Changbin pisze: Thanks, Pietrasiewicz. From: Andrzej

[RESEND PATCH v2] usb/gadget: make composite gadget meet usb compliance for vbus draw

2015-08-30 Thread Du, Changbin
From 08df419517694c4dd9ff328f5644b46a99c2999e Mon Sep 17 00:00:00 2001 From: Du, Changbin changbin...@intel.com Date: Thu, 23 Jul 2015 20:08:04 +0800 Subject: [PATCH v2] usb/gadget: make composite gadget meet usb compliance for vbus draw USB-IF compliance requirement limits the vbus current

RE: [RESEND PATCH v2] usb/gadget: make composite gadget meet usb compliance for vbus draw

2015-08-31 Thread Du, Changbin
I am sorry, I forget to remove them. It is generated by git and I send the patch with outlook. I will use git-send-email instead next time if my email account work. Regards Du, Changbin > -Original Message- > From: 'Greg Kroah-Hartman' [mailto:gre...@linuxfoundation.org] > Sen

RE: [PATCH 0/2] Two fix for dwc2 gadget driver

2015-12-02 Thread Du, Changbin
> On 11/29/2015 9:29 PM, changbin...@intel.com wrote: > > From: "Du, Changbin" <changbin...@intel.com> > > > > With the first patch, enable a enabled ep will return -EBUSY. > > The second patch forbid queuing on disabled ep to avoid panic. >

RE: [PATCH v2] usb: gadget: forbid queuing request to a disabled ep

2015-12-17 Thread Du, Changbin
> >> 2.5.0 > > > > With this patch, ep0 transfer breaks. it because the 'enabled' of ep0 > > is not set. Ep0 is not enabled by usb_ep_enable, but in UDC driver. So > > there need another patch to set ep0's flag also. > > yeah, we don't like regressions :-) So the fix should come before > $subject

RE: [PATCH v2] usb: gadget: forbid queuing request to a disabled ep

2015-12-14 Thread Du, Changbin
> diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h > index 3d583a1..b566a4b 100644 > --- a/include/linux/usb/gadget.h > +++ b/include/linux/usb/gadget.h > @@ -402,6 +402,9 @@ static inline void usb_ep_free_request(struct usb_ep > *ep, > static inline int usb_ep_queue(struct

RE: [lkp] [usb] 22bf2bb019: WARNING: CPU: 0 PID: 0 at include/linux/usb/gadget.h:405 composite_ep0_queue+0xad/0xd0()

2015-12-14 Thread Du, Changbin
272c3>] i386_start_kernel+0x91/0x95 > [8.235971] ---[ end trace a9973fc5ac55cb31 ]--- > [8.236529] g_ether gadget: ep_queue --> -108 > > > Thanks, > Ying Huang Hmm, it because the ep0 'enabled' is not set. Ep0 is not enabled by usb_ep_enable, but in UDC driver. It need a fix. This is an interesting robot testing tool. Thanks! Du, Changbin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

RE: [PATCH] usb: gadget: make usb_ep_enable return -EBUSY if ep has already enabled

2015-12-13 Thread 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. > > > >

RE: [PATCH 1/2] usb: dwc2: add ep enabled flag to avoid double enable/disable

2015-12-13 Thread Du, Changbin
o 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. > > > > Similarly, disable a disabled ep makes no sense, but no need return > > an error here. > > > &

RE: [PATCH v3] usb: gadget: forbid queuing request to a disabled ep

2015-12-17 Thread Du, Changbin
> > > > diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h > > index 3d583a1..0c5d9ea 100644 > > --- a/include/linux/usb/gadget.h > > +++ b/include/linux/usb/gadget.h > > @@ -402,6 +402,9 @@ static inline void usb_ep_free_request(struct > usb_ep *ep, > > static inline int

RE: [PATCH] usb: f_fs: avoid race condition with ffs_epfile_io_complete

2016-01-04 Thread Du, Changbin
should only handle the "data complete" > interrupt on queued request; if the "data complete" interrupt occurs, but > it belongs to nobody, it will handle noop. > > > Best Regards, > Peter Chen You are right, but the problem is the request->status is wrong. If

RE: [PATCH] usb: f_fs: avoid race condition with ffs_epfile_io_complete

2016-01-04 Thread Du, Changbin
> > > > You are right, but the problem is the request->status is wrong. If the data > > send out but report caller as -EINTR, it will introduce duplicate-send > > issue. > > > > Why -EINTR, the kernel-doc said it should return -ECONNRESET for active > request, see include/linux/usb/gadget.h. > >

RE: [PATCH] usb: gadget: acm: set notify_req to NULL after freed to avoid double free

2015-12-27 Thread Du, Changbin
> On 12/26/2015 04:57 AM, changbin...@intel.com wrote: > > From: "Du, Changbin" <changbin...@intel.com> > > > > If acm_bind fails before allocate notification and acm->notify_req is > > not set to NULL after freed last time, double free will happen. &

RE: [PATCH 1/2] usb: configfs: allow UDC binding rule configured as binding to *any* UDC

2016-06-05 Thread Du, Changbin
Thanks, Machek, This patch has already been dropped. > On Tue 2016-05-03 11:04:24, changbin...@intel.com wrote: > > From: "Du, Changbin" <changbin...@gmail.com> > > > > On most platforms, there is only one device controller available. > > In this ca

RE: [PATCH] usb: core: add debugobjects support for urb object

2016-05-25 Thread Du, Changbin
> On Tue, May 24, 2016 at 03:53:53PM +0800, changbin...@intel.com wrote: > > From: "Du, Changbin" <changbin...@intel.com> > > > > Add debugobject support to track the life time of struct urb. > > This feature help us detect violation of urb operatio

RE: [PATCH] usb: dwc3: add debugfs node to dump FIFO/Queue available space

2016-04-06 Thread Du, Changbin
> > This can be used to check some special issues, like whether data is > > successfully copied from memory to fifo when a trb is blocked. > > > > Signed-off-by: Du, Changbin <changbin...@intel.com> > > --- > > drivers/usb/dwc3/core.h| 5

RE: [PATCH v2 0/3] Improvement, fix and new entry for dwc3 debugfs

2016-04-06 Thread Du, Changbin
> before I review your patches, one comment > > changbin...@intel.com writes: > > From: "Du, Changbin" <changbin...@intel.com> > > > > The first patch removed unnecessary checking for debugfs api call; > > The second patch fix a memory leak issue

RE: [PATCH v3 1/2] usb: dwc3: make dwc3_debugfs_init return value be void

2016-04-11 Thread Du, Changbin
t change > them so they read as follows: > > if (!dwc->regset) > goto err1; > > [...] > > return; /* this is our successful exit point */ > > err1: > debugfs_remove_recursive(root); > kfree(dwc->regset); > > > -- > Balbi No, no need anymore. Because no branch share this code now. Then remove the goto would make code a little clear. Thanks, Du, Changbin

RE: [PATCH] usb: dwc3: free dwc->regset on dwc3_debugfs_exit

2016-04-12 Thread Du, Changbin
Hi, Balbi, > > Hmm, I agree from this point. I will combine this patch with other two > patches > > (due to their dependency). And I'd like remove the 'dwc->root=NULL' as > well, > > you are creating a dependency that doesn't exist. Please stop that. You > should have two separate branches based

RE: [PATCH] usb: dwc3: free dwc->regset on dwc3_debugfs_exit

2016-04-11 Thread Du, Changbin
> Hi, > > "Du, Changbin" <changbin...@intel.com> writes: > >> > >> >> > + dwc->regset = NULL; > >> >> > >> >> setting regset to NULL is unnecessary. We only call > dwc3_debugfs_exit() > >>

RE: [PATCH] usb: dwc3: free dwc->regset on dwc3_debugfs_exit

2016-04-11 Thread Du, Changbin
out of the debugfs code. They should be treat as some logical independent. Per this point, I still think set pointer to null is not bad. For example, if dwc3 core code invoke dwc3_debugfs_exit twice by mistake(just an example case, not really), then no crash/impact for the second call. Thanks, Du, Changbin

RE: [PATCH] usb: dwc3: free dwc->regset on dwc3_debugfs_exit

2016-04-11 Thread Du, Changbin
> So, they do has dependency. :) > > + dwc->regset = NULL; > > setting regset to NULL is unnecessary. We only call dwc3_debugfs_exit() > when removing the driver. > > -- > Balbi I'd like keep this line even it is unnecessary, because It is a good habit to Avoid wild pointers. Just like the dwc->root = NULL. Thanks, Du, Changbin

RE: [PATCH] usb: dwc3: rename __dwc3_cleanup_done_trbs to __dwc3_cleanup_one_trb

2016-03-30 Thread Du, Changbin
> Balbi IMO, "one_trb" is a little more clear. But both is okay for me. :) Thanks, Du, Changbin

RE: [PATCH v4 2/2] usb: dwc3: add debugfs node to dump FIFO/Queue available space

2016-04-13 Thread Du, Changbin
Hello, Sergei, > > From: "Du, Changbin" <changbin...@intel.com> > > > > For DWC3 USB controller, the Global Debug Queue/FIFO Space Available > > Register(GDBGFIFOSPACE) can be used to dump FIFO/Queue available > space. > > Space needed before

RE: [PATCH v4 2/2] usb: dwc3: add debugfs node to dump FIFO/Queue available space

2016-04-14 Thread Du, Changbin
n also add these info to each EP folder, that is awesome! :) Best Regards, Du, Changbin > -Original Message- > From: Felipe Balbi [mailto:ba...@kernel.org] > Sent: Thursday, April 14, 2016 4:03 PM > To: Du, Changbin <changbin...@intel.com> > Cc: gre...@linuxfoundation

RE: [PATCH v4 2/2] usb: dwc3: add debugfs node to dump FIFO/Queue available space

2016-04-14 Thread Du, Changbin
> Hi, > > "Du, Changbin" <changbin...@intel.com> writes: > >> > At last, comparing with the FIFO/Queue info, I think software transfer > >> > Requests list, TRBs info, EVENTs history are much more useful for > >> debugging > >

RE: [PATCH v4 2/2] usb: dwc3: add debugfs node to dump FIFO/Queue available space

2016-04-14 Thread Du, Changbin
is important in some case. We usually encounter some transfer issues but very hard to reproduce it. But we cannot enable trace all the time since performance concern. Then I thought it was so great if I can have a look for the trb status. :) Best Regards, Du, Changbin

RE: [PATCH 1/7] debugobjects: make fixup functions return bool instead of int

2016-04-22 Thread Du, Changbin
Hi, > On Fri, 22 Apr 2016, changbin...@intel.com wrote: > > From: "Du, Changbin" <changbin...@intel.com> > > > > The object debugging infrastructure core provides some fixup callbacks > > for the subsystem who use it. These callbacks are called

RE: [PATCH] usb: hub: fix panic caused by NULL bos pointer during reset device

2016-04-26 Thread Du, Changbin
> On Tue, Mar 08, 2016 at 05:15:17PM +0800, changbin...@intel.com wrote: > > From: "Du, Changbin" <changbin...@intel.com> > > > > This is a reworked patch based on reverted commit d8f00cd685f5 ("usb: > > hub: do not clear BOS field during reset devi

RE: [PATCH] usb: dwc3: usb/dwc3: fake dissconnect event when turn off pullup

2016-04-27 Thread Du, Changbin
sue a soft disconnection. This confused user that the UI still show usb as connected State, caused by missing a disconnect event. > Hi, > > changbin...@intel.com writes: > > From: "Du, Changbin" <changbin...@intel.com> > > > > The dwc3 controller can't gene

RE: [PATCH] checkpatch: Add support to check already applied git commits

2016-04-24 Thread Du, Changbin
Hi, > From: Joe Perches [mailto:j...@perches.com] > Sent: Monday, April 25, 2016 7:12 AM > To: Andrew Morton <a...@linux-foundation.org>; Andy Whitcroft > <a...@canonical.com> > Cc: Du, Changbin <changbin...@intel.com>; linux-kernel@vger.kernel.org > Subj

RE: [PATCH] usb: gadget: f_fs: report error if excess data received

2016-05-19 Thread Du, Changbin
day so I’ll finish up the patch doing 1 > so we will have a choice between 1 (my patch) and 3 (your patch). > Great! Prefer your patch if #1 works good. > -- > Best regards > ミハウ “퓶퓲퓷퓪86” ナザレヴイツ > «If at first you don’t succeed, give up skydiving» Best Regards, Du, Changbin

RE: [PATCH] usb: gadget: f_fs: report error if excess data received

2016-05-18 Thread Du, Changbin
he DWC3 has not been design as this, if software fail the transfer, it is a little weird for host. So, now we have 3 choices: 1) buffer the excess data 2) fail the transfer 3) drop the excess data, then print an warning message Which one do you prefer? > -- > Best regards > ミハウ “퓶퓲퓷퓪86” ナザ

RE: [PATCH] usb: gadget: f_fs: report error if excess data received

2016-05-18 Thread Du, Changbin
> >> thanks Alan Stern and Michal. > >> Here just have a comment - the buffered data need be dropped when > the > >> epfile is closed, because it means the session is terminated. > > > > I blame that on sleep deprivation. Another issue is what to do when > > endpoint is disabled. Should the

RE: [PATCH] usb: gadget: f_fs: report error if excess data received

2016-05-12 Thread Du, Changbin
y > allowing these extra bytes to reach userspace, we could be creating a > possible attack vector. > > Your explanation is unsatisfactory, so I won't apply your patch, sorry. > > -- > balbi It is fine. Then need userspace take care of all the data it received. Because Kernel may drop some data for it. Kernel ffs driver is unauthentic sometimes. Best Regards, Du, Changbin

RE: [PATCH] usb: gadget: f_fs: report error if excess data received

2016-05-11 Thread Du, Changbin
> Hi, > > changbin...@intel.com writes: > > From: "Du, Changbin" <changbin...@intel.com> > > > > Since the buffer size for req is rounded up to maxpacketsize, > > then we may end up with more data then user space has space > > for. >

RE: [PATCH] usb: gadget: f_fs: report error if excess data received

2016-05-11 Thread Du, Changbin
> On Wed, May 11 2016, Felipe Balbi wrote: > > Also, returning -EOVERFLOW is not exactly correct here, because you'd > > violate POSIX specification of read(), right ? > > Maybe we could piggyback on: > >EINVAL fd was created via a call to timerfd_create(2) and the > wrong

RE: [PATCH] usb: gadget: f_fs: report error if excess data received

2016-05-12 Thread Du, Changbin
> -- > Balbi Well, first, there must be a protocol upon usb between host side and device side. Second device side didn't know how many bytes to receive, it need host side tell it. But host could be buggy, or the application is killed and restart. These all can lead host send more than device wanted bytes. For sure it wrong at host side, but device side don't know. Best Regards, Du, Changbin

RE: [PATCH] usb: gadget: f_fs: report error if excess data received

2016-05-12 Thread Du, Changbin
> Hi, > > "Du, Changbin" <changbin...@intel.com> writes: > >> right, and that was my point: if we copy more to userspace, then we have > >> a real big problem. > >> > > Yes, we drop the data because we userspace buffer is not enough this

RE: [PATCH] usb: gadget: f_fs: report error if excess data received

2016-05-16 Thread Du, Changbin
> There appears to be no kfifo support for iov_iter though, so I just went > with a simple buffer. > > I haven’t looked at the patch too carefully so this is an RFC rather > than an actual patch at this point. It does compile at least. > > Regardless, the more I thin about it, the more I’m

RE: [PATCH] usb: gadget: f_fs: report error if excess data received

2016-05-13 Thread Du, Changbin
ange anything. Besides, it's a pointless discussion as > cannot break userspace ABI. GadgetFS and FunctionFS have been shipping > in kernel for many years. > That because developers know the special requirement of FunctionFS, just like adb. > -- > Balbi Do you mind if I modify my original patch for print error instead of return error? Best Regards, Du, Changbin

RE: [PATCH] usb: gadget: f_fs: report error if excess data received

2016-05-12 Thread Du, Changbin
least this let development can find some key message to find What happed under kernel. But the message should be *error* I think. And this missed AIO path. This is identify to my patch after remove the "return -EOVERFLOW;" line. Byw, we not need add the field "expected_len", we can get it from the struct ffs_io_data. If this is fine for you, I can publish a new patch. > -- > Balbi Best Regards, Du, Changbin

RE: [PATCH] usb: gadget: f_fs: report error if excess data received

2016-05-12 Thread Du, Changbin
Hi, > > we need a min() here. Better version below: No need. copy_to_iter will do it for us. Best Regards, Du, Changbin > > diff --git a/drivers/usb/gadget/function/f_fs.c > b/drivers/usb/gadget/function/f_fs.c > index 73515d54e1cc..6c49b152f46e 100644 > --- a/driver

RE: [PATCH] usb: gadget: f_fs: report error if excess data received

2016-05-12 Thread Du, Changbin
> Hi, > > "Du, Changbin" <changbin...@intel.com> writes: > >> >> > These all can lead host send more than device wanted bytes. For > sure > >> >> > it wrong at host side, but device side don't know. > >> >> > >&

RE: [PATCH] usb: hub: fix panic caused by NULL bos pointer during reset device

2016-05-03 Thread Du, Changbin
t checked patch 464ad8c43a9e, it fix the same issue. So my patch no longer need now. Thanks for the patch. Best Regards, Du, Changbin

RE: [PATCH 1/2] usb: configfs: allow UDC binding rule configured as binding to *any* UDC

2016-05-04 Thread Du, Changbin
is not bind, it is free to reconfigure it. So seem no need block re-configuration. In a word, this patch is just an improvement, not to fix any issues or add new function. > Cheers, > -- > Krzysztof Opasiak > Samsung R Institute Poland > Samsung Electronics Thanks, Du, Changbin

RE: [PATCH 1/2] usb: configfs: allow UDC binding rule configured as binding to *any* UDC

2016-05-05 Thread Du, Changbin
> > add new function. > > So it doesn't add any new functionality and breaks existing user space > tools. > Ok, regarding there is a better tool, this change doesn't make much sense. So just abandon it. > Cheers, > -- > Krzysztof Opasiak > Samsung R Institute Poland > Samsung Electronics Best Regards, Du, Changbin

RE: [PATCH] debugobjects: insulate non-fixup logic related to static obj from fixup callbacks

2016-05-08 Thread Du, Changbin
> From: Thomas Gleixner [mailto:t...@linutronix.de] > On Sun, 8 May 2016, Du, Changbin wrote: > > > From: Thomas Gleixner [mailto:t...@linutronix.de] > > > > raw_spin_unlock_irqrestore(>lock, flags); > > > > /* > > &

RE: [PATCH] debugobjects: insulate non-fixup logic related to static obj from fixup callbacks

2016-05-08 Thread Du, Changbin
> From: Thomas Gleixner [mailto:t...@linutronix.de] > Can you please fix your mail client. Every mail you send has: > > Cc: ..... > "Du, Changbin" <changbin...@intel.com>, > Du > > And that stray 'Du' is just broken. > Yes, I should add &quo

Re: [PATCH 1/2] kconfig/mconf: add jumping tip in title of search result textbox

2017-02-06 Thread Du, Changbin
On Mon, Feb 06, 2017 at 02:00:51PM +0200, Jani Nikula wrote: > On Mon, 06 Feb 2017, changbin...@intel.com wrote: > > From: Changbin Du <changbin...@intel.com> > > > > Prompt user how to quickly jump to the item he/she is interested in. > > :o > > All

Re: [PATCH 2/2] Documentation/kconfig: add search jump feature description

2017-02-06 Thread Du, Changbin
On Mon, Feb 06, 2017 at 07:42:11AM -0700, Jim Davis wrote: > On Mon, Feb 6, 2017 at 12:46 AM, <changbin...@intel.com> wrote: > > From: Changbin Du <changbin...@intel.com> > > > > Kernel menuconfig support direct jumping function from the search > > re

RE: [Intel-gfx] [PATCH] drm/i915: check if execlist_port is empty before using its content

2016-12-25 Thread Du, Changbin
> On Fri, Dec 23, 2016 at 01:46:36PM +0800, changbin...@intel.com wrote: > > From: "Du, Changbin" <changbin...@intel.com> > > > > This patch fix a crash in function reset_common_ring. In this case, > > the port[0].request is null when reset the rende

Re: [PATCH v2 0/2] kconfig/mconf: propagate jumping function in search result view

2017-03-23 Thread Du, Changbin
Sencond ping... if this is realy not necessary I give up. On Mon, Mar 06, 2017 at 06:28:50PM +0800, Du, Changbin wrote: > Hello, any new update need for this or new comments? :) > > On Wed, Feb 08, 2017 at 11:09:37AM +0800, changbin...@intel.com wrote: > > From: Changb

Re: [PATCH] perf lock: subcommands should include common options

2017-03-17 Thread Du, Changbin
On Fri, Mar 17, 2017 at 11:08:34AM -0300, Arnaldo Carvalho de Melo wrote: > Em Fri, Mar 17, 2017 at 01:53:42PM +0800, changbin...@intel.com escreveu: > > From: Changbin Du <changbin...@intel.com> > > > > When I use -i option for report subcommand, it doesn't accept

Re: [PATCH] perf report: show sort_order in title

2017-03-14 Thread Du, Changbin
On Tue, Mar 14, 2017 at 10:04:16AM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Mar 14, 2017 at 10:16:44AM +0800, Du, Changbin escreveu: > > On Mon, Mar 13, 2017 at 11:57:18AM -0300, Arnaldo Carvalho de Melo wrote: > > > But then, while testing, > > > > Be

Re: [PATCH] perf sort: only insert overhead && overhead_children when no overhead* field given

2017-03-14 Thread Du, Changbin
. For example, fun1fun2 foo foo Then the 'overhead_acc' for fun1 should not include the samples that fun2 call foo. Thanks. changbin On Mon, Mar 13, 2017 at 04:36:01PM +0800, changbin...@intel.com wrote: > From: Changbin Du <changbin...@intel.com> > > If w

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-11 Thread Du, Changbin
On Tue, Apr 11, 2017 at 12:32:49PM +0200, Jiri Olsa wrote: > On Tue, Apr 11, 2017 at 06:13:17PM +0800, Du, Changbin wrote: > > > > > > > > > yes, this is an option. But for safety, I sugguest do not rely on > > > > list_del_in

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-09 Thread Du, Changbin
On Sun, Apr 09, 2017 at 07:05:52PM +0200, Jiri Olsa wrote: > On Wed, Apr 05, 2017 at 10:44:22AM +0800, Du, Changbin wrote: > > On Tue, Apr 04, 2017 at 12:51:03PM -0300, Arnaldo Carvalho de Melo wrote: > > > Em Wed, Apr 05, 2017 at 12:34:59AM +0900, Namhyung Kim escreveu:

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-10 Thread Du, Changbin
On Mon, Apr 10, 2017 at 10:39:50AM +0200, Jiri Olsa wrote: > On Tue, Apr 04, 2017 at 12:19:40PM -0300, Arnaldo Carvalho de Melo wrote: > > SNIP > > > > --- > > > tools/perf/ui/hist.c | 25 +++-- > > > 1 file changed, 15 insertions(+), 10 deletions(-) > > > > > > diff --git

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-10 Thread Du, Changbin
On Mon, Apr 10, 2017 at 01:33:25PM +0200, Jiri Olsa wrote: > On Mon, Apr 10, 2017 at 06:21:12PM +0800, Du, Changbin wrote: > > On Mon, Apr 10, 2017 at 10:39:50AM +0200, Jiri Olsa wrote: > > > On Tue, Apr 04, 2017 at 12:19:40PM -0300, Arnaldo Carvalho de Melo wrote:

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-11 Thread Du, Changbin
> > > > > yes, this is an option. But for safety, I sugguest do not rely on > > list_del_init. > > No rule rather than create one. > > > > But anyway, both are ok for me. What's your options? > > hum, also I dont think we need to touch that bit at all > if we are going to remove it right

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-11 Thread Du, Changbin
> > (gdb) print fmt.sort_list > > $5 = {next = 0x9727d0 , prev = 0x9727d0 > > } > > > > In this case, the fmt is linked in sort_list, but not in list. So crash > > at the list_del_init(>list) of second loop. > > so the only place I can see the POISON could

Re: [PATCH] perf report: show sort_order in title

2017-03-13 Thread Du, Changbin
On Mon, Mar 13, 2017 at 11:57:18AM -0300, Arnaldo Carvalho de Melo wrote: > > I'll just rename this to use the tools/perf/ style for such functions, > > making it: > > > > static int hists__scnprintf_sort_fields(hists, buf, size) > > But then, while testing, > > Before: > > $ perf

Re: [PATCH v2 0/2] kconfig/mconf: propagate jumping function in search result view

2017-03-06 Thread Du, Changbin
Hello, any new update need for this or new comments? :) On Wed, Feb 08, 2017 at 11:09:37AM +0800, changbin...@intel.com wrote: > From: Changbin Du <changbin...@intel.com> > > While I am searching something in menuconfig, I hope if I can jump to > interested > items direct

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-04 Thread Du, Changbin
t; > Em Mon, Mar 27, 2017 at 02:22:55PM +0800, changbin...@intel.com escreveu: > > >> From: Changbin Du <changbin...@intel.com> > > >> > > >> Some perf_hpp_fmt both registered at field and sort list. For such > > >> instance, we only can free

Re: [PATCH v2] perf sort: only insert overhead && overhead_children when no overhead* field given

2017-07-04 Thread Du, Changbin
On Thu, Jun 29, 2017 at 05:22:52PM +0200, Jiri Olsa wrote: > > > --- a/tools/perf/util/sort.c > > > +++ b/tools/perf/util/sort.c > > > @@ -2635,6 +2635,9 @@ static char *setup_overhead(char *keys) > > > if (sort__mode == SORT_MODE__DIFF) > > > return keys; > > > > > > + if

Re: [PATCH v2] perf sort: only insert overhead && overhead_children when no overhead* field given

2017-06-26 Thread Du, Changbin
Hi, Jiri, what is the status of this one? I didn't get a response of v2. thanks. On Fri, Jun 02, 2017 at 12:22:00PM +0800, changbin...@intel.com wrote: > From: Changbin Du <changbin...@intel.com> > > If we always insert 'overhead' and 'overhead_children' as sort keys, > this

Re: [Q] What about PCI mmio access alignment?

2017-05-28 Thread Du, Changbin
:48PM +0300, Andy Shevchenko wrote: > On Thu, May 25, 2017 at 1:12 PM, Du, Changbin <changbin...@intel.com> wrote: > > I have a basic quesion about the alignment when access PCI bar mmio space. > > Is > > the address accessed must be DW aligned and count must be DW ali

[Q] What about PCI mmio access alignment?

2017-05-25 Thread Du, Changbin
Hi, guys, I have a basic quesion about the alignment when access PCI bar mmio space. Is the address accessed must be DW aligned and count must be DW aligned? As far as I know, The address field of TLB ignore lower 2 bits and the unit of length field also is DW. So does it mean above question is

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-05-31 Thread Du, Changbin
+0800, Du, Changbin wrote: > On Tue, Apr 11, 2017 at 12:32:49PM +0200, Jiri Olsa wrote: > > On Tue, Apr 11, 2017 at 06:13:17PM +0800, Du, Changbin wrote: > > > > > > > > > > > yes, this is an option. But for safety, I sugguest do not rely on > > &g

Re: [PATCH] perf sort: only insert overhead && overhead_children when no overhead* field given

2017-06-01 Thread Du, Changbin
On Thu, Jun 01, 2017 at 12:21:39PM +0200, Jiri Olsa wrote: > On Thu, Jun 01, 2017 at 05:03:21PM +0800, changbin...@intel.com wrote: > > diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c > > index 5762ae4..69eea3a 100644 > > --- a/tools/perf/util/sort.c > > +++ b/tools/perf/util/sort.c >

Re: [PATCH] perf sort: only insert overhead && overhead_children when no overhead* field given

2017-06-01 Thread Du, Changbin
On Fri, Jun 02, 2017 at 10:52:24AM +0800, Du, Changbin wrote: > On Thu, Jun 01, 2017 at 12:21:39PM +0200, Jiri Olsa wrote: > > On Thu, Jun 01, 2017 at 05:03:21PM +0800, changbin...@intel.com wrote: > > > diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c > >

Re: [RESEND][PATCH] kvm: x86: Do not handle MMIO request in fast_page_fault

2017-09-13 Thread Du, Changbin
On Wed, Sep 13, 2017 at 04:39:56PM +0200, Radim Krčmář wrote: > 2017-09-05 18:37+0800, changbin...@intel.com: > > From: Changbin Du <changbin...@intel.com> > > > > If it is a MMIO request, it should be handled by slow path. This patch > > actually fixed below

  1   2   3   4   5   >