[peter.chen-usb:pwrseq-lib 4/7] drivers/usb/core/pwrseq.c:52:23-29: ERROR: application of sizeof to pointer

2016-07-07 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git pwrseq-lib head: 72289855b3d236efef879059b315940de9e80df2 commit: bda499ece3edc6187490ad32238bcc65075d80d5 [4/7] usb: core: add power sequence handling for USB devices coccinelle warnings: (new ones prefixed by >>) >>

[PATCH] usb: core: fix noderef.cocci warnings

2016-07-07 Thread kbuild test robot
drivers/usb/core/pwrseq.c:52:23-29: ERROR: application of sizeof to pointer sizeof when applied to a pointer typed expression gives the size of the pointer Generated by: scripts/coccinelle/misc/noderef.cocci Signed-off-by: Fengguang Wu --- pwrseq.c |2 +- 1 file changed, 1 insertion(+),

[PATCH] power: fix noderef.cocci warnings

2016-07-07 Thread kbuild test robot
drivers/power/pwrseq/pwrseq_generic.c:121:22-28: ERROR: application of sizeof to pointer sizeof when applied to a pointer typed expression gives the size of the pointer Generated by: scripts/coccinelle/misc/noderef.cocci Signed-off-by: Fengguang Wu --- pwrseq_generic.c |2 +- 1 file ch

[peter.chen-usb:pwrseq-lib 2/7] drivers/power/pwrseq/pwrseq_generic.c:121:22-28: ERROR: application of sizeof to pointer

2016-07-07 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git pwrseq-lib head: 72289855b3d236efef879059b315940de9e80df2 commit: 36fe54395583ac3cd6f704a8b3b1dd8c18b8ac04 [2/7] power: add power sequence library coccinelle warnings: (new ones prefixed by >>) >> drivers/power/pwrseq

Re: [PATCH 1/6] binding-doc: power: pwrseq-generic: add binding doc for generic power sequence library

2016-07-07 Thread Peter Chen
On Thu, Jul 07, 2016 at 04:53:07PM -0700, Joshua Clayton wrote: > > > On 07/07/2016 02:47 AM, Philipp Zabel wrote: > > Am Donnerstag, den 07.07.2016, 17:14 +0800 schrieb Peter Chen: > >> Add binding doc for generic power sequence library. > >> > >> Signed-off-by: Peter Chen > >> --- > >> .../bi

Re: [PATCH 1/6] binding-doc: power: pwrseq-generic: add binding doc for generic power sequence library

2016-07-07 Thread Peter Chen
On Thu, Jul 07, 2016 at 11:47:14AM +0200, Philipp Zabel wrote: > Am Donnerstag, den 07.07.2016, 17:14 +0800 schrieb Peter Chen: > > Add binding doc for generic power sequence library. > > > > Signed-off-by: Peter Chen > > --- > > .../bindings/power/pwrseq/pwrseq-generic.txt | 56 > > +

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-07 Thread Baolin Wang
On 7 July 2016 at 20:51, Michal Nazarewicz wrote: > On Thu, Jul 07 2016, Baolin Wang wrote: >> Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size >> attribute, which means it need to align the request buffer's size to an ep's >> maxpacketsize. >> >> Thus we add usb_ep_alig

Re: [PATCH 5/6] usb: chipidea: host: let the hcd know's parent device node

2016-07-07 Thread Peter Chen
On Thu, Jul 07, 2016 at 03:56:51PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-07-07 02:14:51) > > diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c > > index 053bac9..55120ef 100644 > > --- a/drivers/usb/chipidea/host.c > > +++ b/drivers/usb/chipidea/host.c > > @@ -1

Re: [PATCH 1/1] usb: quirks: Add no-lpm quirk for Elan Microelectronics Touchpad

2016-07-07 Thread Lu Baolu
Hi, On 07/07/2016 05:53 AM, Joseph Salisbury wrote: > BugLink: http://bugs.launchpad.net/bugs/1498667 > > As reported in BugLink, this device has an issue with Linux Power Management > so s/"Linux Power Management"/"USB Link Power Management" Best regards, Lu Baolu > adding a quirk. This qui

