[PATCH v6 20/22] usb: usbtmc: Remove redundant macro USBTMC_SIZE_IOBUFFER

2018-09-12 Thread Guido Kiener
Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless --- drivers/usb/class/usbtmc.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c index 5b6cdb1237ab..ad3932ca4d8d 100644 --- a/drivers/usb/class/usbtmc.c +++ b/drivers/usb/class/

[PATCH v6 04/22] usb: usbtmc: Add ioctl for vendor specific read

2018-09-12 Thread Guido Kiener
The USBTMC_IOCTL_READ call provides for generic synchronous and asynchronous reads on bulk IN to implement vendor specific library routines. Depending on transfer_size the function submits one or more urbs (up to 16) each with a size of up to 4kB. The flag USBTMC_FLAG_IGNORE_TRAILER can be used w

Re: [PATCH 3/3] mfd: omap-usb-host: Drop support for non-DT probe

2018-09-12 Thread Roger Quadros
Hi Laurent, On 11/09/18 18:06, Laurent Pinchart wrote: > Now that all platforms using OMAP USB host devices have been converted > to DT, drop support for legacy non-DT probe from the driver. > > Signed-off-by: Laurent Pinchart > --- > drivers/mfd/omap-usb-host.c| 153 > +++-

[PATCH v6 00/22] usb: usbtmc: Changes needed for compatible IVI/VISA library

2018-09-12 Thread Guido Kiener
The working group "VISA for Linux" of the IVI Foundation www.ivifoundation.org specifies common rules, shared libraries and drivers to implement the specification of "VPP-4.3: The VISA Library" on Linux to be compatible with implementations on other operating systems. The USBTMC protocol is part o

[PATCH v6 03/22] usb: usbtmc: Add ioctl USBTMC_IOCTL_WRITE_RESULT

2018-09-12 Thread Guido Kiener
ioctl USBTMC_IOCTL_WRITE_RESULT copies current out_transfer_size to given __u32 pointer and returns current out_status of the last (asnynchronous) USBTMC_IOCTL_WRITE call. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless --- drivers/usb/class/usbtmc.c | 25 + inc

[PATCH v6 02/22] usb: usbtmc: Add ioctl for vendor specific write

2018-09-12 Thread Guido Kiener
The new ioctl USBTMC_IOCTL_WRITE sends a generic message to bulk OUT. This ioctl is used for vendor specific or asynchronous I/O as well. The message is split into chunks of 4k (page size). Message size is aligned to 32 bit boundaries. With flag USBTMC_FLAG_ASYNC the ioctl is non blocking. With f

[PATCH v6 01/22] usb: usbtmc: Add ioctl for generic requests on control

2018-09-12 Thread Guido Kiener
Add USBTMC_IOCTL_CTRL_REQUEST to send arbitrary requests on the control pipe. Used by specific applications of IVI Foundation, Inc. to implement VISA API functions: viUsbControlIn/Out. The maximum length of control request is set to 4k. This ioctl does not support compatibility for 32 bit applic

[PATCH v6 17/22] usb: usbtmc: Add ioctl USBTMC_IOCTL_API_VERSION

2018-09-12 Thread Guido Kiener
Add ioctl USBTMC_IOCTL_API_VERSION to get current API version of usbtmc driver. This is to allow an instrument library to determine whether the driver API is compatible with the implementation. The API may change in future versions. Therefore the macro USBTMC_API_VERSION should be incremented whe

[PATCH v6 19/22] usb: usbtmc: Remove redundant code

2018-09-12 Thread Guido Kiener
Remove redundant code and fix debug messages. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless --- drivers/usb/class/usbtmc.c | 25 - 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c index 72867a

[PATCH v6 21/22] usb: usbtmc: Fix split quoted string in debug message

2018-09-12 Thread Guido Kiener
Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless --- drivers/usb/class/usbtmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c index ad3932ca4d8d..b9e505cbe6b4 100644 --- a/drivers/usb/class/usbtmc.c +++ b/dri

[PATCH v6 08/22] usb: usbtmc: Add ioctl USBTMC488_IOCTL_WAIT_SRQ

