Add Thunderbolt tree to linux-next

2018-12-05 Thread Mika Westerberg
Hi Stephen, I maintain the Thunderbolt tree that gets merged to mainline via Greg's char-misc tree. I would like to get the tree included in linux-next to get wider coverage before it hits Greg's tree. Can you please include branches 'fixes' and 'next' from:

Re: [PATCH v5 09/15] i2c: acpi: Introduce i2c_acpi_get_i2c_resource() helper

2018-11-30 Thread Mika Westerberg
On Fri, Nov 30, 2018 at 12:49:50PM +0100, Wolfram Sang wrote: > > > > Is this something we have to live with or which can be cleaned up > > > somewhen? > > > > My opinion that we might need something like > > drivers/acpi/acpi_i2c_lib.c > > drivers/acpi/acpi_gpio_lib.c > > etc. > > > > Collect

Re: [PATCH] PCI: pciehp: Report degraded links via link bandwidth notification

2018-11-29 Thread Mika Westerberg
On Thu, Nov 29, 2018 at 07:00:58PM +, alex_gagn...@dellteam.com wrote: > >> + if (link_status & PCI_EXP_LNKSTA_LBMS) { > >> + if (pdev->subordinate && pdev->subordinate->self) > >> + endpoint = pdev->subordinate->self; > > > > Hmm, I thought pdev->subordinate->self

Re: [PATCH] PCI: pciehp: Report degraded links via link bandwidth notification

2018-11-29 Thread Mika Westerberg
Hi Alexandru, On Wed, Nov 28, 2018 at 06:08:24PM -0600, Alexandru Gagniuc wrote: > A warning is generated when a PCIe device is probed with a degraded > link, but there was no similar mechanism to warn when the link becomes > degraded after probing. The Link Bandwidth Notification provides this >

[PATCH v3 4/4] thunderbolt: Export IOMMU based DMA protection support to userspace

2018-11-29 Thread Mika Westerberg
s/security/information-protection/kernel-dma-protection-for-thunderbolt Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat --- .../ABI/testing/sysfs-bus-thunderbolt | 9 + Documentation/admin-guide/thunderbolt.rst | 20 +++ drivers/thunderbol

[PATCH v3 3/4] iommu/vt-d: Do not enable ATS for untrusted devices

2018-11-29 Thread Mika Westerberg
d. In case this turns out to cause performance issues we may selectively allow ATS based on user decision but currently use big hammer and disable it completely to be on the safe side. [1] https://www.repository.cam.ac.uk/handle/1810/274352 Signed-off-by: Mika Westerberg Reviewed-by: Ashok Raj

[PATCH v3 0/4] PCI / iommu / thunderbolt: IOMMU based DMA protection

2018-11-29 Thread Mika Westerberg
d not change the code with the exception of few comments and rename of the flag. Let me know if that's not the case anymore. Lu Baolu (1): iommu/vt-d: Force IOMMU on for platform opt in hint Mika Westerberg (3): PCI / ACPI: Identify untrusted PCI devices iommu/vt-d: Do not enable ATS

[PATCH v3 1/4] PCI / ACPI: Identify untrusted PCI devices

2018-11-29 Thread Mika Westerberg
eat resulting when these GUIDs are treated equivalent. [1] https://docs.microsoft.com/en-us/windows-hardware/drivers/pci/dsd-for-pcie-root-ports#identifying-externally-exposed-pcie-root-ports Signed-off-by: Mika Westerberg --- drivers/acpi/property.c | 11 +++ drivers/pci/pci-acpi.c | 1

Re: [PATCH v5 05/15] i2c: acpi: Return error pointers from i2c_acpi_new_device()

2018-11-28 Thread Mika Westerberg
we would like > to > bail out if the error seems unrecoverable, such as invalid argument supplied. > To achieve this, return error pointer in some cases. > > Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg

Re: [PATCH v5 09/15] i2c: acpi: Introduce i2c_acpi_get_i2c_resource() helper

2018-11-28 Thread Mika Westerberg
On Wed, Nov 28, 2018 at 01:45:29PM +0200, Andy Shevchenko wrote: > Besides current two users one more is coming. Definitely makes sense to > introduce a helper. > > No functional change intended. > > Signed-off-by: Andy Shevchenko > Reviewed-by: Hans de Goede Acked-by: Mika Westerberg

Re: [PATCH v2 05/13] i2c: acpi: Return error pointers from i2c_acpi_new_device()

2018-11-27 Thread Mika Westerberg
On Tue, Nov 27, 2018 at 10:16:25AM +0100, Hans de Goede wrote: > One problem is that i2c_new_device() currently simply returns NULL on all > errors. Andy, you could take a look how much work it is to make that return > an ERR_PTR too, or just check its return value and return ERR_PTR(-ENXIO) if >

Re: [PATCH v2 07/13] i2c: acpi: Introduce i2c_acpi_get_i2c_resource() helper

2018-11-27 Thread Mika Westerberg
On Mon, Nov 26, 2018 at 05:08:52PM +0200, Andy Shevchenko wrote: > Besides current two users one more is coming. Definitely makes sense to > introduce a helper. > > No functional change intended. > > Signed-off-by: Andy Shevchenko > Reviewed-by: Hans de Goede > --- >

Re: [PATCH v2 06/13] i2c: acpi: Use ACPI_FAILURE instead of !ACPI_SUCCESS

2018-11-27 Thread Mika Westerberg
On Mon, Nov 26, 2018 at 05:08:51PM +0200, Andy Shevchenko wrote: > Convert to use ACPI_FAILURE instead of !ACPI_SUCCESS. > > Signed-off-by: Andy Shevchenko > Reviewed-by: Hans de Goede Acked-by: Mika Westerberg

Re: [PATCH v2 05/13] i2c: acpi: Return error pointers from i2c_acpi_new_device()

2018-11-27 Thread Mika Westerberg
On Mon, Nov 26, 2018 at 05:08:50PM +0200, Andy Shevchenko wrote: > The caller would like to know the reason why the i2c_acpi_new_device() fails. > For example, if adapter is not available, it might be in the future and we > would like to re-probe the clients again. But at the same time we would

Re: [PATCH 1/1] thunderbolt: Prevent root port runtime suspend during NVM upgrade

2018-11-26 Thread Mika Westerberg
On Mon, Nov 26, 2018 at 11:46:39AM +0100, Greg Kroah-Hartman wrote: > On Mon, Nov 26, 2018 at 12:47:46PM +0300, Mika Westerberg wrote: > > During NVM upgrade process the host router is hot-removed for a short > > while. During this time it is possible that the root port is moved

[PATCH v2 2/4] iommu/vt-d: Force IOMMU on for platform opt in hint

2018-11-26 Thread Mika Westerberg
. This can be turned off by adding "intel_iommu=off" in the kernel command line, if any problems are found. [1] https://docs.microsoft.com/en-us/windows/security/information-protection/kernel-dma-protection-for-thunderbolt Cc: Jacob Pan Cc: Sohil Mehta Signed-off-by: Lu Baolu Signed-of

[PATCH 0/1] thunderbolt: Fix for v4.20-rc5

2018-11-26 Thread Mika Westerberg
runtime suspend during NVM upgrade (2018-11-15 13:28:09 +0300) thunderbolt: Fix for v4.20-rc5 Mika Westerberg (1): thunderbolt: Prevent root port runtime suspend

[PATCH 1/1] thunderbolt: Prevent root port runtime suspend during NVM upgrade

2018-11-26 Thread Mika Westerberg
port goes into D3cold and never wakes up unless userspace does PCI config space access, such as running 'lscpi'. For this reason we explicitly prevent the root port from runtime suspending during NVM upgrade. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/switch.c | 40

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-15 Thread Mika Westerberg
On Thu, Nov 15, 2018 at 08:27:41PM +0100, Lukas Wunner wrote: > On Thu, Nov 15, 2018 at 09:10:26PM +0200, Mika Westerberg wrote: > > I was thinking we could cover all these with is_external filling them > > based on the _DSD or some other means in the kernel. > > >

Re: [PATCH] thunderbolt: Prevent root port runtime suspend during NVM upgrade

2018-11-15 Thread Mika Westerberg
On Wed, Nov 07, 2018 at 02:17:14PM +0300, Mika Westerberg wrote: > During NVM upgrade process the host router is hot-removed for a short > while. During this time it is possible that the root port is moved into > D3cold which would be fine if the root port could trigger PME on itself.

[PATCH] PCI: pciehp: Assign ctrl->slot_ctrl before writing it to hardware

2018-11-14 Thread Mika Westerberg
Fix by moving ctrl->slot_ctrl assignment to happen before it is written to the hardware. Fixes: 720d6a671a6e ("PCI: pciehp: Do not handle events if interrupts are masked") Reported-by: Shameerali Kolothum Thodi Signed-off-by: Mika Westerberg --- drivers/pci/hotplug/pciehp_hpc.c

[PATCH] thunderbolt: Prevent root port runtime suspend during NVM upgrade

2018-11-07 Thread Mika Westerberg
port goes into D3cold and never wakes up unless userspace does PCI config space access, such as running 'lscpi'. For this reason we explicitly prevent the root port from runtime suspending during NVM upgrade. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/switch.c | 40

Re: [PATCH] thunderbolt: fix a missing-check bug

2018-10-22 Thread Mika Westerberg
On Sat, Oct 20, 2018 at 03:15:56PM -0500, Wenwen Wang wrote: > In tb_ring_poll(), the flag of the frame, i.e., > 'ring->descriptors[ring->tail].flags', is checked to see whether the frame > is completed. If yes, the frame including the flag will be read from the > ring and returned to the caller.

Re: [PATCH] thunderbolt: fix a missing-check bug

2018-10-22 Thread Mika Westerberg
On Sat, Oct 20, 2018 at 02:47:49PM -0500, Wenwen Wang wrote: > In ring_work(), the first while loop is used to collect all completed > frames from the ring buffer. In each iteration of this loop, the flag of > the frame, i.e., 'ring->descriptors[ring->tail].flags' is firstly check to > see whether

Re: [PATCH] thunderbolt: fix a missing-check bug

2018-10-22 Thread Mika Westerberg
Hi, On Sat, Oct 20, 2018 at 01:38:18PM -0500, Wenwen Wang wrote: > In icm_copy(), the packet id 'hdr->packet_id' is firstly compared against > 'req->npackets'. If it is less than 'req->npackets', the received packet. > i.e., 'pkg->buffer', is then copied to 'req->response + offset' through >

Re: [PATCH] thunderbolt: Fix a missing-check bug

2018-10-22 Thread Mika Westerberg
Hi, On Sat, Oct 20, 2018 at 12:55:51PM -0500, Wenwen Wang wrote: > In tb_ctl_rx_callback(), the checksum of the received control packet is > calculated on 'pkg->buffer' through tb_crc() and saved to 'crc32', Then, > 'crc32' is compared with the received checksum to confirm the integrity of > the

Re: [PATCH] thunderbolt: Fix a missing-check bug

2018-10-22 Thread Mika Westerberg
On Fri, Oct 19, 2018 at 04:25:01PM -0500, Wenwen Wang wrote: > Hi Mika, Hi, > Thanks for your response. The current version of the code assumes that > the Thunderbolt controller behaves as expected, e.g., the host > controller should not touch the data after it is marked ready. > However, it is

Re: [PATCH] thunderbolt: Fix a missing-check bug

2018-10-18 Thread Mika Westerberg
Hi Wenwen, On Wed, Oct 17, 2018 at 09:00:29AM -0500, Wenwen Wang wrote: > In tb_cfg_copy(), the header of the received control package, which is in > the buffer 'pkg->buffer', is firstly parsed through parse_header() to make > sure the header is in the expected format. In parse_header(), the

Re: [PATCH v4] spi: spi-ep93xx: Use dma_data_direction for ep93xx_spi_dma_{finish,prepare}

2018-10-08 Thread Mika Westerberg
avoid using > an explicit cast, add a simple function, ep93xx_dma_data_to_trans_dir, > to safely map between the two types because they are not 1 to 1 in > meaning. > > Signed-off-by: Nathan Chancellor Reviewed-by: Mika Westerberg

Re: [PATCH v3] spi: spi-ep93xx: Use dma_data_direction for ep93xx_spi_dma_{finish,prepare}

2018-10-08 Thread Mika Westerberg
avoid using > an explicit cast, add a simple function, ep93xx_dma_data_to_trans_dir, > to safely map between the two types because they are not 1 to 1 in > meaning. > > Signed-off-by: Nathan Chancellor Looks good to me, Reviewed-by: Mika Westerberg

Re: [PATCH] spi: spi-ep93xx: Change dir type in ep93xx_spi_dma_{finish,prepare}

2018-10-05 Thread Mika Westerberg
Hi, On Thu, Oct 04, 2018 at 11:32:47AM +0100, Mark Brown wrote: > On Wed, Oct 03, 2018 at 07:39:26PM -0700, Nathan Chancellor wrote: > > Clang warns when one enumerated type is implicitly converted to another. > > > > drivers/spi/spi-ep93xx.c:342:62: warning: implicit conversion from > >

[PATCH 5/5] thunderbolt: Add Intel as copyright holder

2018-10-01 Thread Mika Westerberg
functional changes intended. Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat --- drivers/thunderbolt/cap.c | 3 ++- drivers/thunderbolt/ctl.c | 3 ++- drivers/thunderbolt/ctl.h | 3 ++- drivers/thunderbolt/eeprom.c | 3 ++- drivers/thunderbolt/nhi.c | 3 ++- drivers/t

[PATCH 4/5] thunderbolt: Convert rest of the driver files to use SPDX identifier

2018-10-01 Thread Mika Westerberg
This gets rid of the licence boilerplate duplicated in each file. While there fix doubled space in domain.c author line. No functional changes intended. Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat --- drivers/thunderbolt/dma_port.c | 5 + drivers/thunderbolt/dma_port.h | 5

[PATCH 2/5] thunderbolt: Make the driver less verbose

2018-10-01 Thread Mika Westerberg
is untouched. Logging can be easily re-enabled by passing "thunderbolt.dyndbg" in the kernel command line (or using the corresponding control file runtime). Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat --- drivers/thunderbolt/ctl.c| 6 ++-- drivers/thunderbolt/eep

[PATCH 1/5] thunderbolt: Remove a meaningless NULL pointer check before dma_pool_destroy

2018-10-01 Thread Mika Westerberg
From: zhong jiang dma_pool_destroy() already takes NULL pointer into account so there is no need to check that again in tb_ctl_free(). Signed-off-by: zhong jiang [mw: reword commit log a bit] Signed-off-by: Mika Westerberg --- drivers/thunderbolt/ctl.c | 3 +-- 1 file changed, 1 insertion

[PATCH 3/5] thunderbolt: Print connected devices

2018-10-01 Thread Mika Westerberg
as well as developers because it immediately shows the actual device that was connected. This patch adds printing of the actual connected devices to the driver. Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat --- drivers/thunderbolt/switch.c | 11 +++ 1 file changed, 11

[PATCH 0/5] thunderbolt: Changes for v4.20 merge window

2018-10-01 Thread Mika Westerberg
) thunderbolt: Changes for v4.20 merge window Mika Westerberg (4): thunderbolt: Make the driver less verbose thunderbolt: Print connected devices thunderbolt

