Re: [RFC PATCH 0/2] usb: dwc2: Enable URB giveback in a tasklet context

2014-09-15 Thread Ming Lei
On Mon, Sep 15, 2014 at 11:22 PM, dingu...@opensource.altera.com wrote: From: Dinh Nguyen dingu...@opensource.altera.com Hi Ming-Lei, Thanks for your patch to enable the URB giveback in a tasklet context for the EHCI driver. I found your patch to fix a USB webcam timeout/stutter issue

Re: [RFC PATCH 0/2] usb: dwc2: Enable URB giveback in a tasklet context

2014-09-15 Thread Ming Lei
On Tue, Sep 16, 2014 at 7:16 AM, Paul Zimmerman paul.zimmer...@synopsys.com wrote: From: dingu...@opensource.altera.com [mailto:dingu...@opensource.altera.com] Sent: Monday, September 15, 2014 8:23 AM Hi Ming-Lei, Thanks for your patch to enable the URB giveback in a tasklet context

Re: questions about give back urb in tasklet

2014-03-22 Thread Ming Lei
On Wed, Mar 19, 2014 at 11:05 PM, vichy vichy@gmail.com wrote: hi Ming: One approach I like to use is trace event. Would you please let us how to to use trace event for calculate max/average usb irq time? You can enable irq_handler_entry and irq_handler_exit event, then write a script

Re: questions about give back urb in tasklet

2014-03-19 Thread Ming Lei
disabled during completion because we need to convert spin_lock in all current usb drivers to spin_lock_irqsave() first. I posted lot of patches to do the conversion, but unfortunately most of them aren't merged. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe linux-usb

Re: questions about give back urb in tasklet

2014-03-19 Thread Ming Lei
) is there some reason xhci cannot put completion in BH? IMO, the completion handler should be put into tasklet, and can be done. If you like, you can take time to do that. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord

Re: 3.13-rc1 regression: Scatter-gather list issues at SuperSpeed only

2014-03-04 Thread Ming Lei
wondering if there is other solutions for the case. Basically this case is very similar with current usbnet(axis 88179/ 178a). Thanks, -- Ming Lei -- 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

Re: 3.13-rc1 regression: Scatter-gather list issues at SuperSpeed only

2014-03-04 Thread Ming Lei
storage too since the single URB in the middle of transfer produces short packet. Thanks, -- Ming Lei -- 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

Re: 3.13-rc1 regression: Scatter-gather list issues at SuperSpeed only

2014-03-03 Thread Ming Lei
in xhcd, shouldn't it? Thanks, -- Ming Lei -- 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

Re: [PATCH RFC 1/1] usb: Tell xhci when usb data might be misaligned

2014-02-01 Thread Ming Lei
On Sat, Feb 1, 2014 at 9:30 PM, Mark Lord ml...@pobox.com wrote: On 14-02-01 02:54 AM, Ming Lei wrote: .. With SG enabled, for the iperf client test case, the average urb size for transmission will be increased from ~1500 to ~20K bytes in my test case: iperf -c $SRV -t 30 -P 4 -w 128K

Re: [PATCH RFC 1/1] usb: Tell xhci when usb data might be misaligned

2014-01-31 Thread Ming Lei
On Sat, Feb 1, 2014 at 3:00 AM, Sarah Sharp sarah.a.sh...@linux.intel.com wrote: On Fri, Jan 31, 2014 at 08:17:58AM +0800, Ming Lei wrote: On Fri, Jan 31, 2014 at 6:15 AM, Sarah Sharp sarah.a.sh...@linux.intel.com wrote: On Thu, Jan 30, 2014 at 10:50:21PM +0100, Bjørn Mork wrote: FWIW

Re: [PATCH RFC 1/1] usb: Tell xhci when usb data might be misaligned

2014-01-30 Thread Ming Lei
, -- Ming Lei -- 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

Re: PROBLEM: usbnet / ax88179_178a: Panic in usb_hcd_map_urb_for_dma

2014-01-15 Thread Ming Lei
doesn't seem significant, they soon add up. If you plan to remove the 'nents' parameter, I am wondering if it is a good idea, because sg_nents() should be more heavy. Not mention sometimes the callers just want to map/unmap part of entries. Thanks, -- Ming Lei -- To unsubscribe from this list: send

Re: [PATCH net,stable] net: usbnet: fix SG initialisation

