iprutils: Don't retry if ipr driver not loaded
Since we enhanced the retry logic for tool_init, it had the side effect of adding a delay for iprutils when run if the ipr driver is not loaded. Revert this behavior so we don't sit and sleep for an extended period of time on systems with no ipr. Signed-off-by: Brian King <Brian King brking@linux.vnet.ibm.com>
This commit is contained in:
parent
8c080d887d
commit
22133b0783
1 changed files with 3 additions and 4 deletions
7
iprlib.c
7
iprlib.c
|
|
@ -2078,7 +2078,7 @@ static int __tool_init(int save_state)
|
|||
dirfd = opendir("/sys/bus/pci/drivers/ipr");
|
||||
if (!dirfd) {
|
||||
syslog_dbg("Failed to open ipr driver bus on second attempt. %m\n");
|
||||
return -EAGAIN;
|
||||
return -ENXIO;
|
||||
}
|
||||
}
|
||||
while ((dent = readdir(dirfd)) != NULL) {
|
||||
|
|
@ -2176,9 +2176,8 @@ int tool_init(int save_state)
|
|||
|
||||
for (i = 0; i < 4 && rc_err == -EAGAIN; i++) {
|
||||
rc_err = __tool_init(save_state);
|
||||
if (rc_err == 0)
|
||||
break;
|
||||
sleep(2);
|
||||
if (rc_err == -EAGAIN)
|
||||
sleep(2);
|
||||
}
|
||||
if (rc_err) {
|
||||
syslog_dbg("Failed to initialize adapters. Timeout reached");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue