Commit 7fe7d16
committed
[vioscsi] Programatically determine max_segments
Refactors VioScsiFindAdapter() to:
1. Use new mnemonic adaptExt->max_segments to replace adaptExt->max_physical_breaks
(also used in the VioScsiBuildIo() and VioScsiReadExtendedData() functions)
2. Enable Registry lookup for max_segments in neo value "MaxPhysicalSegments" or
the legacy value "PhysicalBreaks". New value defined by REGISTRY_MAX_PH_SEGMENTS.
3. Also derive max_segments from adaptExt->scsi_config.seg_max and also from
the adaptExt->scsi_config.max_sectors value
4. Choose from among best candidates and check within limits
5. Enforce legacy StorPort NOPB off-by-one behaviour and provide explanation
6. Improves relevant instrumentation
7. Use new mnemonic PHYS_SEGMENTS_LIMIT to replace MAX_PHYS_SEGMENTS
8. Update VIRTIO_MAX_SG to (PHYS_SEGMENTS_LIMIT + 1)
9. Update VIRTIO_SCSI_QUEUE_LAST to (MAX_CPU - VIRTIO_SCSI_REQUEST_QUEUE_0)
Note: This commit enables the use of max_segments greater than
adaptExt->scsi_config.seg_max (max = 254) up to
PHYS_SEGMENTS_LIMIT (presently 512).
Signed-off-by: benyamin-codez <[email protected]>1 parent 2bcf04f commit 7fe7d16
0 commit comments