Re: [PATCH] platform/x86: intel-wmi-thunderbolt: Add dynamic debugging

2018-09-26 Thread Mika Westerberg
> https://github.com/hughsie/fwupd/commit/ef6f1d76983c9b66 > https://github.com/hughsie/fwupd/commit/c07ce5b4889a5384 > > To allow easier debugging of this situation add output that can be turned > on with dynamic debugging to better root cause this problem. > > Suggested-by:

Re: sdhci driver card-detect is broken because gpiolib can't fallback to _CRS?

2018-09-26 Thread Mika Westerberg
Hi, On Tue, Sep 25, 2018 at 01:54:57PM -0700, Rajat Jain wrote: > * Use con_id=NULL if it is dealing with a legacy BIOS (i.e. no _DSD > properties in the ACPI). > * Use con_id= if it is dealing with a modern BIOS (i.e. > which provides _DSD for the property) Or you can use con_id= everywhere

Re: [PATCH] gpio: mockup: use device properties instead of platform_data

2018-09-25 Thread Mika Westerberg
On Tue, Sep 25, 2018 at 10:53:30AM +0200, Linus Walleij wrote: > On Mon, Sep 24, 2018 at 9:35 AM Bartosz Golaszewski wrote: > > niedz., 23 wrz 2018 o 13:17 Bartosz Golaszewski napisaƂ(a): > > > > > > Some users want to introduce device tree support to the mockup driver. > > > Let's make it

