summaryrefslogtreecommitdiff
path: root/scripts/dummy-tools/python3
diff options
context:
space:
mode:
authorNiklas Cassel <cassel@kernel.org>2026-11-03 21:54:50 +0100
committerNiklas Cassel <cassel@kernel.org>2026-11-07 13:20:41 +0100
commit6fde0444d07ec954f3d885375e0402ff2f2e5064 (patch)
tree7ac931795eed5b322d0543444ab394ed6f14e633 /scripts/dummy-tools/python3
parentec585ac78742527f80495dd8f451dcda7e9e7f59 (diff)
ata: libata-scsi: fix MODE SELECT handling of data after the mode page
ata_scsi_mode_select_xlat() only supports one mode page per MODE SELECT command, and rejects a parameter list with data after the mode page with INVALID FIELD IN PARAMETER LIST. However: - It does not set the field pointer, so the sense data reports 0xffff as the FIELD POINTER. - It only checks for data after the mode page after the mode page handler has been called. ata_mselect_control_ata_feature() has then already updated the CDL enabled flag of the device, even though the command is rejected and the CDL setting of the device is not changed. - For the control mode page, ata_mselect_control_spg0() does not need an ATA command, so the check is skipped, and the data after the mode page is silently ignored. Check for data after the mode page before calling the mode page handlers, and set the FIELD POINTER to the first byte after the mode page, i.e. to the first byte of the next mode page. The reason why only one mode page per command is supported is that a MODE SELECT command is translated into at most one ATA command, so update the comment accordingly. Fixes: 1b26d29ccd59 ("[libata] scsi: implement MODE SELECT command") Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Link: https://lore.kernel.org/r/20261103205448.931471-11-cassel@kernel.org Signed-off-by: Niklas Cassel <cassel@kernel.org>
Diffstat (limited to 'scripts/dummy-tools/python3')
0 files changed, 0 insertions, 0 deletions