[PATCH 2.6.9-34] emc_clariion_checker: Additional SCSI info on query command error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



emc_clariion_checker returns a "query command error" but no information
as to what generated the error. The proposed patch adds the
sense/ASC/ASCQ or SCSI/host/driver byte information as available from
the SG_IO interface to assist in troubleshooting. The changes should be
pretty universal but this was built on 2.6.9-34 under the
multipath-tools-0.4.5.56 tree. 
---
Hope I'm getting this format right. This is my first time submitting a
patch. Please yell directly at me if I'm screwing it up. Thanks...

Jerry Levy, Engineer IV
EMC Global Services Technical Support, PREM ISG
AMER Host Systems Software - UNIX
E-mail: levy_jerome@xxxxxxx
---

--- libcheckers/emc_clariion.c  2008-07-09 12:29:52.000000000 -0400
+++ libcheckers/emc_clariion.c.original 2008-07-09 10:39:05.000000000
-0400
@@ -32,7 +32,6 @@ int emc_clariion(int fd, char *msg, void
        unsigned char sb[128] = { 0, };
        unsigned char inqCmdBlk[INQUIRY_CMDLEN] = {INQUIRY_CMD, 1, 0xC0,
0,
                                                sizeof(sb), 0};
-       unsigned char msgbuf[128];
        struct sg_io_hdr io_hdr;
        struct emc_clariion_checker_context * ctxt = NULL;
        int ret;
@@ -87,15 +86,7 @@ int emc_clariion(int fd, char *msg, void
                goto out;
        }
        if (io_hdr.info & SG_INFO_OK_MASK) {
-               if(io_hdr.sb_len_wr) {
-                       sprintf(msgbuf,"emc_clariion_checker: query
command error (sense 0x%02X, ASC 0x%02x, ASCQ 0x%02x)",
-
sense_buffer[2],sense_buffer[12],sense_buffer[13]);
-               }
-               else {
-                       sprintf(msgbuf,"emc_clariion_checker: query
command error (SCSI 0x%02X, host 0x%02x, driver 0x%02x)",
-
io_hdr.masked_status,io_hdr.host_status,io_hdr.driver_status);
-               }
-               MSG(msgbuf);
+               MSG("emc_clariion_checker: query command indicates
error");
                ret = PATH_DOWN;
                goto out;
        }


--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux