Commit d03abe58 authored by Sebastian Ott's avatar Sebastian Ott Committed by Martin Schwidefsky

s390/pci: try harder to modify a function

In rare situations a PCI function can report a busy condition
when we issue the modify pci function command. A temporary busy
condition can exceed 1 second but not 2 seconds. Increase the
time until we report an error to 2 seconds. Also increase the
time we sleep between the retries to reduce the load in this
case.
Suggested-by: default avatarGerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 1d578966
...@@ -179,7 +179,7 @@ int clp_add_pci_device(u32 fid, u32 fh, int configured) ...@@ -179,7 +179,7 @@ int clp_add_pci_device(u32 fid, u32 fh, int configured)
static int clp_set_pci_fn(u32 *fh, u8 nr_dma_as, u8 command) static int clp_set_pci_fn(u32 *fh, u8 nr_dma_as, u8 command)
{ {
struct clp_req_rsp_set_pci *rrb; struct clp_req_rsp_set_pci *rrb;
int rc, retries = 1000; int rc, retries = 100;
rrb = clp_alloc_block(GFP_KERNEL); rrb = clp_alloc_block(GFP_KERNEL);
if (!rrb) if (!rrb)
...@@ -199,7 +199,7 @@ static int clp_set_pci_fn(u32 *fh, u8 nr_dma_as, u8 command) ...@@ -199,7 +199,7 @@ static int clp_set_pci_fn(u32 *fh, u8 nr_dma_as, u8 command)
retries--; retries--;
if (retries < 0) if (retries < 0)
break; break;
msleep(1); msleep(20);
} }
} while (rrb->response.hdr.rsp == CLP_RC_SETPCIFN_BUSY); } while (rrb->response.hdr.rsp == CLP_RC_SETPCIFN_BUSY);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment