Re: close() on some Intel CNP-LP PCI devices takes up to 2.7 s

2020-06-10 Thread Mika Westerberg
On Wed, Jun 10, 2020 at 08:18:07AM +0200, Paul Menzel wrote: > Thank you for replying so quickly. Hopefully, I’ll be able to test the > commit tomorrow. > > One question though. The commit talks about resuming from suspend. I > understand that training happens there. > > In my case the system is

Re: close() on some Intel CNP-LP PCI devices takes up to 2.7 s

2020-06-09 Thread Mika Westerberg
On Tue, Jun 09, 2020 at 05:39:21PM +0200, Paul Menzel wrote: > Dear Linux folks, > > > On the Intel Cannon Point-LP laptop Dell Precision 3540 with a dedicated AMD > graphics card (both graphics devices can be used) with Debian Sid/unstable > with Linux 5.6.14, running lspci takes quite some

Re: [PATCH 1/1] iommu/vt-d: Enable PCI ACS for platform opt in hint

2020-06-09 Thread Mika Westerberg
/vt-d: Force IOMMU on for platform opt in hint") > Cc: Mika Westerberg Reviewed-by: Mika Westerberg

Re: [PATCH] thunderbolt: Improve USB4 config symbol help text

2020-06-03 Thread Mika Westerberg
Hi, On Tue, Jun 02, 2020 at 02:28:15PM +0200, Geert Uytterhoeven wrote: > Fix the spelling of "specification", and add a missing "the" article. > > Fixes: 690ac0d20d4022bb ("thunderbolt: Update Kconfig entries to USB4") Maybe Fixes tag here is too strong. It is simply fixing a typo :) I will

Re: [PATCH v4] iommu/vt-d: Don't apply gfx quirks to untrusted devices

2020-06-03 Thread Mika Westerberg
t the device we are applying quirks to, is > indeed an internal trusted device. > > Signed-off-by: Rajat Jain > Acked-by: Lu Baolu > Reviewed-by: Ashok Raj Looks good now, thanks! Reviewed-by: Mika Westerberg

Re: [PATCH v3] iommu/vt-d: Don't apply gfx quirks to untrusted devices

