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

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 lik

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 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 > --- > drivers/i2c/i2c-core-acpi.

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 > i

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 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

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

2018-11-29 Thread Mika Westerberg
e I did 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

[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

[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 R

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 >

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 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 a

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.

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. > > > >

[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

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: git://git.kernel.org/pub/scm/linux/

Re: [PATCH] thunderbolt: fix small typo in variable name

2018-07-07 Thread Mika Westerberg
On Sat, Jul 07, 2018 at 10:19:50AM +0200, Lukas Wunner wrote: > On Tue, Jun 26, 2018 at 04:34:20PM -0700, nathan.d.ciob...@linux.intel.com > wrot> Fixes small variable name typo and the associated > > checkpatch spelling warning > > > > Signed-off-by: Nathan Ciobanu > > --- > > drivers/thunderb

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

2018-07-07 Thread Mika Westerberg
On Sat, Jul 07, 2018 at 03:38:15PM +0200, Lukas Wunner wrote: > On Mon, Jun 18, 2018 at 02:07:31PM +0300, Mika Westerberg wrote: > > --- a/drivers/thunderbolt/domain.c > > +++ b/drivers/thunderbolt/domain.c > > @@ -132,6 +133,8 @@ static ssize_t boot_acl_show(struc

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

2018-07-07 Thread Mika Westerberg
On Sat, Jul 07, 2018 at 04:43:48PM +0200, Lukas Wunner wrote: > On Sat, Jul 07, 2018 at 05:25:53PM +0300, Mika Westerberg wrote: > > On Sat, Jul 07, 2018 at 03:38:15PM +0200, Lukas Wunner wrote: > > > You're setting pm_runtime_no_callbacks() on the domain. A side effect of

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

2018-07-08 Thread Mika Westerberg
On Sat, Jul 07, 2018 at 11:14:01PM +0200, Lukas Wunner wrote: > On Mon, Jun 18, 2018 at 02:07:31PM +0300, Mika Westerberg wrote: > > Implement this using standard Linux runtime PM APIs so that when all the > > children devices are runtime suspended, the Thunderbolt host controller

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

2018-07-08 Thread Mika Westerberg
On Mon, Jul 09, 2018 at 04:20:00AM +, mario.limoncie...@dell.com wrote: > In practice I don't anticipate anyone in the industry outside of Apple wiring > up TBT > with RTD3 unless it's at least Alpine Ridge or newer. I don't think Apple does it even with Alpine Ridge. I have one Macbook here

Re: [PATCH v1 0/4] PCI: shpchp: NULL pointer fix and cleanups

2018-06-26 Thread Mika Westerberg
whole series, Reviewed-by: Mika Westerberg

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

2018-06-26 Thread Mika Westerberg
by: nb.n0...@gmail.com > Tested-by: nb.n0...@gmail.com > Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg

[PATCH 0/1] thunderbolt: Fix for v4.18-rc3

2018-06-26 Thread Mika Westerberg
changed (2018-06-20 16:13:54 +0300) Mika Westerberg (1): thunderbolt: Notify userspace when boot_acl is changed drivers/thunderbolt/domain.c | 4 1 file changed, 4 insertions(+) -- 2.18.0

[PATCH 1/1] thunderbolt: Notify userspace when boot_acl is changed

2018-06-26 Thread Mika Westerberg
e boot_acl attribute is changed. Fixes: 9aaa3b8b4c56 ("thunderbolt: Add support for preboot ACL") Reported-and-tested-by: Christian Kellner Signed-off-by: Mika Westerberg Reviewed-by: Christian Kellner Acked-by: Yehezkel Bernat Cc: sta...@vger.kernel.org --- drivers/thunderbolt/domai

Re: [PATCH] thunderbolt: fix small typo in variable name

2018-06-27 Thread Mika Westerberg
On Tue, Jun 26, 2018 at 04:34:20PM -0700, nathan.d.ciob...@linux.intel.com wrote: > From: Nathan Ciobanu > > Fixes small variable name typo and the associated > checkpatch spelling warning > > Signed-off-by: Nathan Ciobanu Applied to thunderbolt.git/next, thanks!

[PATCH 5/5] thunderbolt: Add support for runtime PM

2018-06-18 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

[PATCH 4/5] thunderbolt: Use correct ICM commands in system suspend

2018-06-18 Thread Mika Westerberg
The correct way to put the ICM into suspend state is to send it NHI_MAILBOX_DRV_UNLOADS mailbox command. NHI_MAILBOX_SAVE_DEVS is not needed on Intel Titan Ridge so we can skip it. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/icm.c | 18 +- 1 file changed, 13

[PATCH 2/5] thunderbolt: Do not unnecessarily call ICM get route

2018-06-18 Thread Mika Westerberg
This command is not really fast and can make resume time slower. We only need to get route again if the link was changed and during initial device connected message. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/icm.c | 35 ++- 1 file changed, 26

[PATCH 1/5] thunderbolt: Use 64-bit DMA mask if supported by the platform

2018-06-18 Thread Mika Westerberg
PCI defaults to 32-bit DMA mask but this device is capable of full 64-bit addressing, so make sure we first try 64-bit DMA mask before falling back to the default 32-bit. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/nhi.c | 8 1 file changed, 8 insertions(+) diff --git a

[PATCH 0/5] thunderbolt: Add support for runtime PM

2018-06-18 Thread Mika Westerberg
. This work is still in progress. Mika Westerberg (5): thunderbolt: Use 64-bit DMA mask if supported by the platform thunderbolt: Do not unnecessarily call ICM get route thunderbolt: No need to take tb->lock in domain suspend/complete thunderbolt: Use correct ICM commands in system susp

[PATCH 3/5] thunderbolt: No need to take tb->lock in domain suspend/complete

2018-06-18 Thread Mika Westerberg
If the connection manager implementation needs to touch the domain structures it ought to take the lock itself. Currently only ICM implements these hooks and it does not need the lock because we there will be no notifications before driver ready message is sent to it. Signed-off-by: Mika

[PATCH] thunderbolt: Notify userspace when boot_acl is changed

2018-06-18 Thread Mika Westerberg
e boot_acl attribute is changed. Fixes: 9aaa3b8b4c56 ("thunderbolt: Add support for preboot ACL") Reported-by: Christian Kellner Signed-off-by: Mika Westerberg --- drivers/thunderbolt/domain.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/thunderbolt/domain.c b/drivers/

Re: [PATCH] thunderbolt: Notify userspace when boot_acl is changed

2018-06-20 Thread Mika Westerberg
On Mon, Jun 18, 2018 at 05:44:04PM +0300, Mika Westerberg wrote: > The commit 9aaa3b8b4c56 ("thunderbolt: Add support for preboot ACL") > introduced boot_acl attribute but missed the fact that now userspace > needs to poll the attribute constantly to find out whether it has &g

Re: [PATCH v1 1/2] PCI: shpchp: Use dev_printk() for OSHP-related messages

2018-06-02 Thread Mika Westerberg
On Sat, Jun 02, 2018 at 12:42:06AM -0500, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > Use dev_printk() for messages related to requesting control of SHPC hotplug > via the OSHP method. > > Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg

Re: [PATCH v1 2/2] PCI: shpchp: Fix AMD POGO identification

2018-06-02 Thread Mika Westerberg
; - all AMD bridges, and > - all devices from any vendor with device ID 0x7458 Good catch. Reviewed-by: Mika Westerberg

Re: [PATCH 0/5] thunderbolt: Add support for runtime PM

2018-07-03 Thread Mika Westerberg
On Mon, Jun 18, 2018 at 02:07:26PM +0300, Mika Westerberg wrote: > Hi all, > > In recent PCs such as Lenovo X1 Carbon 6th generation the Thunderbolt > controller is in RTD3 mode (Runtime D3). This is different from the > previous modes because now the controller is present most

Re: [PATCH] pinctrl: baytrail: Mark expected switch fall-throughs

2018-07-05 Thread Mika Westerberg
292309 ("Missing break in switch") > Signed-off-by: Gustavo A. R. Silva Acked-by: Mika Westerberg

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

2018-06-13 Thread Mika Westerberg
ns out to be problematic for S3 > > (suspend-to-RAM). > > > > To address that issue restore the previous S3 suspend and resume > > behavior of the LPSS to avoid applying PM quirks then. > > > > LGTM, > Reviewed-by: Andy Shevchenko Also, Acked-by: Mika Westerberg

Re: [PATCH] mfd: intel-lpss: Fix Intel Cannon Lake LPSS I2C input clock

2018-05-18 Thread Mika Westerberg
he correct rate. We still share the same 230 ns SDA > hold time value than Sunrisepoint. > > Cc: sta...@vger.kernel.org > Fixes: b418bbff36dd ("mfd: intel-lpss: Add Intel Cannonlake PCI IDs") > Reported-by: Jian-Hong Pan > Reported-by: Chris Chiu > Reported-by: Daniel Drake > Signed-off-by: Jarkko Nikula Acked-by: Mika Westerberg

Re: [PATCH] PCI / PM: Do not clear state_saved for devices that remain suspended

2018-05-18 Thread Mika Westerberg
clear > state_saved in pci_pm_freeze() when smart suspend is set) did for > hibernation.] > > Fixes: c4b65157aeef (PCI / PM: Take SMART_SUSPEND driver flag into account) > Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg

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

2018-08-16 Thread Mika Westerberg
e.] > > 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] 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][next] gpiolib-acpi: remove unused variable 'err', cleans up build warning

