Re: [RFC PATCH 03/22] thunderbolt: Log warning if adding switch fails

2019-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 02:18:04PM +0200, Greg Kroah-Hartman wrote: > On Tue, Oct 01, 2019 at 02:38:11PM +0300, Mika Westerberg wrote: > > If we fail to add a switch for some reason log a warning with the error > > code. This is useful for debugging. > > > > Sig

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

2019-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 02:10:05PM +0200, Greg Kroah-Hartman wrote: > On Tue, Oct 01, 2019 at 02:38:09PM +0300, Mika Westerberg wrote: > > We currently differentiate between SW CM and ICM by looking directly at > > You should spell out what "SW CM" and "ICM" m

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

2019-10-01 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

[RFC PATCH 04/22] thunderbolt: Make tb_sw_write() take const parameter

2019-10-01 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

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

2019-10-01 Thread Mika Westerberg
There are quite many places in the driver where we iterate over each port in the switch skipping. To make it bit more consistent provide set of helper macros that can be used to do this and convert the existing call sites to these. No functional changes. Signed-off-by: Mika Westerberg

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

2019-10-01 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 | 4 +++- drivers/thunderbolt/tb.h | 25 + 2 files

[RFC PATCH 11/22] thunderbolt: Convert DP adapter register names to follow the USB4 spec

2019-10-01 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

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

2019-10-01 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

[RFC PATCH 14/22] thunderbolt: Add bandwidth management for Display Port tunnels

2019-10-01 Thread Mika Westerberg
). If another high rate monitor 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

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

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

[RFC PATCH 13/22] thunderbolt: Add Display Port adapter pairing and resource management

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

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

2019-10-01 Thread Mika Westerberg
1 and 2, and 3 and 4 are linked together and also with USB4. 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

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

2019-10-01 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

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

2019-10-01 Thread Mika Westerberg
of the link actually supports 2x widths. This also means that all the paths should be established through the primary port so update tb_path_alloc() to handle this as well. Lane bonding is supported starting from Falcon Ridge (2nd generation) controllers. Signed-off-by: Mika Westerberg

[RFC PATCH 16/22] thunderbolt: Call tb_eeprom_get_drom_offset() from tb_eeprom_read_n()

2019-10-01 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

[RFC PATCH 03/22] thunderbolt: Log warning if adding switch fails

2019-10-01 Thread Mika Westerberg
If we fail to add a switch for some reason log a warning with the error code. This is useful for debugging. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/tb.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c

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

2019-10-01 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 | 27 ++- 1 file c

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

2019-10-01 Thread Mika Westerberg
We currently differentiate between SW CM and ICM by looking directly at the sw->config.enabled field which may be rather hard to understand for the casual reader. For this reason introduce a wrapper function with documentation that should make the intention more clear. Signed-off-by: M

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

2019-10-01 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 | 14 +++--- drivers/thunderbolt

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

2019-10-01 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

[RFC PATCH 15/22] thunderbolt: Make tb_find_port() available to other files

2019-10-01 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

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

2019-10-01 Thread Mika Westerberg
Titan Ridge devices and newer need 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 | 44 +++ 2

[RFC PATCH 10/22] thunderbolt: Convert PCIe adapter register names to use USB4 names

2019-10-01 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

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

2019-10-01 Thread Mika Westerberg
in most places. Both can be used interchangeably. This also updates the Kconfig entry accordingly. Co-developed-by: Rajmohan Mani Signed-off-by: Rajmohan Mani Signed-off-by: Mika Westerberg --- drivers/thunderbolt/Kconfig | 9 +- drivers/thunderbolt/Makefile | 2 +- drivers/thunder

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

2019-10-01 Thread Mika Westerberg
ng whether we should move the whole Thunderbolt driver under drivers/usb/thunderbolt as well? Mika Westerberg (19): thunderbolt: Introduce tb_switch_is_icm() thunderbolt: Log switch route string on config read/write timeout thunderbolt: Log warning if adding switch fails thunderbolt: Make

[PATCH 2/3] thunderbolt: Fix lockdep circular locking depedency warning

2019-10-01 Thread Mika Westerberg
rg/lkml/2019/8/30/513 Fixes: a03e828915c0 ("thunderbolt: Serialize PCIe tunnel creation with PCI rescan") Reported-by: Dominik Brodowski Signed-off-by: Mika Westerberg --- drivers/thunderbolt/switch.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/thunderbolt/switc

