aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorYuri Pankov <yuripv@FreeBSD.org>2023-05-05 09:48:57 +0000
committerYuri Pankov <yuripv@FreeBSD.org>2023-05-05 09:51:44 +0000
commit6abf81b3d6747da0baa90860d5a6e929c97c9bb9 (patch)
treef71f267ded46c32c75f719c0e82abd499ea415ed /sys/dev
parentfff1551c0357cc43f6138fecfad1d79d8d8baa15 (diff)
downloadsrc-6abf81b3d6747da0baa90860d5a6e929c97c9bb9.tar.gz
src-6abf81b3d6747da0baa90860d5a6e929c97c9bb9.zip
pvscsi: maximum target number is one less than number of targets
Fix the number of targets we inquiry to be one less than the maximum number of targets adapter reports. This gets rid of the errors reported on VMware Workstation: (probe36:pvscsi0:0:65:0): INQUIRY. CDB: 12 00 00 00 24 00 (probe36:pvscsi0:0:65:0): CAM status: CCB request completed with an error While here, print the maximum number of targets. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D39867
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/vmware/pvscsi/pvscsi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/vmware/pvscsi/pvscsi.c b/sys/dev/vmware/pvscsi/pvscsi.c
index 1ba4777da906..48650647c561 100644
--- a/sys/dev/vmware/pvscsi/pvscsi.c
+++ b/sys/dev/vmware/pvscsi/pvscsi.c
@@ -1412,7 +1412,7 @@ finish_ccb:
cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED;
cpi->hba_eng_cnt = 0;
/* cpi->vuhba_flags = 0; */
- cpi->max_target = sc->max_targets;
+ cpi->max_target = sc->max_targets - 1;
cpi->max_lun = 0;
cpi->async_flags = 0;
cpi->hpath_id = 0;
@@ -1684,6 +1684,7 @@ pvscsi_attach(device_t dev)
PVSCSI_MAX_REQ_QUEUE_DEPTH);
device_printf(sc->dev, "Use Msg: %d\n", sc->use_msg);
+ device_printf(sc->dev, "Max targets: %d\n", sc->max_targets);
device_printf(sc->dev, "REQ num pages: %d\n", sc->req_ring_num_pages);
device_printf(sc->dev, "CMP num pages: %d\n", sc->cmp_ring_num_pages);
device_printf(sc->dev, "MSG num pages: %d\n", sc->msg_ring_num_pages);