public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: bcm-kernel-feedback-list@broadcom.com,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Heiko Stuebner <heiko@sntech.de>,
	Srinath Mannam <srinath.mannam@broadcom.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Vivek Gautam <vivek.gautam@codeaurora.org>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	"open list:LIBATA SUBSYSTEM (Serial and Parallel ATA drivers)" 
	<linux-ide@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] ata: Allow having a port recovery callback
Date: Wed, 10 Jan 2018 06:25:05 -0800	[thread overview]
Message-ID: <20180110142505.GA3668920@devbig577.frc2.facebook.com> (raw)
In-Reply-To: <1515539097-26742-2-git-send-email-f.fainelli@gmail.com>

Hello,

On Tue, Jan 09, 2018 at 03:04:55PM -0800, Florian Fainelli wrote:
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index 3c09122bf038..921c2813af07 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -2045,6 +2045,8 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
>  	if (ata_msg_warn(ap))
>  		ata_dev_warn(dev, "failed to IDENTIFY (%s, err_mask=0x%x)\n",
>  			     reason, err_mask);
> +	if (ap->host->ops->port_recovery)
> +		ap->host->ops->port_recovery(ap);
>  	return rc;
>  }

This is a really weird spot to add a callback named port_recovery().
Can't the affected driver simply implement its own
ata_port_operations->read_id() operation which does the recovery if
necessary?

Thanks.

-- 
tejun

  reply	other threads:[~2018-01-10 14:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-09 23:04 [PATCH 0/3] ata: ahci_brcm: Recover from failures to identify devices Florian Fainelli
2018-01-09 23:04 ` [PATCH 1/3] ata: Allow having a port recovery callback Florian Fainelli
2018-01-10 14:25   ` Tejun Heo [this message]
2018-01-10 17:53     ` Florian Fainelli
2018-01-10 16:02   ` Sergei Shtylyov
2018-01-09 23:04 ` [PATCH 2/3] phy: brcm-sata: Implementation calibrate callback Florian Fainelli
2018-01-09 23:04 ` [PATCH 3/3] ata: ahci_brcm: Recover from failures to identify devices Florian Fainelli

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=20180110142505.GA3668920@devbig577.frc2.facebook.com \
    --to=tj@kernel.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=dan.carpenter@oracle.com \
    --cc=f.fainelli@gmail.com \
    --cc=heiko@sntech.de \
    --cc=kishon@ti.com \
    --cc=krzk@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srinath.mannam@broadcom.com \
    --cc=vivek.gautam@codeaurora.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