From: Damien Le Moal <dlemoal@kernel.org>
To: Rosen Penev <rosenp@gmail.com>, linux-ide@vger.kernel.org
Cc: Niklas Cassel <cassel@kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ata: pata_ep93xx: fix incorrect return value in data_xfer
Date: Thu, 23 Jul 2026 16:41:26 +0900 [thread overview]
Message-ID: <9bb67b07-b46b-4f1e-a4ac-f6e70f15b31e@kernel.org> (raw)
In-Reply-To: <20260720020907.2004063-1-rosenp@gmail.com>
On 7/20/26 11:09, Rosen Penev wrote:
> The while (words--) loop post-decrements words, so it underflows from
> 0 to UINT_MAX on exit. The function then returns "words << 1", which
> is either 0 (for odd-length transfers after words++) or 0xFFFFFFFE
> (for even-length transfers). Callers like __atapi_pio_bytes() depend
> on the correct byte count to manage scatter-gather progress; a wrong
> value causes ATAPI PIO transfer errors.
>
> Fix by returning ALIGN(buflen, 2) instead of the corrupted words
> counter, matching what ata_sff_data_xfer() effectively returns via
> its words counter.
>
> Assisted-by: opencode:big-pickle
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
This does not apply cleanly. Please rebase on libata/for-7.3.
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2026-07-23 7:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 2:09 Rosen Penev
2026-07-23 7:41 ` Damien Le Moal [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-06-01 19:21 Rosen Penev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9bb67b07-b46b-4f1e-a4ac-f6e70f15b31e@kernel.org \
--to=dlemoal@kernel.org \
--cc=cassel@kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rosenp@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®