2014-01-11 Thread Ming Lei
, resulting in an oops. Fixes: 60e453a940ac (USBNET: fix handling padding packet) Reported-by: Thomas Kear tho...@kear.co.nz Cc: Ming Lei ming@canonical.com Signed-off-by: Bjørn Mork bj...@mork.no --- I don't have the hardware to verify this fix. It would be good if someone could test

Re: [PATCH net,stable] net: usbnet: fix SG initialisation

2014-01-11 Thread Ming Lei
On Sat, Jan 11, 2014 at 5:16 PM, Ming Lei ming@canonical.com wrote: On Sat, Jan 11, 2014 at 6:10 AM, Bjørn Mork bj...@mork.no wrote: Commit 60e453a940ac (USBNET: fix handling padding packet) added an extra SG entry in case padding is necessary, but failed to update the initialisation

[PATCH] USB: storage: fix compile warning

2013-12-09 Thread Ming Lei
This patch should fix the below compile warning: drivers/usb/storage/protocol.c: In function 'usb_stor_access_xfer_buf': drivers/usb/storage/protocol.c:155:22: warning: comparison of distinct pointer types lacks a cast [enabled by default] Reported-by: kbuild test robot fengguang...@intel.com

Re: [PATCH] USB: storage: fix compile warning

2013-12-09 Thread Ming Lei
On Tue, Dec 10, 2013 at 1:05 PM, Greg Kroah-Hartman gre...@linuxfoundation.org wrote: On Tue, Dec 10, 2013 at 12:37:24PM +0800, Ming Lei wrote: This patch should fix the below compile warning: drivers/usb/storage/protocol.c: In function 'usb_stor_access_xfer_buf': drivers/usb/storage

[PATCH v1] USB: storage: fix compile warning

2013-12-09 Thread Ming Lei
Reported-by: Stephen Rothwell s...@canb.auug.org.au Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/storage/protocol.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/storage/protocol.c b/drivers/usb/storage/protocol.c index f54e5fe..12e3c2f 100644

Re: [PATCH v1 1/2] lib/scatterlist: export sg_miter_skip()

2013-12-01 Thread Ming Lei
On Sat, Nov 30, 2013 at 6:23 AM, Tejun Heo t...@kernel.org wrote: On Tue, Nov 26, 2013 at 12:43:37PM +0800, Ming Lei wrote: sg_copy_buffer() can't meet demand for some drrivers(such usb mass storage), so we have to use the sg_miter_* APIs to access sg buffer, then need export sg_miter_skip

[PATCH v1 1/2] lib/scatterlist: export sg_miter_skip()

2013-11-25 Thread Ming Lei
-by: Andrew Morton a...@linux-foundation.org Cc: FUJITA Tomonori fujita.tomon...@lab.ntt.co.jp Cc: Tejun Heo t...@kernel.org Cc: Jens Axboe ax...@kernel.dk Signed-off-by: Ming Lei ming@canonical.com --- include/linux/scatterlist.h |1 + lib/scatterlist.c |3 ++- 2 files changed, 3

Re: [PATCH 2/2] USB: storage: use sg_miter_* APIs to access scsi buffer

2013-11-01 Thread Ming Lei
On Fri, Nov 1, 2013 at 10:54 PM, Alan Stern st...@rowland.harvard.edu wrote: On Wed, 30 Oct 2013, Ming Lei wrote: We have sg_miter_* APIs for accessing scsi sg buffer, so use them to make code clean and bug free. Hmmm. You could simply call sg_copy_buffer, if you didn't mind the quadratic

Re: [PATCH 1/2] lib/scatterlist: export sg_miter_skip()

2013-10-31 Thread Ming Lei
reviewing commenting on 2/2 and merge the two finally to usb-next tree if you are OK with it? Thanks, -- Ming Lei -- 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

[PATCH 2/2] USB: storage: use sg_miter_* APIs to access scsi buffer

2013-10-29 Thread Ming Lei
We have sg_miter_* APIs for accessing scsi sg buffer, so use them to make code clean and bug free. Cc: Matthew Dharm mdharm-...@one-eyed-alien.net Cc: Alan Stern st...@rowland.harvard.edu Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Signed-off-by: Ming Lei ming@canonical.com --- drivers

[PATCH 1/2] lib/scatterlist: export sg_miter_skip()