2018-09-12 Thread Guido Kiener
Wait until an SRQ (service request) is received on the interrupt pipe or until the given period of time is expired. In contrast to the poll() function this ioctl does not return when other (a)synchronous I/O operations fail with EPOLLERR. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless --

[PATCH v6 05/22] usb: usbtmc: Add ioctl USBTMC_IOCTL_CANCEL_IO

2018-09-12 Thread Guido Kiener
ioctl USBTMC_IOCTL_CANCEL_IO stops and kills all flying urbs of last USBTMC_IOCTL_READ and USBTMC_IOCTL_WRITE function calls. A subsequent call to USBTMC_IOCTL_READ or USBTMC_IOCTL_WRITE_RESULT returns -ECANCELED with information about current transferred data. Signed-off-by: Guido Kiener Reviewe

[PATCH v6 09/22] usb: usbtmc: add ioctl USBTMC_IOCTL_MSG_IN_ATTR

2018-09-12 Thread Guido Kiener
add ioctl USBTMC_IOCTL_MSG_IN_ATTR that returns the specific bmTransferAttributes field of the last DEV_DEP_MSG_IN Bulk-IN header. This header is received by the read() function. The meaning of the (u8) bitmap bmTransferAttributes is: Bit 0 = EOM flag is set when the last transfer of a USBTMC mess

[PATCH v6 10/22] usb: usbtmc: Add ioctl USBTMC_IOCTL_AUTO_ABORT

2018-09-12 Thread Guido Kiener
Add ioctl USBTMC_IOCTL_AUTO_ABORT to configure auto_abort for each specific file handle. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless --- drivers/usb/class/usbtmc.c | 23 --- include/uapi/linux/usb/tmc.h | 1 + 2 files changed, 17 insertions(+), 7 deletions(-)

[PATCH v6 07/22] usb: usbtmc: Fix suspend/resume

2018-09-12 Thread Guido Kiener
Submitted urbs are not allowed when system is suspended. Thus the submitted urb waiting at interrupt pipe is killed during suspend callback and submitted again when system resumes. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless --- drivers/usb/class/usbtmc.c | 16 +++- 1 fil

[PATCH v6 22/22] usb: usbtmc: Remove sysfs group TermChar and auto_abort

2018-09-12 Thread Guido Kiener
As all the properties of the usbtmc driver can now be controlled on a per file descriptor basis by ioctl functions the sysfs interface is of limited use. We are not aware about applications that are using the sysfs parameter TermChar, TermCharEnabled or auto_abort. Signed-off-by: Guido Kiener Rev

[PATCH v6 12/22] usb: usbtmc: Optimize usbtmc_read

2018-09-12 Thread Guido Kiener
Use new usbtmc_generic_read function to maximize bandwidth during long data transfer. Also fix reading of zero length packet (ZLP) or trailing short packet. The maximum input transfer size is limited to INT_MAX (=2GB). Also remove redundant return in send_request_dev_dep_msg_in(). Signed-off-by: G

[PATCH v6 06/22] usb: usbtmc: Add ioctl USBTMC_IOCTL_CLEANUP_IO

2018-09-12 Thread Guido Kiener
The ioctl USBTMC_IOCTL_CLEANUP_IO kills all submitted urbs to OUT and IN bulk, and clears all received data from IN bulk. Internal transfer counters and error states are reset. An application should use this ioctl after an asnychronous transfer was canceled and/or error handling has finished. Sig

Re: [PATCH 2/3] ARM: OMAP2+: Remove legacy USB initialization code

2018-09-12 Thread Roger Quadros
On 11/09/18 18:06, Laurent Pinchart wrote: > Several legacy USB-related functions, structures and macros are not used > anymore after conversion to DT. Remove them. > > Signed-off-by: Laurent Pinchart Acked-by: Roger Quadros cheers, -roger > --- > arch/arm/mach-omap2/common.h| 2

[PATCH v6 16/22] usb: usbtmc: Replace USBTMC_TIMEOUT macros for control messages

