Patchwork sata_mv WARNING: at drivers/ata/libata-sff.c:1322

login
register
mail settings
Submitter Gwendal Grignou
Date July 14, 2011, 7:19 a.m.
Message ID <CAMHSBOU+XHaFn_HtDTdvPr-sHEGS9MsYgCG9dUk71hLZJDaRow@mail.gmail.com>
Download mbox | patch
Permalink /patch/104634/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Gwendal Grignou - July 14, 2011, 7:19 a.m.
Mark,

How PMP support with sata_mv broken for you? I am using marvell 7042
and sil3726 and it works fine, but I am still using 2.6.36.

Tejun, Marc,

I think what happen is if a command is canceled while waiting for
sff_pio_task to fire up, the warning may happen. The following patch
should fix it. Marc, can you reproduce the problem easily?

Thanks,
Gwendal.



On Wed, Jul 13, 2011 at 3:41 PM, Mark Lord <mlord@pobox.com> wrote:
> On 11-07-13 04:54 PM, Gwendal Grignou wrote:
>> I put the warning because a new pio task should not be queued while
>> another one is pending. Therefore, either sff_pio_task_link is NULL
>> [no task pending] or sff_pio_task_link is equal to the link of the
>> task [assumed to be the task in progress].
>> I must have missed something and did not cleanup sff_pio_task_link
>> properly in case of error...
> ..
>
> I wonder if any of those changes are what broke PMP support?
> I have a Marvell PMP here that used to work when I finished with sata_mv,
> but no longer works with it now.
>
> ??
> --
> Mark Lord
> Real-Time Remedies Inc.
> mlord@pobox.com
>
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mark Lord - July 14, 2011, 12:03 p.m.
On 11-07-14 03:19 AM, Gwendal Grignou wrote:
> Mark,
> 
> How PMP support with sata_mv broken for you? I am using marvell 7042
> and sil3726 and it works fine, but I am still using 2.6.36.


It's broken when used with a Marvell PMP.
Still works with other brands.

Strange, that.
Marc MERLIN - July 15, 2011, 3:55 p.m.
On Thu, Jul 14, 2011 at 12:19:16AM -0700, Gwendal Grignou wrote:
> Mark,
> 
> How PMP support with sata_mv broken for you? I am using marvell 7042
> and sil3726 and it works fine, but I am still using 2.6.36.
> 
> Tejun, Marc,
> 
> I think what happen is if a command is canceled while waiting for
> sff_pio_task to fire up, the warning may happen. The following patch
> should fix it. Marc, can you reproduce the problem easily?
> 
> Thanks,
> Gwendal.
> 
> diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
> index 996a7a5..c24127d 100644
> --- a/drivers/ata/libata-sff.c
> +++ b/drivers/ata/libata-sff.c
> @@ -1333,6 +1333,7 @@ void ata_sff_flush_pio_task(struct ata_port *ap)
> 
>         cancel_delayed_work_sync(&ap->sff_pio_task);
>         ap->hsm_task_state = HSM_ST_IDLE;
> +       ap->sff_pio_task_link = NULL;
> 
>         if (ata_msg_ctl(ap))
>                 ata_port_dbg(ap, "%s: EXIT\n", __func__);

I can confirm this makes the warnings go away, thanks Gwendal.

Marc

Patch

diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 996a7a5..c24127d 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -1333,6 +1333,7 @@  void ata_sff_flush_pio_task(struct ata_port *ap)

        cancel_delayed_work_sync(&ap->sff_pio_task);
        ap->hsm_task_state = HSM_ST_IDLE;
+       ap->sff_pio_task_link = NULL;

        if (ata_msg_ctl(ap))
                ata_port_dbg(ap, "%s: EXIT\n", __func__);