All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: suman Tripathi <stripathi@apm.com>,
	olof@lixom.net, tj@kernel.org, arnd@arndb.de
Cc: linux-ide@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, mlangsdo@redhat.com,
	jcm@redhat.com, patches@apm.com
Subject: Re: [PATCH v3 1/3] libahci: Implement the capability to override the generic ahci interrupt handler.
Date: Fri, 5 Feb 2016 17:12:40 +0300	[thread overview]
Message-ID: <56B4ADD8.1020008@cogentembedded.com> (raw)
In-Reply-To: <1454620826-22554-2-git-send-email-stripathi@apm.com>

Hello.

On 02/05/2016 12:20 AM, suman Tripathi wrote:

> From: Suman Tripathi <stripathi@apm.com>
>
> This patch implements the capability to override the generic
> ahci interrupt handler so that the LDD drivers can implement

    AHCI.

> there own custom interrupt handler routines.

    s/there/their/.

> Signed-off-by: Suman Tripathi <stripathi@apm.com>
> ---
>   drivers/ata/ahci.h    |    2 ++
>   drivers/ata/libahci.c |   32 +++++++++++++++++++++++---------
>   2 files changed, 25 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
> index a4faa43..3d883ee 100644
> --- a/drivers/ata/ahci.h
> +++ b/drivers/ata/ahci.h
> @@ -360,6 +360,7 @@ struct ahci_host_priv {
>   	 * be overridden anytime before the host is activated.
>   	 */
>   	void			(*start_engine)(struct ata_port *ap);
> +	irqreturn_t 		(*ahci_irq_intr)(int irq, void *dev_instance);

    The 'ahci_irq_intr' name is somewhat tautological.


[...]
> diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
> index eda3cf2..5d3035a 100644
> --- a/drivers/ata/libahci.c
> +++ b/drivers/ata/libahci.c
[...]
> @@ -2504,15 +2505,28 @@ int ahci_host_activate(struct ata_host *host, struct scsi_host_template *sht)
>   	struct ahci_host_priv *hpriv = host->private_data;
>   	int irq = hpriv->irq;
>   	int rc;
> +	irqreturn_t (*ahci_irq_handler)(int irq, void *dev_instance);
>
> -	if (hpriv->flags & (AHCI_HFLAG_MULTI_MSI | AHCI_HFLAG_MULTI_MSIX))
> -		rc = ahci_host_activate_multi_irqs(host, sht);
> -	else if (hpriv->flags & AHCI_HFLAG_EDGE_IRQ)
> -		rc = ata_host_activate(host, irq, ahci_single_edge_irq_intr,
> -				       IRQF_SHARED, sht);
> -	else
> -		rc = ata_host_activate(host, irq, ahci_single_level_irq_intr,
> -				       IRQF_SHARED, sht);
> +	ahci_irq_handler = hpriv->ahci_irq_intr;
> +
> +	if (hpriv->flags & (AHCI_HFLAG_MULTI_MSI | AHCI_HFLAG_MULTI_MSIX)) {
> +		if (!ahci_irq_handler)
> +			rc = ahci_host_activate_multi_irqs(host, sht);
> +		else
> +			dev_warn(host->dev, "both AHCI_HFLAG_MULTI_MSI flag set \
> +				 and custom irq handler implemented\n");
> +
> +	} else {
> +		if (!ahci_irq_handler) {

    Why not *else* *if* on a single line?

[...]

MBR, Sergei


WARNING: multiple messages have this Message-ID (diff)
From: sergei.shtylyov@cogentembedded.com (Sergei Shtylyov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/3] libahci: Implement the capability to override the generic ahci interrupt handler.
Date: Fri, 5 Feb 2016 17:12:40 +0300	[thread overview]
Message-ID: <56B4ADD8.1020008@cogentembedded.com> (raw)
In-Reply-To: <1454620826-22554-2-git-send-email-stripathi@apm.com>

Hello.

On 02/05/2016 12:20 AM, suman Tripathi wrote:

> From: Suman Tripathi <stripathi@apm.com>
>
> This patch implements the capability to override the generic
> ahci interrupt handler so that the LDD drivers can implement

    AHCI.

> there own custom interrupt handler routines.

    s/there/their/.

> Signed-off-by: Suman Tripathi <stripathi@apm.com>
> ---
>   drivers/ata/ahci.h    |    2 ++
>   drivers/ata/libahci.c |   32 +++++++++++++++++++++++---------
>   2 files changed, 25 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
> index a4faa43..3d883ee 100644
> --- a/drivers/ata/ahci.h
> +++ b/drivers/ata/ahci.h
> @@ -360,6 +360,7 @@ struct ahci_host_priv {
>   	 * be overridden anytime before the host is activated.
>   	 */
>   	void			(*start_engine)(struct ata_port *ap);
> +	irqreturn_t 		(*ahci_irq_intr)(int irq, void *dev_instance);

    The 'ahci_irq_intr' name is somewhat tautological.


[...]
> diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
> index eda3cf2..5d3035a 100644
> --- a/drivers/ata/libahci.c
> +++ b/drivers/ata/libahci.c
[...]
> @@ -2504,15 +2505,28 @@ int ahci_host_activate(struct ata_host *host, struct scsi_host_template *sht)
>   	struct ahci_host_priv *hpriv = host->private_data;
>   	int irq = hpriv->irq;
>   	int rc;
> +	irqreturn_t (*ahci_irq_handler)(int irq, void *dev_instance);
>
> -	if (hpriv->flags & (AHCI_HFLAG_MULTI_MSI | AHCI_HFLAG_MULTI_MSIX))
> -		rc = ahci_host_activate_multi_irqs(host, sht);
> -	else if (hpriv->flags & AHCI_HFLAG_EDGE_IRQ)
> -		rc = ata_host_activate(host, irq, ahci_single_edge_irq_intr,
> -				       IRQF_SHARED, sht);
> -	else
> -		rc = ata_host_activate(host, irq, ahci_single_level_irq_intr,
> -				       IRQF_SHARED, sht);
> +	ahci_irq_handler = hpriv->ahci_irq_intr;
> +
> +	if (hpriv->flags & (AHCI_HFLAG_MULTI_MSI | AHCI_HFLAG_MULTI_MSIX)) {
> +		if (!ahci_irq_handler)
> +			rc = ahci_host_activate_multi_irqs(host, sht);
> +		else
> +			dev_warn(host->dev, "both AHCI_HFLAG_MULTI_MSI flag set \
> +				 and custom irq handler implemented\n");
> +
> +	} else {
> +		if (!ahci_irq_handler) {

    Why not *else* *if* on a single line?

[...]

MBR, Sergei

  reply	other threads:[~2016-02-05 14:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-04 21:20 [PATCH v3 0/3] ata: Fixes related to edge trigger latch for the ahci_xgene_driver suman Tripathi
2016-02-04 21:20 ` [PATCH v3 1/3] libahci: Implement the capability to override the generic ahci interrupt handler suman Tripathi
2016-02-05 14:12   ` Sergei Shtylyov [this message]
2016-02-05 14:12     ` Sergei Shtylyov
2016-02-05 16:41   ` Tejun Heo
2016-02-05 16:41     ` Tejun Heo
2016-02-05 18:06     ` Suman Tripathi
2016-02-05 18:06       ` Suman Tripathi
     [not found] ` <1454620826-22554-1-git-send-email-stripathi-qTEPVZfXA3Y@public.gmane.org>
2016-02-04 21:20   ` [PATCH v3 2/3] libahci: ata: Remove the AHCI_HFLAG_EDGE_IRQ support from libahci suman Tripathi
2016-02-04 21:20 ` [PATCH v3 3/3] ahci_xgene: Implement the workaround to fix the missing of edge interrupt for HOST_IRQ_STAT suman Tripathi

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=56B4ADD8.1020008@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=jcm@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=mlangsdo@redhat.com \
    --cc=olof@lixom.net \
    --cc=patches@apm.com \
    --cc=stripathi@apm.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.