Re: [PATCH 2/3] PCI: pciehp: Wait for PDS if in-band presence is disabled

2019-10-11 Thread Andy Shevchenko
On Fri, Oct 11, 2019 at 11:48 AM Andy Shevchenko wrote: > > On Fri, Oct 11, 2019 at 9:49 AM Andy Shevchenko > wrote: > > > > On Thu, Oct 10, 2019 at 11:37 PM Stuart Hayes > > wrote: > > > > > Thank you for the feedback! An infinite loop is used several other > > > places in > > > this driver-

Re: [PATCH 2/3] PCI: pciehp: Wait for PDS if in-band presence is disabled

2019-10-11 Thread Andy Shevchenko
On Fri, Oct 11, 2019 at 9:49 AM Andy Shevchenko wrote: > > On Thu, Oct 10, 2019 at 11:37 PM Stuart Hayes > wrote: > > > Thank you for the feedback! An infinite loop is used several other places > > in > > this driver--this keeps the style similar. I can change it as you suggest, > > though, i

Re: [PATCH 2/3] PCI: pciehp: Wait for PDS if in-band presence is disabled

2019-10-10 Thread Andy Shevchenko
On Thu, Oct 10, 2019 at 11:37 PM Stuart Hayes wrote: > Thank you for the feedback! An infinite loop is used several other places in > this driver--this keeps the style similar. I can change it as you suggest, > though, if that would be preferable to consistency. Better to start the change now.

Re: [PATCH 2/3] PCI: pciehp: Wait for PDS if in-band presence is disabled

2019-10-10 Thread Stuart Hayes
On Thu, Oct 10, 2019 at 12:40 AM Andy Shevchenko wrote: > > On Thu, Oct 10, 2019 at 8:37 AM Andy Shevchenko > wrote: > > On Wed, Oct 9, 2019 at 11:05 PM Stuart Hayes > > wrote: > > > > +static void pcie_wait_for_presence(struct pci_dev *pdev) > > > +{ > > > + int timeout = 1250; > > > > +

Re: [PATCH 2/3] PCI: pciehp: Wait for PDS if in-band presence is disabled

2019-10-09 Thread Andy Shevchenko
On Thu, Oct 10, 2019 at 8:37 AM Andy Shevchenko wrote: > On Wed, Oct 9, 2019 at 11:05 PM Stuart Hayes wrote: > > +static void pcie_wait_for_presence(struct pci_dev *pdev) > > +{ > > + int timeout = 1250; > > + bool pds; Also this is redundant. Just use the following outside the loo

Re: [PATCH 2/3] PCI: pciehp: Wait for PDS if in-band presence is disabled

2019-10-09 Thread Andy Shevchenko
On Wed, Oct 9, 2019 at 11:05 PM Stuart Hayes wrote: > > From: Alexandru Gagniuc > > When inband presence is disabled, PDS may come up at any time, or not > at all. PDS being low may indicate that the card is still mating, and > we could expect contact bounce to bring down the link as well. > > It

[PATCH 2/3] PCI: pciehp: Wait for PDS if in-band presence is disabled

2019-10-09 Thread Stuart Hayes
From: Alexandru Gagniuc When inband presence is disabled, PDS may come up at any time, or not at all. PDS being low may indicate that the card is still mating, and we could expect contact bounce to bring down the link as well. It is reasonable to assume that most cards will mate in a hotplug slo

[PATCH 2/3] PCI: pciehp: Wait for PDS if in-band presence is disabled

2019-10-01 Thread Stuart Hayes
When inband presence is disabled, PDS may come up at any time, or not at all. PDS being low may indicate that the card is still mating, and we could expect contact bounce to bring down the link as well. It is reasonable to assume that most cards will mate in a hotplug slot in about a second. Thus,