[PATCH 1/2] thunderbolt: Do not handle ICM events after domain is stopped

2018-09-24 Thread Mika Westerberg
ned-off-by: Mika Westerberg --- drivers/thunderbolt/icm.c | 49 --- 1 file changed, 20 insertions(+), 29 deletions(-) diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c index e1e264a9a4c7..28fc4ce75edb 100644 --- a/drivers/thunderbolt/icm.c ++

[PATCH 2/2] thunderbolt: Initialize after IOMMUs

2018-09-24 Thread Mika Westerberg
driver initialization happen at rootfs level. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/nhi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c index 88cff05a1808..5cd6bdfa068f 100644 --- a/drivers/thunderbolt/nhi.c

[PATCH 0/2] thunderbolt: Fixes for v4.19-rc6

2018-09-24 Thread Mika Westerberg
Mika Westerberg (2): thunderbolt: Do not handle ICM events after domain is stopped thunderbolt: Initialize after IOMMUs drivers/thunderbolt/icm.c | 49 --- drivers/thunderbolt/nhi.c | 2 +- 2

Re: [PATCH v2 0/4] thunderbolt: Miscellaneous cleanups

2018-09-21 Thread Mika Westerberg
On Thu, Sep 20, 2018 at 01:33:19PM +0300, Yehezkel Bernat wrote: > On Mon, Sep 17, 2018 at 5:43 PM Mika Westerberg > wrote: > > > > Hi all, > > > > Here are a couple of changes which have been in my TODO list some time > > already but have not had time to make

