[PATCH v2 0/5] usbnet: avoiding access auto-suspended device

2012-11-04 Thread Ming Lei
Thip patchset avoids accessing auto-suspended device in ioctl path, which is generally triggered by some network utility(ethtool, ifconfig, ...) Most of network devices have the problem, but as discussed in the thread: http://marc.info/?t=13505486063r=1w=2 the problem should be

[PATCH v2 1/5] usbnet: introduce usbnet_read[write]_cmd_nopm

2012-11-04 Thread Ming Lei
This patch introduces the below two helpers to prepare for solving the usbnet runtime PM problem, which may cause some network utilities (ifconfig, ethtool,...) touch a suspended device. usbnet_read_cmd_nopm() usbnet_write_cmd_nopm() The above two helpers should be called by

[PATCH v2 2/5] usbnet: smsc75xx: apply the introduced usbnet_read[write]_cmd_nopm

2012-11-04 Thread Ming Lei
This patch applies the introduced usbnet_read_cmd_nopm() and usbnet_write_cmd_nopm() in the callback of resume and suspend to avoid deadlock if USB runtime PM is considered into usbnet_read_cmd() and usbnet_write_cmd(). Cc: Steve Glendinning steve.glendinn...@shawell.net Signed-off-by: Ming Lei

[PATCH v2 3/5] usbnet: smsc95xx: fix memory leak in smsc95xx_suspend

2012-11-04 Thread Ming Lei
This patch fixes memory leak in smsc95xx_suspend. Also, it isn't necessary to bother mm to allocate 8bytes/16byte, and we can use stack variable safely. Cc: Steve Glendinning steve.glendinn...@shawell.net Signed-off-by: Ming Lei ming@canonical.com --- drivers/net/usb/smsc95xx.c | 12

[PATCH v2 4/5] usbnet: smsc95xx: apply the introduced usbnet_read[write]_cmd_nopm

2012-11-04 Thread Ming Lei
This patch applies the introduced usbnet_read_cmd_nopm() and usbnet_write_cmd_nopm() in the callback of resume and suspend to avoid deadlock if USB runtime PM is considered into usbnet_read_cmd() and usbnet_write_cmd(). Cc: Steve Glendinning steve.glendinn...@shawell.net Signed-off-by: Ming Lei

[PATCH v2 5/5] usbnet: make device out of suspend before calling usbnet_read[write]_cmd

2012-11-04 Thread Ming Lei
This patche gets the runtime PM reference count before calling usbnet_read[write]_cmd, and puts it after completion of the usbnet_read[write]_cmd, so that the usb control message can always be sent to one active device in the non-PM context. Signed-off-by: Ming Lei ming@canonical.com ---

Re: [PATCH v1 2/5] usbnet: smsc75xx: apply the introduced usbnet_read[write]_cmd_nopm

2012-11-04 Thread Ming Lei
On Sun, Nov 4, 2012 at 1:58 PM, David Miller da...@davemloft.net wrote: This gets rejects, you didn't have your net-next tree uptodate enough. Sorry, I just rebased that on 3.7.0-rc3-next-20121102. The new patchset which is against the latest net-next has been sent out. Thanks, -- Ming Lei

Re: 3.4.4: disabling irq

2012-11-04 Thread Udo van den Heuvel
Well, The issue appeared again. irq 18 was disabled, one pwc webcam was on that irq. This time on new hardware: Gigabyte F2A85X-UP4 with A10-5800K APU. The box was busy with it's raid10 array, this time, by running bonnie++; also a raid-check was in progress. (unknown at the time) So what does

Re: [PATCH v2 5/5] usbnet: make device out of suspend before calling usbnet_read[write]_cmd

2012-11-04 Thread Sergei Shtylyov
Hello. On 04-11-2012 15:16, Ming Lei wrote: s/make/wake/ in the subject? This patche gets the runtime PM reference count before calling s/patche/patch/ usbnet_read[write]_cmd, and puts it after completion of the usbnet_read[write]_cmd, so that the usb control message can always

USB issue with kernel 3.6

2012-11-04 Thread Piergiorgio Sartor
Hi all, I've a strange problem with the USB subsystem, under kernel 3.6, this was not happening under 3.5. The system is Fedora, so I'll use their kernel numbers, and the related bug report is this: https://bugzilla.redhat.com/show_bug.cgi?id=866166 I've some USB hubs cascaded in order to have

Re: [PATCH] usb: gadget: ncm: correct endianess conversion

2012-11-04 Thread Dmytro Milinevskyy
Hum, you are right. It's pain to send anything via thunderbird. Resending. br, -- dmytro On Fri, Nov 2, 2012 at 12:46 PM, Sergei Shtylyov sshtyl...@mvista.com wrote: Hello. On 01-11-2012 19:16, Dmytro Milinevskyy wrote: Convert USB descriptor's fields to CPU byte order before using locally