2018-09-12 Thread Guido Kiener
Use common timeout macro USB_CTRL_GET_TIMEOUT (=5s) for all usb_control_msg() function calls. The macro USBTMC_TIMEOUT should only be used as default value for Bulk IN/OUT transfers. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless --- drivers/usb/class/usbtmc.c | 8 1 file chan

[PATCH v6 13/22] usb: usbtmc: Fix ioctl USBTMC_IOCTL_CLEAR

2018-09-12 Thread Guido Kiener
Remove calculation of max_size (=wMaxPacketSize) and wrong condition (actual == max_size) in while loop. A device clear should always flush the complete Bulk-IN FIFO. Insert a sleep of 50 ms between subsequent CHECK_CLEAR_STATUS control requests to avoid stressing the instrument with repeated requ

[PATCH v6 11/22] usb: usbtmc: Optimize usbtmc_write

2018-09-12 Thread Guido Kiener
Use new usbtmc_generic_write function to maximize bandwidth during long data transfer. The maximum output transfer size is limited to INT_MAX (=2GB). Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless --- drivers/usb/class/usbtmc.c | 176 +++-- 1 file changed

[PATCH v6 14/22] usb: usbtmc: Fix ioctl USBTMC_IOCTL_ABORT_BULK_IN

2018-09-12 Thread Guido Kiener
Add parameter 'tag' to function usbtmc_ioctl_abort_bulk_in_tag() for future versions. Remove calculation of max_size (=wMaxPacketSize) and wrong condition (actual == max_size) in while loop. An abort operation should always flush the complete Bulk-IN until a short packet is received. Return error

[PATCH v6 15/22] usb: usbtmc: Fix ioctl USBTMC_IOCTL_ABORT_BULK_OUT

2018-09-12 Thread Guido Kiener
Add parameter 'tag' to function usbtmc_ioctl_abort_bulk_out_tag() for future versions. Use USBTMC_BUFSIZE (4k) instead of USBTMC_SIZE_IOBUFFER (2k). Using USBTMC_SIZE_IOBUFFER is deprecated. Insert a sleep of 50 ms between subsequent CHECK_ABORT_BULK_OUT_STATUS control requests to avoid stressing

[PATCH v6 18/22] usb: usbtmc: Update ioctl-number.txt

2018-09-12 Thread Guido Kiener
Reserve a suitable range of ioctl numbers for USBTMC driver. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless --- Documentation/ioctl/ioctl-number.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-numb

Re: [PATCH v4 00/10] usb: typec: A few more improvements for Intel CHT

2018-09-12 Thread Heikki Krogerus
Hi, On Tue, Sep 11, 2018 at 07:36:34PM +0200, Hans de Goede wrote: > On 11-09-18 12:10, Heikki Krogerus wrote: > > This is fourth version of this series. There was one bug in patch 2/10 > > that Hans noticed. It should be fixed now. > > > > The commit message from v3: > > > > These patches will

Re: [PATCH] usb: chipidea: imx: enable OTG overcurrent in case USB subsystem is already started

2018-09-12 Thread Peter Chen
On Tue, Sep 11, 2018 at 5:39 PM Nicolas Adell wrote: > > On Thursday 30 Aug 2018 à 16:44:01 (+0800), Peter Chen wrote: > > On Wed, Aug 29, 2018 at 8:22 PM Nicolas Adell > > wrote: > > > > > On Wednesday 29 Aug 2018 ą 17:37:19 (+0800), Peter Chen wrote: > > > > On Mon, Aug 27, 2018 at 10:01 PM Nic

Re: [PATCH 3/3] mfd: omap-usb-host: Drop support for non-DT probe

2018-09-12 Thread Laurent Pinchart
Hi Roger, On Wednesday, 12 September 2018 10:57:31 EEST Roger Quadros wrote: > On 11/09/18 18:06, Laurent Pinchart wrote: > > Now that all platforms using OMAP USB host devices have been converted > > to DT, drop support for legacy non-DT probe from the driver. > > > > Signed-off-by: Laurent Pinc

Re: [PATCH 3/3] mfd: omap-usb-host: Drop support for non-DT probe

