aboutsummaryrefslogtreecommitdiffstats
path: root/sys/cam/nvme/nvme_da.c
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2019-08-08 02:00:11 +0000
committerAlexander Motin <mav@FreeBSD.org>2019-08-08 02:00:11 +0000
commited0429f4c9ce488b78401c2ddc1b0f4da399b697 (patch)
treea188c6060047fed39d67cadb4705b01a7a9c7503 /sys/cam/nvme/nvme_da.c
parent07cf38634d9f6a83a01c61106db8f6b7108b8cd4 (diff)
downloadsrc-ed0429f4c9ce488b78401c2ddc1b0f4da399b697.tar.gz
src-ed0429f4c9ce488b78401c2ddc1b0f4da399b697.zip
MFC r345817: 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.
Notes
Notes: svn path=/stable/12/; revision=350716
Diffstat (limited to 'sys/cam/nvme/nvme_da.c')
-rw-r--r--sys/cam/nvme/nvme_da.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c
index 0aa697b47b3c..76e7ca4a4edb 100644
--- a/sys/cam/nvme/nvme_da.c
+++ b/sys/cam/nvme/nvme_da.c
@@ -759,10 +759,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;
@@ -801,9 +797,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;