2013-10-29 Thread Ming Lei
: Andrew Morton a...@linux-foundation.org, Cc: FUJITA Tomonori fujita.tomon...@lab.ntt.co.jp, Cc: Tejun Heo t...@kernel.org, Cc: Jens Axboe ax...@kernel.dk Signed-off-by: Ming Lei ming@canonical.com --- include/linux/scatterlist.h |1 + lib/scatterlist.c |3 ++- 2 files changed, 3

Re: [PATCH] usb-storage: scsiglue: Changing the command result

2013-10-15 Thread Ming Lei
, and patch should be doable, the only side effect is that previous returned DID_ABORT in srb-result is replaced with DID_TIME_OUT now. Another way is to implement .eh_timed_out callback to return different error for the two failure, but looks not a big deal. Thanks, -- Ming Lei -- To unsubscribe from

Re: [PATCH] usb-storage: scsiglue: Changing the command result

2013-10-15 Thread Ming Lei
. Of course the SCSI midlayer has decided to abort. That's the only way this bit can get set. But usb-storage doesn't know why SCSI decided to abort. usb-storage may know if it is caused by timeout via .eh_timed_out callback if it wants to know. Thanks, -- Ming Lei -- To unsubscribe from

Re: [PATCH] usbnet: smsc95xx: Add device tree input for MAC address

2013-10-10 Thread Ming Lei
will need to post V2 for that. Your patch still doesn't deal with two smsc95xx devices built in one board. The problem is a generic one, looks it is better to do it when OF supports discoverable bus. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body

Re: [PATCH] usbnet: smsc95xx: Add device tree input for MAC address

2013-10-10 Thread Ming Lei
first before post your V2. Below link is one I remembered, but I think you can find more: https://lkml.org/lkml/2013/8/11/100 This is all dependent on what the dev.id is of udev. I am not sure why it depends on udev, and udev can't see the device util it is added to system. Thanks, -- Ming

Re: [PATCH] usbnet: smsc95xx: Add device tree input for MAC address

2013-10-07 Thread Ming Lei
On Mon, Oct 7, 2013 at 1:31 AM, Dan Murphy dmur...@ti.com wrote: On 10/06/2013 10:05 AM, Ming Lei wrote: On Sat, Oct 5, 2013 at 2:25 AM, Dan Murphy dmur...@ti.com wrote: If the smsc95xx does not have a valid MAC address stored within the eeprom then a random number is generated. The MAC can

Re: [PATCH] usbnet: smsc95xx: Add device tree input for MAC address

2013-10-06 Thread Ming Lei
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/ Thanks, -- Ming Lei -- To unsubscribe from this list: send the line

Re: [PATCH] memory mapping for usbfs (v0.4)

2013-10-05 Thread Ming Lei
to trigger the allocation failure, and actually on some ARCHs, size of kernel stack or page directory table for creating each process is 16KB. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More

Re: [PATCH] memory mapping for usbfs (v0.4)

2013-10-05 Thread Ming Lei
On Sat, Oct 5, 2013 at 11:10 PM, Alan Stern st...@rowland.harvard.edu wrote: On Sat, 5 Oct 2013, Ming Lei wrote: The buffer should be cached. The userspace program will have to make sure that it doesn't try to access the buffer while DMA is in progress. As long as that restriction

Re: [PATCH] Memory mapping for USBFS

2013-09-29 Thread Ming Lei
be submitted in process context with context switch cost - URB complete is notified by signal, which might introduce much latency With one kernel mode driver, you can get better performance/latency much easily. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH] Memory mapping for USBFS

2013-09-29 Thread Ming Lei
On Sun, Sep 29, 2013 at 8:18 PM, Markus Rechberger mrechber...@gmail.com wrote: On Sun, Sep 29, 2013 at 2:07 PM, Ming Lei tom.leim...@gmail.com wrote: On Sun, Sep 29, 2013 at 7:51 PM, Markus Rechberger mrechber...@gmail.com wrote: I agree, but here not only small buffers are the problem

Re: [PATCH] memory mapping for usbfs (v0.4)

2013-09-29 Thread Ming Lei
ARCHs is extremely slow, so I an wondering if it is good way to map the area as non-cached. Thanks, -- Ming Lei -- 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

Re: [PATCH] Memory mapping for USBFS