Re: [PATCH] pinctrl: intel: Do pin translation in other GPIO operations as well

2018-09-21 Thread Mika Westerberg
On Thu, Sep 20, 2018 at 08:26:25AM -0700, Linus Walleij wrote: > On Tue, Sep 18, 2018 at 8:36 AM Mika Westerberg > wrote: > > > For some reason I thought GPIOLIB handles translation from GPIO ranges > > to pinctrl pins but it turns out not to be the case. This mean

Re: [PATCH 5/5] MAINTAINERS: Add Lukas Wunner as co-maintainer of thunderbolt

2018-09-19 Thread Mika Westerberg
On Tue, Sep 18, 2018 at 12:34:16AM +0200, Andreas Noever wrote: > On Thu, Sep 13, 2018 at 11:00 AM Mika Westerberg > wrote: > > > > On Mon, Sep 10, 2018 at 12:33:33PM +0300, Mika Westerberg wrote: > > > Hi Lukas, > > > > > > I'm includin

Re: [PATCH] pinctrl: intel: Do pin translation in other GPIO operations as well

2018-09-19 Thread Mika Westerberg
On Tue, Sep 18, 2018 at 03:04:23PM -0700, Rajat Jain wrote: > On Tue, Sep 18, 2018 at 8:36 AM Mika Westerberg > wrote: > > > > For some reason I thought GPIOLIB handles translation from GPIO ranges > > to pinctrl pins but it turns out not to be the case. This means that &

Re: [PATCH] pinctrl: intel: Do pin translation in other GPIO operations as well

2018-09-19 Thread Mika Westerberg
On Tue, Sep 18, 2018 at 03:14:44PM -0700, Rajat Jain wrote: > Also consider fixing the checkpatch warning: > > Errors: > * checkpatch.pl errors/warnings > > WARNING: Prefer 'unsigned int' to bare use of 'unsigned' > #48: FILE:

Re: [RFC/PATCH 4/5] gpiolib: add support for fetching descriptors from static properties

2018-09-19 Thread Mika Westerberg
On Tue, Sep 18, 2018 at 10:04:18AM -0700, Dmitry Torokhov wrote: > I am not sure how that would work, as there are multiple properties in > that child array, so we can't simply take the first entry or assume that > all entries describe GPIOs. Here is the fuller example: > > static const struct

[PATCH] pinctrl: intel: Do pin translation in other GPIO operations as well

