]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: handle long delays in VPD access
authorStephen Hemminger <shemminger@vyatta.com>
Thu, 18 Dec 2008 17:17:16 +0000 (09:17 -0800)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 7 Jan 2009 19:13:16 +0000 (11:13 -0800)
commit83a272692fa57c1b1361c3448d60cf99ef7d6d93
tree8ee86fe0b3dffa0ebff4406f1470092c4df84f25
parentfb6ef4f9d6299e3871b8ae577f62ac042e270a53
PCI: handle long delays in VPD access

Accessing the VPD area can take a long time.  The existing
VPD access code fails consistently on my hardware. There are comments
in the SysKonnect vendor driver that it can take up to 13ms per word.

Change the access routines to:
  * use a mutex rather than spinning with IRQ's disabled and lock held
  * have a much longer timeout
  * call cond_resched while spinning

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/access.c