Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Apr 2018 19:47:45 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r332145 - head/sys/cam/scsi
Message-ID:  <201804061947.w36Jljbb038232@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Fri Apr  6 19:47:44 2018
New Revision: 332145
URL: https://svnweb.freebsd.org/changeset/base/332145

Log:
  Do not fail devices just for errors in descriptor format.
  
  MFC after:	1 week
  Sponsored by:	iXsystems, Inc.

Modified:
  head/sys/cam/scsi/scsi_cd.c
  head/sys/cam/scsi/scsi_da.c

Modified: head/sys/cam/scsi/scsi_cd.c
==============================================================================
--- head/sys/cam/scsi/scsi_cd.c	Fri Apr  6 19:47:07 2018	(r332144)
+++ head/sys/cam/scsi/scsi_cd.c	Fri Apr  6 19:47:44 2018	(r332145)
@@ -1119,7 +1119,8 @@ cddone(struct cam_periph *periph, union ccb *done_ccb)
 				 * supported" (0x25) error.
 				 */
 				if ((have_sense) && (asc != 0x25)
-				 && (error_code == SSD_CURRENT_ERROR)) {
+				 && (error_code == SSD_CURRENT_ERROR
+				  || error_code == SSD_DESC_CURRENT_ERROR)) {
 					const char *sense_key_desc;
 					const char *asc_desc;
 

Modified: head/sys/cam/scsi/scsi_da.c
==============================================================================
--- head/sys/cam/scsi/scsi_da.c	Fri Apr  6 19:47:07 2018	(r332144)
+++ head/sys/cam/scsi/scsi_da.c	Fri Apr  6 19:47:44 2018	(r332145)
@@ -4649,7 +4649,8 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
 				    (((csio->ccb_h.status & CAM_STATUS_MASK) ==
 					CAM_REQ_INVALID) ||
 				     ((have_sense) &&
-				      (error_code == SSD_CURRENT_ERROR) &&
+				      (error_code == SSD_CURRENT_ERROR ||
+				       error_code == SSD_DESC_CURRENT_ERROR) &&
 				      (sense_key == SSD_KEY_ILLEGAL_REQUEST)))) {
 					cam_periph_lock(periph);
 					softc->flags &= ~DA_FLAG_CAN_RC16;
@@ -4674,7 +4675,8 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
 				 */
 				if ((have_sense)
 				 && (asc != 0x25) && (asc != 0x44)
-				 && (error_code == SSD_CURRENT_ERROR)) {
+				 && (error_code == SSD_CURRENT_ERROR
+				  || error_code == SSD_DESC_CURRENT_ERROR)) {
 					const char *sense_key_desc;
 					const char *asc_desc;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804061947.w36Jljbb038232>