2020-06-02 Thread Mika Westerberg
On Tue, Jun 02, 2020 at 04:26:02PM -0700, Rajat Jain wrote: > +static bool risky_device(struct pci_dev *pdev) > +{ > + if (pdev->untrusted) { > + pci_warn(pdev, > + "Skipping IOMMU quirk for dev (%04X:%04X) on untrusted" > + " PCI link.

Re: [PATCH] iommu/vt-d: Don't apply gfx quirks to untrusted devices

2020-06-02 Thread Mika Westerberg
On Mon, Jun 01, 2020 at 10:45:17PM -0700, Rajat Jain wrote: > Currently, an external malicious PCI device can masquerade the VID:PID > of faulty gfx devices, and thus apply iommu quirks to effectively > disable the IOMMU restrictions for itself. > > Thus we need to ensure that the device we are

Re: [PATCH 1/2] mtd: spi-nor: create/Export parameter softwareseq for intel-spi driver to user

2020-05-28 Thread Mika Westerberg
be useful. On Thu, May 28, 2020 at 04:16:38PM +0530, Vignesh Raghavendra wrote: > +Mika Westerberg original author of the driver > > On 18/05/20 11:29 pm, Daniel Walker wrote: > > From: Bobby Liu > > > > How to use: > > append softwareseq=1 while probe the

Re: [PATCH 1/1] thunderbolt: add trivial .shutdown

2020-05-25 Thread Mika Westerberg
On Wed, May 20, 2020 at 09:52:21PM +0300, Maxim Levitsky wrote: > On my machine, a kexec with this driver loaded in the old kernel > causes a very long delay on boot in the kexec'ed kernel, > most likely due to unclean shutdown prior to that. > > Unloading thunderbolt driver prior to kexec allows

Re: [PATCH] mfd: Export LPC attributes for the system SPI chip

2020-05-14 Thread Mika Westerberg
On Thu, May 14, 2020 at 01:53:23PM +0100, Richard Hughes wrote: > On Thu, 14 May 2020 at 13:15, Mika Westerberg > wrote: > > > +What:/sys/kernel/security/firmware/bioswe > > Should this still be "firmware_protections" or similar. Plain "fi

Re: [PATCH] mfd: Export LPC attributes for the system SPI chip

2020-05-14 Thread Mika Westerberg
On Wed, May 13, 2020 at 07:27:50PM +0100, Richard Hughes wrote: > On Wed, 2020-05-13 at 19:25 +0300, Mika Westerberg wrote: > > This may be problematic if there is driver bound to the device and > > accessing the hardware simultaneusly. Although this is just read side > &

Re: [PATCH] mfd: Export LPC attributes for the system SPI chip

2020-05-13 Thread Mika Westerberg
On Wed, May 13, 2020 at 03:13:28PM +0100, Richard Hughes wrote: > On Wed, 13 May 2020 at 10:11, Mika Westerberg > wrote: > > > I can fix up all those, but out of interest how did you "know" the > > > right three digit identifier to use? > > I w

Re: [PATCH] mfd: Export LPC attributes for the system SPI chip

2020-05-13 Thread Mika Westerberg
On Wed, May 13, 2020 at 09:48:55AM +0100, Richard Hughes wrote: > On Wed, 13 May 2020 at 08:08, Mika Westerberg > wrote: > > I think this one should contain KernelVersion as well, see > > Documentation/ABI/README. > > Thanks, I'll fix that up. > > > I think y

Re: [PATCH] mfd: Export LPC attributes for the system SPI chip

2020-05-13 Thread Mika Westerberg
Hi Richard, On Tue, May 12, 2020 at 09:42:43PM +0100, Richard Hughes wrote: > Export standard SPI-specific config values from various LPC > controllers. > This allows userspace components such as fwupd to verify the most basic > SPI > protections are set correctly. For instance, checking BIOSWE

Re: [PATCH] thunderbolt: Replace zero-length array with flexible-array

2020-05-11 Thread Mika Westerberg
On Thu, May 07, 2020 at 02:25:24PM -0500, Gustavo A. R. Silva wrote: > The current codebase makes use of the zero-length array language > extension to the C90 standard, but the preferred mechanism to declare > variable-length types such as these ones is a flexible array member[1][2], > introduced

Re: [PATCH v3] PCI/ASPM: Enable ASPM for bridge-to-bridge link

2020-05-07 Thread Mika Westerberg
On Wed, May 06, 2020 at 04:29:47PM -0500, Bjorn Helgaas wrote: > On Wed, May 06, 2020 at 09:14:38AM +0300, Mika Westerberg wrote: > > On Wed, May 06, 2020 at 01:34:21AM +0800, Kai-Heng Feng wrote: > > > The TI PCIe-to-PCI bridge prevents the Intel SoC from entering power >

Re: [PATCH v3] PCI/ASPM: Enable ASPM for bridge-to-bridge link

2020-05-06 Thread Mika Westerberg
ASPM > on bridge-to-bridge link. > > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=207571 > Signed-off-by: Kai-Heng Feng Reviewed-by: Mika Westerberg

Re: [PATCH] watchdog: iTCO: fix link error

2020-04-29 Thread Mika Westerberg
pmc_ipc: Convert to MFD") > Signed-off-by: Arnd Bergmann Reviewed-by: Mika Westerberg

Re: [PATCH 00/25] thunderbolt: Add support for USB4

2019-10-23 Thread Mika Westerberg
On Wed, Oct 23, 2019 at 03:55:48PM +, mario.limoncie...@dell.com wrote: > > I did not yet add the hw_vendor_id and hw_product_id attributes because I > > clocked that 'dd if=nvm_activeX/nvmem of=/dev/null bs=64 count=2' (that's > > what fwupd does) takes typically less than 10 ms when the

[PATCH 07/25] thunderbolt: Make tb_sw_write() take const parameter

2019-10-23 Thread Mika Westerberg
The function does not modify the argument in any way so make it const. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/tb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h index 1565af2e48cb..455ca490ea87 100644

[PATCH 00/25] thunderbolt: Add support for USB4

2019-10-23 Thread Mika Westerberg
re are objections. USB4 support patches 18 - 25 have been tested on development hardware but since it is rather early stage hardware we have not been able to properly test all features such as power management (which is why it is currently missing in this series). Mika Westerberg (22):

[PATCH 04/25] thunderbolt: Convert basic adapter register names to follow the USB4 spec

2019-10-23 Thread Mika Westerberg
Now that USB4 spec has names for these basic registers we can use them instead. This makes it easier to match certain register to the spec. No functional changes. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/switch.c | 18 +- drivers/thunderbolt/tb_regs.h | 15

[PATCH 14/25] thunderbolt: Add Display Port CM handshake for Titan Ridge devices

2019-10-23 Thread Mika Westerberg
Titan Ridge needs an additional connection manager handshake in order to do proper Display Port tunneling so implement it here. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/tb_regs.h | 3 +++ drivers/thunderbolt/tunnel.c | 45 +++ 2 files changed, 48

[PATCH 01/25] thunderbolt: Introduce tb_switch_is_icm()

2019-10-23 Thread Mika Westerberg
and for the casual reader. For this reason introduce a wrapper function with documentation that should make the intention more clear. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/lc.c | 4 ++-- drivers/thunderbolt/switch.c | 4 ++-- drivers/thunderbolt/tb.h | 14 ++ 3 fi

[PATCH 12/25] thunderbolt: Expand controller name in tb_switch_is_xy()

2019-10-23 Thread Mika Westerberg
For a casual reader tb_switch_is_cr() does not tell much so instead spell out the full controller name in the function name. For example tb_switch_is_cr() becomes tb_switch_is_cactus_ridge() which is easier to understand. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/cap.c | 6

[PATCH 09/25] thunderbolt: Refactor add_switch() into two functions

2019-10-23 Thread Mika Westerberg
error logging in case kmemdup() fails. No functional changes. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/icm.c | 110 +++--- 1 file changed, 67 insertions(+), 43 deletions(-) diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c index

[PATCH 11/25] thunderbolt: Add default linking between lane adapters if not provided by DROM

2019-10-23 Thread Mika Westerberg
completely (see USB4 section 5.2.1 for more information). Signed-off-by: Mika Westerberg --- drivers/thunderbolt/eeprom.c | 11 --- drivers/thunderbolt/switch.c | 32 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/drivers/thunderbolt/eeprom.c

[PATCH 10/25] thunderbolt: Add support for lane bonding

2019-10-23 Thread Mika Westerberg
and number of lanes under each device except the host router following similar attribute naming than USB bus. Expose speed and number of lanes for both directions to allow possibility of asymmetric link in the future. Signed-off-by: Mika Westerberg --- .../ABI/testing/sysfs-bus-thunderbolt

[PATCH 16/25] thunderbolt: Add bandwidth management for Display Port tunnels

2019-10-23 Thread Mika Westerberg
is connected we may need to reduce the bandwidth it consumes so that it fits into the total 40 Gb/s available on the Thunderbolt fabric. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/path.c| 22 +++ drivers/thunderbolt/tb.c | 52 ++- drivers/thunderbolt/tb.h | 2 + drivers

[PATCH 06/25] thunderbolt: Convert DP adapter register names to follow the USB4 spec

2019-10-23 Thread Mika Westerberg
Now that USB4 spec has names for these DP adapter registers we can use them instead. This makes it easier to match certain register to the spec. No functional changes. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/switch.c | 50 --- drivers/thunderbolt

[PATCH 08/25] thunderbolt: Add helper macro to iterate over switch ports

2019-10-23 Thread Mika Westerberg
-by: Mika Westerberg --- drivers/thunderbolt/icm.c | 12 +++- drivers/thunderbolt/switch.c | 57 ++- drivers/thunderbolt/tb.c | 54 - drivers/thunderbolt/tb.h | 11 +++ drivers/thunderbolt/xdomain.c | 5 ++- 5

[PATCH 17/25] thunderbolt: Do not start firmware unless asked by the user

2019-10-23 Thread Mika Westerberg
pararameter (start_icm) which is by default false. Having this ability to enable the firmware may be useful at least when debugging possible issues with the software connection manager implementation. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/icm.c | 23 +++ drivers

[PATCH 19/25] thunderbolt: Call tb_eeprom_get_drom_offset() from tb_eeprom_read_n()

2019-10-23 Thread Mika Westerberg
because the former is only supposed to be used with system calls (invalid syscall nr). Signed-off-by: Mika Westerberg --- drivers/thunderbolt/eeprom.c | 88 ++-- 1 file changed, 43 insertions(+), 45 deletions(-) diff --git a/drivers/thunderbolt/eeprom.c b/drivers

[PATCH 24/25] thunderbolt: Add support for USB 3.x tunnels

2019-10-23 Thread Mika Westerberg
adapter port to USB3 upstream adapter port over a single USB4 link. This adds support for USB 3.x tunneling and also capability to discover existing USB 3.x tunnels (for example created by connection manager in boot firmware). Signed-off-by: Rajmohan Mani Co-developed-by: Mika Westerberg Signed-off

[PATCH 21/25] thunderbolt: Update Kconfig entry to USB4

2019-10-23 Thread Mika Westerberg
dependency accordingly. Signed-off-by: Mika Westerberg --- drivers/Makefile | 2 +- drivers/net/Kconfig | 2 +- drivers/thunderbolt/Kconfig | 11 ++- drivers/thunderbolt/Makefile | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/Makefile b

[PATCH 22/25] thunderbolt: Make tb_switch_find_cap() available to other files

2019-10-23 Thread Mika Westerberg
From: Rajmohan Mani We need to find switch capabilities in order to implement TMU support so make it available to other files as well. Signed-off-by: Rajmohan Mani Signed-off-by: Mika Westerberg --- drivers/thunderbolt/cap.c | 11 ++- drivers/thunderbolt/tb.h | 1 + 2 files changed

[PATCH 23/25] thunderbolt: Add support for Time Management Unit

2019-10-23 Thread Mika Westerberg
without need to perform complex steps to re-configure the domain dynamically. We can add more fine-grained TMU configuration later on when we start enabling CLx states. Signed-off-by: Rajmohan Mani Co-developed-by: Mika Westerberg Signed-off-by: Mika Westerberg --- drivers/thunderbolt/Makefile

[PATCH 20/25] thunderbolt: Add initial support for USB4

2019-10-23 Thread Mika Westerberg
in most places. Both can be used interchangeably. Co-developed-by: Rajmohan Mani Signed-off-by: Rajmohan Mani Signed-off-by: Mika Westerberg --- drivers/thunderbolt/Makefile | 2 +- drivers/thunderbolt/eeprom.c | 53 ++- drivers/thunderbolt/nhi.c | 3 + drivers/thunderbolt/nhi.h

[PATCH 18/25] thunderbolt: Make tb_find_port() available to other files

2019-10-23 Thread Mika Westerberg
We will be needing this when adding initial USB4 support so make it available to other files in the driver as well. We also rename it to tb_switch_find_port() to follow conventions used in switch.c. No functional changes. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/switch.c | 18

[PATCH 15/25] thunderbolt: Add Display Port adapter pairing and resource management

2019-10-23 Thread Mika Westerberg
tunnel. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/lc.c | 161 +++ drivers/thunderbolt/switch.c | 44 drivers/thunderbolt/tb.c | 201 -- drivers/thunderbolt/tb.h | 9 ++ drivers/thunderbolt/tb_regs.h |

[PATCH 05/25] thunderbolt: Convert PCIe adapter register names to follow the USB4 spec

2019-10-23 Thread Mika Westerberg
Now that USB4 spec has names for these PCIe adapter registers we can use them instead. This makes it easier to match certain register to the spec. No functional changes. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/switch.c | 10 ++ drivers/thunderbolt/tb_regs.h | 4 ++-- 2

[PATCH 25/25] thunderbolt: Update documentation with the USB4 information

2019-10-23 Thread Mika Westerberg
Update user's and administrator's guide to mention USB4, how it relates to Thunderbolt (it is public spec of Thunderbolt 3) and and how it is supported in Linux. Signed-off-by: Mika Westerberg --- Documentation/admin-guide/thunderbolt.rst | 25 ++- 1 file changed, 20

[PATCH 03/25] thunderbolt: Log error if adding switch fails

2019-10-23 Thread Mika Westerberg
If we fail to add a switch for some reason log an error instead of keeping silent. This is useful for debugging. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/switch.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/thunderbolt/switch.c

[PATCH 02/25] thunderbolt: Log switch route string on config read/write timeout

2019-10-23 Thread Mika Westerberg
This helps to point out which switch config read/write triggered the timeout. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/ctl.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/thunderbolt/ctl.c b/drivers/thunderbolt/ctl.c index 2ec1af8f7968

[PATCH 13/25] thunderbolt: Add downstream PCIe port mappings for Alpine and Titan Ridge

2019-10-23 Thread Mika Westerberg
In order to keep PCIe hierarchies consistent across hotplugs, add hard-coded PCIe downstream port to Thunderbolt port for Alpine Ridge and Titan Ridge as well. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/tb.c | 5 - drivers/thunderbolt/tb.h | 25 + 2

Re: [PATCH v2 2/2] PCI: pciehp: Prevent deadlock on disconnect

2019-10-23 Thread Mika Westerberg
On Tue, Oct 22, 2019 at 06:00:06PM -0500, Bjorn Helgaas wrote: > On Mon, Aug 12, 2019 at 05:31:33PM +0300, Mika Westerberg wrote: > > If there are more than one PCIe switch with hotplug downstream ports > > hot-removing them leads to a following deadlock: > > > > IN

Re: [PATCH v3 3/3] PCI: pciehp: Add dmi table for in-band presence disabled

2019-10-22 Thread Mika Westerberg
On Mon, Oct 21, 2019 at 07:13:32PM -0500, Alex G. wrote: > I think it's clearer if this is explained in a comment. That it doesn't > break anything, and we're okay this applies to all hotplug ports, even those > that are not in front of an NVMe backplane. I agree.

Re: [PATCH v3] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges

2019-10-21 Thread Mika Westerberg
On Mon, Oct 21, 2019 at 04:49:09PM +0200, Karol Herbst wrote: > On Mon, Oct 21, 2019 at 4:09 PM Mika Westerberg > wrote: > > > > On Mon, Oct 21, 2019 at 03:54:09PM +0200, Karol Herbst wrote: > > > > I really would like to provide you more information about s

Re: [PATCH v3 3/3] PCI: pciehp: Add dmi table for in-band presence disabled

2019-10-21 Thread Mika Westerberg
On Thu, Oct 17, 2019 at 03:32:56PM -0400, Stuart Hayes wrote: > Some systems have in-band presence detection disabled for hot-plug PCI > slots, but do not report this in the slot capabilities 2 (SLTCAP2) register. > On these systems, presence detect can become active well after the link is >

Re: [PATCH v3 2/3] PCI: pciehp: Wait for PDS if in-band presence is disabled

2019-10-21 Thread Mika Westerberg
ing the driver, and to prevent > the hotplug code from disabling a device if the presence detect change > goes active after the device is enabled. > > Signed-off-by: Alexandru Gagniuc > Signed-off-by: Stuart Hayes Reviewed-by: Mika Westerberg One nit below. > --- > v2: > re

Re: [PATCH v3 1/3] PCI: pciehp: Add support for disabling in-band presence

2019-10-21 Thread Mika Westerberg
always reflects the state of the > out-of-band presence. > > The recommendation of the PCIe spec is to disable in-band presence > whenever supported. > > Signed-off-by: Alexandru Gagniuc Reviewed-by: Mika Westerberg

Re: [v3] thunderbolt: Fix to check the return value of kmemdup

2019-10-11 Thread Mika Westerberg
On Fri, Oct 11, 2019 at 04:13:22PM +0200, Markus Elfring wrote: > Would you like to reconsider also the addition of the function call > “tb_sw_warn(sw, "cannot allocate memory for switch\n")”? For that I already have a patch as part of my USB4 support v2 series.

Re: [v3] thunderbolt: Fix to check the return value of kmemdup

2019-10-11 Thread Mika Westerberg
On Fri, Oct 11, 2019 at 03:00:13PM +0200, Markus Elfring wrote: > > uuid in add_switch is allocted via kmemdup which can fail. > > I have tried another script for the semantic patch language out. > This source code analysis approach points out that the implementation > of the function

Re: [PATCH] HID: i2c-hid: Remove runtime power management

2019-10-11 Thread Mika Westerberg
On Fri, Oct 11, 2019 at 11:27:10AM +0200, Benjamin Tissoires wrote: > Hi, > > [Adding Mika, who introduced runpm in i2c-hid] > > few questions, remarks: > > On Tue, Oct 8, 2019 at 10:26 PM Hans de Goede wrote: > > > > Hi, > > > > On 08-10-2019 17:38, Kai-Heng Feng wrote: > > > Runtime power

[GIT PULL] Thunderbolt fixes for v5.4

2019-10-11 Thread Mika Westerberg
people have reported: - Fix DP tunneling on some Light Ridge controllers - Fix for lockdep circular locking dependency warning - Drop unnecessary read on ICL Mika Westerberg (3): thunderbolt: Read DP IN adapter first two

Re: [PATCH] thunderbolt: Add 'generation' attribute for devices

2019-10-09 Thread Mika Westerberg
On Thu, Oct 03, 2019 at 07:32:40PM +0200, Christian Kellner wrote: > From: Christian Kellner > > The Thunderbolt standard went through several major iterations, here > called generation. USB4, which will be based on Thunderbolt, will be > generation 4. Let userspace know the generation of the

Re: [PATCH v2] mfd: intel-lpss: use devm_ioremap_uc for MMIO

2019-10-08 Thread Mika Westerberg
bining > > 40-7f : PCI Bus :00 > 40-400fff : :00:02.0 (i915) > 401000-401fff : :00:15.0 (intel-lpss-pci) > > Link: https://bugzilla.kernel.org/show_bug.cgi?id=203485 > Signed-off-by: Tuowen Zhao Acked-by: Mika Westerberg

Re: [PATCH 0/3] thunderbolt: Fixes for few reported issues

2019-10-08 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 01:29:02PM +0300, Mika Westerberg wrote: > Mika Westerberg (3): > thunderbolt: Read DP IN adapter first two dwords in one go > thunderbolt: Fix lockdep circular locking depedency warning > thunderbolt: Drop unnecessary read when writing LC command in Ice L

Re: [PATCH v2 0/2] PCI: Add missing link delays

2019-10-08 Thread Mika Westerberg
On Mon, Oct 07, 2019 at 05:15:24PM +0200, Matthias Andree wrote: > Am 07.10.19 um 11:32 schrieb Mika Westerberg: > > On Sat, Oct 05, 2019 at 09:34:41AM +0200, Matthias Andree wrote: > >> Am 04.10.19 um 15:06 schrieb Mika Westerberg: > >>> On Fri, Oct 04, 2019 at 02:

Re: [PATCH v2 0/2] PCI: Add missing link delays

2019-10-07 Thread Mika Westerberg
On Sat, Oct 05, 2019 at 09:34:41AM +0200, Matthias Andree wrote: > Am 04.10.19 um 15:06 schrieb Mika Westerberg: > > On Fri, Oct 04, 2019 at 02:57:21PM +0200, Matthias Andree wrote: > >> Am 04.10.19 um 14:39 schrieb Mika Westerberg: > >>> @Matthias, @Paul and @Nicho

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-04 Thread Mika Westerberg
On Fri, Oct 04, 2019 at 05:02:37PM +0200, Christian Kellner wrote: > Should work. What would the value be for Thunderbolt 3 (and before)? I > guess '0' if I am looking at the right thing (bits 31:24 in > ROUTER_CS_4)? Yes, it would be 0x10 and below that depending on the generation. > Is there

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-04 Thread Mika Westerberg
+Christian On Fri, Oct 04, 2019 at 02:05:46PM +, mario.limoncie...@dell.com wrote: > > > > On Fri, Oct 4, 2019 at 11:19 AM Mika Westerberg > > wrote: > > > > > > On Fri, Oct 04, 2019 at 11:07:34AM +0300, Yehezkel Bernat wrote: > > > > > Als

Re: [PATCH v2 0/2] PCI: Add missing link delays

2019-10-04 Thread Mika Westerberg
On Fri, Oct 04, 2019 at 02:57:21PM +0200, Matthias Andree wrote: > Am 04.10.19 um 14:39 schrieb Mika Westerberg: > > @Matthias, @Paul and @Nicholas, I appreciate if you could check that this > > does not cause any issues for your systems. > > Just to be sure: is this i

[PATCH v2 0/2] PCI: Add missing link delays

2019-10-04 Thread Mika Westerberg
appreciate if you could check that this does not cause any issues for your systems. Mika Westerberg (2): PCI: Introduce pcie_wait_for_link_delay() PCI: Add missing link delays required by the PCIe spec drivers/pci/pci-driver.c | 18 +++ drivers/pci/pci.c| 113

[PATCH v2 1/2] PCI: Introduce pcie_wait_for_link_delay()

2019-10-04 Thread Mika Westerberg
This is otherwise similar to pcie_wait_for_link() but allows passing custom activation delay in milliseconds. Signed-off-by: Mika Westerberg --- drivers/pci/pci.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c

[PATCH v2 2/2] PCI: Add missing link delays required by the PCIe spec

2019-10-04 Thread Mika Westerberg
b0187.korp216.prod.outlook.com/ Link: https://bugzilla.kernel.org/show_bug.cgi?id=203885 Reported-by: Kai-Heng Feng Tested-by: Kai-Heng Feng Signed-off-by: Mika Westerberg --- drivers/pci/pci-driver.c | 18 drivers/pci/pci.c| 92 +--- driv

Re: System hangs if NVMe/SSD is removed during suspend

2019-10-04 Thread Mika Westerberg
On Fri, Oct 04, 2019 at 11:59:26AM +0200, Rafael J. Wysocki wrote: > On Friday, October 4, 2019 10:03:40 AM CEST Mika Westerberg wrote: > > On Thu, Oct 03, 2019 at 09:50:33AM -0700, Tejun Heo wrote: > > > Hello, Mika. > > > > > > On Wed, Oct 02, 2019 at 03:

[PATCH 1/2] bdi: Do not use freezable workqueue

2019-10-04 Thread Mika Westerberg
from bdi_wq. Reported-by: AceLan Kao Link: https://marc.info/?l=linux-kernel=138695698516487 Link: https://bugzilla.kernel.org/show_bug.cgi?id=204385 Link: https://lore.kernel.org/lkml/20191002122136.gd2...@lahna.fi.intel.com/#t Signed-off-by: Mika Westerberg --- I'm not too familiar with the bdi

[PATCH 2/2] Revert "libata, freezer: avoid block device removal while system is frozen"

2019-10-04 Thread Mika Westerberg
by reverting it. Signed-off-by: Mika Westerberg --- drivers/ata/libata-scsi.c | 21 - kernel/freezer.c | 6 -- 2 files changed, 27 deletions(-) diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 76d0f9de767b..58e09ffe8b9c 100644 --- a/drivers/ata

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-04 Thread Mika Westerberg
On Fri, Oct 04, 2019 at 11:07:34AM +0300, Yehezkel Bernat wrote: > > Also if you can get the hw_vendor_id and hw_product_id from the kernel > > does that mean you don't need to do the two reads or you still need > > those? > > Are those the chip vendor or the OEM, in case they are different?

Re: System hangs if NVMe/SSD is removed during suspend

2019-10-04 Thread Mika Westerberg
On Thu, Oct 03, 2019 at 09:50:33AM -0700, Tejun Heo wrote: > Hello, Mika. > > On Wed, Oct 02, 2019 at 03:21:36PM +0300, Mika Westerberg wrote: > > but from that discussion I don't see more generic solution to be > > implemented. > > > > Any ideas we should fix t

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-04 Thread Mika Westerberg
On Thu, Oct 03, 2019 at 02:41:11PM +, mario.limoncie...@dell.com wrote: > > -Original Message- > > From: Mika Westerberg > > Sent: Thursday, October 3, 2019 3:00 AM > > To: Limonciello, Mario > > Cc: yehezkel...@gmail.com; linux-...@vger.kernel.org

Re: [RFC PATCH 06/22] thunderbolt: Add support for lane bonding

2019-10-03 Thread Mika Westerberg
On Thu, Oct 03, 2019 at 10:25:32AM +0200, Oliver Neukum wrote: > Am Mittwoch, den 02.10.2019, 17:30 +0300 schrieb Mika Westerberg: > > On Wed, Oct 02, 2019 at 04:21:06PM +0200, Oliver Neukum wrote: > > > Am Dienstag, den 01.10.2019, 15:53 +0300 schrieb Mika Westerberg: > >

Re: [RFC PATCH 20/22] thunderbolt: Add support for USB tunnels

2019-10-03 Thread Mika Westerberg
On Thu, Oct 03, 2019 at 10:42:56AM +0200, Oliver Neukum wrote: > Am Dienstag, den 01.10.2019, 14:38 +0300 schrieb Mika Westerberg: > > From: Rajmohan Mani > > > > USB4 added a capability to tunnel USB 3.x protocol over the USB4 > > fabric. USB4 device routers may in

Re: [RFC PATCH 19/22] thunderbolt: Add support for Time Management Unit

2019-10-03 Thread Mika Westerberg
On Wed, Oct 02, 2019 at 04:52:06PM +, Mani, Rajmohan wrote: > > + /* Enable TMU if it is off */ > > + if (!tb_switch_tmu_is_enabled(tb->root_switch)) > > To be consistent with the implementation of tb_switch_tmu_disable(), should we > move the above check inside tb_switch_tmu_enable()?

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-03 Thread Mika Westerberg
On Wed, Oct 02, 2019 at 04:00:55PM +, mario.limoncie...@dell.com wrote: > > It's not even "same location - another meaning", the vendor ID comes from > > the > > DROM section, so it takes a few internal jumps inside the NVM to find the > > location. One of the "pointers" or section headers

Re: [RFC PATCH 06/22] thunderbolt: Add support for lane bonding

2019-10-02 Thread Mika Westerberg
On Wed, Oct 02, 2019 at 04:21:06PM +0200, Oliver Neukum wrote: > Am Dienstag, den 01.10.2019, 15:53 +0300 schrieb Mika Westerberg: > > > > > > Are we only going to be allowed to "bond" two links together? Or will > > > we be doing more than 2 in

Re: [RFC PATCH 05/22] thunderbolt: Add helper macros to iterate over switch ports

2019-10-02 Thread Mika Westerberg
On Wed, Oct 02, 2019 at 04:17:54PM +0200, Oliver Neukum wrote: > Am Dienstag, den 01.10.2019, 14:38 +0300 schrieb Mika Westerberg: > > @@ -1975,10 +1972,8 @@ void tb_switch_suspend(struct tb_switch *sw) > > if (err) > > return; > > >

System hangs if NVMe/SSD is removed during suspend

2019-10-02 Thread Mika Westerberg
Hi Tejun, In a system with Thunderbolt connected NVMe or SSD entering system suspend, detaching the NVMe/SSD and resuming the system hangs (see also https://bugzilla.kernel.org/show_bug.cgi?id=204385). Triggering sysrq-w I see this: [ 113.093783] Workqueue: nvme-wq nvme_remove_dead_ctrl_work

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-02 Thread Mika Westerberg
On Wed, Oct 02, 2019 at 10:39:54AM +0200, Greg Kroah-Hartman wrote: > On Wed, Oct 02, 2019 at 11:30:34AM +0300, Mika Westerberg wrote: > > On Tue, Oct 01, 2019 at 06:27:42PM +0200, Oliver Neukum wrote: > > > Am Dienstag, den 01.10.2019, 18:07 +0300 schrieb Mika Westerber

Re: [RFC PATCH 22/22] thunderbolt: Do not start firmware unless asked by the user

2019-10-02 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 04:53:54PM +, mario.limoncie...@dell.com wrote: > > -Original Message- > > From: Mika Westerberg > > Sent: Tuesday, October 1, 2019 9:59 AM > > To: Limonciello, Mario > > Cc: linux-...@vger.kernel.org; andreas.noe...@gmail.co

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-02 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 06:14:23PM +, mario.limoncie...@dell.com wrote: > One more thought; would you consider exporting to sysfs sw->config.vendor_id? > Maybe an attribute that is switch_vendor? > > Userland fwupd also does validation on the NVM and will need to follow this. > The same check

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-02 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 05:05:09PM +, mario.limoncie...@dell.com wrote: > > @@ -322,9 +398,21 @@ static int tb_switch_nvm_add(struct tb_switch *sw) > > u32 val; > > int ret; > > > > - if (!sw->dma_port) > > + if (!nvm_readable(sw)) > > return 0; > > > > + /* > > +

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-02 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 06:27:42PM +0200, Oliver Neukum wrote: > Am Dienstag, den 01.10.2019, 18:07 +0300 schrieb Mika Westerberg: > > Hi, > > > OK, but does that break existing .configs? I mean if you have already > > CONFIG_THUNDERBOLT in your .config/defconfig does it

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 05:22:13PM +0200, Greg KH wrote: > On Tue, Oct 01, 2019 at 02:59:06PM +, mario.limoncie...@dell.com wrote: > > > > > > > -Original Message- > > > From: Greg Kroah-Hartman > > > Sent: Tuesday, October 1, 2019 9:54 AM

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 05:19:35PM +0200, Greg Kroah-Hartman wrote: > On Tue, Oct 01, 2019 at 06:07:34PM +0300, Mika Westerberg wrote: > > On Tue, Oct 01, 2019 at 04:53:54PM +0200, Greg Kroah-Hartman wrote: > > > On Tue, Oct 01, 2019 at 04:09:05PM +0300, Mika Westerberg wrote: &

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 02:59:06PM +, mario.limoncie...@dell.com wrote: > > > > -Original Message- > > From: Greg Kroah-Hartman > > Sent: Tuesday, October 1, 2019 9:54 AM > > To: Mika Westerberg > > Cc: linux-...@vger.kernel.org; Andreas Noever;

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 04:53:54PM +0200, Greg Kroah-Hartman wrote: > On Tue, Oct 01, 2019 at 04:09:05PM +0300, Mika Westerberg wrote: > > On Tue, Oct 01, 2019 at 02:47:48PM +0200, Greg Kroah-Hartman wrote: > > > > - Thunderbolt Controller driver. This driv

Re: [RFC PATCH 22/22] thunderbolt: Do not start firmware unless asked by the user

2019-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 02:43:15PM +, mario.limoncie...@dell.com wrote: > > -Original Message- > > From: Mika Westerberg > > Sent: Tuesday, October 1, 2019 6:39 AM > > To: linux-...@vger.kernel.org > > Cc: Andreas Noever; Michael Jamet; Mika Westerberg;

Re: linux-next: Fixes tag needs some work in the pinctrl-intel-fixes tree

2019-10-01 Thread Mika Westerberg
On Wed, Oct 02, 2019 at 12:30:04AM +1000, Stephen Rothwell wrote: > Hi all, > > In commit > > d21556b6ff04 ("pinctrl: intel: Allocate IRQ chip dynamic") > > Fixes tag > > Fixes: ee1a6ca43dba ("Add Intel Broxton pin controller support") > > has these problem(s): > > - Subject does not

Re: [RFC PATCH 21/22] thunderbolt: Update documentation with the USB4 information

2019-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 02:17:01PM +, mario.limoncie...@dell.com wrote: > > > > -Original Message- > > From: Mika Westerberg > > Sent: Tuesday, October 1, 2019 6:38 AM > > To: linux-...@vger.kernel.org > > Cc: Andreas Noever; Michael Jam

Re: [RFC PATCH 01/22] thunderbolt: Introduce tb_switch_is_icm()

2019-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 01:50:13PM +, mario.limoncie...@dell.com wrote: > > Here at Intel we use term "SW CM" and "FW CM" and IMHO they are better > > than ECM/ICM. But if people insist I can change them. > > I do agree with you, SW CM and FW CM are clearer than ECM/ICM, maybe just >

Re: [RFC PATCH 01/22] thunderbolt: Introduce tb_switch_is_icm()

2019-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 01:36:49PM +, mario.limoncie...@dell.com wrote: > > -Original Message- > > From: Mika Westerberg > > Sent: Tuesday, October 1, 2019 7:47 AM > > To: Greg Kroah-Hartman > > Cc: linux-...@vger.kernel.org; Andreas Noever; Micha

Re: [RFC PATCH 00/22] thunderbolt: Add support for USB4

2019-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 02:49:54PM +0200, Greg Kroah-Hartman wrote: > On Tue, Oct 01, 2019 at 02:38:08PM +0300, Mika Westerberg wrote: > > Hi all, > > > > I'm sending this as RFC because the series is still missing important > > features such as power management so not

Re: [RFC PATCH 12/22] thunderbolt: Add Display Port CM handshake for Titan Ridge devices

2019-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 02:44:09PM +0200, Greg Kroah-Hartman wrote: > On Tue, Oct 01, 2019 at 02:38:20PM +0300, Mika Westerberg wrote: > > Titan Ridge devices and newer need an additional connection manager > > handshake in order to do proper Display Port tunneling so implem

Re: [RFC PATCH 09/22] thunderbolt: Convert basic adapter register names to follow the USB4 spec

2019-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 02:41:26PM +0200, Greg Kroah-Hartman wrote: > On Tue, Oct 01, 2019 at 02:38:17PM +0300, Mika Westerberg wrote: > > Now that USB4 spec has names for these basic registers we can use them > > instead. This makes it easier to match certain regis

Re: [RFC PATCH 08/22] thunderbolt: Add downstream PCIe port mappings for Alpine and Titan Ridge

2019-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 02:40:54PM +0200, Greg Kroah-Hartman wrote: > On Tue, Oct 01, 2019 at 02:38:16PM +0300, Mika Westerberg wrote: > > In order to keep PCIe hierarchies consistent across hotplugs, add > > hard-coded PCIe downstream port to Thunderbolt port for Alpine Ridge and

Re: [RFC PATCH 07/22] thunderbolt: Add default linking between ports if not provided by DROM

2019-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 02:39:11PM +0200, Greg Kroah-Hartman wrote: > On Tue, Oct 01, 2019 at 02:38:15PM +0300, Mika Westerberg wrote: > > Some cases the DROM information is not correct or is simply missing. > > What is "DROM"? It is "Device ROM". Essentially p

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 02:47:48PM +0200, Greg Kroah-Hartman wrote: > > - Thunderbolt Controller driver. This driver is required if you > > - want to hotplug Thunderbolt devices on Apple hardware or on PCs > > - with Intel Falcon Ridge or newer. > > + USB4 (Thunderbolt) driver.

Re: [RFC PATCH 06/22] thunderbolt: Add support for lane bonding

2019-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 02:38:08PM +0200, Greg Kroah-Hartman wrote: > On Tue, Oct 01, 2019 at 02:38:14PM +0300, Mika Westerberg wrote: > > Lane bonding allows aggregating the two 10/20 Gb/s (depending on the > > generation) lanes into a single 20/40 Gb/s bonded link. This all

<    1   2   3   4   5   6   7   8   9   10   >