Re: Working with usbfs

2015-01-11 Thread Rohan Vichare
Hi, I wanted to create a small simple usbfs using VFS framework of Linux USB. so I was in need for this function. Source I have is totally sufficient for me. I am not writing USB kernel driver, As explained I was just trying to create the usbfs which will give me notifications of devices and buses

Re: Difference between run time and normal suspend

2015-01-11 Thread vichy
hi Alan: >> 3. for host part, runtime suspend/resume is only doing port >> suspend/resume or both host and port going to suspend/resume? > > Only the port. However, when _all_ the devices attached to the host > controlluer go into runtime suspend, the controller itself will also be > put into ru

Re: [RESEND PATCH v2 1/2] usb: serial: handle -EPROTO quietly in generic_read_bulk

2015-01-11 Thread Johan Hovold
On Sat, Jan 10, 2015 at 04:44:32PM -0800, Jeremiah Mahler wrote: > If a USB serial device is unplugged while there is an active program > using the device it will spam the logs with -EPROTO (71) messages as it > attempts to retry. Can you change this to "might spam", as which error message, and if

Re: [RESEND PATCH v2 1/2] usb: serial: handle -EPROTO quietly in generic_read_bulk

2015-01-11 Thread Jeremiah Mahler
Johan, On Sun, Jan 11, 2015 at 12:36:18PM +0100, Johan Hovold wrote: > On Sat, Jan 10, 2015 at 04:44:32PM -0800, Jeremiah Mahler wrote: > > If a USB serial device is unplugged while there is an active program > > using the device it will spam the logs with -EPROTO (71) messages as it > > attempts

[PATCH v3 0/2] usb: serial: silence non-critical unplug read errors

2015-01-11 Thread Jeremiah Mahler
If a USB serial device (e.g. /dev/ttyUSB0) with an active program is unplugged, a bunch of -ENODEV and -EPROTO errors may be produced in the logs. This patch set quiets these messages without changing the original behavior. This change is beneficial when using daemons such as slcand, which is sim

[PATCH v3 2/2] usb: serial: handle -ENODEV quietly in generic_submit_read_urb

2015-01-11 Thread Jeremiah Mahler
If a USB serial device (e.g. /dev/ttyUSB0) with an active program is unplugged, an -ENODEV (19) error will be produced after it gives up trying to resubmit a read. usb_serial_generic_submit_read_urb - usb_submit_urb failed: -19 Add -ENODEV as one of the permanent errors along with -EPERM that u

[PATCH v3 1/2] usb: serial: silence all non-critical read errors

2015-01-11 Thread Jeremiah Mahler
If a USB serial device is unplugged while there is an active program using the device it may spam the logs with -EPROTO (71) messages as it attempts to retry. Most serial usb drivers (metro-usb, pl2303, mos7840, ...) only output these messages for debugging. The generic driver treats these as err

[PATCH v3 0/4] scsi: ufs & ums-* & esp_scsi: fix module reference counting

2015-01-11 Thread Akinobu Mita
While accessing a scsi_device, the use count of the underlying LLDD module is incremented. The module reference is retrieved through .module field of struct scsi_host_template. This mapping between scsi_device and underlying LLDD module works well except ufs, unusual usb storage drivers, and sub

[PATCH v3 1/4] scsi: add ability to adjust module reference for scsi host

2015-01-11 Thread Akinobu Mita
While accessing a scsi_device, the use count of the underlying LLDD module is incremented. The module reference is retrieved through .module field of struct scsi_host_template. This mapping between scsi_device and underlying LLDD module works well except ufs, unusual usb storage drivers, and sub

[PATCH v3 3/4] usb: storage: adjust module reference for scsi host

2015-01-11 Thread Akinobu Mita
While accessing a unusual usb storage (ums-alauda, ums-cypress, ...), the module reference count is not incremented. Because these drivers allocate scsi hosts with usb_stor_host_template defined in usb-storage module. So these drivers always can be unloaded. This fixes it by passing correct modu

Re: Difference between run time and normal suspend

2015-01-11 Thread Alan Stern
On Sun, 11 Jan 2015, vichy wrote: > hi Alan: > > > >> 3. for host part, runtime suspend/resume is only doing port > >> suspend/resume or both host and port going to suspend/resume? > > > > Only the port. However, when _all_ the devices attached to the host > > controlluer go into runtime suspen

Re: Working with usbfs

2015-01-11 Thread Greg KH
On Sun, Jan 11, 2015 at 04:34:08PM +0600, Rohan Vichare wrote: > Hi, > > I wanted to create a small simple usbfs using VFS framework of Linux > USB. so I was in need for this function. > Source I have is totally sufficient for me. > I am not writing USB kernel driver, As explained I was just tryin

Re: [PATCH v2 2/3] usb: phy: add lubbock phy driver

2015-01-11 Thread Dmitry Eremin-Solenikov
Hello, 2015-01-08 19:58 GMT+03:00 Felipe Balbi : > On Sun, Nov 30, 2014 at 01:02:04AM +0300, Dmitry Eremin-Solenikov wrote: >> Extract lubbock-specific code from pxa25x_udc driver. As a bonus, phy >> driver determines connector/VBUS status by reading CPLD register. Also >> it uses a work to call i

[PATCH v4 4/4] can: kvaser_usb: Retry first bulk transfer on -ETIMEDOUT

2015-01-11 Thread Ahmed S. Darwish
From: Ahmed S. Darwish (This is a draft patch, I'm not sure if this fixes the USB bug or only its psymptom. Feedback from the linux-usb folks is really appreciated.) When plugging the Kvaser USB/CAN dongle the first time, everything works as expected and all of the transfers from and to the USB

Re: [PATCH v4 4/4] can: kvaser_usb: Retry first bulk transfer on -ETIMEDOUT

2015-01-11 Thread Marc Kleine-Budde
On 01/11/2015 09:45 PM, Ahmed S. Darwish wrote: > From: Ahmed S. Darwish > > (This is a draft patch, I'm not sure if this fixes the USB > bug or only its psymptom. Feedback from the linux-usb folks > is really appreciated.) > > When plugging the Kvaser USB/CAN dongle the first time, everything >

[PATCH] uwb: lc-dev: Remove unused function

2015-01-11 Thread Rickard Strandqvist
Remove the function uwb_dev_addr_bcast() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/uwb/lc-dev.c |7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/uwb/lc-dev.c b/

[PATCH 1/2] fhci-hub: no need to overwrite byte 3 of the Hub Descriptor

2015-01-11 Thread Sergei Shtylyov
The code handling Get Hub Descriptor request copies data from root_hub_des[], then overwrites byte 3 with real 'wHubCharacteristics' value. There's no need to overwrite, we can substitute the real value right into root_hub_des[3]. Signed-off-by: Sergei Shtylyov --- The patch is against the 'usb-

[PATCH 2/2] fhci-hub: kill 'len' variable in fhci_hub_control()

2015-01-11 Thread Sergei Shtylyov
The 'len' variable in fhci_hub_control() is write-only, so totally useless. Signed-off-by: Sergei Shtylyov --- The patch is against the 'usb-next' branch of Greg KH's 'usb.git' repo. drivers/usb/host/fhci-hub.c |4 1 file changed, 4 deletions(-) Index: usb/drivers/usb/host/fhci-hub.c