2018-09-12 Thread Roger Quadros
On 12/09/18 11:30, Laurent Pinchart wrote: > Hi Roger, > > On Wednesday, 12 September 2018 10:57:31 EEST Roger Quadros wrote: >> On 11/09/18 18:06, Laurent Pinchart wrote: >>> Now that all platforms using OMAP USB host devices have been converted >>> to DT, drop support for legacy non-DT probe fro

Re: [PATCH v11 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-12 Thread Peter Rosin
On 2018-09-11 18:53, Ajay Gupta wrote: > Hi Peter, > >> -Original Message- >> From: linux-i2c-ow...@vger.kernel.org >> On Behalf Of Peter Rosin >> Sent: Tuesday, September 11, 2018 1:55 AM >> To: Ajay Gupta ; w...@the-dreams.de; >> heikki.kroge...@linux.intel.com >> Cc: linux-usb@vger.ker

Re: [PATCH v12 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-12 Thread Peter Rosin
On 2018-09-12 00:48, Ajay Gupta wrote: >> If it doesn't work, maybe you can tweak something in gpu_i2c_read_byte to >> make it work? > I tried a few tweaks but it didn't work that way. I think it may take time to > get > this part working. > > Can we update this part later when we have it workin

Re: [PATCH v12 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-12 Thread Peter Rosin
On 2018-09-11 19:45, Ajay Gupta wrote: > Latest NVIDIA GPU card has USB Type-C interface. There is a > Type-C controller which can be accessed over I2C. > > This driver adds I2C bus driver to communicate with Type-C controller. > I2C client driver will be part of USB Type-C UCSI driver. > > Signe

[bug report] usb: host: fotg2: add silicon clock handling

2018-09-12 Thread Dan Carpenter
Hello Linus Walleij, This is a semi-automatic email about new static checker warnings. The patch ffa8a31b5b3b: "usb: host: fotg2: add silicon clock handling" from Sep 1, 2018, leads to the following Smatch complaint: drivers/usb/host/fotg210-hcd.c:5666 fotg210_hcd_remove() warn: variab

Re: [PATCH] usb: dwc2: disable power_down on rockchip devices

2018-09-12 Thread Urja Rannikko
Hi, ping? I just accidentally managed to replicate the work done here, though my identification of the likely breaking commit was: 03ea6d6e9e1ff1b0222eb723eee5990d3511cc4d ("usb: dwc2: Enable power down") If someone is wondering what I am replying to, should be this patch: https://patchwork.kerne

RE: [PATCH v12 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-12 Thread Ajay Gupta
Hi Peter, > > This driver adds I2C bus driver to communicate with Type-C controller. > > I2C client driver will be part of USB Type-C UCSI driver. > > > > Signed-off-by: Ajay Gupta > > Reviewed-by: Andy Shevchenko > > Reviewed-by: Heikki Krogerus > > --- > > Changes from v1 -> v2 > > None >

Re: [PATCH v12 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-12 Thread Peter Rosin
On 2018-09-12 20:02, Ajay Gupta wrote: > Hi Peter, > >>> This driver adds I2C bus driver to communicate with Type-C controller. >>> I2C client driver will be part of USB Type-C UCSI driver. >>> >>> Signed-off-by: Ajay Gupta >>> Reviewed-by: Andy Shevchenko >>> Reviewed-by: Heikki Krogerus >>> -

RE: [PATCH v12 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-12 Thread Ajay Gupta
Hi Peter, > >>> This driver adds I2C bus driver to communicate with Type-C controller. > >>> I2C client driver will be part of USB Type-C UCSI driver. > >>> > >>> Signed-off-by: Ajay Gupta > >>> Reviewed-by: Andy Shevchenko > >>> Reviewed-by: Heikki Krogerus > >>> --- > >>> Changes from v1 -> v

Re: [PATCH] usb: dwc2: disable power_down on rockchip devices

2018-09-12 Thread Minas Harutyunyan
Hi, On 9/12/2018 7:21 PM, Urja Rannikko wrote: > Hi, ping? > > I just accidentally managed to replicate the work done here, though my > identification of the likely breaking commit was: > 03ea6d6e9e1ff1b0222eb723eee5990d3511cc4d ("usb: dwc2: Enable power down") > > If someone is wondering what I

Re: [PATCH] usb: dwc2: disable power_down on rockchip devices

2018-09-12 Thread Minas Harutyunyan
On 7/20/2018 7:25 AM, Hal Emmerich wrote: > From 04fbf78e4e569bf872f1ffcb0a6f9b89569dc913 Mon Sep 17 00:00:00 2001 > From: Hal Emmerich > Date: Thu, 19 Jul 2018 21:48:08 -0500 > Subject: [PATCH] usb: dwc2: disable power_down on rockchip devices > >  The bug would let the usb controller enter pa

Re: [PATCH 1/1] usb: host: xhci-plat: add platform TPL support

2018-09-12 Thread Peter Chen
On Wed, Jul 18, 2018 at 2:45 PM Peter Chen wrote: > > The TPL support is used to identify targeted devices during > EH2.0 and EH3.0 certification test, the user can add "tpl-support" > at dts to enable this feature. > > Signed-off-by: Peter Chen > --- > drivers/usb/host/xhci-plat.c | 3 +++ > 1

Re: [PATCH 00/25] Change tty_port(standard)_install's return type

2018-09-12 Thread Alan Cox
On Tue, 4 Sep 2018 11:44:26 +0900 Jaejoong Kim wrote: > Many drivers with tty use the tty_stand_install(). But, there is no > need to handle the error, since it always returns 0. And what happens if another change means it can fail again. It's just a property of the current implementation that

[PATCH v2 02/17] compat_ioctl: move drivers to generic_compat_ioctl_ptrarg

2018-09-12 Thread Arnd Bergmann
Each of these drivers has a copy of the same trivial helper function to convert the pointer argument and then call the native ioctl handler. We now have a generic implementation of that, so use it. Signed-off-by: Arnd Bergmann --- drivers/char/ppdev.c | 12 +- drivers/char/

[PATCH v2 03/17] compat_ioctl: use correct compat_ptr() translation in drivers

2018-09-12 Thread Arnd Bergmann
A handful of drivers all have a trivial wrapper around their ioctl handler, but don't call the compat_ptr() conversion function at the moment. In practice this does not matter, since none of them are used on the s390 architecture and for all other architectures, compat_ptr() does not do anything, b

[PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-12 Thread Arnd Bergmann
The .ioctl and .compat_ioctl file operations have the same prototype so they can both point to the same function, which works great almost all the time when all the commands are compatible. One exception is the s390 architecture, where a compat pointer is only 31 bit wide, and converting it into a

Re: [PATCH v2 02/17] compat_ioctl: move drivers to generic_compat_ioctl_ptrarg

2018-09-12 Thread Jason Gunthorpe
On Wed, Sep 12, 2018 at 05:01:03PM +0200, Arnd Bergmann wrote: > Each of these drivers has a copy of the same trivial helper function to > convert the pointer argument and then call the native ioctl handler. > > We now have a generic implementation of that, so use it. > > Signed-off-by: Arnd Berg

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-12 Thread Jason Gunthorpe
On Wed, Sep 12, 2018 at 05:08:52PM +0200, Arnd Bergmann wrote: > The .ioctl and .compat_ioctl file operations have the same prototype so > they can both point to the same function, which works great almost all > the time when all the commands are compatible. > > One exception is the s390 architect

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-12 Thread Daniel Vetter
On Wed, Sep 12, 2018 at 5:08 PM, Arnd Bergmann wrote: > The .ioctl and .compat_ioctl file operations have the same prototype so > they can both point to the same function, which works great almost all > the time when all the commands are compatible. > > One exception is the s390 architecture, wher

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-12 Thread Mauro Carvalho Chehab
Em Wed, 12 Sep 2018 17:08:52 +0200 Arnd Bergmann escreveu: > The .ioctl and .compat_ioctl file operations have the same prototype so > they can both point to the same function, which works great almost all > the time when all the commands are compatible. > > One exception is the s390 architectur

Re: [PATCH v3] usb: typec: get the vbus source and charge values from the devicetree

2018-09-12 Thread Angus Ainslie
On 2018-09-11 09:33, Guenter Roeck wrote: I cant put my finger on it but this seems wrong. As i said both src and sink should never be true at the same time. I also din’t understand why turning off src should power off your board. Ultimately my concern is that we may be just painting over the rea

Re: [PATCH v2 02/17] compat_ioctl: move drivers to generic_compat_ioctl_ptrarg

2018-09-12 Thread Arnd Bergmann
On Wed, Sep 12, 2018 at 5:33 PM Jason Gunthorpe wrote: > > On Wed, Sep 12, 2018 at 05:01:03PM +0200, Arnd Bergmann wrote: > > Each of these drivers has a copy of the same trivial helper function to > > convert the pointer argument and then call the native ioctl handler. > > > > We now have a gener

Re: [PATCH] option: Improve Quectel EP06 detection

2018-09-12 Thread Lars Melin
On 9/11/2018 21:34, Kristian Evensen wrote: On Tue, Sep 11, 2018 at 4:00 PM Lars Melin wrote: My opinion is that the option and qmi-wwan drivers should support EP06 in the factory delivery configuration and not in a configuration the user has selected with a Quectel proprietary AT cmd. Can yo

Re: [PATCH v3] usb: typec: get the vbus source and charge values from the devicetree

2018-09-12 Thread Guenter Roeck
On Wed, Sep 12, 2018 at 10:08:58AM -0600, Angus Ainslie wrote: > On 2018-09-11 09:33, Guenter Roeck wrote: > >I cant put my finger on it but this seems wrong. As i said both src > >and sink should never be true at the same time. I also din’t > >understand why turning off src should power off your b

Re: [PATCH] option: Improve Quectel EP06 detection

2018-09-12 Thread Kristian Evensen
On Wed, Sep 12, 2018 at 6:32 PM Lars Melin wrote: > You have chosen a platform which has limited usb resources and want to > solve that problem by adjusting the device driver? No, you asked for a good reason for why disabling and not just ignoring an interface makes sense, and I think that suppor

Re: [PATCH v2 03/17] compat_ioctl: use correct compat_ptr() translation in drivers

2018-09-12 Thread Greg Kroah-Hartman
On Wed, Sep 12, 2018 at 05:01:04PM +0200, Arnd Bergmann wrote: > A handful of drivers all have a trivial wrapper around their ioctl > handler, but don't call the compat_ptr() conversion function at the > moment. In practice this does not matter, since none of them are used > on the s390 architectur

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-12 Thread Greg Kroah-Hartman
On Wed, Sep 12, 2018 at 05:08:52PM +0200, Arnd Bergmann wrote: > The .ioctl and .compat_ioctl file operations have the same prototype so > they can both point to the same function, which works great almost all > the time when all the commands are compatible. > > One exception is the s390 architect

Re: [PATCH v2 02/17] compat_ioctl: move drivers to generic_compat_ioctl_ptrarg

2018-09-12 Thread Greg Kroah-Hartman
On Wed, Sep 12, 2018 at 05:01:03PM +0200, Arnd Bergmann wrote: > Each of these drivers has a copy of the same trivial helper function to > convert the pointer argument and then call the native ioctl handler. > > We now have a generic implementation of that, so use it. > > Signed-off-by: Arnd Berg

[PATCH] usb: dwc2: remove set but unused variable

2018-09-12 Thread Josh Abraham
This patch removes a set but unused variable in hcd.c. Fixes warning: variable ‘data_fifo’ set but not used [-Wunused-but-set-variable] Signed-off-by: Joshua Abraham --- drivers/usb/dwc2/hcd.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c

Re: [PATCH] option: Improve Quectel EP06 detection

2018-09-12 Thread Lars Melin
On 9/12/2018 23:57, Kristian Evensen wrote: On Wed, Sep 12, 2018 at 6:32 PM Lars Melin wrote: You have chosen a platform which has limited usb resources and want to solve that problem by adjusting the device driver? No, you asked for a good reason for why disabling and not just ignoring an in

Re: [PATCH 4.4 18/31] r8152: napi hangup fix after disconnect

2018-09-12 Thread Ben Hutchings
On Sat, 2018-08-25 at 09:43 +0200, Jiri Slaby wrote: > On 08/24/2018, 06:38 PM, Ben Hutchings wrote: > > On Fri, 2018-07-20 at 14:13 +0200, Greg Kroah-Hartman wrote: > > > 4.4-stable review patch.  If anyone has any objections, please let me > > > know. > > > > > > -- > > > > > >

Re: [PATCH] option: Improve Quectel EP06 detection

2018-09-12 Thread Dan Williams
On Thu, 2018-09-13 at 01:25 +0700, Lars Melin wrote: > On 9/12/2018 23:57, Kristian Evensen wrote: > > On Wed, Sep 12, 2018 at 6:32 PM Lars Melin > > wrote: > > > You have chosen a platform which has limited usb resources and > > > want to > > > solve that problem by adjusting the device driver? >

Re: [PATCH] option: Improve Quectel EP06 detection

2018-09-12 Thread Bjørn Mork
Dan Williams writes: > The fact that the firmware implementation has the ability to change the > endpoints is unrelated to Kristian's case, and that alone is > justification for this to be quirked in the driver. People other than > Kristian will undoubtedly use the functionality, on platforms le

Re: [PATCH v2 03/17] compat_ioctl: use correct compat_ptr() translation in drivers

2018-09-12 Thread Andrew Donnellan
On 13/09/18 01:01, Arnd Bergmann wrote: A handful of drivers all have a trivial wrapper around their ioctl handler, but don't call the compat_ptr() conversion function at the moment. In practice this does not matter, since none of them are used on the s390 architecture and for all other architect

[PATCH 1/2] typec: tcpm: Do not disconnect link for self powered devices

2018-09-12 Thread Badhri Jagan Sridharan
During HARD_RESET the data link is disconnected. For self powered device, the spec is advising against doing that. >From USB_PD_R3_0 7.1.5 Response to Hard Resets Device operation during and after a Hard Reset is defined as follows: Self-powered devices Should Not disconnect from USB during a Hard

[PATCH 2/2] typec: tcpm: Add option to maintain current limit at Vsafe5V

2018-09-12 Thread Badhri Jagan Sridharan
During hard reset, TCPM turns off the charging path. The spec provides an option for Sink to either drop to vSafe5V or vSafe0V. >From USB_PD_R3_0 2.6.2 Sink Operation .. Serious errors are handled by Hard Reset Signaling issued by either Port Partner. A Hard Reset: resets protocol as for a Soft Re

Re: [PATCH 0/4] usb: dwc2: fix host mode external vbus supply management

2018-09-12 Thread Minas Harutyunyan
On 9/5/2018 3:40 PM, Amelie Delaunay wrote: > This patchset fixes and improves host mode external vbus supply management, > mainly around suspend/resume use cases. It also avoid 'vbus regulator" > to be requested lots of times upon each call to dwc2_vbus_supply_init(), > especially when pm runtime

Re: [PATCH] usb: dwc2: remove set but unused variable

2018-09-12 Thread Minas Harutyunyan
On 9/12/2018 10:16 PM, Josh Abraham wrote: > This patch removes a set but unused variable in hcd.c. > > Fixes warning: > variable ‘data_fifo’ set but not used [-Wunused-but-set-variable] > > Signed-off-by: Joshua Abraham > --- > drivers/usb/dwc2/hcd.c | 3 --- > 1 file changed, 3 deletions(-)

Re: [PATCH 2/2] typec: tcpm: Add option to maintain current limit at Vsafe5V

2018-09-12 Thread Jack Pham
Hello Badhri, On Wed, Sep 12, 2018 at 07:11:13PM -0700, Badhri Jagan Sridharan wrote: > During hard reset, TCPM turns off the charging path. > The spec provides an option for Sink to either drop to vSafe5V or vSafe0V. This doesn't make sense. By definition the sink isn't sourcing VBUS, so how can