RE: [PATCH v3] usb: hub: try old enumeration scheme first for high speed devices

2018-09-27 Thread Zengtao (B)
Hi greg: Sorry for the late response, I have applied the tags and resend, please receive it and check Thx Zengtao >-Original Message- >From: Greg KH [mailto:gre...@linuxfoundation.org] >Sent: Thursday, September 20, 2018 6:38 PM >To: Roger Quadros >Cc: Zengtao (B) ; st...@rowland.harv

[PATCH] usb: hub: try old enumeration scheme first for high speed devices

2018-09-27 Thread Zeng Tao
The new scheme is required just to support legacy low and full-speed devices. For high speed devices, it will slower the enumeration speed. So in this patch we try the "old" enumeration scheme first for high speed devices, and this is what Windows does since Windows 8. Signed-off-by: Zeng Tao Ack

Re: [PATCH 2/2] hwmon: ina3221: Add enable sysfs nodes

2018-09-27 Thread Nicolin Chen
On Thu, Sep 27, 2018 at 03:52:00PM -0700, Guenter Roeck wrote: > The proper fix for this problem would be to add support for suspend / > resume to the driver. At resume time, all channels will have been > re-enabled if the chip was powered off, even if they were explicitly > disabled by devicetree

Re: [PATCH 2/2] hwmon: ina3221: Add enable sysfs nodes