2013-09-28 Thread Ming Lei
capabilities than on the CPU architecture. Yes, but for most cases, more than 4GB ram is seldom used in 32bit CPU. Thanks, -- Ming Lei -- 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

Re: [PATCH] Memory mapping for USBFS

2013-09-27 Thread Ming Lei
to user space directly), which should be more flexible, and user don't need to use mmap/munmap, so should be easier to use. At least, wrt. usb mass storage test, both CPU utilization and throughput can be improved with direct I/O. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line

Re: [PATCH] Memory mapping for USBFS

2013-09-27 Thread Ming Lei
On Sat, Sep 28, 2013 at 10:29 AM, Alan Stern st...@rowland.harvard.edu wrote: On Sat, 28 Sep 2013, Ming Lei wrote: On Wed, Sep 25, 2013 at 3:12 AM, Markus Rechberger mrechber...@gmail.com wrote: This patch adds memory mapping support to USBFS for isochronous and bulk data transfers

[PATCH v1] USBNET: fix handling padding packet

2013-09-23 Thread Ming Lei
packet can be sent to device if drivers require that. Reported-by: David Laight david.lai...@aculab.com Acked-by: Oliver Neukum oli...@neukum.org Signed-off-by: Ming Lei ming@canonical.com --- v1: - fix bug in case of dev-can_dma_sg and !urb-num_sgs --- drivers/net/usb/usbnet.c | 27

Re: Cannot shutdown power use from built in webcam in thinkpad T530 questions]

2013-09-22 Thread Ming Lei
by 'lsof | grep /dev/video'. Also looks power usage estimation of 'power top' should be used when battery provides power, and the data isn't correct if power is provided from power adapter, if I remember correctly. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe linux

Re: [PATCH] USBNET: fix handling padding packet

2013-09-19 Thread Ming Lei
support matters? Why is padding only relevant for the ECM? Of course, other devices need it too, such as asix devices. Thanks, -- Ming Lei -- 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

Re: [PATCH] USBNET: fix handling padding packet

2013-09-18 Thread Ming Lei
On Wed, Sep 18, 2013 at 9:59 PM, Bjørn Mork bj...@mork.no wrote: Ming Lei ming@canonical.com writes: Commit 638c5115a7949(USBNET: support DMA SG) introduces DMA SG if the usb host controller is capable of building packet from discontinuous buffers, but missed handling padding packet when

Re: [PATCH] USBNET: fix handling padding packet

2013-09-18 Thread Ming Lei
On Wed, Sep 18, 2013 at 11:52 PM, Bjørn Mork bj...@mork.no wrote: Ming Lei ming@canonical.com writes: Are you really sure that the one driver/device using this really need the padding byte? If you could just make FLAG_SEND_ZLP part of the condition for enabling can_dma_sg, then all

[PATCH] USBNET: fix handling padding packet

2013-09-17 Thread Ming Lei
packet can be sent to device if drivers require that. Reported-by: David Laight david.lai...@aculab.com Cc: Oliver Neukum oli...@neukum.org Signed-off-by: Ming Lei ming@canonical.com --- drivers/net/usb/usbnet.c | 27 +-- include/linux/usb/usbnet.h |1 + 2 files

Re: usbnet transmit path problems

2013-09-16 Thread Ming Lei
On Mon, Sep 16, 2013 at 4:13 PM, Oliver Neukum oli...@neukum.org wrote: On Thu, 2013-09-12 at 09:56 +0800, Ming Lei wrote: On Thu, Sep 12, 2013 at 12:05 AM, David Laight david.lai...@aculab.com wrote: Patches are always welcome, :-) Indeed, I think your patch, if no better alternatives

Re: usbnet transmit path problems

2013-09-11 Thread Ming Lei
On Wed, Sep 11, 2013 at 8:56 PM, David Laight david.lai...@aculab.com wrote: 2) If 'length % dev-maxpacket == 0' for a multi-fragment packet then the extra byte isn't added correctly (the code probably falls off the end of the scatter-gather list). Indeed. Ming Lei, should

Re: usbnet transmit path problems

2013-09-11 Thread Ming Lei
falls off the end of the scatter-gather list). Indeed. Ming Lei, should usbnet handle this in the sg case or better leave it to the subdriver you introduced this for? Is the ZLP issue a problem with the host or with the target? Sorry, what do you mean the ZLP issue here? I

