From d03abe5882cc4815bf98c0e01a1deafa4a5d6730 Mon Sep 17 00:00:00 2001 From: Sebastian Ott Date: Thu, 29 Aug 2013 19:38:33 +0200 Subject: 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: Gerald Schaefer Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky --- arch/s390/pci/pci_clp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/s390/pci') diff --git a/arch/s390/pci/pci_clp.c b/arch/s390/pci/pci_clp.c index 70db060..3eaf63a 100644 --- a/arch/s390/pci/pci_clp.c +++ b/arch/s390/pci/pci_clp.c @@ -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); -- cgit v1.1