2018-09-27 Thread Guenter Roeck
On Thu, Sep 27, 2018 at 03:26:14PM -0700, Nicolin Chen wrote: > On Wed, Sep 26, 2018 at 06:06:32AM -0700, Guenter Roeck wrote: > > > +static inline bool ina3221_is_enable(struct ina3221_data *ina, int > > > channel) > > > > s/is_enable/is_enabled/, maybe ? > > Fixing. > > > > + return (config &

Re: [PATCH 2/2] hwmon: ina3221: Add enable sysfs nodes

2018-09-27 Thread Nicolin Chen
On Wed, Sep 26, 2018 at 06:06:32AM -0700, Guenter Roeck wrote: > > +static inline bool ina3221_is_enable(struct ina3221_data *ina, int channel) > > s/is_enable/is_enabled/, maybe ? Fixing. > > + return (config & INA3221_CONFIG_CHx_EN(channel)) > 0; > > The "> 0" is unnecessary. Conversion to

Re: [PATCH v7 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-27 Thread Nicolin Chen
On Thu, Sep 27, 2018 at 03:06:20PM -0700, Guenter Roeck wrote: > I am quite sure I asked to use kstrtobool(). Did that get lost or do you have > some reason to not use it ? > > I can understand if you don't want to change ina3221_is_enable() to > ina3221_is_enabled(), since that is POV, but I do

Re: [PATCH v7 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-27 Thread Guenter Roeck
On Thu, Sep 27, 2018 at 01:54:06PM -0700, Nicolin Chen wrote: > An ina3221 chip has three input ports. Each port is used > to measure the voltage and current of its input source. > > The DT binding now has defined bindings for their input > sources, so the driver should read these information and

[PATCH v7 0/2] Add an initial DT binding doc for ina3221

2018-09-27 Thread Nicolin Chen
This series adds a initial DT binding doc for ina3221. It defines a child node to describe the input source of each ina3221 channel. Then it changes the driver to handle the information properly. Changelog v6->v7: * Refined the example in the binding doc (PATCH-1) v5->v6: * Removed status proper

[PATCH v7 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-27 Thread Nicolin Chen
An ina3221 chip has three input ports. Each port is used to measure the voltage and current of its input source. The DT binding now has defined bindings for their input sources, so the driver should read these information and handle accordingly. This patch adds a new structure of input source spe

[PATCH v7 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-27 Thread Nicolin Chen
Texas Instruments INA3221 is a triple-channel shunt and bus voltage monitor. This patch adds a DT binding doc for it. Signed-off-by: Nicolin Chen --- Changelog v6->v7: * Restored three channel examples and merged them with the parent one v5->v6: * Removed status property as no need to explicitl

Re: [PATCH v6 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-27 Thread Nicolin Chen
On Thu, Sep 27, 2018 at 03:38:44PM -0500, Rob Herring wrote: > On Thu, Sep 27, 2018 at 2:49 PM Nicolin Chen wrote: > > > > Texas Instruments INA3221 is a triple-channel shunt and bus > > voltage monitor. This patch adds a DT binding doc for it. > > > > Signed-off-by: Nicolin Chen > > --- > > Chan

Re: [PATCH v6 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-27 Thread Rob Herring
On Thu, Sep 27, 2018 at 2:49 PM Nicolin Chen wrote: > > Texas Instruments INA3221 is a triple-channel shunt and bus > voltage monitor. This patch adds a DT binding doc for it. > > Signed-off-by: Nicolin Chen > --- > Changelog > v5->v6: > * Removed status property as no need to explicitly list it

[PATCH v6 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-27 Thread Nicolin Chen
An ina3221 chip has three input ports. Each port is used to measure the voltage and current of its input source. The DT binding now has defined bindings for their input sources, so the driver should read these information and handle accordingly. This patch adds a new structure of input source spe

[PATCH v6 0/2] Add an initial DT binding doc for ina3221

2018-09-27 Thread Nicolin Chen
This series adds a initial DT binding doc for ina3221. It defines a child node to describe the input source of each ina3221 channel. Then it changes the driver to handle the information properly. Changelog v5->v6: * Removed status property and merged examples (PATCH-1) * Added in[123]_enable sys

[PATCH v6 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-27 Thread Nicolin Chen
Texas Instruments INA3221 is a triple-channel shunt and bus voltage monitor. This patch adds a DT binding doc for it. Signed-off-by: Nicolin Chen --- Changelog v5->v6: * Removed status property as no need to explicitly list it. * Combined all examples into a complete one. v4->v5: * Replaced "i

Re: [PATCH v5 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-27 Thread Nicolin Chen
On Thu, Sep 27, 2018 at 12:44:13PM -0500, Rob Herring wrote: > > +2) child nodes > > + Required properties: > > + - reg: Must be 0, 1 or 2, corresponding to IN1, IN2 or IN3 port of > > INA3221 > > + > > + Optional properties: > > + - label: Name of the input source > > + - shunt-resistor-micr

Re: [PATCH 2/2] hwmon: ina3221: Add enable sysfs nodes

2018-09-27 Thread Nicolin Chen
Hello Guenter, On Thu, Sep 27, 2018 at 09:05:09AM -0700, Guenter Roeck wrote: > > > Point is that I don't _know_ how this is going to be used, so I'd > > > rather keep it flexible. > > > > Well, taking one step back, I am okay to follow your way if you > > are really firm about it. Just please gi

Re: [PATCH 0/2] boot to a mapped device

2018-09-27 Thread Mike Snitzer
On Thu, Sep 27 2018 at 12:36pm -0400, Kees Cook wrote: > On Thu, Sep 27, 2018 at 7:23 AM, Mike Snitzer wrote: > > On Wed, Sep 26 2018 at 3:16am -0400, > > Richard Weinberger wrote: > > > >> Helen, > >> > >> On Wed, Sep 26, 2018 at 7:01 AM Helen Koike > >> wrote: > >> > > >> > This series is

Re: [PATCH v5 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-27 Thread Rob Herring
On Tue, Sep 25, 2018 at 03:59:29PM -0700, Nicolin Chen wrote: > Texas Instruments INA3221 is a triple-channel shunt and bus > voltage monitor. This patch adds a DT binding doc for it. > > Signed-off-by: Nicolin Chen > --- > Changelog > v4->v5: > * Replaced "input-id" with "reg" and added address

Re: [PATCH v5 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-27 Thread Rob Herring
On Tue, Sep 25, 2018 at 06:52:29PM -0700, Guenter Roeck wrote: > Hi Nicolin, > > On 09/25/2018 03:59 PM, Nicolin Chen wrote: > > Texas Instruments INA3221 is a triple-channel shunt and bus > > voltage monitor. This patch adds a DT binding doc for it. > > > > Signed-off-by: Nicolin Chen > > --- >

Re: [PATCH v2] NTB: switchtec_ntb: Update switchtec documentation with pre-requisites for NTB

2018-09-27 Thread Logan Gunthorpe
On 2018-09-27 12:36 a.m., wesley.sh...@microchip.com wrote: > Update switchtec documentation > 1.add pre-requisites for NTB driver > 2.misc updates > change NTB hardware driver name to ntb_hw_switchtec > update the description of 2 partitions limit > add reference to Linux Documentation/ntb.t

Re: [PATCH 0/2] boot to a mapped device

2018-09-27 Thread Kees Cook
On Thu, Sep 27, 2018 at 7:23 AM, Mike Snitzer wrote: > On Wed, Sep 26 2018 at 3:16am -0400, > Richard Weinberger wrote: > >> Helen, >> >> On Wed, Sep 26, 2018 at 7:01 AM Helen Koike >> wrote: >> > >> > This series is reviving an old patchwork. >> > Booting from a mapped device requires an init

Re: [PATCH v8 07/12] dt-bindings: mfd: Add a document for PECI client MFD

2018-09-27 Thread Jae Hyun Yoo
On 9/27/2018 8:15 AM, Rob Herring wrote: On Tue, 18 Sep 2018 14:51:19 -0700, Jae Hyun Yoo wrote: This commit adds a dt-bindings document for PECI client MFD. Cc: Lee Jones Cc: Rob Herring Cc: Mark Rutland Cc: Andrew Jeffery Cc: James Feist Cc: Jason M Biils Cc: Joel Stanley Cc: Vernon Ma

Re: [PATCH v8 01/12] dt-bindings: Add a document of PECI subsystem

2018-09-27 Thread Jae Hyun Yoo
On 9/27/2018 8:10 AM, Rob Herring wrote: On Tue, 18 Sep 2018 14:51:13 -0700, Jae Hyun Yoo wrote: This commit adds a document of generic PECI bus, adapter and client driver. Cc: Rob Herring Cc: Mark Rutland Cc: Andrew Jeffery Cc: Joel Stanley Signed-off-by: Jae Hyun Yoo Reviewed-by: Haiyue

Re: [PATCH 2/2] hwmon: ina3221: Add enable sysfs nodes

2018-09-27 Thread Guenter Roeck
Hi Nicolin, On Wed, Sep 26, 2018 at 02:55:06PM -0700, Nicolin Chen wrote: > On Wed, Sep 26, 2018 at 01:44:55PM -0700, Guenter Roeck wrote: > > On Wed, Sep 26, 2018 at 01:25:20PM -0700, Nicolin Chen wrote: > > > Hello, > > > > > > On Wed, Sep 26, 2018 at 12:58:17PM -0700, Guenter Roeck wrote: > >

Re: [PATCH v8 07/12] dt-bindings: mfd: Add a document for PECI client MFD

2018-09-27 Thread Rob Herring
On Tue, 18 Sep 2018 14:51:19 -0700, Jae Hyun Yoo wrote: > This commit adds a dt-bindings document for PECI client MFD. > > Cc: Lee Jones > Cc: Rob Herring > Cc: Mark Rutland > Cc: Andrew Jeffery > Cc: James Feist > Cc: Jason M Biils > Cc: Joel Stanley > Cc: Vernon Mauery > Signed-off-by: J

Re: [PATCH v8 01/12] dt-bindings: Add a document of PECI subsystem

2018-09-27 Thread Rob Herring
On Tue, 18 Sep 2018 14:51:13 -0700, Jae Hyun Yoo wrote: > This commit adds a document of generic PECI bus, adapter and client > driver. > > Cc: Rob Herring > Cc: Mark Rutland > Cc: Andrew Jeffery > Cc: Joel Stanley > Signed-off-by: Jae Hyun Yoo > Reviewed-by: Haiyue Wang > Reviewed-by: James

Re: [PATCH 0/2] boot to a mapped device

2018-09-27 Thread Mike Snitzer
On Wed, Sep 26 2018 at 3:16am -0400, Richard Weinberger wrote: > Helen, > > On Wed, Sep 26, 2018 at 7:01 AM Helen Koike wrote: > > > > This series is reviving an old patchwork. > > Booting from a mapped device requires an initramfs. This series is > > allows for device-mapper targets to be con

[PATCH v2 2/3] gpio: Propagate errors from gpiod_set_array_value_complex()

2018-09-27 Thread Geert Uytterhoeven
Internal helper function gpiod_set_array_value_complex() was changed to return an error value, but not all gpiolib callers were updated to propagate the new error up. Fixes: 3027743f83f867d8 ("gpio: Remove VLA from gpiolib") Signed-off-by: Geert Uytterhoeven --- v2: - Rebase on top of gpio arra

[PATCH v2 1/3] Documentation: gpio: Fix return type of gpiod_set_raw_array_value*()

2018-09-27 Thread Geert Uytterhoeven
The return type of gpiod_set_raw_array_value() and gpiod_set_raw_array_value_cansleep() was changed from void to int, but the doc update was forgotten. Fixes: 3027743f83f867d8 ("gpio: Remove VLA from gpiolib") Signed-off-by: Geert Uytterhoeven --- v2: - Rebase on top of gpio array rework. ---

[PATCH v2 0/3] gpio: Fix VLA removal fallout

2018-09-27 Thread Geert Uytterhoeven
Hi Linus, This patch series fixes various (mostly harmless) issues introduced by commit 3027743f83f867d8 ("gpio: Remove VLA from gpiolib"). As per the "one patch should fix one issue"-policy, this series contains 3 patches, although they all have the same Fixes: tag. Changes compared to

[PATCH v2 3/3] gpio: Restore indentation of continued lines

2018-09-27 Thread Geert Uytterhoeven
Fixes: 3027743f83f867d8 ("gpio: Remove VLA from gpiolib") Signed-off-by: Geert Uytterhoeven --- v2: - Rebase on top of gpio array rework. --- drivers/gpio/gpiolib.c| 20 ++-- drivers/gpio/gpiolib.h| 8 include/linux/gpio/consumer.h | 18 +---

[PATCH v3 3/6] mm/memory_hotplug: fix online/offline_pages called w.o. mem_hotplug_lock

2018-09-27 Thread David Hildenbrand
There seem to be some problems as result of 30467e0b3be ("mm, hotplug: fix concurrent memory hot-add deadlock"), which tried to fix a possible lock inversion reported and discussed in [1] due to the two locks a) device_lock() b) mem_hotplug_lock While add_memory() first takes b), f

[PATCH v3 4/6] powerpc/powernv: hold device_hotplug_lock when calling device_online()

2018-09-27 Thread David Hildenbrand
device_online() should be called with device_hotplug_lock() held. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Rashmica Gupta Cc: Balbir Singh Cc: Michael Neuling Reviewed-by: Pavel Tatashin Reviewed-by: Rashmica Gupta Signed-off-by: David Hildenbrand --- arch/p

[PATCH v3 2/6] mm/memory_hotplug: make add_memory() take the device_hotplug_lock

2018-09-27 Thread David Hildenbrand
add_memory() currently does not take the device_hotplug_lock, however is aleady called under the lock from arch/powerpc/platforms/pseries/hotplug-memory.c drivers/acpi/acpi_memhotplug.c to synchronize against CPU hot-remove and similar. In general, we should hold the device_hotplug

[PATCH v3 5/6] powerpc/powernv: hold device_hotplug_lock when calling memtrace_offline_pages()

2018-09-27 Thread David Hildenbrand
Let's perform all checking + offlining + removing under device_hotplug_lock, so nobody can mess with these devices via sysfs concurrently. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Rashmica Gupta Cc: Balbir Singh Cc: Michael Neuling Reviewed-by: Pavel Tatashin R

[PATCH v3 6/6] memory-hotplug.txt: Add some details about locking internals

2018-09-27 Thread David Hildenbrand
Let's document the magic a bit, especially why device_hotplug_lock is required when adding/removing memory and how it all play together with requests to online/offline memory from user space. Cc: Jonathan Corbet Cc: Michal Hocko Cc: Andrew Morton Reviewed-by: Pavel Tatashin Reviewed-by: Rashmi

[PATCH v3 1/6] mm/memory_hotplug: make remove_memory() take the device_hotplug_lock

2018-09-27 Thread David Hildenbrand
remove_memory() is exported right now but requires the device_hotplug_lock, which is not exported. So let's provide a variant that takes the lock and only export that one. The lock is already held in arch/powerpc/platforms/pseries/hotplug-memory.c drivers/acpi/acpi_memhotplug.c

[PATCH v3 0/6] mm: online/offline_pages called w.o. mem_hotplug_lock

2018-09-27 Thread David Hildenbrand
@Andrew, Only patch #5 changed (see change notes below). Thanks! Reading through the code and studying how mem_hotplug_lock is to be used, I noticed that there are two places where we can end up calling device_online()/device_offline() - online_pages()/offline_pages() without the mem_hotplug_lock