From: Tejun Heo <tj@kernel.org>
To: David Milburn <dmilburn@redhat.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH 1/2] libata: initialize link speed from sstatus if online.
Date: Sat, 21 Oct 2017 09:48:43 -0700 [thread overview]
Message-ID: <20171021164843.GW1302522@devbig577.frc2.facebook.com> (raw)
In-Reply-To: <1508437836-31649-2-git-send-email-dmilburn@redhat.com>
Hello, David.
On Thu, Oct 19, 2017 at 01:30:35PM -0500, David Milburn wrote:
> @@ -3002,16 +3002,16 @@ int ata_bus_probe(struct ata_port *ap)
> */
> static void sata_print_link_status(struct ata_link *link)
> {
> - u32 sstatus, scontrol, tmp;
> + u32 sstatus, scontrol;
>
> if (sata_scr_read(link, SCR_STATUS, &sstatus))
> return;
> sata_scr_read(link, SCR_CONTROL, &scontrol);
>
> if (ata_phys_link_online(link)) {
> - tmp = (sstatus >> 4) & 0xf;
> + link->sata_spd = (sstatus >> 4) & 0xf;
> ata_link_info(link, "SATA link up %s (SStatus %X SControl %X)\n",
> - sata_spd_string(tmp), sstatus, scontrol);
> + sata_spd_string(link->sata_spd), sstatus, scontrol);
> } else {
> ata_link_info(link, "SATA link down (SStatus %X SControl %X)\n",
> sstatus, scontrol);
I don't think it makes sense to update a link field from a
print_status function.
Thanks.
--
tejun
next prev parent reply other threads:[~2017-10-21 16:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-19 18:30 [PATCH 0/2] libata: hotplug link speed David Milburn
2017-10-19 18:30 ` [PATCH 1/2] libata: initialize link speed from sstatus if online David Milburn
2017-10-21 16:48 ` Tejun Heo [this message]
2017-10-19 18:30 ` [PATCH 2/2] Allow error handler to change speed only if link is online David Milburn
2017-10-21 16:53 ` [PATCH 0/2] libata: hotplug link speed Tejun Heo
2017-10-23 19:38 ` David Milburn
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=20171021164843.GW1302522@devbig577.frc2.facebook.com \
--to=tj@kernel.org \
--cc=dmilburn@redhat.com \
--cc=linux-ide@vger.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