2018-09-18 Thread Mika Westerberg
. Fix this in the same way we did for lock/unlock IRQ operations and translate the GPIO number to pin before using it. Fixes: a60eac3239f0 ("pinctrl: intel: Allow custom GPIO base for pad groups") Reported-by: Rajat Jain Signed-off-by: Mika Westerberg --- drivers/pinctrl/intel/pinct

Re: pinctrl-icelake: driver writes to wrong offsets?

2018-09-18 Thread Mika Westerberg
On Tue, Sep 18, 2018 at 11:31:57AM +0300, Mika Westerberg wrote: > > As you can see in the above example, when I export the pins and change > > the directions from "in" to "out" PADCFG get updated correctly for pin > > 18, but when writing the value,

Re: [RFC/PATCH 4/5] gpiolib: add support for fetching descriptors from static properties

2018-09-18 Thread Mika Westerberg
Hi, On Mon, Sep 17, 2018 at 11:16:02AM -0700, Dmitry Torokhov wrote: > Now that static device properties understand notion of child nodes, let's > teach gpiolib to tie such children and machine GPIO descriptor tables. > We will continue using a single table for entire device, but instead of >

Re: pinctrl-icelake: driver writes to wrong offsets?

2018-09-18 Thread Mika Westerberg
On Mon, Sep 17, 2018 at 11:16:41AM -0700, Rajat Jain wrote: > On Mon, Sep 17, 2018 at 1:13 AM Mika Westerberg > wrote: > > > > On Fri, Sep 14, 2018 at 05:18:34PM -0700, Rajat Jain wrote: > > > This is to report what I think is a problem in the pinctrl-icelake >

[PATCH v2 2/4] thunderbolt: Print connected devices

2018-09-17 Thread Mika Westerberg
as well as developers because it immediately shows the actual device that was connected. This patch adds printing of the actual connected devices to the driver. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/switch.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers

[PATCH v2 3/4] thunderbolt: Convert rest of the driver files to use SPDX identifier

2018-09-17 Thread Mika Westerberg
This gets rid of the licence boilerplate duplicated in each file. While there fix doubled space in domain.c author line. No functional changes intended. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/dma_port.c | 5 + drivers/thunderbolt/dma_port.h | 5 + drivers/thunderbolt

[PATCH v2 1/4] thunderbolt: Make the driver less verbose

2018-09-17 Thread Mika Westerberg
is untouched. Logging can be easily re-enabled by passing "thunderbolt.dyndbg" in the kernel command line (or using the corresponding control file runtime). Signed-off-by: Mika Westerberg --- drivers/thunderbolt/ctl.c| 6 ++-- drivers/thunderbolt/eeprom.c | 2 +- drivers/thunder

[PATCH v2 4/4] thunderbolt: Add Intel as copyright holder

2018-09-17 Thread Mika Westerberg
functional changes intended. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/cap.c | 3 ++- drivers/thunderbolt/ctl.c | 3 ++- drivers/thunderbolt/ctl.h | 3 ++- drivers/thunderbolt/eeprom.c | 3 ++- drivers/thunderbolt/nhi.c | 3 ++- drivers/thunderbolt/nhi.h | 3 ++

[PATCH v2 0/4] thunderbolt: Miscellaneous cleanups

2018-09-17 Thread Mika Westerberg
their name which is read from DROM) printed to the system log. Hence the patch 2/4. Mika Westerberg (4): thunderbolt: Make the driver less verbose thunderbolt: Print connected devices thunderbolt: Convert rest of the driver files to use SPDX identifier thunderbolt: Add Intel as copyright holder

Re: [PATCH] pinctrl: cannonlake: Fix gpio base for GPP-E

2018-09-17 Thread Mika Westerberg
d-off-by: Simon Detheridge Indeed, you are correct. Acked-by: Mika Westerberg

Re: pinctrl-icelake: driver writes to wrong offsets?

2018-09-17 Thread Mika Westerberg
On Fri, Sep 14, 2018 at 05:18:34PM -0700, Rajat Jain wrote: > This is to report what I think is a problem in the pinctrl-icelake > driver. It seems that when trying to control GPIO pins GPP_A* and > GPIO_B*, the driver ends up writing to incorrect PADCFG registers. > I've reached this conclusion

Re: pinctrl-icelake: driver writes to wrong offsets?

2018-09-17 Thread Mika Westerberg
On Fri, Sep 14, 2018 at 05:18:34PM -0700, Rajat Jain wrote: > Hi, > > This is to report what I think is a problem in the pinctrl-icelake > driver. It seems that when trying to control GPIO pins GPP_A* and > GPIO_B*, the driver ends up writing to incorrect PADCFG registers. > I've reached this

Re: [REGRESSION][BISECTED] Boot stall related to drivers/pci/hotplug/acpiphp_glue.c

2018-09-17 Thread Mika Westerberg
On Mon, Sep 17, 2018 at 08:58:50AM +0300, Peter Anemone wrote: > Dear kernel developers > I reported a bug at Bugzilla, but Greg Kroah-Hartman pointed me in > mailing lists. Here's my bug report: > > Linux has been unbootable for me from 4.18 upwards. Even the fallback > image does not boot. This

