From: Tejun Heo <tj@kernel.org>
To: Alexander Gordeev <agordeev@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH v4 2/4] AHCI: Move host activation code into ahci_host_activate()
Date: Sun, 28 Sep 2014 12:04:08 -0400 [thread overview]
Message-ID: <20140928160408.GA8050@mtj.dyndns.org> (raw)
In-Reply-To: <39cff5287f4fcc33d0f00f89cb2337c5a5ec22b6.1411648623.git.agordeev@redhat.com>
On Thu, Sep 25, 2014 at 03:13:22PM +0200, Alexander Gordeev wrote:
> -/**
> - * ahci_host_activate - start AHCI host, request IRQs and register it
> - * @host: target ATA host
> - * @irq: base IRQ number to request
> - * @irq_handler: irq_handler used when requesting IRQs
> - * @irq_flags: irq_flags used when requesting IRQs
> - *
> - * Similar to ata_host_activate, but requests IRQs according to AHCI-1.1
> - * when multiple MSIs were allocated. That is one MSI per port, starting
> - * from @irq.
> - *
> - * LOCKING:
> - * Inherited from calling layer (may sleep).
> - *
> - * RETURNS:
> - * 0 on success, -errno otherwise.
> - */
> -int ahci_host_activate(struct ata_host *host, int irq)
> -{
> - int i, rc;
> -
> - rc = ata_host_start(host);
> - if (rc)
> - return rc;
> -
> - for (i = 0; i < host->n_ports; i++) {
> - struct ahci_port_priv *pp = host->ports[i]->private_data;
> -
> - /* Do not receive interrupts sent by dummy ports */
> - if (!pp) {
> - disable_irq(irq + i);
> - continue;
> - }
> -
> - rc = devm_request_threaded_irq(host->dev, irq + i,
> - ahci_hw_interrupt,
> - ahci_thread_fn, IRQF_SHARED,
> - pp->irq_desc, host->ports[i]);
> - if (rc)
> - goto out_free_irqs;
> - }
> -
> - for (i = 0; i < host->n_ports; i++)
> - ata_port_desc(host->ports[i], "irq %d", irq + i);
> -
> - rc = ata_host_register(host, &ahci_sht);
> - if (rc)
> - goto out_free_all_irqs;
> -
> - return 0;
> -
> -out_free_all_irqs:
> - i = host->n_ports;
> -out_free_irqs:
> - for (i--; i >= 0; i--)
> - devm_free_irq(host->dev, irq + i, host->ports[i]);
> -
> - return rc;
> -}
It's generally a bad idea to mix code movement w/ other changes. I'm
applying this one but please separate code movements to separate
patches from now on.
Thanks.
--
tejun
next prev parent reply other threads:[~2014-09-28 16:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-25 13:13 [PATCH v4 0/4] AHCI: Optimize interrupt processing in multi-MSI mode Alexander Gordeev
2014-09-25 13:13 ` [PATCH v4 1/4] AHCI: Cleanup checking of multiple MSIs/SLM modes Alexander Gordeev
2014-09-25 13:13 ` [PATCH v4 2/4] AHCI: Move host activation code into ahci_host_activate() Alexander Gordeev
2014-09-28 16:04 ` Tejun Heo [this message]
2014-09-29 10:18 ` Alexander Gordeev
2014-09-29 10:19 ` [PATCH] " Alexander Gordeev
2014-09-29 14:04 ` Tejun Heo
2014-09-25 13:13 ` [PATCH v4 3/4] AHCI: Make few function names more descriptive Alexander Gordeev
2014-09-28 16:04 ` Tejun Heo
2014-09-25 13:13 ` [PATCH v4 4/4] AHCI: Do not read HOST_IRQ_STAT reg in multi-MSI mode Alexander Gordeev
2014-09-28 16:10 ` Tejun Heo
2014-09-29 10:21 ` [PATCH] " Alexander Gordeev
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=20140928160408.GA8050@mtj.dyndns.org \
--to=tj@kernel.org \
--cc=agordeev@redhat.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@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
Powered by JetHome