]> git.karo-electronics.de Git - linux-beck.git/commitdiff
s390/pci: try harder to modify a function
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Thu, 29 Aug 2013 17:38:33 +0000 (19:38 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 30 Aug 2013 06:57:18 +0000 (08:57 +0200)
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: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/pci/pci_clp.c

index 70db060b4d41969605a9ce4646952bbea8f7870d..3eaf63a6ecac9a9f00a7e6eb9cb6b2a7171e4046 100644 (file)
@@ -179,7 +179,7 @@ error:
 static int clp_set_pci_fn(u32 *fh, u8 nr_dma_as, u8 command)
 {
        struct clp_req_rsp_set_pci *rrb;
-       int rc, retries = 1000;
+       int rc, retries = 100;
 
        rrb = clp_alloc_block(GFP_KERNEL);
        if (!rrb)
@@ -199,7 +199,7 @@ static int clp_set_pci_fn(u32 *fh, u8 nr_dma_as, u8 command)
                        retries--;
                        if (retries < 0)
                                break;
-                       msleep(1);
+                       msleep(20);
                }
        } while (rrb->response.hdr.rsp == CLP_RC_SETPCIFN_BUSY);