linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5] Fixes to DMA state check
@ 2021-10-12  6:27 Reimar Döffinger
  2021-10-12  6:27 ` [PATCH 1/6] libata: fix checking of DMA state Reimar Döffinger
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Reimar Döffinger @ 2021-10-12  6:27 UTC (permalink / raw)
  To: Damien Le Moal, linux-ide, Jens Axboe, hch, Paul Menzel

Patch series to add ata_dma_enabled calls instead of incorrectly
checking dev->dma_mode != 0.
Only the first patch is confirmed to have caused real issues
that it indeed fixes, rest based purely on code review.

Changes v5:
Add stable Cc to first patch, which is confirmed to fix
issues seen by users.

Changes v4:
- split per file/driver
- added Signed-off-by and Tested-by lines, improved commit messages
Changes v3:
- found and updated more cases in pata_ali, pata_amd and pata_radisys.
Changes v2:
- removed initialization change for SATA. I got confused by the
  ping-pong between libata-eh and libata-core and thought SATA did not
  set up xfermode
- reviewed other cases that used dma_mode in boolean context and those
  seemed to need changing as well, so added them to patch.
  I did not see any places that would set dma_mode to 0 ever, so I
  do think they were all indeed wrong.



^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: [PATCH] libata: fix checking of DMA state
@ 2021-09-27  9:15 Damien Le Moal
  2021-10-03 13:28 ` [PATCH v4] Fixes to DMA state check Reimar Döffinger
  0 siblings, 1 reply; 8+ messages in thread
From: Damien Le Moal @ 2021-09-27  9:15 UTC (permalink / raw)
  To: Reimar Döffinger, Paul Menzel; +Cc: linux-ide, Jens Axboe, hch

On 2021/09/27 18:10, Reimar Döffinger wrote:
> 
>> On 27 Sep 2021, at 10:56, Paul Menzel <pmenzel@molgen.mpg.de> wrote:
>>
>> Dear Reimar,
>>
>>
>> Thank you for the patch.
>>
>>
>> Am 19.08.21 um 10:13 schrieb Reimar Döffinger:
>>
>> Maybe start with a problem statement:
>>
>> With some SSDs Linux logs the error below:
>>
>>    failed to set xfermode (err_mask=0x40)
>>
>>> Checking if DMA is enabled should be done via the
>>> ata_dma_enabled helper function, since the init state
>>> 0xff indicates disabled.
>>> Only the libata-core logic is tested on actual devices,
>>> the other changes are based on code review only.
>>
>> Your Signed-off-by line is missing, and you might want to add the Linux kernel bug tracker entry:
>>
>> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=195895
> 
> Thanks, I missed that the Signed-off-by got lost, and thanks for testing.
> I actually wanted to ask (e.g. Damien?), would you like me to split out the fully
> tested and confirmed working and necessary libata-core change
> from the other changes?

It is generally good practice to have one patch per driver, preceded if needed
by core changes. So yes, please split things if it can be done cleanly.

> I am quite confident that all the code modified was wrong before,
> however it could be that some of the code actually relies
> on that bug to cancel out further bugs, so fixing could well break more
> than it fixes...

I had a look when you sent the patch and did not see anything scary. Please
resend and I will check again.


-- 
Damien Le Moal
Western Digital Research

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-10-12  6:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-12  6:27 [PATCH v5] Fixes to DMA state check Reimar Döffinger
2021-10-12  6:27 ` [PATCH 1/6] libata: fix checking of DMA state Reimar Döffinger
2021-10-12  6:27 ` [PATCH 2/6] libata-scsi: " Reimar Döffinger
2021-10-12  6:27 ` [PATCH 3/6] pata_ali: " Reimar Döffinger
2021-10-12  6:27 ` [PATCH 4/6] pata_amd: " Reimar Döffinger
2021-10-12  6:27 ` [PATCH 5/6] pata_optidma: " Reimar Döffinger
2021-10-12  6:27 ` [PATCH 6/6] pata_radisys: " Reimar Döffinger
  -- strict thread matches above, loose matches on Subject: below --
2021-09-27  9:15 [PATCH] libata: " Damien Le Moal
2021-10-03 13:28 ` [PATCH v4] Fixes to DMA state check Reimar Döffinger
2021-10-03 13:28   ` [PATCH 5/6] pata_optidma: fix checking of DMA state Reimar Döffinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).