Re: [PATCH v1] USB: EHCI: disable IAA_WATCHDOG and START_UNLINK_INTR if they needn't to be handled

2013-08-29 Thread Ming Lei
On Thu, Aug 29, 2013 at 12:05 AM, Alan Stern st...@rowland.harvard.edu wrote: On Wed, 28 Aug 2013, Ming Lei wrote: Think about it this way: Why did you write the USB: EHCI: improve interrupt qh unlink patch in the first place? Essentially the same reason applies to uhci-hcd and ohci-hcd

Re: [RFC 2/3] EHCI: convert the IRQ handler to a tasklet

2013-08-29 Thread Ming Lei
On Tue, Aug 27, 2013 at 10:39 PM, Alan Stern st...@rowland.harvard.edu wrote: On Tue, 27 Aug 2013, Ming Lei wrote: Yes. A new spinlock would be needed to synchronize the top half and the bottom half. The same spinlock would also be used to avoid scheduling the tasklet when it is already

Re: [PATCH v1] USB: EHCI: disable IAA_WATCHDOG and START_UNLINK_INTR if they needn't to be handled

2013-08-28 Thread Ming Lei
On Wed, Aug 28, 2013 at 12:24 PM, Ming Lei tom.leim...@gmail.com wrote: On Wed, 28 Aug 2013 12:02:03 +0800 Ming Lei ming@canonical.com wrote: Actually the problem only happened when underrun without URB_ISO_ASAP. I have another fix which uses rebase trick and is simper(less change

Re: [RFC 3/3] EHCI: handle late isochronous submissions

2013-08-28 Thread Ming Lei
; /* isoc activity count */ Thanks, -- Ming Lei -- 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

Re: [RFC 3/3] EHCI: handle late isochronous submissions

2013-08-28 Thread Ming Lei
On Thu, Aug 29, 2013 at 12:23 AM, Alan Stern st...@rowland.harvard.edu wrote: On Wed, 28 Aug 2013, Ming Lei wrote: Below is the approach I proposed(mentioned in another thread), which should be simper than this one, any comments? drivers/usb/host/ehci-sched.c | 53

Re: [PATCH v1] USB: EHCI: disable IAA_WATCHDOG and START_UNLINK_INTR if they needn't to be handled

2013-08-27 Thread Ming Lei
On Tue, Aug 27, 2013 at 4:05 AM, Alan Stern st...@rowland.harvard.edu wrote: On Mon, 26 Aug 2013, Ming Lei wrote: The problem is that once an interrupt QH has been unlinked, relinking it might not make it visible to the hardware until the next frame starts. Therefore interrupt endpoints

Re: [RFC 2/3] EHCI: convert the IRQ handler to a tasklet

2013-08-26 Thread Ming Lei
On Mon, Aug 26, 2013 at 11:29 PM, Alan Stern st...@rowland.harvard.edu wrote: On Mon, 26 Aug 2013, Ming Lei wrote: On Sat, 24 Aug 2013, Ming Lei wrote: But the current interrupt from EHCI isn't be acked(USBSTS isn't cleared), so EHCI HW don't know the irq has been handled

Re: [RFC 2/3] EHCI: convert the IRQ handler to a tasklet

