In case of not connected device, only first condition is checked for PQ in rdac path...
authorChaskiel Grundman <cg2v@andrew.cmu.edu>
Wed, 8 Dec 2010 06:40:13 +0000 (07:40 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 8 Dec 2010 06:40:13 +0000 (07:40 +0100)
corrects the check by masking MSB 3 bits and comparing it with 0x20.

Signed-off-by: Vijay Chauhan <vijay.chauhan@lsi.com>
libmultipath/checkers/rdac.c

index bdff862..fb39155 100644 (file)
@@ -108,7 +108,7 @@ libcheck_check (struct checker * c)
                        c->timeout)) {
                ret = PATH_DOWN;
                goto done;
-       } else if ((inq.PQ_PDT & 0x20) || (inq.PQ_PDT & 0x7f)) {
+        } else if (((inq.PQ_PDT & 0xE0) == 0x20) || (inq.PQ_PDT & 0x7f)) {
                /* LUN not connected*/
                ret = PATH_DOWN;
                goto done;