diff mbox

[v2,1/3] ata: ahci: rpm_put port on port_stop to match rpm_get in port_start

Message ID 20180420101834.15783-1-0v3rdr0n3@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

0v3rdr0n3@gmail.com April 20, 2018, 10:18 a.m. UTC
From: Samuel Morris <samorris@lexmark.com>

Signed-off-by: Samuel Morris <samorris@lexmark.com>
---
 drivers/ata/libahci.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Tejun Heo April 26, 2018, 7:09 p.m. UTC | #1
Hello,

On Fri, Apr 20, 2018 at 10:18:32AM +0000, 0v3rdr0n3@gmail.com wrote:
> From: Samuel Morris <samorris@lexmark.com>
> 
> Signed-off-by: Samuel Morris <samorris@lexmark.com>
> ---
>  drivers/ata/libahci.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
> index 7adcf3caabd0..8eec099a605f 100644
> --- a/drivers/ata/libahci.c
> +++ b/drivers/ata/libahci.c
> @@ -2432,6 +2432,8 @@ static void ahci_port_stop(struct ata_port *ap)
>  	 * re-enabling INTx.
>  	 */
>  	writel(1 << ap->port_no, host_mmio + HOST_IRQ_STAT);
> +
> +	ahci_rpm_put_port(ap);

Can you add a comment explaining that this is to balance out the final
ahci_port_resume() call in port_start?

Thanks.
Samuel Morris April 30, 2018, 12:06 a.m. UTC | #2
On Thu, Apr 26, 2018 at 7:09 PM, Tejun Heo <tj@kernel.org> wrote:
> Hello,
>
> On Fri, Apr 20, 2018 at 10:18:32AM +0000, 0v3rdr0n3@gmail.com wrote:
>> From: Samuel Morris <samorris@lexmark.com>
>>
>> Signed-off-by: Samuel Morris <samorris@lexmark.com>
>> ---
>>  drivers/ata/libahci.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
>> index 7adcf3caabd0..8eec099a605f 100644
>> --- a/drivers/ata/libahci.c
>> +++ b/drivers/ata/libahci.c
>> @@ -2432,6 +2432,8 @@ static void ahci_port_stop(struct ata_port *ap)
>>        * re-enabling INTx.
>>        */
>>       writel(1 << ap->port_no, host_mmio + HOST_IRQ_STAT);
>> +
>> +     ahci_rpm_put_port(ap);
>
> Can you add a comment explaining that this is to balance out the final
> ahci_port_resume() call in port_start?

Will do.

>
> Thanks.
>
> --
> tejun
diff mbox

Patch

diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 7adcf3caabd0..8eec099a605f 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -2432,6 +2432,8 @@  static void ahci_port_stop(struct ata_port *ap)
 	 * re-enabling INTx.
 	 */
 	writel(1 << ap->port_no, host_mmio + HOST_IRQ_STAT);
+
+	ahci_rpm_put_port(ap);
 }
 
 void ahci_print_info(struct ata_host *host, const char *scc_s)