From: dlg Date: Sat, 19 Apr 2014 05:00:06 +0000 (+0000) Subject: implement emc_mpath_checksense() according to what my cx500 throws. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7d32ae4d1f51ec5ecf5789e4cbe16db33a098e2e;p=openbsd implement emc_mpath_checksense() according to what my cx500 throws. tested by jmatthew@ --- diff --git a/sys/scsi/mpath_emc.c b/sys/scsi/mpath_emc.c index 619db404fdb..d7ace5d8f12 100644 --- a/sys/scsi/mpath_emc.c +++ b/sys/scsi/mpath_emc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpath_emc.c,v 1.17 2014/04/17 06:38:54 dlg Exp $ */ +/* $OpenBSD: mpath_emc.c,v 1.18 2014/04/19 05:00:06 dlg Exp $ */ /* * Copyright (c) 2011 David Gwynne @@ -204,6 +204,15 @@ emc_mpath_start(struct scsi_xfer *xs) int emc_mpath_checksense(struct scsi_xfer *xs) { + struct scsi_sense_data *sense = &xs->sense; + + if ((sense->error_code & SSD_ERRCODE) == SSD_ERRCODE_CURRENT && + (sense->flags & SSD_KEY) == SKEY_NOT_READY && + ASC_ASCQ(sense) == 0x0403) { + /* Logical Unit Not Ready, Manual Intervention Required */ + return (MPATH_SENSE_FAILOVER); + } + return (MPATH_SENSE_DECLINED); }