2018-12-18 Thread Mika Westerberg
On Tue, Dec 18, 2018 at 12:28:02PM +, Colin King wrote: > From: Colin Ian King > > Variable err is defined but never used. Remove it. Cleans up warning: > > warning: unused variable ‘err’ [-Wunused-variable] > > Signed-off-by: Colin Ian King Acked-by: Mika Westerberg

Re: [RFT][PATCH 0/2] ACPI / PM: Avoid spurious wakeups from non-wakeup GPEs in suspend-to-idle

2018-12-17 Thread Mika Westerberg
n loop of it). This > is done in patch [1/2]. > > Patch [2/2] is just a folllow-up. I tested both patches on Lenovo Carbon X1 6th generation and one new Dell system. Both default to s2idle. I did not see any issues around s2idle with the two patches applied. Tested-by: Mika Westerberg

[GIT PULL] Thunderbolt changes for v4.21

2018-12-10 Thread Mika Westerberg
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 for untrusted devices thunderbolt: Export IOMMU based DMA protection support to userspace

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

2019-01-07 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 --- The original patch was sent 14 Nov 201

[PATCH 1/2] Revert "PCI/PME: Implement runtime PM callbacks"

2019-01-07 Thread Mika Westerberg
r Kallweit Signed-off-by: Mika Westerberg --- drivers/pci/pcie/pme.c | 27 --- 1 file changed, 27 deletions(-) diff --git a/drivers/pci/pcie/pme.c b/drivers/pci/pcie/pme.c index 0dbcf429089f..1a8b85051b1b 100644 --- a/drivers/pci/pcie/pme.c +++ b/drivers/pci/pcie/pme.c

