Skip to content

Commit

Permalink
pvscsi: maximum target number is one less than number of targets
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
laffer1 committed Dec 1, 2024
1 parent 8a32cd3 commit 7de559f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sys/dev/vmware/pvscsi/pvscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,7 @@ pvscsi_action(struct cam_sim *sim, union ccb *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;
Expand Down Expand Up @@ -1682,6 +1682,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);
Expand Down

0 comments on commit 7de559f

Please sign in to comment.