Re: [PATCH 1/6] binding-doc: power: pwrseq-generic: add binding doc for generic power sequence library

2016-07-07 Thread Joshua Clayton
On 07/07/2016 02:47 AM, Philipp Zabel wrote: > Am Donnerstag, den 07.07.2016, 17:14 +0800 schrieb Peter Chen: >> Add binding doc for generic power sequence library. >> >> Signed-off-by: Peter Chen >> --- >> .../bindings/power/pwrseq/pwrseq-generic.txt | 56 >> ++ >> 1

Re: [PATCH 5/6] usb: chipidea: host: let the hcd know's parent device node

2016-07-07 Thread Stephen Boyd
Quoting Peter Chen (2016-07-07 02:14:51) > diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c > index 053bac9..55120ef 100644 > --- a/drivers/usb/chipidea/host.c > +++ b/drivers/usb/chipidea/host.c > @@ -109,15 +109,25 @@ static int host_start(struct ci_hdrc *ci) > struc

[PATCH v2 01/22] of: device: Support loading a module with OF based modalias

2016-07-07 Thread Stephen Boyd
In the case of ULPI devices, we want to be able to load the driver before registering the device so that we don't get stuck in a loop waiting for the phy module to appear and failing usb controller probe. Currently we request the ulpi module via the ulpi ids, but in the DT case we might need to req

[PATCH v2 08/22] usb: chipidea: Remove locking in ci_udc_start()

2016-07-07 Thread Stephen Boyd
We don't call hw_device_reset() with the ci->lock held, so it doesn't seem like this lock here is protecting anything. Let's just remove it. This allows us to call sleeping functions like phy_init() from within the CI_HDRC_CONTROLLER_RESET_EVENT hook. Cc: Peter Chen Cc: Greg Kroah-Hartman Signed

[PATCH v2 21/22] phy: Add support for Qualcomm's USB HSIC phy

2016-07-07 Thread Stephen Boyd
The HSIC USB controller on qcom SoCs has an integrated all digital phy controlled via the ULPI viewport. Cc: Kishon Vijay Abraham I Cc: Signed-off-by: Stephen Boyd --- .../devicetree/bindings/phy/qcom,usb-hsic-phy.txt | 72 + drivers/phy/Kconfig| 7 +

[PATCH v2 05/22] usb: chipidea: Handle extcon events properly

2016-07-07 Thread Stephen Boyd
We're currently emulating the vbus and id interrupts in the OTGSC read API, but we also need to make sure that if we're handling the events with extcon that we don't enable the interrupts for those events in the hardware. Therefore, properly emulate this register if we're using extcon, but don't en

[PATCH v2 09/22] usb: chipidea: Kick OTG state machine for AVVIS with vbus extcon

2016-07-07 Thread Stephen Boyd
Force the OTG state machine to go forward when we're using an extcon for vbus detection. In this case, the controller may never raise an interrupt for AVVIS, so we need to simulate the event by toggling the appropriate OTG fsm bits and kicking the state machine again. Cc: Peter Chen Cc: Greg Kroa

[PATCH v2 07/22] usb: chipidea: Notify events when switching host mode

2016-07-07 Thread Stephen Boyd
The chipidea/udc.c file sends a CI_HDRC_CONTROLLER_RESET_EVENT to the wrapper drivers when it calls hw_device_reset(), but that function is not called from chipidea/host.c. And the udc.c file sends the CI_HDRC_CONTROLLER_STOPPED_EVENT but the host.c file doesn't do anything. The intent of the rese

[PATCH v2 04/22] usb: chipidea: Only read/write OTGSC from one place

2016-07-07 Thread Stephen Boyd
With the id and vbus detection done via extcon we need to make sure we poll the status of OTGSC properly by considering what the extcon is saying, and not just what the register is saying. Let's move this hw_wait_reg() function to the only place it's used and simplify it for polling the OTGSC regis

[PATCH v2 18/22] usb: chipidea: msm: Add reset controller for PHY POR bit

2016-07-07 Thread Stephen Boyd
The MSM chipidea wrapper has two bits that are used to reset the first or second phy. Add support for these bits via the reset controller framework, so that phy drivers can reset their hardware at the right time during initialization. Cc: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen

[PATCH v2 06/22] usb: chipidea: Add platform flag for wrapper phy management

2016-07-07 Thread Stephen Boyd
The ULPI phy on qcom platforms needs to be initialized and powered on after a USB reset and before we toggle the run/stop bit. Otherwise, the phy locks up and doesn't work properly. Therefore, add a flag to skip any phy power management in the core layer, leaving it up to the glue driver to manage.

[PATCH v2 12/22] usb: chipidea: msm: Rely on core to override AHBBURST

2016-07-07 Thread Stephen Boyd
The core framework already handles setting this parameter with a platform quirk. Add the appropriate flag so that we always set AHBBURST to 0. Technically DT should be doing this, but we always do it for msm chipidea devices so setting the flag in the driver works just as well. Cc: Peter Chen Cc:

[PATCH v2 14/22] usb: chipidea: msm: Add proper clk and reset support

2016-07-07 Thread Stephen Boyd
The msm chipidea controller uses two main clks, an AHB clk to read/write the MMIO registers and a core clk called the system clk that drives the controller itself. Add support for these clks as they're required in all designs. Also add support for an optional third clk that we need to turn on to r

[PATCH v2 20/22] usb: chipidea: msm: Be silent on probe defer errors

2016-07-07 Thread Stephen Boyd
If something fails in ci_hdrc_add_device() due to probe defer, we shouldn't print an error message. Be silent in this case as we'll try probe again later. Cc: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd --- drivers/usb/chipidea/ci_hdrc_msm.c | 3 ++- 1 file changed, 2 inserti

[PATCH v2 22/22] phy: Add support for Qualcomm's USB HS phy

2016-07-07 Thread Stephen Boyd
The high-speed phy on qcom SoCs is controlled via the ULPI viewport. Cc: Kishon Vijay Abraham I Cc: Signed-off-by: Stephen Boyd --- .../devicetree/bindings/phy/qcom,usb-hs-phy.txt| 83 ++ drivers/phy/Kconfig| 8 + drivers/phy/Makefile

[PATCH v2 13/22] usb: chipidea: msm: Use hw_write_id_reg() instead of writel

2016-07-07 Thread Stephen Boyd
The MSM_USB_BASE macro trick is not very clear, and we're using it for only one register write so let's just move to using hw_write_id_reg() and passing the ci pointer instead. That clearly shows what offset we're using and avoids needing to include the msm_hsusb_hw.h file when we're going to delet

[PATCH v2 17/22] usb: chipidea: msm: Make platform data driver local instead of global

2016-07-07 Thread Stephen Boyd
If two devices are probed with this same driver, they'll share the same platform data structure, while the chipidea core layer writes and modifies it. This can lead to interesting results especially if one device is an OTG type chipidea controller and another is a host. Let's create a copy of this

[PATCH v2 19/22] usb: chipidea: msm: Handle phy power states

2016-07-07 Thread Stephen Boyd
The ULPI phy on qcom platforms needs to be initialized and powered on after a USB reset and before we toggle the run/stop bit. Otherwise, the phy locks up and doesn't work properly. Hook the phy initialization into the RESET event and the phy power off into the STOPPED event. Cc: Peter Chen Cc: G

[PATCH v2 15/22] usb: chipidea: msm: Mux over secondary phy at the right time

