On 18/02/2022 03:12, Damien Le Moal wrote:
I don't know why the driver even does this, but the implementation of
pm80xx_send_read_log() is questionable. It would be nice to not see ATA
code in the driver like this.
I have been thinking about this one. We should be able to avoid this
read log and rely on libata-eh to do it. All we should need to do is an
internal abort all without completing the commands. libata will do the
read log and resend the retry for the failed command (if appropriate)
and all the other aborted NCQ commands.
Need to look at how other libsas drivers are handling this. But the
above should work, I think.
I just assumed that this was something specific to that HW as no other
libsas driver does this manually.
Not adding this to the current series though:) That will be for another
patch series.
Please note that the Hisi SAS driver also issues an ATA softreset as
part of the disk reset procedure - it would be nice to have that sort of
code in libata also; I see softreset code in libahci which maybe could
be refactored. I can check further when I get a chance.
Thanks,
John