[PATCH] usb: gadget: ncm: correct endianess conversion

2012-11-04 Thread Dmytro Milinevskyy
Convert USB descriptor's fields to CPU byte order before using locally in USB NCM gadget driver. Tested on MIPS32 big-endian device. Signed-off-by: Dmytro Milinevskyy milinevs...@gmail.com --- drivers/usb/gadget/f_ncm.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff

[PATCH V3 1/4] USB: Set usb port's DeviceRemovable according acpi information in EHCI

2012-11-04 Thread Lan Tianyu
ACPI provide _PLD and _UPC aml methods to describe usb port visibility and connectability. This patch is to use those information to change ehci root hub descriptors and set usb hub port's DeviceRemovable in the hub_configure(). When hub descriptor request is issued at first time, usb port device

[PATCH V3 3/4] usb: Create link files between child device and usb port device.

2012-11-04 Thread Lan Tianyu
To show the relationship between usb port and child device, add link file port under usb device's sysfs directoy and device under usb port device's sysfs directory. They are linked to each other. Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/hub.c | 22

[PATCH V3 0/4] usb: expose DeviceRemovable to user space via sysfs attribute

2012-11-04 Thread Lan Tianyu
Change since v1: [PATCH 3] Rename link file's name child to device, add check of return value of sysfs_create_link() and handle error return value properly. Change since v2: [PATCH 1] fix a logic backward problem. Add changelog about change ehci root hub descriptors based on ACPI

[PATCH V3 2/4] usb/xhci: set root hub's DeviceRemovable according to usb port connect type

2012-11-04 Thread Lan Tianyu
This patch is to set xhci root hub's DeviceRemovable according to usb port's connect type which currently comes from ACPI information rather than xhci PORTSC register due to Windows prefers to ACPI information. If ACPI information was different with PORTSC, there would be a warning.

[PATCH V3 4/4] usb: Add portX/connect_type attribute to expose usb port's connect type

2012-11-04 Thread Lan Tianyu
Some platforms provide usb port connect types through ACPI. This patch is to add this new attribute to expose these information to user space. Signed-off-by: Lan Tianyu tianyu@intel.com --- Documentation/ABI/testing/sysfs-bus-usb |9 +++ drivers/usb/core/hub.c | 43

Re: EHCI controller CS5536 hard disk disconnects

2012-11-04 Thread Sergey Vlasov
On Sat, Nov 03, 2012 at 09:14:08PM +0100, Miguel Dardenne wrote: On 2012-11-03 17:50, Alan Stern wrote: I get a USB disconnect of my external USB HDD about once per day. Enabling USB debug in the kernel shows the first error as 'ehci_hcd detected XactErr'. It happens only when the drive is

AR9331 chipset has XactErr when working with USB 1.1 devices

2012-11-04 Thread Ashok Rao
New small and portable routers from TP-LINK (TL-MR3020 and TL-MR3040) incorporate this Atheros chipset. On Linux 3.3.8 (and earlier kernels like 3.2.5) we are finding data transfer issues with USB 1.1 devices. The device (a Samsung BlackJack phone working as a 3G modem) can pass data to the

Re: USB issue with kernel 3.6

2012-11-04 Thread Alan Stern
On Sun, 4 Nov 2012, Piergiorgio Sartor wrote: Hi all, I've a strange problem with the USB subsystem, under kernel 3.6, this was not happening under 3.5. The system is Fedora, so I'll use their kernel numbers, and the related bug report is this:

Re: USB issue with kernel 3.6

2012-11-04 Thread Piergiorgio Sartor
On Sun, Nov 04, 2012 at 03:07:35PM -0500, Alan Stern wrote: [...] The first thing you should do is test a 3.6 kernel with CONFIG_USB_DEBUG enabled and post the dmesg log showing the problem. That will help indicate what is going wrong. I guess this is a compile time option. Is it any

Re: USB issue with kernel 3.6

2012-11-04 Thread Piergiorgio Sartor
On Sun, Nov 04, 2012 at 03:07:35PM -0500, Alan Stern wrote: [...] The first thing you should do is test a 3.6 kernel with CONFIG_USB_DEBUG enabled and post the dmesg log showing the problem. That will help indicate what is going wrong. If that doesn't suggest a solution, the next thing

merging printk and WARN

2012-11-04 Thread Julia Lawall
It looks like these patches were not a good idea, because in each case the printk provides an error level, and WARN then provides another one. Sorry for the noise. julia -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org

058f:9360 8GB MicroSD card not recognized in Alcor Micro Corp. 8-in-1 Media Card Reader

