Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1649680

Re: [PATCH 20/24] thunderbolt: Do not touch the hardware if the NHI is gone on resume

From Lukas Wunner <lukas@wunner.de>
Newsgroups linux.kernel
Subject Re: [PATCH 20/24] thunderbolt: Do not touch the hardware if the NHI is gone on resume
Date 2017-05-24 16:50 +0200
Message-ID <tKFLQ-3z2-11@gated-at.bofh.it> (permalink)
References <tIuKR-3YK-5@gated-at.bofh.it> <tIuUy-44c-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, May 18, 2017 at 05:39:10PM +0300, Mika Westerberg wrote:
> @@ -655,6 +659,16 @@ static int nhi_resume_noirq(struct device *dev)
>  {
>  	struct pci_dev *pdev = to_pci_dev(dev);
>  	struct tb *tb = pci_get_drvdata(pdev);
> +	u32 vid;
> +
> +	/*
> +	 * Check that the device is still there. It may be that the user
> +	 * unplugged last device which causes the host controller to go
> +	 * away on PCs.
> +	 */
> +	pci_read_config_dword(pdev, PCI_VENDOR_ID, &vid);
> +	if (vid == ~0)
> +		tb->nhi->going_away = true;

if (!pci_device_is_present(pdev))

Thanks,

Lukas

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 20/24] thunderbolt: Do not touch the hardware if the NHI is gone on resume Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-05-18 16:50 +0200
  Re: [PATCH 20/24] thunderbolt: Do not touch the hardware if the NHI  is gone on resume Lukas Wunner <lukas@wunner.de> - 2017-05-24 16:50 +0200
    Re: [PATCH 20/24] thunderbolt: Do not touch the hardware if the NHI  is gone on resume Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-05-25 09:20 +0200

csiph-web