2013-08-25 Thread Ming Lei
. OK, I will ask Greg to put back the patch 'USB: EHCI: disable IAA_WATCHDOG and START_UNLINK_INTR if they needn't to be handled' into his tree. On Sat, 24 Aug 2013, Ming Lei wrote: But the current interrupt from EHCI isn't be acked(USBSTS isn't cleared), so EHCI HW don't know the irq has

Re: [RFC 2/3] EHCI: convert the IRQ handler to a tasklet

2013-08-23 Thread Ming Lei
On Sat, Aug 24, 2013 at 12:06 AM, Alan Stern st...@rowland.harvard.edu wrote: On Fri, 23 Aug 2013, Ming Lei wrote: On Fri, Aug 23, 2013 at 4:39 AM, Alan Stern st...@rowland.harvard.edu wrote: This patch divides ehci-hcd's interrupt handler into a top half and a bottom half, using

Re: [PATCH v1] USB: EHCI: disable IAA_WATCHDOG and START_UNLINK_INTR if they needn't to be handled

2013-08-23 Thread Ming Lei
On Fri, Aug 23, 2013 at 11:40 PM, Alan Stern st...@rowland.harvard.edu wrote: On Fri, 23 Aug 2013, Ming Lei wrote: On Fri, Aug 23, 2013 at 4:36 AM, Alan Stern st...@rowland.harvard.edu wrote: On Thu, 22 Aug 2013, Ming Lei wrote: This seems to be the most important factor. When you

Re: [PATCH v1] USB: EHCI: disable IAA_WATCHDOG and START_UNLINK_INTR if they needn't to be handled

2013-08-22 Thread Ming Lei
On Wed, Aug 21, 2013 at 11:23 PM, Alan Stern st...@rowland.harvard.edu wrote: On Wed, 21 Aug 2013, Ming Lei wrote: By the way, even though it's a little late to ask this... Why did you decide to move only the giveback routine into a tasklet, instead of moving the entire interrupt handler

Re: [PATCH v1] USB: EHCI: disable IAA_WATCHDOG and START_UNLINK_INTR if they needn't to be handled

2013-08-22 Thread Ming Lei
On Thu, Aug 22, 2013 at 4:58 PM, Ming Lei ming@canonical.com wrote: On Wed, Aug 21, 2013 at 11:23 PM, Alan Stern st...@rowland.harvard.edu wrote: I'm starting to think that moving the entire handler to a tasklet would have been better. Not sure, if so: - one thing is that the HCD

Re: [PATCH v1 23/49] hid: usbhid: prepare for enabling irq in complete()

2013-08-22 Thread Ming Lei
On Sun, Aug 18, 2013 at 12:24 AM, Ming Lei ming@canonical.com wrote: Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Jiri Kosina jkos...@suse.cz Cc: linux-in...@vger.kernel.org Signed-off-by: Ming Lei ming@canonical.com Jiri, could you review

Re: [PATCH v1 24/49] BT: btusb: prepare for enabling irq in complete()

2013-08-22 Thread Ming Lei
On Sun, Aug 18, 2013 at 12:24 AM, Ming Lei ming@canonical.com wrote: Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Marcel Holtmann mar...@holtmann.org Cc: Gustavo Padovan gust...@padovan.org Cc: Johan Hedberg johan.hedb...@gmail.com Cc: linux

Re: [PATCH v1] USB: EHCI: disable IAA_WATCHDOG and START_UNLINK_INTR if they needn't to be handled

2013-08-22 Thread Ming Lei
On Fri, Aug 23, 2013 at 4:36 AM, Alan Stern st...@rowland.harvard.edu wrote: On Thu, 22 Aug 2013, Ming Lei wrote: This seems to be the most important factor. When you think about it, though, does it really minimize the changes? Consider all the other adjustments we had to make to ehci

[PATCH v1] USB: EHCI: disable IAA_WATCHDOG and START_UNLINK_INTR if they needn't to be handled

2013-08-21 Thread Ming Lei
expirations/sec (20% ~ 30% of totoal timer expirations/sec) can be saved when one asix network NIC is connected to EHCI without network traffic(the device responds interrupt poll 7~8 times per second constantly for link status query). Cc: Alan Stern st...@rowland.harvard.edu Signed-off-by: Ming Lei ming

Re: [PATCH v1] USB: EHCI: disable IAA_WATCHDOG and START_UNLINK_INTR if they needn't to be handled

2013-08-21 Thread Ming Lei
moving complete() to tasklet can help to decrease HCD irq handling time. Also moving only the giveback routine into a tasklet can avoid dropping HCD private lock during irq handler, which may simplify HCD code, and I have figured out ehci cleanup patches for this. Thanks, -- Ming Lei -- To unsubscribe

Re: [PATCH 3/3] USB: EHCI: disable IAA_WATCHDOG and START_UNLINK_INTR if they needn't to be handled

2013-08-20 Thread Ming Lei
request comes. What does this help with? Measurements please. The patch may avoid unnecessary CPU wakeups caused by timer expiration, and measurement is provided below. On Mon, Aug 19, 2013 at 11:30 PM, Alan Stern st...@rowland.harvard.edu wrote: On Mon, 19 Aug 2013, Ming Lei wrote

Re: Non-enumerable devices on USB and other enumerable buses

2013-08-20 Thread Ming Lei
On Tue, Aug 20, 2013 at 12:01 AM, Mark Brown broo...@kernel.org wrote: On Mon, Aug 19, 2013 at 08:17:53PM +0800, Ming Lei wrote: On Sat, Aug 17, 2013 at 9:29 AM, Alan Stern st...@rowland.harvard.edu wrote: Aong those lines, I would like to point out that the device concept embodied

[PATCH 1/3] USB: use percpu counter to count submitted URBs per device

2013-08-19 Thread Ming Lei
Because usb_hcd_submit_urb is in the hotest path of usb core, so use percpu counter to count URB instead of using atomic variable because atomic operations are much slower than percpu operations. Cc: Oliver Neukum oli...@neukum.org Cc: Alan Stern st...@rowland.harvard.edu Signed-off-by: Ming Lei

[PATCH 3/3] USB: EHCI: disable IAA_WATCHDOG and START_UNLINK_INTR if they needn't to be handled

2013-08-19 Thread Ming Lei
This patch introduces ehci_disable_event(), which is applied on IAA_WATCHDOG and START_UNLINK_INTR events in case that the two events needn't to be handled, so that we may avoid unnecessary CPU wakeup. Cc: Alan Stern st...@rowland.harvard.edu Signed-off-by: Ming Lei ming@canonical.com

[RFC PATCH 2/3] USB: kill urb-use_count atomic variable

2013-08-19 Thread Ming Lei
kept as atomic but ARCH's atomic operations(atomic_inc/ atomic_dec) are saved. Cc: Oliver Neukum oli...@neukum.org Cc: Alan Stern st...@rowland.harvard.edu Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/core/hcd.c | 14 +- drivers/usb/core/urb.c |8

Re: Non-enumerable devices on USB and other enumerable buses

2013-08-19 Thread Ming Lei
, or at least helped to solidify your ideas. Thanks, -- Ming Lei -- 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

Re: [PATCH 1/3] USB: use percpu counter to count submitted URBs per device

2013-08-19 Thread Ming Lei
On Mon, Aug 19, 2013 at 10:00 PM, Greg Kroah-Hartman gre...@linuxfoundation.org wrote: On Mon, Aug 19, 2013 at 07:04:18PM +0800, Ming Lei wrote: Because usb_hcd_submit_urb is in the hotest path of usb core, so use percpu counter to count URB instead of using atomic variable because atomic

Re: [PATCH 1/3] USB: use percpu counter to count submitted URBs per device

2013-08-19 Thread Ming Lei
On Mon, Aug 19, 2013 at 10:42 PM, Alan Stern st...@rowland.harvard.edu wrote: On Mon, 19 Aug 2013, Ming Lei wrote: Because usb_hcd_submit_urb is in the hotest path of usb core, so use percpu counter to count URB instead of using atomic variable because atomic operations are much slower than

Re: [PATCH 1/3] USB: use percpu counter to count submitted URBs per device

2013-08-19 Thread Ming Lei
On Mon, Aug 19, 2013 at 11:17 PM, Alan Stern st...@rowland.harvard.edu wrote: On Mon, 19 Aug 2013, Ming Lei wrote: On Mon, Aug 19, 2013 at 10:42 PM, Alan Stern st...@rowland.harvard.edu wrote: On Mon, 19 Aug 2013, Ming Lei wrote: Because usb_hcd_submit_urb is in the hotest path of usb

Re: [PATCH 1/3] USB: use percpu counter to count submitted URBs per device

2013-08-19 Thread Ming Lei
On Mon, Aug 19, 2013 at 11:14 PM, Greg Kroah-Hartman gre...@linuxfoundation.org wrote: On Mon, Aug 19, 2013 at 11:06:31PM +0800, Ming Lei wrote: On Mon, Aug 19, 2013 at 10:00 PM, Greg Kroah-Hartman gre...@linuxfoundation.org wrote: On Mon, Aug 19, 2013 at 07:04:18PM +0800, Ming Lei wrote

Re: [PATCH v1 02/49] USB: sg: prepare for enabling irq in complete()

2013-08-18 Thread Ming Lei
On Sun, Aug 18, 2013 at 9:01 AM, Alan Stern st...@rowland.harvard.edu wrote: On Sun, 18 Aug 2013, Ming Lei wrote: Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Alan Stern st...@rowland.harvard.edu Signed-off-by: Ming Lei ming@canonical.com

Re: [PATCH v1 26/49] input: cm109: prepare for enabling irq in complete()

2013-08-18 Thread Ming Lei
Hi Dmitry, On Sun, Aug 18, 2013 at 11:37 AM, Dmitry Torokhov dmitry.torok...@gmail.com wrote: Hi Ming, On Sun, Aug 18, 2013 at 12:24:51AM +0800, Ming Lei wrote: Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). I think cm109 needs some love in it's URB

