Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Mar 2018 20:19:00 +0000 (UTC)
From:      "Kenneth D. Merry" <ken@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r331223 - head/sys/cam/scsi
Message-ID:  <201803192019.w2JKJ0Td003743@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ken
Date: Mon Mar 19 20:19:00 2018
New Revision: 331223
URL: https://svnweb.freebsd.org/changeset/base/331223

Log:
  cam_periph_acquire() now returns an errno.
  
  The ch(4) driver was missed in change 328918, which changed
  cam_periph_acquire() to return an errno instead of cam_status.
  
  As a result, ch(4) failed to attach.
  
  Sponsored by:	Spectra Logic

Modified:
  head/sys/cam/scsi/scsi_ch.c

Modified: head/sys/cam/scsi/scsi_ch.c
==============================================================================
--- head/sys/cam/scsi/scsi_ch.c	Mon Mar 19 19:32:05 2018	(r331222)
+++ head/sys/cam/scsi/scsi_ch.c	Mon Mar 19 20:19:00 2018	(r331223)
@@ -419,7 +419,7 @@ chregister(struct cam_periph *periph, void *arg)
 	 * instance for it.  We'll release this reference once the devfs
 	 * instance has been freed.
 	 */
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP) {
+	if (cam_periph_acquire(periph) != 0) {
 		xpt_print(periph->path, "%s: lost periph during "
 			  "registration!\n", __func__);
 		cam_periph_lock(periph);
@@ -467,7 +467,7 @@ chopen(struct cdev *dev, int flags, int fmt, struct th
 	int error;
 
 	periph = (struct cam_periph *)dev->si_drv1;
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP)
+	if (cam_periph_acquire(periph) != 0)
 		return (ENXIO);
 
 	softc = (struct ch_softc *)periph->softc;



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