2016-07-07 Thread Stephen Boyd
We need to pick the correct phy at runtime based on how the SoC has been wired onto the board. If the secondary phy is used, take it out of reset and mux over to it by writing into the TCSR register. Make sure to do this on reset too, because this register is reset to the default value (primary phy

[PATCH v2 16/22] usb: chipidea: msm: Restore wrapper settings after reset

2016-07-07 Thread Stephen Boyd
When the RESET bit is set in the USBCMD register it resets quite a few of the wrapper's registers to their reset state. This includes the GENCONFIG and GENCONFIG2 registers. Currently this is done by the usb phy and ehci-msm drivers writing into the controller wrapper's MMIO address space. Let's co

[PATCH v2 11/22] usb: chipidea: msm: Mark device as runtime pm active

2016-07-07 Thread Stephen Boyd
We're not properly marking the glue layer/wrapper device as runtime active, so runtime PM believes that the hardware state is inactive when we call pm_runtime_enable() in this driver. This causes a problem when the glue layer has a power domain associated with it, because runtime PM will go and dis

[PATCH v2 03/22] usb: ulpi: Support device discovery via device properties

2016-07-07 Thread Stephen Boyd
The qcom HSIC ULPI phy doesn't have any bits set in the vendor or product ID registers. This makes it impossible to make a ULPI driver match against the ID registers. Add support to discover the ULPI phys via DT/device properties to help alleviate this problem. In the DT case, we'll look for a ULPI

[PATCH v2 02/22] of: device: Export of_device_{get_modalias,uvent_modalias} to modules

2016-07-07 Thread Stephen Boyd
The ULPI bus can be built as a module, and it will soon be calling these functions when it supports probing devices from DT. Export them so they can be used by the ULPI module. Signed-off-by: Stephen Boyd --- drivers/of/device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/of/de

[PATCH v2 10/22] usb: chipidea: Add support for ULPI PHY bus

2016-07-07 Thread Stephen Boyd
Some phys for the chipidea controller are controlled via the ULPI viewport. Add support for the ULPI bus so that these sorts of phys can be probed and read/written automatically without having to duplicate the viewport logic in each phy driver. Cc: Peter Chen Cc: Greg Kroah-Hartman Cc: Heikki Kr

[PATCH v2 00/22] Support qcom's HSIC USB and rewrite USB2 HS phy support

2016-07-07 Thread Stephen Boyd
The state of USB ChipIdea support on Qualcomm's platforms is not great. The DT description of these devices requires up to three different nodes for what amounts to be the same hardware block, when there should really only be one. Furthermore, the "phy" driver that is in mainline (phy-msm-usb.c) du

Odp: Re: Problem: booting from Sandisk USB stick fails

2016-07-07 Thread Ziutek Putek
Dnia Czwartek, 7 Lipca 2016 01:08 Greg KH napisaƂ(a) > On Wed, Jul 06, 2016 at 08:00:55PM +0200, Ziutek Putek wrote: > > [1.] Booting from Sandisk USB stick fails and stops on Dell Latitude E5420 > > Laptop. > > > > [2.] On mainline kernel I get error: > > [ 18.414128] usb 2-1.4: device descri

[PATCH] usb: gadget: fix check in sync read from ep in gadgetfs

2016-07-07 Thread Binyamin Sharet
When reading synchronously from a non-zero endpoint, gadgetfs will return -EFAULT even if the read succeeds, due to a bad check of the copy_to_iter() return value. This fix compares the return value of copy_to_iter to the amount of bytes that was passed, and only fails if they are not the same. S

Re: [RFC] usb: phy: generic: get rid of VBUS handling

2016-07-07 Thread Robert Jarzmik
Felipe Balbi writes: > Hi, > > Robert Jarzmik writes: >> I don't know if there are other users than pxa, I'll make the assumption >> there >> aren't. > > yeah, we can keep patches in linux-next for as long as possible. If > nobody complains, we're good. Hi Felipe, Just a small update. I made

Re: usb usb1-port1: connect-debounce failed

2016-07-07 Thread Alan Stern
On Thu, 7 Jul 2016, Cristian wrote: > Hello, > > Open bug in bugzilla.kernel.org : > https://bugzilla.kernel.org/show_bug.cgi?id=121571 > > [ 1365.501054] usb usb1-port1: connect-debounce failed That's not a bug; it's a hardware problem. Were you unplugging the mouse when the error message oc

usb usb1-port1: connect-debounce failed

2016-07-07 Thread Cristian
Hello, Open bug in bugzilla.kernel.org : https://bugzilla.kernel.org/show_bug.cgi?id=121571 [ 1365.501054] usb usb1-port1: connect-debounce failed Thanks, -- Cristian -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org Mo

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-07 Thread Michal Nazarewicz
On Thu, Jul 07 2016, Baolin Wang wrote: > Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size > attribute, which means it need to align the request buffer's size to an ep's > maxpacketsize. > > Thus we add usb_ep_align_maybe() function to check if it is need to align > the r

[PATCH v2 1/2] usb: gadget: legacy: Add udc module param to all legacy gadgets

2016-07-07 Thread Krzysztof Opasiak
Add new module parameter called "udc" to all legacy gadgets. By using this parameter user can choose a controller towhich this gadget should be bound. This may be useful esp. when having multiple controllers or multiple gadget builtin. When value for this param is not provided then old behaviour

[PATCH v2 2/2] usb: gadget: Allow to build both USB functions and legacy gadgets

2016-07-07 Thread Krzysztof Opasiak
Currently it is possible to build in some subset of usb functions *OR* some gadget module. This is limited only by Kconfig not any functionality. This patch removes this limitation. With this patch it is possible to set up all build combinations: 1) Multiple gadgets build in 2) Part of functions b