Re: [PATCH v1 02/49] USB: sg: prepare for enabling irq in complete()

2013-08-18 Thread Ming Lei
On Sun, Aug 18, 2013 at 10:44 PM, Alan Stern st...@rowland.harvard.edu wrote: On Sun, 18 Aug 2013, Ming Lei wrote: As far as I can see, these don't need to disable interrupts. All they protect against is the code in usb_sg_wait() and usb_sg_cancel(), which both run in process context

[PATCH v1 02/49] USB: sg: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Alan Stern st...@rowland.harvard.edu Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/core/message.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/core

[PATCH v1 00/49] USB: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
deletions(-) Thanks, -- Ming Lei -- 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

[PATCH v1 04/49] USB: cdc-wdm: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Oliver Neukum oli...@neukum.org Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/class/cdc-wdm.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/usb

[PATCH v1 01/49] USB: skeleton: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/usb-skeleton.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c

[PATCH v1 03/49] USB: devio: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Alan Stern st...@rowland.harvard.edu Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/core/devio.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/core

[PATCH v1 07/49] USB: misc: uss720: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so prepare for the comming change. Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/misc/uss720.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c index

[PATCH v1 05/49] USB: usblp: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Signed-off-by: Pete Zaitcev zait...@kotori.zaitcev.us Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/class/usblp.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git