[PATCH 0/2] PCI: Fix runtime PME generation from D3hot

2019-01-07 Thread Mika Westerberg
, that the PCIe hierarchy wakes up immediately after being put into D3cold. This series of two patches tries to fix both issues so that PME wakes up from D3hot and that the hierarchy does not wake up immediately from D3cold. [1] https://www.spinics.net/lists/linux-pci/msg79051.html Mika Wes

[PATCH 2/2] PCI: pciehp: Disable Data Link Layer State Changed event on suspend

2019-01-07 Thread Mika Westerberg
allows the downstream hotplug port to notice when a device is plugged/unplugged. Link: https://bugzilla.kernel.org/show_bug.cgi?id=202103 Fixes: 0e157e528604 ("PCI/PME: Implement runtime PM callbacks") Signed-off-by: Mika Westerberg --- drivers/pci/hotplug/pciehp_hpc.c | 10 -

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

2018-10-08 Thread Mika Westerberg
truct dma_slave_config > and the direction parameter in dmaengine_prep_slave_sg. To 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

[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/swi

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 > > enumerat

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

2018-10-08 Thread Mika Westerberg
truct dma_slave_config > and the direction parameter in dmaengine_prep_slave_sg. To 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] 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 heade

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 n

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 r

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 > memcp

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
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. T

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

