diff options
| author | Shao Mingyin <shao.mingyin@zte.com.cn> | 2026-11-03 21:54:56 +0100 |
|---|---|---|
| committer | Niklas Cassel <cassel@kernel.org> | 2026-11-07 13:34:39 +0100 |
| commit | 7c972e73641cbe5f77f63c336de15c7a30268d49 (patch) | |
| tree | 9edc59338113bc6b986343134352ab4cb08943cf /tools/lib/python | |
| parent | 0fdb8eef88a886751e33600d446a66c529384f11 (diff) | |
ata: libata-scsi: set the field pointer when rejecting CDL
ata_mselect_control_ata_feature() rejects enabling CDL while NCQ
priority is enabled, but unlike its other error branches it returns
without setting *fp.
ata_scsi_mode_select_xlat() initializes fp to 0xffff and, when the
handler fails, adds the offset of the mode page in the parameter list
to it, i.e. the length of the mode parameter header and of the block
descriptors. As fp is a u16, this wraps around, so the resulting sense
data reports the byte before the mode page, i.e. the last byte of the
mode parameter header or of the block descriptors, as the FIELD
POINTER, instead of the byte containing the CDL_CTRL field that
requests enabling CDL.
Set *fp to 4, i.e. to the byte containing the CDL_CTRL field, like the
branch rejecting an invalid CDL_CTRL value does.
Fixes: df60f9c64576 ("scsi: ata: libata: Add ATA feature control sub-page translation")
Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
[cassel: set *fp to 4, the offset of CDL_CTRL in the mode page]
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20261103205448.931471-17-cassel@kernel.org
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