[PATCH 1/3] thunderbolt: Read DP IN adapter first two dwords in one go

2019-10-01 Thread Mika Westerberg
. This is likely firmware bug but we can work it around by always reading the two dwords in one go. There should be no harm for other controllers either so can do it unconditionally. Link: https://lkml.org/lkml/2019/8/28/160 Reported-by: Brad Campbell Signed-off-by: Mika Westerberg --- drivers

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

2019-10-01 Thread Mika Westerberg
that we do unnecessary PCI config space read when issuing LC mailbox command on ICL. 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

[PATCH 3/3] thunderbolt: Drop unnecessary read when writing LC command in Ice Lake

2019-10-01 Thread Mika Westerberg
The read is not needed as we overwrite the returned value in the next line anyway so drop it. Fixes: 3cdb9446a117 ("thunderbolt: Add support for Intel Ice Lake") Reported-by: Nicholas Johnson Signed-off-by: Mika Westerberg --- drivers/thunderbolt/nhi_ops.c | 1 - 1 file changed,

Re: [PATCH] pinctrl: cherryview: restore Strago DMI workaround for all versions

2019-10-01 Thread Mika Westerberg
On Mon, Sep 23, 2019 at 07:49:58PM -0700, Dmitry Torokhov wrote: > This is essentially a revert of: > > e3f72b749da2 pinctrl: cherryview: fix Strago DMI workaround > 86c5dd6860a6 pinctrl: cherryview: limit Strago DMI workarounds to version 1.0 > > because even with 1.1 versions of BIOS there are

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

2019-09-30 Thread Mika Westerberg
Hi, In $subject, use MMIO instead of mmio. On Fri, Sep 27, 2019 at 11:55:13AM -0600, Tuowen Zhao wrote: > Write-combining BAR for intel-lpss-pci in MTRR causes system hangs > during boot. > > This patch adds devm_ioremap_uc as a new managed wrapper to ioremap_uc > and with it forces the use of s

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

2019-09-23 Thread Mika Westerberg
On Mon, Sep 23, 2019 at 11:12:42AM +0300, Mika Westerberg wrote: > Regarding suggestion of unbinding PCI drivers without > pci_lock_rescan_remove() hold, I haven't looked it too closely but I > think we need to take that lock anyway because when we are unbinding a > hotplug driv

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

2019-09-23 Thread Mika Westerberg
Hi Lukas, On Mon, Sep 23, 2019 at 07:34:03AM +0200, Lukas Wunner 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: > > For t

Re: [PATCH] PCI: Add missing link delays required by the PCIe spec

2019-09-18 Thread Mika Westerberg
Hi Bjorn, On Tue, Aug 27, 2019 at 12:25:47PM +0300, Mika Westerberg wrote: > Here are the relevant parts from ICL. I'll send you the full dmesg as > a separate email. The topology is such that I have 2 Titan Ridge devices > connected in chain (each include PCIe switch + xHCI).

Re: [PATCH] PCI: Use minimum window alignment when calculating memory window size

2019-09-18 Thread Mika Westerberg
On Mon, Aug 12, 2019 at 05:41:44PM +0300, Mika Westerberg wrote: > There is an issue in Linux PCI resource allocation that if we remove an > existing device that was initially configured by the BIOS and then issue > rescan, it will not fit in to the memory space allocated by the BIOS >

Re: [PATCH v2 1/2] PCI: pciehp: Do not disable interrupt twice on suspend

2019-09-18 Thread Mika Westerberg
On Mon, Aug 12, 2019 at 05:31:32PM +0300, Mika Westerberg wrote: > We try to keep PCIe hotplug ports runtime suspended when entering system > suspend. Due to the fact that the PCIe portdrv sets NEVER_SKIP driver PM > flag the PM core always calls system suspend/resume hooks even if the &g

Re: [PATCH v2 1/2] mtd: spi-nor: intel-spi: support chips without software sequencer

2019-09-16 Thread Mika Westerberg
On Mon, Sep 16, 2019 at 09:22:04AM +, Jethro Beekman wrote: > On 2019-09-16 11:19, Mika Westerberg wrote: > > On Mon, Sep 16, 2019 at 09:12:50AM +, Jethro Beekman wrote: > >> On 2019-09-16 11:11, Mika Westerberg wrote: > >>> Hi, > >>> > >>

Re: [PATCH v2 1/2] mtd: spi-nor: intel-spi: support chips without software sequencer

