Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Apr 2019 20:27:56 +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: r345817 - in head/sys: cam/nvme conf
Message-ID:  <201904022027.x32KRua0095865@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Apr  2 20:27:56 2019
New Revision: 345817
URL: https://svnweb.freebsd.org/changeset/base/345817

Log:
  Build NVMe CAM transport unrelated to NVMe SIM.
  
  Before this I suppose it was impossible load CAM-based NVMe as module.
  Plus this appeared to be needed to build r345815 without NVMe driver.
  
  MFC after:	2 weeks

Modified:
  head/sys/cam/nvme/nvme_da.c
  head/sys/conf/files

Modified: head/sys/cam/nvme/nvme_da.c
==============================================================================
--- head/sys/cam/nvme/nvme_da.c	Tue Apr  2 20:03:03 2019	(r345816)
+++ head/sys/cam/nvme/nvme_da.c	Tue Apr  2 20:27:56 2019	(r345817)
@@ -770,10 +770,6 @@ ndaregister(struct cam_periph *periph, void *arg)
 	softc->quirks = quirks;
 	cam_iosched_set_sort_queue(softc->cam_iosched, 0);
 	softc->disk = disk = disk_alloc();
-	strlcpy(softc->disk->d_descr, cd->mn,
-	    MIN(sizeof(softc->disk->d_descr), sizeof(cd->mn)));
-	strlcpy(softc->disk->d_ident, cd->sn,
-	    MIN(sizeof(softc->disk->d_ident), sizeof(cd->sn)));
 	disk->d_rotation_rate = DISK_RR_NON_ROTATING;
 	disk->d_open = ndaopen;
 	disk->d_close = ndaclose;
@@ -812,9 +808,9 @@ ndaregister(struct cam_periph *periph, void *arg)
 	 * d_ident and d_descr are both far bigger than the length of either
 	 *  the serial or model number strings.
 	 */
-	nvme_strvis(disk->d_descr, cd->mn,
+	cam_strvis(disk->d_descr, cd->mn,
 	    sizeof(disk->d_descr), NVME_MODEL_NUMBER_LENGTH);
-	nvme_strvis(disk->d_ident, cd->sn,
+	cam_strvis(disk->d_ident, cd->sn,
 	    sizeof(disk->d_ident), NVME_SERIAL_NUMBER_LENGTH);
 	disk->d_hba_vendor = cpi.hba_vendor;
 	disk->d_hba_device = cpi.hba_device;

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Tue Apr  2 20:03:03 2019	(r345816)
+++ head/sys/conf/files	Tue Apr  2 20:27:56 2019	(r345817)
@@ -86,9 +86,9 @@ cam/cam_xpt.c			optional scbus
 cam/ata/ata_all.c		optional scbus
 cam/ata/ata_xpt.c		optional scbus
 cam/ata/ata_pmp.c		optional scbus
-cam/nvme/nvme_all.c		optional scbus nvme
-cam/nvme/nvme_da.c		optional scbus nvme da
-cam/nvme/nvme_xpt.c		optional scbus nvme
+cam/nvme/nvme_all.c		optional scbus
+cam/nvme/nvme_da.c		optional nda | da
+cam/nvme/nvme_xpt.c		optional scbus
 cam/scsi/scsi_xpt.c		optional scbus
 cam/scsi/scsi_all.c		optional scbus
 cam/scsi/scsi_cd.c		optional cd



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