Re: [PATCH 2/2] thunderbolt: Initialize after IOMMUs

2018-09-14 Thread Mika Westerberg
On Mon, Sep 03, 2018 at 04:20:12PM +0300, Mika Westerberg wrote: > If IOMMU is enabled and Thunderbolt driver is built into the kernel > image, it will be probed before IOMMUs are attached to the PCI bus. > Because of this DMA mappings the driver does will not go through IOMMU > and s

Re: [PATCH 1/2] thunderbolt: Do not handle ICM events after domain is stopped

2018-09-14 Thread Mika Westerberg
On Mon, Sep 03, 2018 at 04:20:11PM +0300, Mika Westerberg wrote: > If there is a long chain of devices connected when the driver is loaded > ICM sends device connected event for each and those are put to tb->wq > for later processing. Now if the driver gets unloaded in th

Re: [PATCH 4/5] thunderbolt: Correlate PCI devices with Thunderbolt ports

2018-09-13 Thread Mika Westerberg
On Thu, Sep 13, 2018 at 12:43:03PM +0300, Yehezkel Bernat wrote: > On Mon, Sep 10, 2018 at 12:45 PM Mika Westerberg > wrote: > > > > Hi Lukas, > > > > On Sun, Sep 09, 2018 at 11:42:01PM +0200, Lukas Wunner wrote: > > > Ideas what we can do wi

Re: [PATCH 5/5] MAINTAINERS: Add Lukas Wunner as co-maintainer of thunderbolt

2018-09-13 Thread Mika Westerberg
On Mon, Sep 10, 2018 at 12:33:33PM +0300, Mika Westerberg wrote: > Hi Lukas, > > I'm including Greg here in case I've done something wrong as a maintainer. > Since I've only maintained Thunderbolt quite short time, it may be that > I've done mistakes but certainly I did not d

Re: USB type-C altmode support for UCSI

2018-09-11 Thread Mika Westerberg
On Mon, Sep 10, 2018 at 09:25:48PM +, mario.limoncie...@dell.com wrote: > Also they had said it would be interesting to know if anything newer suffers > this same fault (such as XPS 9370 or Precision 5530). I tried 9370 and it detects the adapter correctly. IIRC I did the same for 5530 and it

Re: [PATCH 5/5] MAINTAINERS: Add Lukas Wunner as co-maintainer of thunderbolt

2018-09-10 Thread Mika Westerberg
On Mon, Sep 10, 2018 at 12:25:14PM +0200, Lukas Wunner wrote: > On Mon, Sep 10, 2018 at 12:33:33PM +0300, Mika Westerberg wrote: > > The reason for making the driver less verbose comes from direct feedback > > from the community. For example: > > > > https://lkml.org

Re: [PATCH 2/5] thunderbolt: Obtain PCI slot number from DROM

2018-09-10 Thread Mika Westerberg
On Sun, Sep 09, 2018 at 11:42:01PM +0200, Lukas Wunner wrote: > +struct tb_drom_entry_pci { > + /* BYTES 0-1 */ > + struct tb_drom_entry_header header; > + /* BYTE 2 */ > + u8 unknown:5; > + u8 slot:3; > + /* BYTES 3-10 are only present on PCIe upstream ports */ > +}

Re: [PATCH 4/5] thunderbolt: Correlate PCI devices with Thunderbolt ports

2018-09-10 Thread Mika Westerberg
Hi Lukas, On Sun, Sep 09, 2018 at 11:42:01PM +0200, Lukas Wunner wrote: > Ideas what we can do with correlation: > > * Represent the relationship between PCI devices and Thunderbolt ports > with symlinks in sysfs. I wonder is that really useful? I don't think we should be adding sysfs entries

Re: [PATCH 5/5] MAINTAINERS: Add Lukas Wunner as co-maintainer of thunderbolt

2018-09-10 Thread Mika Westerberg
Wunner > --- > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index a5b256b25905..8815f4639e58 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -14445,6 +14445,7 @@ F:drivers/platform/x86/thinkpad_acpi.c > > THUNDERBOLT DRIVER > M: Andreas Noever > +M: Lukas Wunner > M: Michael Jamet > M: Mika Westerberg > M: Yehezkel Bernat > -- > 2.18.0

Re: [PATCH 2/2] thunderbolt: Initialize after IOMMUs

2018-09-06 Thread Mika Westerberg
On Thu, Sep 06, 2018 at 01:21:01PM +0200, Lukas Wunner wrote: > On Thu, Sep 06, 2018 at 02:07:56PM +0300, Mika Westerberg wrote: > > On Thu, Sep 06, 2018 at 01:00:49PM +0200, Lukas Wunner wrote: > > > On Thu, Sep 06, 2018 at 01:36:02PM +0300, Mika Westerberg wrote: > >

Re: [PATCH 2/2] thunderbolt: Initialize after IOMMUs

2018-09-06 Thread Mika Westerberg
On Thu, Sep 06, 2018 at 01:00:49PM +0200, Lukas Wunner wrote: > On Thu, Sep 06, 2018 at 01:36:02PM +0300, Mika Westerberg wrote: > > On Thu, Sep 06, 2018 at 10:13:37AM +0200, Lukas Wunner wrote: > > > So with this patch, you rely on the linker ordering nhi_init() after >

