This patch series includes new features such us Active Clock Gating(ACG),
LPM and Hibernation, enhancements and fixes for already existing features.
All this patches were already sent to lkml separately. ACG, LPM and Hibernation
were sent as patch series.
All patches were tested in our lab.
Changes from v1:
"usb: dwc2: pci: Fix error handling in dwc2_pci_probe" was divided into 4 patches:
"usb: dwc2: pci: Handle error cleanup in probe"
"usb: dwc2: pci: Move devm_kzalloc() before platform_device_add()"
"usb: dwc2: pci: Move usb_phy_generic_register()"
"usb: dwc2: pci: Replace kzalloc() with devm_kzalloc()"
"usb: dwc2: Move polling function to core.c." and "usb: dwc2: Use common polling function."
patches were merged into "usb: dwc2: Bit polling functionality update.".
Also created dwc2_hsotg_wait_bit_clear() function, because in some cases,
we should wait for bit would be cleared not set. Updated all new loops which
came with patches in this series.
usb: dwc2: gadget: Add LPM functionality (LPM):
- "usb: gadget: Allow a non-SuperSpeed gadget to support LPM"
and "usb: gadget: composite: Exclude SS Dev Cap Desc" patches were
removed, because they were already merged to kernel.
- "usb: dwc2: Add core state checking" and "usb: dwc2: Add call_gadget() function call"
patches were added.
- Fixed GLPMCFG initialization. Now hird and besl values also writes into GLPMCFG.
- Replaced shift operator with BIT() macro.
usb: dwc2: Add hibernation feature support (Hibernation):
- Added WA in dwc2_restore_device_registers() function for enabled EPx's IN
in DDMA mode for not to get BNA Interrupt asserted on hibernation exit.
- Added argument is_host to determine if core is in host mode or not and
changed some udelay values in dwc2_hib_restore_common() function.
- Added is_host function parameter to determine being in host mode, checking
host mode to set pcgcctl properly and changed hard coded numbers to
defined values also changed the logic of loading restore values for
[31:14] bits in dwc2_restore_essential_regs() function.
- Fixed a minor bug: added checks for determine hibernation exiting flows
in dwc2_handle_gpwrdn_intr() function. Also changed the way of clearing
all interrupts.
- dwc2_gadget_enter_hibernation() fixed some minor bugs, phy clock now
remains not stopped. Added unmasking of GPWRDN_STS_CHGINT_MSK device
mode interrupts in GPWRDN.
- dwc2_host_enter_hibernation() added a udelay after writing in gpwrdn register.
ACG support for dwc2 driver (ACG):
- Added new acg_enable filed in dwc2_hw_params checks ACG support from hardware side.
- Similar acg_enable field in dwc2_core_params used for dynamically disabling/enabling
ACG functionality from driver.
usb: dwc2: Add safety check in setting of descriptor chain pointer
Updated description of patch.
usb: dwc2: host: Fix transaction errors in host mode
- Rename patch name from "usb: dwc2: host: Setting TOUTCAL and USBTRDTIM fields in host mode".
- Remove programming of USBTRDTIM bitfiled, because this field available
only in Device mode.
- Added comment with description of TOUTCAL bitfiled in comment.
- In description added platforms for which this patch fixes transactions error.
usb: dwc2: hcd: Fix host channel halt flow
Rebased to latest Kernel.
usb: dwc2: Change TxFIFO and RxFIFO flushing flow
Rewritten loop for waiting AHB master IDLE state.
Gevorg Sahakyan (1):
usb: dwc2: Remove version check in GSNPSID
Grigor Tovmasyan (4):
usb: dwc2: Delete unused functionality
usb: dwc2: Make function static
usb: dwc2: Add call_gadget() function call
usb: dwc2: Add core state checking
John Youn (2):
usb: dwc2: Enable LPM
usb: dwc2: Enable power down
Minas Harutyunyan (5):
usb: dwc2: Change TxFIFO and RxFIFO flushing flow
usb: dwc2: hcd: Fix host channel halt flow
usb: dwc2: Add safety check for STSPHSERCVD intr
usb: dwc2: host: Fix transaction errors in host mode
usb: dwc2: Add safety check in setting of descriptor chain pointers
Razmik Karapetyan (10):
usb: dwc2: Set AHB burst size to INCR
usb: dwc2: Remove unnecessary debug prints
usb: dwc2: Define PCGCCTL1 register in hw.h
usb: dwc2: Define Active Clock Gating support bit in GHWCFG4
usb: dwc2: Add dwc2_enable_acg function
usb: dwc2: Backup and restore PCGCCTL1 register
usb: dwc2: Update dwc2_handle_incomplete_isoc_in() function
usb: dwc2: Update dwc2_handle_incomplete_isoc_out() function
usb: dwc2: Update GINTSTS_GOUTNAKEFF interrupt handling
usb: dwc2: Rename function names
Sevak Arakelyan (7):
usb: dwc2: Fix GLPMCFG... definitions
usb: dwc2: Add core parameters for LPM support
usb: dwc2: gadget: Add functionality to exit from LPM L1 state
usb: dwc2: gadget: LPM interrupt handler
usb: dwc2: Enable LPM Transaction Received interrupt.
usb: dwc2: gadget: Configure the core to enable LPM.
usb: dwc2: Bit polling functionality update.
Vardan Mikayelyan (20):
usb: dwc2: eliminate irq parameter from dwc2_gadget_init
usb: dwc2: Force mode optimizations
usb: dwc2: Rename hibernation to partial_power_down
usb: dwc2: Add hibernation field into dwc2_hw_params
usb: dwc2: gadget: Moved dtxfsiz backup array place
usb: dwc2: gadget: Fix dwc2_restore_device_registers
usb: dwc2: core: Add hibernated flag
usb: dwc2: gadget: Add remote_wakeup_allowed flag
usb: dwc2: Changes in registers backup/restore functions
usb: dwc2: Add helper functions for restore routine
usb: dwc2: Add host/device hibernation functions
usb: dwc2: Add dwc2_enter_hibernation(), dwc2_exit_hibernation()
usb: dwc2: Allow entering hibernation from USB_SUSPEND interrupt
usb: dwc2: Add dwc2_handle_gpwrdn_intr() handler
usb: dwc2: Change hub-control to allow hibernation
usb: dwc2: Fix dwc2_hsotg_core_init_disconnected()
usb: dwc2: pci: Replace kzalloc() with devm_kzalloc()
usb: dwc2: pci: Move usb_phy_generic_register()
usb: dwc2: pci: Move devm_kzalloc() before platform_device_add()
usb: dwc2: pci: Handle error cleanup in probe
drivers/usb/dwc2/core.c | 410 ++++++++++++++++++++++++++++++-----------
drivers/usb/dwc2/core.h | 134 ++++++++++----
drivers/usb/dwc2/core_intr.c | 304 +++++++++++++++++++++++++++---
drivers/usb/dwc2/debugfs.c | 7 +-
drivers/usb/dwc2/gadget.c | 425 ++++++++++++++++++++++++++++++++----------
drivers/usb/dwc2/hcd.c | 430 +++++++++++++++++++++++++++++++------------
drivers/usb/dwc2/hcd.h | 56 ------
drivers/usb/dwc2/hw.h | 44 +++--
drivers/usb/dwc2/params.c | 90 +++++++--
drivers/usb/dwc2/pci.c | 27 ++-
drivers/usb/dwc2/platform.c | 12 +-
11 files changed, 1450 insertions(+), 489 deletions(-)
--
2.11.0
From: Moni Shoua <monis(a)mellanox.com>
The XRC target QP create flow it does some security related work.
However, security is enable only when link layer is InfiniBand so before
doing this work the driver should check if security context is initialized.
The same applies for destroy flow.
Cc: <stable(a)vger.kernel.org> # v4.12
Fixes: d291f1a65232 ("IB/core: Enforce PKey security on QPs")
Reviewed-by: Daniel Jurgens <danielj(a)mellanox.com>
Signed-off-by: Moni Shoua <monis(a)mellanox.com>
Signed-off-by: Leon Romanovsky <leon(a)kernel.org>
---
drivers/infiniband/core/security.c | 3 +++
drivers/infiniband/core/verbs.c | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/core/security.c b/drivers/infiniband/core/security.c
index feafdb961c48..59b2f96d986a 100644
--- a/drivers/infiniband/core/security.c
+++ b/drivers/infiniband/core/security.c
@@ -386,6 +386,9 @@ int ib_open_shared_qp_security(struct ib_qp *qp, struct ib_device *dev)
if (ret)
return ret;
+ if (!qp->qp_sec)
+ return 0;
+
mutex_lock(&real_qp->qp_sec->mutex);
ret = check_qp_port_pkey_settings(real_qp->qp_sec->ports_pkeys,
qp->qp_sec);
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index 3fb8fb6cc824..e36d27ed4daa 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -1438,7 +1438,8 @@ int ib_close_qp(struct ib_qp *qp)
spin_unlock_irqrestore(&real_qp->device->event_handler_lock, flags);
atomic_dec(&real_qp->usecnt);
- ib_close_shared_qp_security(qp->qp_sec);
+ if (qp->qp_sec)
+ ib_close_shared_qp_security(qp->qp_sec);
kfree(qp);
return 0;
--
2.15.1
From: Moni Shoua <monis(a)mellanox.com>
If the input command length is larger than the kernel supports an error
should be returned in case the unsupported bytes are not cleared.
Cc: <stable(a)vger.kernel.org> # v4.10
Fixes: 189aba99e700 ("IB/uverbs: Extend modify_qp and support packet pacing")
Reviewed-by: Yishai Hadas <yishaih(a)mellanox.com>
Signed-off-by: Moni Shoua <monis(a)mellanox.com>
Signed-off-by: Leon Romanovsky <leon(a)kernel.org>
---
drivers/infiniband/core/uverbs_cmd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index d0202bb176a4..840b24096690 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -2074,8 +2074,8 @@ int ib_uverbs_ex_modify_qp(struct ib_uverbs_file *file,
return -EOPNOTSUPP;
if (ucore->inlen > sizeof(cmd)) {
- if (ib_is_udata_cleared(ucore, sizeof(cmd),
- ucore->inlen - sizeof(cmd)))
+ if (!ib_is_udata_cleared(ucore, sizeof(cmd),
+ ucore->inlen - sizeof(cmd)))
return -EOPNOTSUPP;
}
--
2.15.1
On 23.12.2017 21:10, Mathias Tillman wrote:
> Thank you, I will test that patch and see if I can find anything interesting in the log. Will have to be some time later next week due to
> the holidays, but I will get back to you with the results.
Ok, I'll be waiting.
Probably you could share your kernel config and lsmod output?
>
> What commit are you referring to exactly? I can test it to see if it's fixed.
Commit that was added into v4.4.103 - 76da0704507bbc51875013f6557877ab308cfd0a upstream.
>
> Also, I should mention that it's not just vsftpd it causes problems with - some other people have reported problems with starting and
> stopping lxc containers. I don't use those myself so I can't really comment on that, but it does seem to have been fixed by reverting the
> commit I mentioned.
Yes. This is common problem for all network namespaces.
Bug somewhere else and requires particular configuration.
>
> Greg: Can't say if the problem exists on master or not - I'm really only able to reproduce it on the Turris Omnia router as I said in the
> bug report. It's based on openwrt and requires some device-specific patches to function properly, so I'm not sure it would work on the
> latest - but I can give it a try.
>
> Regards
> Mathias
>
>
> On Sat, 23 Dec 2017, 17:36 Konstantin Khlebnikov, <khlebnikov(a)yandex-team.ru <mailto:khlebnikov@yandex-team.ru>> wrote:
>
> On 23.12.2017 16:52, Greg KH wrote:
> > adding stable@ and netdev@
> >
> > On Sat, Dec 23, 2017 at 10:49:27AM +0000, Mathias Tillman wrote:
> >> Hi, I wanted to make you aware of a recent regression to the Linux kernel
> >> introduced with commit 2417da3f4d6bc4fc6c77f613f0e2264090892aa5:
> >>
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/com…
> >
> > Is this issue also present in Linus's tree?
> >
> >> I have reported it here:
> >> https://bugzilla.kernel.org/show_bug.cgi?id=198189
> >
> > Bugzilla doesn't work for networking bugs, nor stable stuff, just for a
> > few subsystems, sorry.
> >
> >> Basically, that commit causes an endless loop if, for some reason, not all
> >> devices are unregistered in the rollback_registered_many function in
> >> net/dev.c
> >>
> >> Decided to contact you directly since I have yet to receive any reply on
> >> the bug report, and I wasn't entirely sure what the procedure was. Please
> >> do let me know if I have to change anything in the report.
> >
> > I can revert it, but it would be good to verify if this is an issue in
> > the latest releases or not first.
>
> Most likely bug fixed by that commit hid refcount leak for loopback device.
>
> Mathias, please try debug patch from attachment.
> It logs all refcount changes for loopback in non-host net namespace.
> Hopefully log would will be tiny and show what is missing.
>
> Looks like vsftpd creates and destroys empty net-ns, like "unshare -n true"
>
adding stable@ and netdev@
On Sat, Dec 23, 2017 at 10:49:27AM +0000, Mathias Tillman wrote:
> Hi, I wanted to make you aware of a recent regression to the Linux kernel
> introduced with commit 2417da3f4d6bc4fc6c77f613f0e2264090892aa5:
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/com…
Is this issue also present in Linus's tree?
> I have reported it here:
> https://bugzilla.kernel.org/show_bug.cgi?id=198189
Bugzilla doesn't work for networking bugs, nor stable stuff, just for a
few subsystems, sorry.
> Basically, that commit causes an endless loop if, for some reason, not all
> devices are unregistered in the rollback_registered_many function in
> net/dev.c
>
> Decided to contact you directly since I have yet to receive any reply on
> the bug report, and I wasn't entirely sure what the procedure was. Please
> do let me know if I have to change anything in the report.
I can revert it, but it would be good to verify if this is an issue in
the latest releases or not first.
thanks,
greg k-h
This is a note to let you know that I've just added the patch titled
alpha: fix build failures
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
alpha-fix-build-failures.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From 8ee912dab95f1483156b6e994004bfcc3158d798 Mon Sep 17 00:00:00 2001
From: Sudip Mukherjee <sudipm.mukherjee(a)gmail.com>
Date: Tue, 3 Oct 2017 16:14:15 -0700
Subject: alpha: fix build failures
From: Sudip Mukherjee <sudipm.mukherjee(a)gmail.com>
commit 8ee912dab95f1483156b6e994004bfcc3158d798 upstream.
The build of alpha allmodconfig is giving error:
arch/alpha/include/asm/mmu_context.h: In function 'ev5_switch_mm':
arch/alpha/include/asm/mmu_context.h:160:2: error:
implicit declaration of function 'task_thread_info';
did you mean 'init_thread_info'? [-Werror=implicit-function-declaration]
The file 'mmu_context.h' needed an extra header file.
Link: http://lkml.kernel.org/r/1505668810-7497-1-git-send-email-sudipm.mukherjee@…
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee(a)gmail.com>
Cc: Richard Henderson <rth(a)twiddle.net>
Cc: Ivan Kokshaysky <ink(a)jurassic.park.msu.ru>
Cc: Matt Turner <mattst88(a)gmail.com>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds(a)linux-foundation.org>
Cc: Guenter Roeck <linux(a)roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
arch/alpha/include/asm/mmu_context.h | 1 +
1 file changed, 1 insertion(+)
--- a/arch/alpha/include/asm/mmu_context.h
+++ b/arch/alpha/include/asm/mmu_context.h
@@ -7,6 +7,7 @@
* Copyright (C) 1996, Linus Torvalds
*/
+#include <linux/sched.h>
#include <asm/machvec.h>
#include <asm/compiler.h>
#include <asm-generic/mm_hooks.h>
Patches currently in stable-queue which might be from sudipm.mukherjee(a)gmail.com are
queue-4.4/alpha-fix-build-failures.patch