svn commit: r345817 - in head/sys: cam/nvme conf
Alexander Motin
mav at FreeBSD.org
Tue Apr 2 20:27:57 UTC 2019
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
More information about the svn-src-head
mailing list