From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Tejun Heo <tj@kernel.org>,
IDE/ATA development list <linux-ide@vger.kernel.org>,
Ronny Hegewald <Ronny.Hegewald@online.de>,
stable@vger.kernel.org
Subject: Re: [PATCH 1/2] libata: allow sata_sil24 to opt-out of tag ordered submission
Date: Sat, 17 Jan 2015 21:43:01 +0300 [thread overview]
Message-ID: <54BAAD35.9010502@cogentembedded.com> (raw)
In-Reply-To: <CAPcyv4h3n+cnvADiEbGgi1EFCqEwhzZ7gt_6XUmSC62aOf2Dzw@mail.gmail.com>
On 01/17/2015 09:35 PM, Dan Williams wrote:
> >> Ronny reports: https://bugzilla.kernel.org/show_bug.cgi?id=87101
> >> "Since commit 8a4aeec8d "libata/ahci: accommodate tag ordered
> >> controllers" the access to the harddisk on the first SATA-port is
> >> failing on its first access. The access to the harddisk on the
> >> second port is working normal.
> >> When reverting the above commit, access to both harddisks is working
> >> fine again."
> >> Maintain tag ordered submission as the default, but allow sata_sil24 to
> >> continue with the old behavior.
> >> Cc: <stable@vger.kernel.org <mailto:stable@vger.kernel.org>>
> >> Cc: Tejun Heo <tj@kernel.org <mailto:tj@kernel.org>>
> >> Reported-by: Ronny Hegewald <Ronny.Hegewald@online.de>
> >> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> >> ---
> >> drivers/ata/libata-core.c | 5 ++++-
> >> drivers/ata/sata_sil24.c | 2 +-
> >> include/linux/libata.h | 1 +
> >> 3 files changed, 6 insertions(+), 2 deletions(-)
> >> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> >> index 5c84fb5c3372..e2085d4b5b93 100644
> >> --- a/drivers/ata/libata-core.c
> >> +++ b/drivers/ata/libata-core.c
> >> @@ -4748,7 +4748,10 @@ static struct ata_queued_cmd *ata_qc_new(struct
> ata_port *ap)
> >> return NULL;
> >>
> >> for (i = 0, tag = ap->last_tag + 1; i < max_queue; i++, tag++) {
> >> - tag = tag < max_queue ? tag : 0;
> >> + if (ap->flags & ATA_FLAG_LOWTAG)
> >> + tag = i;
> >> + else
> >> + tag = tag < max_queue ? tag : 0;
> > Ugh, this is clear abuse of the ?: operator... Why not simply:
> > else if (tag >= max_queue)
> > tag = 0;
> "Abuse"!? Let's just call it "creative differences adding in a minimal quirk
> while neglecting to refactor" ;-).
In fact, the old code had the same abuse, I didn't notice that...
> Sure, that's cleaner.
Thanks. :-)
MBR, Sergei
next prev parent reply other threads:[~2015-01-17 18:43 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-16 23:12 [PATCH 0/2] fix sil24 regression and muddy the ata tag allocation waters Dan Williams
2015-01-16 23:13 ` [PATCH 1/2] libata: allow sata_sil24 to opt-out of tag ordered submission Dan Williams
2015-01-17 10:59 ` Sergei Shtylyov
[not found] ` <CAPcyv4h3n+cnvADiEbGgi1EFCqEwhzZ7gt_6XUmSC62aOf2Dzw@mail.gmail.com>
2015-01-17 18:43 ` Sergei Shtylyov [this message]
2015-01-19 14:12 ` Tejun Heo
2015-01-19 14:24 ` Sergei Shtylyov
2015-01-19 14:27 ` Tejun Heo
2015-01-19 14:13 ` Tejun Heo
2015-01-16 23:13 ` [PATCH 2/2] libata: micro-optimize tag allocation Dan Williams
2015-01-16 23:17 ` Jens Axboe
2015-01-16 23:19 ` Dan Williams
2015-01-16 23:21 ` Jens Axboe
2015-01-16 23:38 ` Dan Williams
2015-01-16 23:31 ` Shaohua Li
2015-01-16 23:49 ` Dan Williams
2015-01-16 23:55 ` Shaohua Li
2015-01-16 23:59 ` Dan Williams
2015-01-17 0:10 ` Shaohua Li
2015-01-19 14:14 ` Tejun Heo
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=54BAAD35.9010502@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=Ronny.Hegewald@online.de \
--cc=dan.j.williams@intel.com \
--cc=linux-ide@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tj@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).