From 375c38b4f4aa88fddd6106e4f2722e120fc1dac4 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Wed, 15 Oct 2008 13:44:00 +0200 Subject: [PATCH] Missing fixes for libprio ontap.c The ontap.c libprio source file available on SLES10 SP2 has a few deviations from the corresponding pp_ontap.c source file in the path_priority directory. References: 426975 Signed-off-by: Martin George Signed-off-by: Hannes Reinecke --- libmultipath/prioritizers/ontap.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libmultipath/prioritizers/ontap.c b/libmultipath/prioritizers/ontap.c index 0a629bc..1200114 100644 --- a/libmultipath/prioritizers/ontap.c +++ b/libmultipath/prioritizers/ontap.c @@ -27,7 +27,7 @@ #define INQUIRY_CMDLEN 6 #define DEFAULT_PRIOVAL 10 #define RESULTS_MAX 256 -#define SG_TIMEOUT 30000 +#define SG_TIMEOUT 60000 #define pp_ontap_log(prio, fmt, args...) \ condlog(prio, "%s: ontap prio: " fmt, dev, ##args) @@ -194,7 +194,7 @@ static int ontap_prio(const char *dev, int fd) memset(&results, 0, sizeof (results)); rc = send_gva(dev, fd, 0x41, results, &results_size); - if (rc == 0) { + if (rc >= 0) { tot_len = results[0] << 24 | results[1] << 16 | results[2] << 8 | results[3]; if (tot_len <= 8) { @@ -214,6 +214,8 @@ static int ontap_prio(const char *dev, int fd) is_iscsi_hardware = 1; goto prio_select; } + } else { + return 0; } try_fcp_proxy: -- 1.5.2.4