Commit c59b9f92 authored by Jan Glauber's avatar Jan Glauber Committed by Martin Schwidefsky

s390/pci: no msleep in potential IRQ context

The PCI instructions may be used in IRQ context so scheduling is forbidden.
Use udelay and shorten the delay since we are now polling.
Signed-off-by: default avatarJan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent bafff174
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include <linux/delay.h> #include <linux/delay.h>
#define ZPCI_INSN_BUSY_DELAY 1 /* 1 millisecond */ #define ZPCI_INSN_BUSY_DELAY 1 /* 1 microsecond */
/* Load/Store status codes */ /* Load/Store status codes */
#define ZPCI_PCI_ST_FUNC_NOT_ENABLED 4 #define ZPCI_PCI_ST_FUNC_NOT_ENABLED 4
...@@ -138,7 +138,7 @@ static inline int rpcit_instr(u64 fn, u64 addr, u64 range) ...@@ -138,7 +138,7 @@ static inline int rpcit_instr(u64 fn, u64 addr, u64 range)
do { do {
cc = __rpcit(fn, addr, range, &status); cc = __rpcit(fn, addr, range, &status);
if (cc == 2) if (cc == 2)
msleep(ZPCI_INSN_BUSY_DELAY); udelay(ZPCI_INSN_BUSY_DELAY);
} while (cc == 2); } while (cc == 2);
if (cc) if (cc)
...@@ -198,7 +198,7 @@ static inline int pcilg_instr(u64 *data, u64 req, u64 offset) ...@@ -198,7 +198,7 @@ static inline int pcilg_instr(u64 *data, u64 req, u64 offset)
do { do {
cc = __pcilg(data, req, offset, &status); cc = __pcilg(data, req, offset, &status);
if (cc == 2) if (cc == 2)
msleep(ZPCI_INSN_BUSY_DELAY); udelay(ZPCI_INSN_BUSY_DELAY);
} while (cc == 2); } while (cc == 2);
if (cc) { if (cc) {
...@@ -236,7 +236,7 @@ static inline int pcistg_instr(u64 data, u64 req, u64 offset) ...@@ -236,7 +236,7 @@ static inline int pcistg_instr(u64 data, u64 req, u64 offset)
do { do {
cc = __pcistg(data, req, offset, &status); cc = __pcistg(data, req, offset, &status);
if (cc == 2) if (cc == 2)
msleep(ZPCI_INSN_BUSY_DELAY); udelay(ZPCI_INSN_BUSY_DELAY);
} while (cc == 2); } while (cc == 2);
if (cc) if (cc)
...@@ -268,7 +268,7 @@ static inline int pcistb_instr(const u64 *data, u64 req, u64 offset) ...@@ -268,7 +268,7 @@ static inline int pcistb_instr(const u64 *data, u64 req, u64 offset)
do { do {
cc = __pcistb(data, req, offset, &status); cc = __pcistb(data, req, offset, &status);
if (cc == 2) if (cc == 2)
msleep(ZPCI_INSN_BUSY_DELAY); udelay(ZPCI_INSN_BUSY_DELAY);
} while (cc == 2); } while (cc == 2);
if (cc) if (cc)
......
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