2019-09-16 Thread Mika Westerberg
On Mon, Sep 16, 2019 at 09:12:50AM +, Jethro Beekman wrote: > On 2019-09-16 11:11, Mika Westerberg wrote: > > Hi, > > > > On Sun, Sep 15, 2019 at 08:41:55PM +, Jethro Beekman wrote: > >> Could someone please review this? > >> > >> On 20

Re: [PATCH v2 1/2] mtd: spi-nor: intel-spi: support chips without software sequencer

2019-09-16 Thread Mika Westerberg
Hi, On Sun, Sep 15, 2019 at 08:41:55PM +, Jethro Beekman wrote: > Could someone please review this? > > On 2019-09-04 03:15, Jethro Beekman wrote: > > Some flash controllers don't have a software sequencer. Avoid > > configuring the register addresses for it, and double check > > everywhere t

Re: [PATCH v2 1/2] gpiolib: introduce devm_fwnode_gpiod_get_index()

2019-09-16 Thread Mika Westerberg
On Fri, Sep 13, 2019 at 11:13:10AM -0700, Dmitry Torokhov wrote: > On Fri, Sep 13, 2019 at 12:40:07PM +0300, Mika Westerberg wrote: > > On Thu, Sep 12, 2019 at 08:22:38PM -0700, Dmitry Torokhov wrote: > > > devm_fwnode_get_index_gpiod_from_child() is too long, besides the fwnode

Re: [PATCH v2 2/2] gpiolib: introduce fwnode_gpiod_get_index()

2019-09-13 Thread Mika Westerberg
gpiod_get_index() instead of iterating through GPIO suffixes on > its own. > > Reviewed-by: Andy Shevchenko > Signed-off-by: Dmitry Torokhov Reviewed-by: Mika Westerberg

Re: [PATCH v2 1/2] gpiolib: introduce devm_fwnode_gpiod_get_index()

2019-09-13 Thread Mika Westerberg
On Thu, Sep 12, 2019 at 08:22:38PM -0700, Dmitry Torokhov wrote: > devm_fwnode_get_index_gpiod_from_child() is too long, besides the fwnode > in question does not have to be a child of device node. Let's rename it > to devm_fwnode_gpiod_get_index() and keep the old name for compatibility > for now.

Re: Thunderbolt DP oddity on v5.2.9 on iMac 12,2

2019-09-13 Thread Mika Westerberg
Hi Brad, On Tue, Sep 03, 2019 at 04:33:23PM +0300, Mika Westerberg wrote: > On Tue, Sep 03, 2019 at 08:54:02PM +0800, Brad Campbell wrote: > > On 3/9/19 7:55 pm, Mika Westerberg wrote: > > > On Tue, Sep 03, 2019 at 07:11:32PM +0800, Brad Campbell wrote: > > > > &

Re: [PATCH v1 0/2] pinctrl: Add new pinctrl/GPIO driver

2019-09-13 Thread Mika Westerberg
adds pinmux & GPIO controller driver. > > Patch 2 adds the dt bindings document & include file. > > > > Patches are against Linux 5.3-rc5 at below Git tree: > > git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git > > OK nice, I think you need to in

Re: [PATCH] [v2] pinctrl: intel: mark intel_pin_to_gpio __maybe_unused

2019-09-09 Thread Mika Westerberg
On Mon, Sep 09, 2019 at 12:22:11PM +0300, Andy Shevchenko wrote: > On Fri, Sep 06, 2019 at 08:51:59PM +0200, Arnd Bergmann wrote: > > The intel_pin_to_gpio() function is only called by the > > PM support functions and causes a warning when those are disabled: > > > > drivers/pinctrl/intel/pinctrl-

Re: [PATCH] gpiolib: acpi: make acpi_can_fallback_to_crs() static

2019-09-04 Thread Mika Westerberg
On Wed, Sep 04, 2019 at 10:26:24AM -0700, Dmitry Torokhov wrote: > It is not used outside gpiolib-acpi.c module, so there is no need to > export it. > > Signed-off-by: Dmitry Torokhov Acked-by: Mika Westerberg

Re: [PATCH v2 2/2] mtd: spi-nor: intel-spi: add support for Intel Cannon Lake SPI flash

2019-09-04 Thread Mika Westerberg
atasheets/300-series-chipset-pch-datasheet-vol-2.pdf > > Signed-off-by: Jethro Beekman Reviewed-by: Mika Westerberg

Re: lockdep warning on thunderbolt docking

2019-09-03 Thread Mika Westerberg
On Sat, Aug 31, 2019 at 04:03:21PM +0300, Mika Westerberg wrote: > Hi Dominik, > > On Fri, Aug 30, 2019 at 02:58:48PM +0200, Dominik Brodowski wrote: > > When connecting a thunderbolt-enabled docking station to my work laptop, > > the following lockdep warning is reported

Re: Thunderbolt DP oddity on v5.2.9 on iMac 12,2

2019-09-03 Thread Mika Westerberg
On Tue, Sep 03, 2019 at 08:54:02PM +0800, Brad Campbell wrote: > On 3/9/19 7:55 pm, Mika Westerberg wrote: > > On Tue, Sep 03, 2019 at 07:11:32PM +0800, Brad Campbell wrote: > > > > I think the problem is that for some reason, probably because this is > > first gener

Re: Thunderbolt DP oddity on v5.2.9 on iMac 12,2

2019-09-03 Thread Mika Westerberg
On Tue, Sep 03, 2019 at 07:11:32PM +0800, Brad Campbell wrote: > G'day Mika, > > I'm sending you two dmesg because with that patch applied, a warm boot (as > in reboot) comes up with all 3 heads, but a cold boot only has the two. I > thought that was odd, so I reproduced it a couple of times just

Re: Thunderbolt DP oddity on v5.2.9 on iMac 12,2

2019-09-03 Thread Mika Westerberg
On Tue, Sep 03, 2019 at 01:13:28PM +0300, Mika Westerberg wrote: > Hi Brad, > > On Thu, Aug 29, 2019 at 12:27:08AM +0800, Brad Campbell wrote: > > It wouldn't surprise me if the firmware was doing something funky. It was > > one of the first Thunderbolt equipped m

Re: Thunderbolt DP oddity on v5.2.9 on iMac 12,2

2019-09-03 Thread Mika Westerberg
Hi Brad, On Thu, Aug 29, 2019 at 12:27:08AM +0800, Brad Campbell wrote: > It wouldn't surprise me if the firmware was doing something funky. It was > one of the first Thunderbolt equipped models and the support docs explicitly > say only one Thunderbolt display in Windows and two in later versions

Re: Tweak I2C SDA hold time on GemniLake to make touchpad work

2019-09-03 Thread Mika Westerberg
+Jarkko On Tue, Sep 03, 2019 at 04:10:27PM +0800, Chris Chiu wrote: > Hi, > > We're working on the acer Gemnilake laptop TravelMate B118-M for > touchpad not working issue. The touchpad fails to bring up and the > i2c-hid ouput the message as follows > [8.317293] i2c_hid i2c-ELAN0502:00:

Re: [PATCH 2/2] mtd: spi-nor: intel-spi: add support for Intel Cannon Lake SPI flash

2019-08-31 Thread Mika Westerberg
On Sat, Aug 31, 2019 at 03:29:21PM +, Jethro Beekman wrote: > > > + ispi->sregs = NULL; > > > + ispi->pregs = ispi->base + CNL_PR; > > > + ispi->nregions = CNL_FREG_NUM; > > > + ispi->pr_num = CNL_PR_NUM; > > > > Does CNL really have a different number of PR and

[GIT PULL] Thunderbolt changes for v5.4

2019-08-31 Thread Mika Westerberg
): thunderbolt: Switch to use device_property_count_uXX() J. Bruce Fields (1): thunderbolt: Show key using %*pE not %*pEp Mika Westerberg (8): thunderbolt: Correct path indices for PCIe tunnel thunderbolt: Move NVM upgrade support flag to struct icm thunderbolt: Use 32-bit

Re: [PATCH 2/2] mtd: spi-nor: intel-spi: add support for Intel Cannon Lake SPI flash

2019-08-31 Thread Mika Westerberg
Hi Jethro, On Sat, Aug 31, 2019 at 05:50:34AM +, Jethro Beekman wrote: > (apologies, resending without S/MIME signature) > > Now that SPI flash controllers without a software sequencer are > supported, it's trivial to add support for CNL and its PCI ID. > > Signed-off-by: Jethro Beekman > -

Re: lockdep warning on thunderbolt docking

2019-08-31 Thread Mika Westerberg
Hi Dominik, On Fri, Aug 30, 2019 at 02:58:48PM +0200, Dominik Brodowski wrote: > When connecting a thunderbolt-enabled docking station to my work laptop, > the following lockdep warning is reported on v5.3.0-rc6+ as of Thursday > morning (can look up the exact git id if so required): Thanks for r