[PATCH v1 06/49] USB: adutux: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Lisa Nguyen l...@xenapiadmin.com Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/misc/adutux.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/usb/misc

[PATCH v1 08/49] USB: iowarrior: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/misc/iowarrior.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c

[PATCH v1 14/49] USB: serial: io_edgeport: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Johan Hovold jhov...@gmail.com Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/serial/io_edgeport.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/usb

[PATCH v1 16/49] USB: serial: mos7720: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Johan Hovold jhov...@gmail.com Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/serial/mos7720.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial

[PATCH v1 15/49] USB: serial: io_ti: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Johan Hovold jhov...@gmail.com Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/serial/io_ti.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial/io_ti.c

[PATCH v1 17/49] USB: serial: mos77840: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Johan Hovold jhov...@gmail.com Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/serial/mos7840.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial

[PATCH v1 12/49] USB: serial: cyberjack: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Matthias Bruestle and Harald Welte supp...@reiner-sct.com Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/serial/cyberjack.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions

[PATCH v1 10/49] USB: legousbtower: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Juergen Stuber starb...@users.sourceforge.net Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/misc/legousbtower.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH v1 09/49] USB: ldusb: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/misc/ldusb.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c index

[PATCH v1 13/49] USB: serial: digi_acceleportldusb: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Peter Berger pber...@brimson.com Cc: Al Borchers alborch...@steinerpoint.com Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/serial/digi_acceleport.c | 23 +-- 1 file changed

[PATCH v1 18/49] USB: serial: quatech2: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Johan Hovold jhov...@gmail.com Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/serial/quatech2.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial

[PATCH v1 11/49] USB: usbtest: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/misc/usbtest.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c

[PATCH v1 20/49] USB: serial: symbolserial: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Johan Hovold jhov...@gmail.com Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/serial/symbolserial.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial

[PATCH v1 22/49] USB: serial: usb_wwan: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Johan Hovold jhov...@gmail.com Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/serial/usb_wwan.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial

[PATCH v1 21/49] USB: serial: ti_usb_3410_5052: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Johan Hovold jhov...@gmail.com Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/serial/ti_usb_3410_5052.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/usb

[PATCH v1 19/49] USB: serial: sierra: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Johan Hovold jhov...@gmail.com Signed-off-by: Ming Lei ming@canonical.com --- drivers/usb/serial/sierra.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/usb/serial

[PATCH v1 23/49] hid: usbhid: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Jiri Kosina jkos...@suse.cz Cc: linux-in...@vger.kernel.org Signed-off-by: Ming Lei ming@canonical.com --- drivers/hid/usbhid/hid-core.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

  1   2   3   4   5   6   7   8   >