Re: [PATCH 1/3] thunderbolt: Make the driver less verbose

2018-09-06 Thread Mika Westerberg
On Thu, Sep 06, 2018 at 10:41:43AM +0200, Lukas Wunner wrote: > On Wed, Sep 05, 2018 at 12:54:51PM +0300, Mika Westerberg wrote: > > On Wed, Sep 05, 2018 at 11:05:10AM +0200, Lukas Wunner wrote: > > > On Mon, Sep 03, 2018 at 04:33:02PM +0300, Mika Westerberg wrote: > >

Re: [PATCH 2/2] thunderbolt: Initialize after IOMMUs

2018-09-06 Thread Mika Westerberg
On Thu, Sep 06, 2018 at 10:13:37AM +0200, Lukas Wunner wrote: > On Wed, Sep 05, 2018 at 12:46:02PM +0300, Mika Westerberg wrote: > > On Wed, Sep 05, 2018 at 10:47:46AM +0200, Lukas Wunner wrote: > > > On Mon, Sep 03, 2018 at 04:20:12PM +0300, Mika Westerberg wrote: > >

Re: USB type-C altmode support for UCSI

2018-09-05 Thread Mika Westerberg
On Wed, Sep 05, 2018 at 04:24:29PM +0300, Heikki Krogerus wrote: > +Mika, Mario, LKML > > On Mon, Sep 03, 2018 at 02:17:46PM +, whitequark wrote: > > After looking through LKML, I've seen that people refer to you when > > discussing issues with USB-C device compatibility. Do you think you > >

Re: [PATCH 1/3] thunderbolt: Make the driver less verbose

2018-09-05 Thread Mika Westerberg
On Wed, Sep 05, 2018 at 11:05:10AM +0200, Lukas Wunner wrote: > On Mon, Sep 03, 2018 at 04:33:02PM +0300, Mika Westerberg wrote: > > Currently the driver logs quite a lot to the system message buffer even > > when doing normal operations. This information is not useful for >

Re: [PATCH 2/2] thunderbolt: Initialize after IOMMUs

2018-09-05 Thread Mika Westerberg
On Wed, Sep 05, 2018 at 10:47:46AM +0200, Lukas Wunner wrote: > On Mon, Sep 03, 2018 at 04:20:12PM +0300, Mika Westerberg wrote: > > If IOMMU is enabled and Thunderbolt driver is built into the kernel > > image, it will be probed before IOMMUs are attached to the PCI bus. > >

Re: [PATCH 3/3] thunderbolt: Add Intel as copyright holder

2018-09-04 Thread Mika Westerberg
On Mon, Sep 03, 2018 at 11:18:49PM +0300, Yehezkel Bernat wrote: > > * Copyright (c) 2014 Andreas Noever > > + * Copyright (C) 2018, Intel Corporation > > Nitpicking: (c) or (C)? > I can't find anything in the documentation and both are found in various > files. I don't think there are any

[PATCH 2/3] thunderbolt: Convert rest of the driver files to use SPDX identifier

2018-09-03 Thread Mika Westerberg
This gets rid of the licence boilerplate duplicated in each file. While there fix doubled space in domain.c author line. No functional changes intended. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/dma_port.c | 5 + drivers/thunderbolt/dma_port.h | 5 + drivers/thunderbolt

[PATCH 1/3] thunderbolt: Make the driver less verbose

2018-09-03 Thread Mika Westerberg
is untouched. Logging can be easily re-enabled by passing "thunderbolt.dyndbg" in the kernel command line (or using the corresponding control file runtime). Signed-off-by: Mika Westerberg --- drivers/thunderbolt/ctl.c| 6 ++-- drivers/thunderbolt/eeprom.c | 2 +- drivers/thunder

[PATCH 3/3] thunderbolt: Add Intel as copyright holder

2018-09-03 Thread Mika Westerberg
functional changes intended. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/cap.c | 3 ++- drivers/thunderbolt/ctl.c | 3 ++- drivers/thunderbolt/ctl.h | 3 ++- drivers/thunderbolt/eeprom.c | 3 ++- drivers/thunderbolt/nhi.c | 3 ++- drivers/thunderbolt/nhi.h | 3 ++

[PATCH 0/3] thunderbolt: Miscellaneous cleanups

2018-09-03 Thread Mika Westerberg
Hi, Here are a couple of changes which have been in my TODO list some time already but have not had time to make a proper patch out of them until now. Mika Westerberg (3): thunderbolt: Make the driver less verbose thunderbolt: Convert rest of the driver files to use SPDX identifier

[PATCH 2/2] thunderbolt: Initialize after IOMMUs

2018-09-03 Thread Mika Westerberg
driver initialization happen at rootfs level. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/nhi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c index 88cff05a1808..5cd6bdfa068f 100644 --- a/drivers/thunderbolt/nhi.c

[PATCH 1/2] thunderbolt: Do not handle ICM events after domain is stopped

2018-09-03 Thread Mika Westerberg
ned-off-by: Mika Westerberg --- drivers/thunderbolt/icm.c | 49 --- 1 file changed, 20 insertions(+), 29 deletions(-) diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c index e1e264a9a4c7..28fc4ce75edb 100644 --- a/drivers/thunderbolt/icm.c ++

