On Mon, Sep 02, 2024 at 08:53:59PM +0900, Damien Le Moal wrote: > The 512B buffer sector_buf field of struct ata_port is used for scanning > devices as well as during error recovery with ata EH. This buffer is > thus useless if a port does not have a device connected to it. > And also given that commands using this buffer are issued to devices, > and not to ports, move this buffer definition from struct ata_port to > struct ata_device. > > This change slightly increases system memory usage for systems using a > port-multiplier as in that case we do not need a per-device buffer for > scanning devices (PMP does not allow parallel scanning) nor for EH (as > when entering EH we are guaranteed that all commands to all devices > connected to the PMP have completed or have been aborted). However, > this change reduces memory usage on systems that have many ports with > only few devices rives connected, which is a much more common use case > than the PMP use case. > > Signed-off-by: Damien Le Moal <dlemoal@xxxxxxxxxx> > Reviewed-by: Hannes Reinecke <hare@xxxxxxx> > --- Reviewed-by: Niklas Cassel <cassel@xxxxxxxxxx> ...and since I suggested this specific change in my reply to your V1 series, I feel that I should get a: Suggested-by: Niklas Cassel <cassel@xxxxxxxxxx> :)