Re: [PATCH v4 1/4] ata: libata-scsi: reject reserved bits in 32-byte passthru
From: Damien Le Moal
Date: Sat Nov 14 2026 - 21:01:23 EST
On 11/14/26 02:48, shao.mingyin@xxxxxxxxxx wrote:
> From: Shao Mingyin <shao.mingyin@xxxxxxxxxx>
>
> ATA PASS-THROUGH(32) has no MULTIPLE_COUNT field. Byte 1 is CONTROL,
> including vendor-specific bits 7:6, but libata interprets bits 7:5 as
> MULTIPLE_COUNT. This rejects non-multiple commands with those bits set
> and can print spurious count mismatch warnings for multiple commands.
> The reserved bits 7:5 of byte 10 are not checked.
>
> Reject nonzero reserved bits in byte 10 with field pointer 10. Skip
> the MULTIPLE_COUNT checks for the 32-byte form while retaining the
> device multiple-mode check for READ/WRITE MULTIPLE commands. Also point
> to byte 10 for invalid PROTOCOL. Keep the 12- and 16-byte count checks
> unchanged.
>
> Fixes: b1ffbf854e08 ("libata: Support for an ATA PASS-THROUGH(32) command.")
> Suggested-by: Niklas Cassel <cassel@xxxxxxxxxx>
> Signed-off-by: Shao Mingyin <shao.mingyin@xxxxxxxxxx>
Reviewed-by: Damien Le Moal <dlemoal@xxxxxxx>
--
Damien Le Moal
Western Digital Research