[PATCH 0/6] power: add power sequence library

2016-07-07 Thread Peter Chen
Hi all, This is a follow-up for my last power sequence framework patch set [1]. According to Rob Herring and Ulf Hansson's comments[2], I use a generic power sequence library for parsing the power sequence elements on DT, and implement generic power sequence on library. The host driver can allocat

[PATCH 3/6] binding-doc: usb: usb-device: add optional properties for power sequence

2016-07-07 Thread Peter Chen
Add optional properties for power sequence. Signed-off-by: Peter Chen --- Documentation/devicetree/bindings/usb/usb-device.txt | 10 ++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/usb-device.txt b/Documentation/devicetree/bindings/usb/usb-device.

[PATCH 4/6] usb: core: add power sequence handling for USB devices

2016-07-07 Thread Peter Chen
Some hard-wired USB devices need to do power sequence to let the device work normally, the typical power sequence like: enable USB PHY clock, toggle reset pin, etc. But current Linux USB driver lacks of such code to do it, it may cause some hard-wired USB devices works abnormal or can't be recogniz

[PATCH 2/6] power: add power sequence library

2016-07-07 Thread Peter Chen
We have an well-known problem that the device needs to do some power sequence before it can be recognized by related host, the typical example like hard-wired mmc devices and usb devices. This power sequence is hard to be described at device tree and handled by related host driver, so we have crea

[PATCH 6/6] ARM: dts: imx6qdl-udoo.dtsi: fix onboard USB HUB property

2016-07-07 Thread Peter Chen
From: Peter Chen The current dts describes USB HUB's property at USB controller's entry, it is improper. The USB HUB should be the child node under USB controller, and power sequence properties are under it. Signed-off-by: Peter Chen Signed-off-by: Maciej S. Szmigiero --- arch/arm/boot/dts/im

Re: [PATCH 1/6] binding-doc: power: pwrseq-generic: add binding doc for generic power sequence library

2016-07-07 Thread Philipp Zabel
Am Donnerstag, den 07.07.2016, 17:14 +0800 schrieb Peter Chen: > Add binding doc for generic power sequence library. > > Signed-off-by: Peter Chen > --- > .../bindings/power/pwrseq/pwrseq-generic.txt | 56 > ++ > 1 file changed, 56 insertions(+) > create mode 100644

Re: [PATCH 1/1] usb: core: of.c: fix defined but not declare warning

2016-07-07 Thread Peter Chen
On Wed, Jun 15, 2016 at 11:25:43AM +0800, Peter Chen wrote: > The helper usb_of_get_child_node is defined at of.c, but missing its > declare as a global function. Fix it by adding related header file > as well as compile it on conditional of CONFIG_OF. > > Cc: Greg Kroah-Hartman > Cc: Arnd Bergma

[PATCH 1/6] binding-doc: power: pwrseq-generic: add binding doc for generic power sequence library

2016-07-07 Thread Peter Chen
Add binding doc for generic power sequence library. Signed-off-by: Peter Chen --- .../bindings/power/pwrseq/pwrseq-generic.txt | 56 ++ 1 file changed, 56 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/pwrseq/pwrseq-generic.txt diff --git a/

[PATCH 5/6] usb: chipidea: host: let the hcd know's parent device node

2016-07-07 Thread Peter Chen
From: Peter Chen Since the hcd (chipidea core device) has no device node, so if we want to describe the child node under the hcd, we had to put it under its parent's node (glue layer device), and in the code, we need to let the hcd knows glue layer's code, then the USB core can handle this node.

[PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-07 Thread Baolin Wang
Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size attribute, which means it need to align the request buffer's size to an ep's maxpacketsize. Thus we add usb_ep_align_maybe() function to check if it is need to align the request buffer's size to an ep's maxpacketsize. Sig

[PATCH/RFC 2/4] usb: gadget: u_ether: add a flag to avoid skb_reserve() calling

2016-07-07 Thread Yoshihiro Shimoda
This patch adds a flag "no_skb_reserve" in struct eth_dev. So, if a peripheral driver sets the quirk_avoids_skb_reserve flag, upper network gadget drivers (e.g. f_ncm.c) can avoid skb_reserve() calling using the flag as well. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/gadget/function/u_eth

[PATCH/RFC 1/4] usb: gadget: add a new quirk to avoid skb_reserve in u_ether.c

2016-07-07 Thread Yoshihiro Shimoda
Some platforms (e.g. R-Car SoCs) has memory alignment restriction. If memory alignment is not match, the usb peripheral driver desides not to DMA controller. Then, the performance is not good. In the case of u_ether.c, since it calls skb_reserve() in rx_submit(), it is possible to cause memory ali

[PATCH/RFC 0/4] usb: gadget: add a new quirk to avoid skb_reserve in u_ether.c

2016-07-07 Thread Yoshihiro Shimoda
This patch set is based on the latest Felipe's usb.git / testing/next branch. (commit id = 15e4292a2d21e9997fdb2b8c014cc461b3f268f0) This patch set also needs an additional patch (like the end of this email) to fix the renesas_usbhs driver for R-Car Gen3. (I will submit this patch after v4.8-rc1 w

[PATCH/RFC 3/4] usb: gadget: f_ncm: add support for no_skb_reserve

2016-07-07 Thread Yoshihiro Shimoda
This patch adds to support no_skb_reserve function to improve performance for some platforms. About the detail, please refer to the commit log of "quirk_avoids_skb_reserve" in include/linux/usb/gadget.h. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/gadget/function/f_ncm.c | 2 ++ 1 file chan

[PATCH/RFC 4/4] usb: renesas_usbhs: set quirk_avoids_skb_reserve if USB-DMAC is used

2016-07-07 Thread Yoshihiro Shimoda
This patch sets the quirk_avoids_skb_reserve flag to improve performance of a network gadget driver (e.g. f_ncm.c) if USB-DMAC is used. For example (on r8a7795 board + f_ncm.c + iperf udp mode / receiving): - without this patch: 90.3 Mbits/sec - withthis patch: 273 Mbits/sec Signed-off

[PATCH net-next 0/3] r8152: remove the redundant code

2016-07-07 Thread Hayes Wang
Remove the unnacessary code. Hayes Wang (3): r8152: remove rtl_phy_reset function r8152: remove a netif_carrier_off in rtl8152_open function r8152: remove cancel_delayed_work_sync in rtl8152_set_speed drivers/net/usb/r8152.c | 27 --- 1 file changed, 27 deletions(-)

[PATCH net-next 1/3] r8152: remove rtl_phy_reset function

2016-07-07 Thread Hayes Wang
In rtl_hw_phy_work_func_t(), the flag of PHY_RESET is set in rtl_ops.hw_phy_cfg() and cleared in rtl8152_set_speed(). Therefore, the rtl_phy_reset() is never run and is unnecessary. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 24 1 file changed, 24 deletions(

[PATCH net-next 3/3] r8152: remove cancel_delayed_work_sync in rtl8152_set_speed

2016-07-07 Thread Hayes Wang
There is no conflict between the work_queue function and rtl8152_set_speed(), so we don't have to cancel the delayed work in rtl8152_set_speed(). Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r81

[PATCH net-next 2/3] r8152: remove a netif_carrier_off in rtl8152_open function

2016-07-07 Thread Hayes Wang
After commit 90186af404ad ("r8152: fix lockup when runtime PM is enabled"), the autoresume wouldn't start the device before rtl8152_open() is finished. Therefore, we don't have to reset the linking status before and after autoresume. That is, one of netif_carrier_off() in rtl8152_open() could be re