Re: Thunderbolt DP oddity on v5.2.9 on iMac 12,2

2019-08-28 Thread Mika Westerberg
On Wed, Aug 28, 2019 at 06:43:35PM +0800, Brad Campbell wrote: > On 28/8/19 6:23 pm, Mika Westerberg wrote: > > > On Wed, Aug 28, 2019 at 05:12:00PM +0800, Brad Campbell wrote: > > > > Apart from the warning in the log (which is not fatal, I'll look into > > it

Re: Thunderbolt DP oddity on v5.2.9 on iMac 12,2

2019-08-28 Thread Mika Westerberg
On Wed, Aug 28, 2019 at 05:12:00PM +0800, Brad Campbell wrote: > On 28/8/19 3:33 pm, Mika Westerberg wrote: > > On Wed, Aug 28, 2019 at 03:09:07PM +0800, Brad Campbell wrote: > > > G'day All, > > > > Hi, > > > > > 5.2 is the first kernel th

Re: Thunderbolt DP oddity on v5.2.9 on iMac 12,2

2019-08-28 Thread Mika Westerberg
On Wed, Aug 28, 2019 at 03:09:07PM +0800, Brad Campbell wrote: > G'day All, Hi, > 5.2 is the first kernel that has allowed me to use 2 Apple Thunderbolt > display on a 2011 vintage iMac. Awesome work and many thanks! > > I boot this machine in BIOS (Bootcamp) mode as that gave me brightness > co

Re: [PATCH] PCI: Add missing link delays required by the PCIe spec

2019-08-27 Thread Mika Westerberg
On Mon, Aug 26, 2019 at 05:05:02PM -0500, Bjorn Helgaas wrote: > On Mon, Aug 26, 2019 at 05:42:42PM +0300, Mika Westerberg wrote: > > On Mon, Aug 26, 2019 at 09:07:12AM -0500, Bjorn Helgaas wrote: > > > On Mon, Aug 26, 2019 at 01:17:26PM +0300, Mika Westerberg wrote: > >

Re: [PATCH] PCI: Add missing link delays required by the PCIe spec

2019-08-26 Thread Mika Westerberg
On Mon, Aug 26, 2019 at 09:07:12AM -0500, Bjorn Helgaas wrote: > On Mon, Aug 26, 2019 at 01:17:26PM +0300, Mika Westerberg wrote: > > On Fri, Aug 23, 2019 at 09:12:54PM -0500, Bjorn Helgaas wrote: > > > Hi Mika, > > > > Hi, > > > > > I'm tryi

Re: [PATCH] PCI: Add missing link delays required by the PCIe spec

2019-08-26 Thread Mika Westerberg
On Fri, Aug 23, 2019 at 09:12:54PM -0500, Bjorn Helgaas wrote: > Hi Mika, Hi, > I'm trying to figure out specifically why we need this and where it > should go. Questions below. Thanks for looking at this. > On Wed, Aug 21, 2019 at 03:45:19PM +0300, Mika Westerberg wrote: &g

Re: [PATCH v3 0/8] thunderbolt: Intel Ice Lake support

2019-08-26 Thread Mika Westerberg
On Mon, Aug 19, 2019 at 02:22:15PM +0300, Mika Westerberg wrote: > Hi all, > > This is third iteration of the patch series adding support for the Intel > Ice Lake integrated Thunderbolt controller. The biggest difference from the > previous discrete controllers is that the Ice L

Re: [PATCH v2 0/3] PCI: Add PCI_ERROR_RESPONSE, check for errors

2019-08-23 Thread Mika Westerberg
PONSE definition > PCI / PM: Decode D3cold power state correctly > PCI / PM: Return error when changing power state from D3cold For the whole series, Reviewed-by: Mika Westerberg

Re: [PATCH] PCI: Add missing link delays required by the PCIe spec

2019-08-23 Thread Mika Westerberg
On Thu, Aug 22, 2019 at 08:29:09PM +0200, Matthias Andree wrote: > Am 21.08.19 um 14:45 schrieb Mika Westerberg: > > Hi all, > > > > As the changelog says this is reworked version that tries to avoid reported > > issues while at the same time fix the missing delays so

Re: [PATCH] PCI: Add sysfs attribute for disabling PCIe link to downstream component

2019-08-21 Thread Mika Westerberg
On Wed, Aug 21, 2019 at 10:28:37AM +0300, Mika Westerberg wrote: > > If we see a type of PCI_EXP_TYPE_ROOT_PORT or > > PCI_EXP_TYPE_PCIE_BRIDGE, I think we have to assume that's accurate > > (which we already do today -- for those types, we assume the device > > has a

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

2019-08-21 Thread Mika Westerberg
-Heng Feng Tested-by: Kai-Heng Feng Signed-off-by: Mika Westerberg --- Hi all, As the changelog says this is reworked version that tries to avoid reported issues while at the same time fix the missing delays so we can get ICL systems and at least the one system with Titan Ridge controlle

Re: [PATCH] PCI: Add sysfs attribute for disabling PCIe link to downstream component

2019-08-21 Thread Mika Westerberg
On Tue, Aug 20, 2019 at 09:17:17AM -0500, Bjorn Helgaas wrote: > On Tue, Aug 20, 2019 at 12:58:20PM +0300, Mika Westerberg wrote: > > On Mon, Aug 19, 2019 at 06:52:45PM -0500, Bjorn Helgaas wrote: > > > > Right, it looks like we need some sort of flag there anyway. > &

Re: [PATCH v3 0/8] thunderbolt: Intel Ice Lake support

2019-08-20 Thread Mika Westerberg
On Mon, Aug 19, 2019 at 07:36:37PM +, mario.limoncie...@dell.com wrote: > After checking, this is not introduced by this series, it happens on v5.3-rc5 > as well. > It's a problem in pciehp that will be debugged separately. > > So the Thunderbolt portion of this works for me on ICL system. >

Re: [PATCH] PCI: Add sysfs attribute for disabling PCIe link to downstream component

2019-08-20 Thread Mika Westerberg
On Mon, Aug 19, 2019 at 06:52:45PM -0500, Bjorn Helgaas wrote: > > Right, it looks like we need some sort of flag there anyway. > > Does this mean you're looking at getting rid of "has_secondary_link", > you think it's impossible, or you think it's not worth trying? I was of thinking that we need

Re: [PATCH v3 0/8] thunderbolt: Intel Ice Lake support

2019-08-19 Thread Mika Westerberg
On Mon, Aug 19, 2019 at 04:29:35PM +, mario.limoncie...@dell.com wrote: > > -Original Message- > > From: Mika Westerberg > > Sent: Monday, August 19, 2019 6:22 AM > > To: linux-kernel@vger.kernel.org > > Cc: Andreas Noever; Michael Jamet; Yehezkel

[PATCH v3 1/8] thunderbolt: Correct path indices for PCIe tunnel

2019-08-19 Thread Mika Westerberg
("thunderbolt: Extend tunnel creation to more than 2 adjacent switches") Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat --- drivers/thunderbolt/tunnel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thunderbolt/tunnel.c b/drivers/thunderbolt/tunn

[PATCH v3 8/8] ACPI / property: Add two new Thunderbolt property GUIDs to the list

2019-08-19 Thread Mika Westerberg
Ice Lake Thunderbolt controller includes two new device property compatible properties that we need to be able to extract in the driver so add them to the growing array of GUIDs. Signed-off-by: Mika Westerberg Acked-by: Rafael J. Wysocki --- drivers/acpi/property.c | 6 ++ 1 file changed

[PATCH v3 6/8] thunderbolt: Expose active parts of NVM even if upgrade is not supported

2019-08-19 Thread Mika Westerberg
useful information directly from Linux. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat --- drivers/thunderbolt/switch.c | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index

[PATCH v3 0/8] thunderbolt: Intel Ice Lake support

2019-08-19 Thread Mika Westerberg
means to do so. * Clarified comment in icl_nhi_suspend() * Added clarification comment to icl_nhi_force_power() * Use "Thunderbolt" instead of "TBT" in new GUID entries * Added reviewed tag from Yehezkel Mika Westerberg (8): thunderbolt: Correct path indices for

[PATCH v3 4/8] thunderbolt: Do not fail adding switch if some port is not implemented

2019-08-19 Thread Mika Westerberg
port 5 in eeprom.c. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat --- drivers/thunderbolt/ctl.c| 23 +++ drivers/thunderbolt/eeprom.c | 4 drivers/thunderbolt/switch.c | 8 +++- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a

[PATCH v3 2/8] thunderbolt: Move NVM upgrade support flag to struct icm

2019-08-19 Thread Mika Westerberg
This is depends on the controller and on the platform/CPU we are running. Move it to struct icm so we can set it per controller. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat --- drivers/thunderbolt/icm.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions

[PATCH v3 3/8] thunderbolt: Use 32-bit writes when writing ring producer/consumer

2019-08-19 Thread Mika Westerberg
-by: Mika Westerberg Reviewed-by: Yehezkel Bernat --- drivers/thunderbolt/nhi.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c index 27fbe62c7ddd..9c782706e652 100644 --- a/drivers/thunderbolt/nhi.c

[PATCH v3 7/8] thunderbolt: Add support for Intel Ice Lake

2019-08-19 Thread Mika Westerberg
exit are possible. The driver is responsible of sending Go2Sx command through link controller mailbox when system enters Sx states (suspend-to-mem/disk). Rest of the ICM firwmare flows follow Titan Ridge. Signed-off-by: Raanan Avargil Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat

[PATCH v3 5/8] thunderbolt: Hide switch attributes that are not set

2019-08-19 Thread Mika Westerberg
Thunderbolt host routers may not always contain DROM that includes device identification information. This is mostly needed for Ice Lake systems but some Falcon Ridge controllers on PCs also do not have DROM. In that case hide the identification attributes. Signed-off-by: Mika Westerberg

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

2019-08-19 Thread Mika Westerberg
On Sun, Aug 18, 2019 at 10:28:13PM -0400, Sinan Kaya wrote: > On 8/12/2019 10:31 AM, Mika Westerberg wrote: > > +int pciehp_card_present_or_link_active(struct controller *ctrl) > > { > > - return pciehp_card_present(ctrl) || pciehp_check_link_active(ctrl); > > +

Re: [PATCH] pinctrl: intel: remap the pin number to gpio offset for irq enabled pin

2019-08-19 Thread Mika Westerberg
ling the issue! > This commit maps the PIN number to GPIO offset first in the > intel_pinctrl_should_save() to make sure the values for the > specific PINs can be correctly saved and then restored. > > Signed-off-by: Chris Chiu Acked-by: Mika Westerberg I think this should also hav

Re: [PATCH v2 7/8] thunderbolt: Add support for Intel Ice Lake

2019-08-13 Thread Mika Westerberg
On Tue, Aug 13, 2019 at 07:49:35PM +0300, Mika Westerberg wrote: > > If so, I'd suggest: > > > > /* Keep the domain powered while veto is in effect */ > > if (cmpxchg(&icm->veto, false, true)) > > pm_runtime_get(&tb->dev); >

Re: [PATCH v2 7/8] thunderbolt: Add support for Intel Ice Lake

2019-08-13 Thread Mika Westerberg
On Tue, Aug 13, 2019 at 06:10:38PM +0200, Lukas Wunner wrote: > On Mon, Aug 12, 2019 at 03:38:46PM +0300, Mika Westerberg wrote: > > +static void icm_veto_begin(struct tb *tb) > > +{ > > + struct icm *icm = tb_priv(tb); > > + > > + if (!icm->veto

[PATCH] PCI: Use minimum window alignment when calculating memory window size

2019-08-12 Thread Mika Westerberg
g size to min_align is not necessary. For this reason make the size calculation to use minimum memory window alignment (1M) instead. The resulting resource allocation matches the initial allocation done by the BIOS. Signed-off-by: Mika Westerberg --- The previous RFC version can be found here:

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

2019-08-12 Thread Mika Westerberg
e can prevent this from happening by checking the return value of pcie_capability_read_word() and if it is PCIBIOS_DEVICE_NOT_FOUND stop performing any hot-removal activities. Signed-off-by: Mika Westerberg --- No changes from the previous version. drivers/pci/hotplug/pciehp.h | 6 +++-

[PATCH v2 1/2] PCI: pciehp: Do not disable interrupt twice on suspend

2019-08-12 Thread Mika Westerberg
. Fixes: 9c62f0bfb832 ("PCI: pciehp: Implement runtime PM callbacks") Reported-by: Kai-Heng Feng Tested-by: Kai-Heng Feng Signed-off-by: Mika Westerberg Reviewed-by: Rafael J. Wysocki --- Changes from previous version: * Move .resume inside CONFIG_PM_SLEEP * Added tags from Ka

[PATCH v2 0/8] thunderbolt: Intel Ice Lake support

2019-08-12 Thread Mika Westerberg
ed reviewed tag from Yehezkel Mika Westerberg (8): thunderbolt: Correct path indices for PCIe tunnel thunderbolt: Move NVM upgrade support flag to struct icm thunderbolt: Use 32-bit writes when writing ring producer/consumer thunderbolt: Do not fail adding switch if some port is not implemented

[PATCH v2 7/8] thunderbolt: Add support for Intel Ice Lake

2019-08-12 Thread Mika Westerberg
exit are possible. The driver is responsible of sending Go2Sx command through link controller mailbox when system enters Sx states (suspend-to-mem/disk). Rest of the ICM firwmare flows follow Titan Ridge. Signed-off-by: Raanan Avargil Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat

[PATCH v2 5/8] thunderbolt: Hide switch attributes that are not set

2019-08-12 Thread Mika Westerberg
Thunderbolt host routers may not always contain DROM that includes device identification information. This is mostly needed for Ice Lake systems but some Falcon Ridge controllers on PCs also do not have DROM. In that case hide the identification attributes. Signed-off-by: Mika Westerberg

[PATCH v2 2/8] thunderbolt: Move NVM upgrade support flag to struct icm

2019-08-12 Thread Mika Westerberg
This is depends on the controller and on the platform/CPU we are running. Move it to struct icm so we can set it per controller. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat --- drivers/thunderbolt/icm.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions

[PATCH v2 3/8] thunderbolt: Use 32-bit writes when writing ring producer/consumer

2019-08-12 Thread Mika Westerberg
-by: Mika Westerberg Reviewed-by: Yehezkel Bernat --- drivers/thunderbolt/nhi.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c index 27fbe62c7ddd..9c782706e652 100644 --- a/drivers/thunderbolt/nhi.c

[PATCH v2 8/8] ACPI / property: Add two new Thunderbolt property GUIDs to the list

2019-08-12 Thread Mika Westerberg
Ice Lake Thunderbolt controller includes two new device property compatible properties that we need to be able to extract in the driver so add them to the growing array of GUIDs. Signed-off-by: Mika Westerberg --- drivers/acpi/property.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a

[PATCH v2 4/8] thunderbolt: Do not fail adding switch if some port is not implemented

2019-08-12 Thread Mika Westerberg
port 5 in eeprom.c. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat --- drivers/thunderbolt/ctl.c| 23 +++ drivers/thunderbolt/eeprom.c | 4 drivers/thunderbolt/switch.c | 8 +++- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a

[PATCH v2 6/8] thunderbolt: Expose active parts of NVM even if upgrade is not supported

2019-08-12 Thread Mika Westerberg
useful information directly from Linux. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat --- drivers/thunderbolt/switch.c | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index

[PATCH v2 1/8] thunderbolt: Correct path indices for PCIe tunnel

2019-08-12 Thread Mika Westerberg
("thunderbolt: Extend tunnel creation to more than 2 adjacent switches") Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat --- drivers/thunderbolt/tunnel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thunderbolt/tunnel.c b/drivers/thunderbolt/tunn

Re: [PATCH 3/8] thunderbolt: Use 32-bit writes when writing ring producer/consumer

2019-08-08 Thread 'Mika Westerberg'
On Wed, Aug 07, 2019 at 04:41:30PM +, David Laight wrote: > From: 'Mika Westerberg' [mailto:mika.westerb...@linux.intel.com] > > Sent: 07 August 2019 17:36 > > > > On Wed, Aug 07, 2019 at 04:22:26PM +, David Laight wrote: > > > From: Mika Weste

Re: [PATCH 3/8] thunderbolt: Use 32-bit writes when writing ring producer/consumer

2019-08-07 Thread 'Mika Westerberg'
On Wed, Aug 07, 2019 at 04:22:26PM +, David Laight wrote: > From: Mika Westerberg > > Sent: 07 August 2019 17:14 > > To: David Laight > > > > On Fri, Jul 05, 2019 at 04:04:19PM +, David Laight wrote: > > > > Really a matter of taste, but may

Re: [PATCH 3/8] thunderbolt: Use 32-bit writes when writing ring producer/consumer

2019-08-07 Thread Mika Westerberg
On Fri, Jul 05, 2019 at 04:04:19PM +, David Laight wrote: > > Really a matter of taste, but maybe you want to consider having a single > > function, with a 3rd parameter, bool is_tx. > > The calls here will be unified to: > > ring_iowrite(ring, ring->head, ring->is_tx); > > (No conditio

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