2018-09-16 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: 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 conc

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 by

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

[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
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
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

[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

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 >

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 > usin

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,

[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: [PATCH] watchdog: wdat_wdg: fix typo

2021-02-16 Thread Mika Westerberg
On Tue, Feb 16, 2021 at 03:17:27PM +0100, Flavio Suligoi wrote: > Fix the following typo: > > "recommeded" --> "recommended" > "firmare"--> "firmware" > > Signed-off-by: Flavio Suligoi Reviewed-by: Mika Westerberg

Re: NULL pointer dereference in i2c-hid

2014-12-11 Thread Mika Westerberg
On Wed, Dec 10, 2014 at 06:04:51PM +0100, Gabriele Mazzotta wrote: > my laptop uses a touchpad that needs hid-rmi along with i2c-hid to work. > i2c-hid and hid-rmi can be loaded and unloaded independelty from each > other, however since 34f439e4afcd ("HID: i2c-hid: add runtime PM support") > if I u

Re: NULL pointer dereference in i2c-hid

2014-12-11 Thread Mika Westerberg
On Thu, Dec 11, 2014 at 10:58:01AM +0200, Mika Westerberg wrote: > On Wed, Dec 10, 2014 at 06:04:51PM +0100, Gabriele Mazzotta wrote: > > my laptop uses a touchpad that needs hid-rmi along with i2c-hid to work. > > i2c-hid and hid-rmi can be loaded and unloaded independelty from

Re: [PATCH] ACPI / PM: Fix PM initialization for devices that are not present

2015-01-05 Thread Mika Westerberg
ave appeared > after being not present previously, for example), so make it use > the 'valid' flag of the D0 power state as the initial value of > flags.power_manageable for it and call acpi_bus_init_power() to > discover its current power state. > > Signed-off-b

[PATCH 2/2] pinctrl: cherryview: Save and restore pin configs over system sleep

2014-12-04 Thread Mika Westerberg
anymore. This patch saves the pin configuration and interrupt mask registers on suspend and restores them on exit. This should make sure that the previously configured state is still in effect. Signed-off-by: Mika Westerberg --- drivers/pinctrl/intel/pinctrl-cherryview.c | 104

[PATCH 1/2] pinctrl: intel: Pass CONFIG_DEBUG_PINCTRL to drivers

2014-12-04 Thread Mika Westerberg
If the user has selected CONFIG_DEBUG_PINCTRL=y make sure that Intel pinctrl drivers will be compiled with that option as well. Signed-off-by: Mika Westerberg --- drivers/pinctrl/intel/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pinctrl/intel/Makefile b/drivers

Re: [PATCH 2/2] acpi:apd:add AMD ACPI2Platform device support

2014-12-04 Thread Mika Westerberg
On Wed, Dec 03, 2014 at 08:34:32PM +0800, Ken Xue wrote: > This is a new feature to interpret AMD specific ACPI device to > platform device such as I2C, UART found on AMD CZ and later > chipsets. It based on INTEL LPSS and acpi soc. > > Signed-off-by: Ken Xue > --- > arch/x86/Kconfig| 11

Re: [PATCH 1/2] acpi:soc: merge common codes for creating platform device

2014-12-04 Thread Mika Westerberg
le mode 100644 > index 000..25089a0 > --- /dev/null > +++ b/drivers/acpi/acpi_soc.c > @@ -0,0 +1,211 @@ > +/* > + * ACPI SOC support for Intel Lynxpoint LPSS and AMD APD. > + * > + * Copyright (C) 2015, Intel Corporation & AMD Corporation > + * Authors: Ken Xue

Re: [PATCH] spi/pxa2xx: Clear cur_chip pointer before starting next message

2014-12-05 Thread Mika Westerberg
On Thu, Dec 04, 2014 at 10:01:06PM +0100, Robert Jarzmik wrote: > Mika Westerberg writes: > > > Once the current message is finished, the driver notifies SPI core about > > this by calling spi_finalize_current_message(). This function queues next > > message to be transf

Re: [PATCH 1/2] acpi:soc: merge common codes for creating platform device

2014-12-05 Thread Mika Westerberg
On Fri, Dec 05, 2014 at 02:34:46PM +0800, Ken Xue wrote: > On Thu, 2014-12-04 at 15:04 +0200, Mika Westerberg wrote: > > On Wed, Dec 03, 2014 at 08:33:37PM +0800, Ken Xue wrote: > > > This patch is supposed to deliver some common codes for AMD APD and > > > INTEL LPSS.

Re: [PATCH] spi/pxa2xx: Clear cur_chip pointer before starting next message

2014-12-23 Thread Mika Westerberg
On Mon, Dec 01, 2014 at 11:12:46AM +0200, Mika Westerberg wrote: > Once the current message is finished, the driver notifies SPI core about > this by calling spi_finalize_current_message(). This function queues next > message to be transferred. If there are more messages in the que

[PATCH] brcmfmac: Do not crash if platform data is not populated

2014-12-23 Thread Mika Westerberg
tophe Prigent Signed-off-by: Mika Westerberg --- drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c index 3c06e9365949..9880da

Re: [PATCH] brcmfmac: Do not crash if platform data is not populated

2014-12-23 Thread Mika Westerberg
On Tue, Dec 23, 2014 at 04:37:21PM +0100, Arend van Spriel wrote: > On 12/23/14 15:48, Mika Westerberg wrote: > >The driver looks for pdata->oob_irq_supported to find out if wowl can be > >supported. However, not all platforms populate pdata in which case we crash > >th

[PATCH RESEND] spi/pxa2xx: Clear cur_chip pointer before starting next message

2014-12-29 Thread Mika Westerberg
y: Martin Oldfield Signed-off-by: Mika Westerberg Acked-by: Robert Jarzmik --- drivers/spi/spi-pxa2xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 05c623cfb078..23822e7df6c1 100644 --- a/drivers/spi/spi-pxa2xx.c +++

[PATCH] spi/spidev: Convert to use unified device property API

2014-12-29 Thread Mika Westerberg
This will allow the driver to match using DT compatible property if the device has ACPI _HID of "PRP0001" and accompanying "compatible" property listed in _DSD. Signed-off-by: Mika Westerberg --- drivers/spi/spidev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH] i2c / ACPI: Pick the first address if device has multiple

2014-12-29 Thread Mika Westerberg
driver handle rest of the addresses as it wishes. Signed-off-by: Mika Westerberg Cc: Srinivas Pandruvada --- drivers/i2c/i2c-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 39d25a8cb1ad..a06be43b7842 100644 --- a/drivers

Re: [PATCH] spi/spidev: Convert to use unified device property API

2014-12-29 Thread Mika Westerberg
On Mon, Dec 29, 2014 at 04:03:16PM +, Mark Brown wrote: > On Mon, Dec 29, 2014 at 11:41:14AM +0200, Mika Westerberg wrote: > > This will allow the driver to match using DT compatible property if the > > device has ACPI _HID of "PRP0001" and accompanying "compatibl

Re: [PATCH V4 2/2] i2c-designware: Add Intel Baytrail PMIC I2C bus support

2015-01-23 Thread Mika Westerberg
On Thu, Jan 22, 2015 at 12:48:51PM -0800, David E. Box wrote: > > It would be nice if it was possible to compile this as a module. > > In the makefile the driver is now part of the composite object for > I2C_DESIGNWARE_PLATFORM. So if selected it will compile as the platform driver > is compiled.

[PATCH 1/2] HID: i2c-hid: The interrupt should be level sensitive

2015-01-26 Thread Mika Westerberg
river also seems to do the same. Signed-off-by: Mika Westerberg --- drivers/hid/i2c-hid/i2c-hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c index d43e967e7533..8f1dfc5c5d9c 100644 --- a/drivers/hid/i2c-hid/i2c-

[PATCH 2/2] HID: i2c-hid: Add support for GPIO interrupts

2015-01-26 Thread Mika Westerberg
gpios". This is then assumed to be the GPIO that serves as an interrupt for the device. Signed-off-by: Mika Westerberg --- .../devicetree/bindings/hid/hid-over-i2c.txt | 5 +- drivers/hid/i2c-hid/i2c-hid.c | 70 -- 2 files changed, 56 inserti

Re: [PATCH 2/2] HID: i2c-hid: Add support for GPIO interrupts

2015-01-26 Thread Mika Westerberg
On Mon, Jan 26, 2015 at 02:37:24PM +, Mark Rutland wrote: > On Mon, Jan 26, 2015 at 02:29:33PM +0000, Mika Westerberg wrote: > > The HID over I2C specification allows to have the interrupt for a HID > > device to be GPIO instead of directly connected to the IO-APIC. > >

Re: [PATCH 2/2] HID: i2c-hid: Add support for GPIO interrupts

2015-01-26 Thread Mika Westerberg
On Mon, Jan 26, 2015 at 02:50:01PM +, Mark Rutland wrote: > On Mon, Jan 26, 2015 at 02:47:29PM +0000, Mika Westerberg wrote: > > On Mon, Jan 26, 2015 at 02:37:24PM +, Mark Rutland wrote: > > > On Mon, Jan 26, 2015 at 02:29:33PM +0000, Mika Westerberg wrote: > &

Re: [PATCH 2/2] HID: i2c-hid: Add support for GPIO interrupts

2015-01-26 Thread Mika Westerberg
On Mon, Jan 26, 2015 at 04:01:20PM +, Mark Rutland wrote: > On Mon, Jan 26, 2015 at 03:16:37PM +0000, Mika Westerberg wrote: > > On Mon, Jan 26, 2015 at 02:50:01PM +, Mark Rutland wrote: > > > On Mon, Jan 26, 2015 at 02:47:29PM +0000, Mika Westerberg wrote: > > >

Re: [PATCH] i2c: designware: use {readl|writel}_relaxed instead of readl/writel

2015-01-13 Thread Mika Westerberg
iver a lot (and knows other > people who do)... I don't see problems with this patch. On x86 we have readl_relaxed() the same as readl() so this patch does not change anything there. Feel free to add, Acked-by: Mika Westerberg -- To unsubscribe from this list: send the line "unsubscribe l

Re: [PATCH] i2c / ACPI: Pick the first address if device has multiple

2015-01-13 Thread Mika Westerberg
On Tue, Jan 13, 2015 at 05:48:29PM +0100, Wolfram Sang wrote: > On Tue, Jan 13, 2015 at 08:44:37AM -0800, Srinivas Pandruvada wrote: > > On Tue, 2015-01-13 at 16:50 +0100, Wolfram Sang wrote: > > > On Mon, Dec 29, 2014 at 03:48:48PM +0200, Mika Westerberg wrote: > > >

<    3   4   5   6   7   8   9   10   11   12   >