git: 25695358d03b - stable/13 - pvscsi: Explicitly mask out CTS_SAS_VALID_SPEED bit
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 20 Jan 2025 12:42:12 UTC
The branch stable/13 has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=25695358d03b4c60344df5b7dead04085350448d
commit 25695358d03b4c60344df5b7dead04085350448d
Author: Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2025-01-15 04:32:31 +0000
Commit: Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2025-01-20 12:39:26 +0000
pvscsi: Explicitly mask out CTS_SAS_VALID_SPEED bit
This driver prefers connection speed over sas port speed. On stable/13
branch the stack-allocated CCB is not cleared thus the cam layer may
report weird speed on boot.
```
da0: <VMware Virtual disk 2.0> Fixed Direct Access SPC-4 SCSI device
da0: 4294967.295MB/s transfers
```
-current and stable/14 have the change [1] which clears stack-allocated
CCB thus are not affected, but I want -current and stable/14 to have this
fix in to reduce drift between branches.
1. ec5325dbca62 cam: make sure to clear even more CCBs allocated on the stack
Reviewed by: imp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D48438
(cherry picked from commit 7befd68335a0b34405b6293f30cc47cabc46ab06)
(cherry picked from commit 5094faf5dfa860f238f636457563bc0d89013c7a)
---
sys/dev/vmware/pvscsi/pvscsi.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sys/dev/vmware/pvscsi/pvscsi.c b/sys/dev/vmware/pvscsi/pvscsi.c
index b3be2280eb5e..e850f6d8dae3 100644
--- a/sys/dev/vmware/pvscsi/pvscsi.c
+++ b/sys/dev/vmware/pvscsi/pvscsi.c
@@ -1445,6 +1445,10 @@ finish_ccb:
cts->proto_specific.scsi.flags = CTS_SCSI_FLAGS_TAG_ENB;
cts->proto_specific.scsi.valid = CTS_SCSI_VALID_TQ;
+ /* Prefer connection speed over sas port speed */
+ cts->xport_specific.sas.valid &= ~CTS_SAS_VALID_SPEED;
+ cts->xport_specific.sas.bitrate = 0;
+
ccb_h->status = CAM_REQ_CMP;
xpt_done(ccb);
} break;