Re: [PATCH v2] PCI: Equalize hotplug memory for non/occupied slots

2018-08-31 Thread Mika Westerberg
] > > The calculation for IO (hpiosize) should be similar, but platform > firmwares I've encountered (including QEMU) provide strict allocations > for IO and would not provide free IO resources for hotplug buses > in order to prove this calculation. > > Signed-off-by: Jon Derrick Reviewed-by: Mika Westerberg

Re: [PATCH v1 7/7] MAINTAINERS: Add myself as designated reviewer of Intel MFD PMIC

2018-08-31 Thread Mika Westerberg
. > Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg

Re: [PATCH v1 6/7] mfd: Convert Intel PMIC drivers to use SPDX identifier

2018-08-31 Thread Mika Westerberg
On Thu, Aug 30, 2018 at 07:52:54PM +0300, Andy Shevchenko wrote: > Reduce size of duplicated comments by switching to use SPDX identifier. > > No functional change. > > Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg

Re: [PATCH v1 5/7] mfd: Sort headers alphabetically for Intel PMIC drivers

2018-08-31 Thread Mika Westerberg
On Thu, Aug 30, 2018 at 07:52:53PM +0300, Andy Shevchenko wrote: > Sort headers alphabetically for better maintenance. > > No functional change. > > Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg

Re: [PATCH v1 4/7] mfd: intel_soc_pmic_bxtwc: Chain power button IRQs as well

2018-08-31 Thread Mika Westerberg
ted IRQ chip. > > To address above issues, split power button IRQ to be chained as well. > > Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg

Re: [PATCH v1 3/7] mfd: intel_soc_pmic_crc: Use REGMAP_IRQ_REG() macro

2018-08-31 Thread Mika Westerberg
On Thu, Aug 30, 2018 at 07:52:51PM +0300, Andy Shevchenko wrote: > Instead of open coding each data structure with regmap IRQresources, > use dedicated macro. > > No functional change intended. > > Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg

Re: [PATCH v1 2/7] mfd: intel_soc_pmic_crc: Use DEFINE_RES_IRQ_NAMED() macro

2018-08-31 Thread Mika Westerberg
On Thu, Aug 30, 2018 at 07:52:50PM +0300, Andy Shevchenko wrote: > Instead of open coding each data structure with IRQ resources, > use dedicated macro. > > No functional change intended. > > Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg

Re: [PATCH v1 1/7] mfd: intel_msic: Use DEFINE_RES_IRQ() macro

2018-08-31 Thread Mika Westerberg
-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg

Re: [PATCH] thunderbolt: remove a meaningless null pointer check before dma_pool_destroy

2018-08-20 Thread Mika Westerberg
On Fri, Aug 17, 2018 at 08:24:56PM +0800, zhong jiang wrote: > dma_pool_destroy has taken the null pointer into account. so just > remove the null pointer check. > > Signed-off-by: zhong jiang Applied, thanks!

Re: [PATCH] PCI / ACPI / PM: Resume all bridges on suspend-to-RAM

2018-08-16 Thread Mika Westerberg
case.] > > Fixes: c62ec4610c40 (PM / core: Fix direct_complete handling for devices with > no callbacks) > Reported-by: teika kazura > Tested-by: teika kazura > Link: https://bugzilla.kernel.org/show_bug.cgi?id=200675 > Cc: 4.15+ # 4.15+: 26112ddc254c (PCI / ACPI / PM: > Resume bridges ...) > Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg

Re: [PATCH] ACPI / LPSS: Avoid PM quirks on suspend and resume from hibernation

2018-07-26 Thread Mika Westerberg
and resume from > S3) > Link: https://bugs.launchpad.net/bugs/1774950 > Reported-by: Kai-Heng Feng > Cc: 4.15+ # 4.15+ > Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg

[PATCH v2 6/7] thunderbolt: Add support for runtime PM

2018-07-25 Thread Mika Westerberg
there is a remote wake event (device is connected or disconnected), or when there is access from userspace that requires hardware access. Signed-off-by: Mika Westerberg --- Rebased on top of char-misc-testing which includes 007a74907dee ("thunderbolt: Notify userspace when boot_acl is ch

Re: [PATCH 6/7] thunderbolt: Add support for runtime PM

2018-07-25 Thread Mika Westerberg
On Wed, Jul 25, 2018 at 10:17:01AM +0200, Greg Kroah-Hartman wrote: > On Wed, Jul 25, 2018 at 11:03:20AM +0300, Mika Westerberg wrote: > > When Thunderbolt host controller is set to RTD3 mode (Runtime D3) it is > > present all the time. Because of this it is important to

[PATCH 7/7] thunderbolt: Remove redundant variable 'approved'

2018-07-25 Thread Mika Westerberg
From: Colin Ian King Variable 'approved' is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'approved' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King Signed-off-by: Mika Westerberg --- drivers

[PATCH 6/7] thunderbolt: Add support for runtime PM

2018-07-25 Thread Mika Westerberg
there is a remote wake event (device is connected or disconnected), or when there is access from userspace that requires hardware access. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/domain.c | 42 +++- drivers/thunderbolt/icm.c | 119

  1   2   3   4   5   6   7   8   9   10   >