lkml.org 
[lkml]   [2017]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 20/24] thunderbolt: Do not touch the hardware if the NHI is gone on resume
On Wed, May 24, 2017 at 04:43:10PM +0200, Lukas Wunner wrote:
> 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))

Sure.

\
 
 \ /
  Last update: 2017-05-25 09:13    [W:0.385 / U:27.820 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site