2012-11-04 Thread Dan 'Da Man'
Bug Short Description: 058f:9360 8GB MicroSD card not recognized in Alcor Micro Corp. 8-in-1 Media Card Reader When I insert a 8GB MicroSD into my integrated Alcor Micro Corp. 8-in-1 Media Card Reader using Oneiric it is not recognized. However, the same MicroSD card works in a different laptop's

Re: USB issue with kernel 3.6

2012-11-04 Thread Ming Lei
On Mon, Nov 5, 2012 at 4:17 AM, Piergiorgio Sartor piergiorgio.sar...@nexgo.de wrote: This seems a bit out of reach, for several reasons. I'll have to use a Fedora kernel, which might have its own patches and I suspect things will become complicated beyond my capability to manage them. I

[PATCH] USB: rcar-phy: fixup implicit declaration of function 'iowrite32'

2012-11-04 Thread Kuninori Morimoto
Current rcar-phy driver used iowerite32/ioread32, but it cause compile error on some architectures. This patch used writel/readl and HAS_IOMEM to solve this issue. drivers/usb/phy/rcar-phy.c: In function 'rcar_usb_phy_init': drivers/usb/phy/rcar-phy.c:75:3: error: implicit declaration of

Re: USB issue with kernel 3.6

2012-11-04 Thread Alan Stern
On Sun, 4 Nov 2012, Piergiorgio Sartor wrote: On Sun, Nov 04, 2012 at 03:07:35PM -0500, Alan Stern wrote: [...] The first thing you should do is test a 3.6 kernel with CONFIG_USB_DEBUG enabled and post the dmesg log showing the problem. That will help indicate what is going wrong. I

Re: 058f:9360 8GB MicroSD card not recognized in Alcor Micro Corp. 8-in-1 Media Card Reader

2012-11-04 Thread Alan Stern
On Sun, 4 Nov 2012, Dan 'Da Man' wrote: Bug Short Description: 058f:9360 8GB MicroSD card not recognized in Alcor Micro Corp. 8-in-1 Media Card Reader When I insert a 8GB MicroSD into my integrated Alcor Micro Corp. 8-in-1 Media Card Reader using Oneiric it is not recognized. However, the

[PATCH 1/1] staging: usbip: remove an unnecessary lock in usbip_event_happened. The variable happened is local. So I think there is no need to lock here.

2012-11-04 Thread Harvey Yang
From: harvey.yang harvey.huawei.y...@gmail.com Signed-off-by: harvey.yang harvey.huawei.y...@gmail.com --- drivers/staging/usbip/usbip_event.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/staging/usbip/usbip_event.c b/drivers/staging/usbip/usbip_event.c

Re: [PATCH 1/1] staging: usbip: remove an unnecessary lock in usbip_event_happened. The variable happened is local. So I think there is no need to lock here.

2012-11-04 Thread Greg Kroah-Hartman
On Mon, Nov 05, 2012 at 12:50:26PM +0800, Harvey Yang wrote: From: harvey.yang harvey.huawei.y...@gmail.com Signed-off-by: harvey.yang harvey.huawei.y...@gmail.com --- drivers/staging/usbip/usbip_event.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 1/1] staging: usbip: remove an unnecessary lock in usbip_event_happened. The variable happened is local. So I think there is no need to lock here.

2012-11-04 Thread Prashant Shah
Hi, int happened = 0; - spin_lock(ud-lock); if (ud-event != 0) happened = 1; - spin_unlock(ud-lock); return happened; I am guessing locking was intended to protect ud-event along with happened so that (checking the value of ud-event and

Re: [PATCH 1/1] staging: usbip: remove an unnecessary lock in usbip_event_happened. The variable happened is local. So I think there is no need to lock here.

2012-11-04 Thread harvey yang
I think no need to make 'happened' static as we just check 'ud-event' feild. Maybe making this function inline would make more sense. inline int usbip_event_happened(struct usbip_device *ud) { return ud-event ? 1 : 0; } Thanks Harvey On Mon, Nov 5, 2012 at 1:34 PM, Prashant Shah

Re: AR9331 chipset has XactErr when working with USB 1.1 devices

2012-11-04 Thread Greg KH
On Sun, Nov 04, 2012 at 02:42:32PM -0500, Ashok Rao wrote: New small and portable routers from TP-LINK (TL-MR3020 and TL-MR3040) incorporate this Atheros chipset. On Linux 3.3.8 (and earlier kernels like 3.2.5) we are finding data transfer issues with USB 1.1 devices. The device (a

Re: [PATCH 1/1] usb: at91_udc: fix typo on vubs pullup valid check

2012-11-04 Thread Greg Kroah-Hartman
On Mon, Nov 05, 2012 at 08:39:43AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: if the gpio is not valid complain since 3285e0ec088febc5a88f57ddd78385a7da71476c ARM: at91/udc: use gpio_is_valid to check the gpio Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Cc: