linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Lord <liml@rtr.ca>
To: Tejun Heo <htejun@gmail.com>
Cc: IDE/ATA development list <linux-ide@vger.kernel.org>,
	Jeff Garzik <jgarzik@pobox.com>
Subject: Re: [PATCH 4/5] sata_mv new mv_sata_hardreset handler
Date: Wed, 02 Apr 2008 22:48:18 -0400	[thread overview]
Message-ID: <47F44572.5010100@rtr.ca> (raw)
In-Reply-To: <47F429B0.7020204@gmail.com>

Tejun Heo wrote:
> Mark Lord wrote:
>> Tejun Heo wrote:
>>> Mark Lord wrote:
>> ..
>>>> +    /* FIXME:
>>>> +     * Except for the outer do-while construct below, this function
>>>> +     * is an exact clone of sata_std_hardreset() from libata-core.c.
>>>> +     *
>>>> +     * Once this driver is stable, we should re-org libata so we 
>>>> can share
>>>> +     * more of that code, rather than duplicating so much of it here
>>>> +     * and in other drivers.
>>>> +     */
>>>
>>> After modularize patchsets, sata_link_hardreset() does all the chores 
>>> needed around hardreset and sata_mv should be able to just build a 
>>> loop around it.
>> ..
>>
>> Mmm... I don't see how this helps.
>>
>> The bulk of mv_sata_hardreset() is from sata_std_hardreset().
>>
>> The only part those two do *not* have in common, is that
>> sata_mv needs to do it's own equivalent of sata_link_hardreset(),
>> so sata_link_hardreset() cannot be reused here.  Wrapper or not.
>>
>> Now, if we had a per-LLD .link_hardreset op, defaulting to 
>> sata_link_hardreset,
>> then this would be trivial.
> 
> The MV specific part is retry-if-offline w/ lower link speed, right? You 
> can do that just as well by looping outside of sata_link_hardreset().  
..

Yes, the code already has a loop "outside of sata_link_hardreset()"
for the speed errata handling.  So nothing new there.

And the rest of that routine is a line-by-line clone of ata_std_hardreset().
This is smaller than what other drivers have cloned for these routines,
and a lot better than the old code from sata_mv that it replaces.

The comment in my patch above is just a reminder that someday we could
go back in and address those things.  In *all* LLDs, not just sata_mv.

I guess I'd better stop adding such comments in the future..  :)

Still think it needs any changes ?

  reply	other threads:[~2008-04-03  2:48 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-31 23:27 [PATCH 0/5] sata_mv cleanups Mark Lord
2008-03-31 23:33 ` [PATCH 1/5] sata_mv cosmetic fixes Mark Lord
2008-04-04  7:56   ` Jeff Garzik
2008-03-31 23:34 ` [PATCH 2/5] sata_mv clean up mv_stop_edma usage Mark Lord
2008-04-02  1:59   ` Tejun Heo
2008-04-02 19:33     ` Mark Lord
2008-04-02 19:42       ` Jeff Garzik
2008-04-02 19:47         ` Mark Lord
2008-04-03  0:47           ` Tejun Heo
2008-04-04  7:59   ` Jeff Garzik
2008-03-31 23:35 ` [PATCH 3/5] sata_mv fix ifctl handling Mark Lord
2008-03-31 23:35 ` [PATCH 4/5] sata_mv new mv_sata_hardreset handler Mark Lord
2008-04-02  2:31   ` Tejun Heo
2008-04-02 19:33     ` Mark Lord
2008-04-02 19:51     ` Mark Lord
2008-04-03  0:49       ` Tejun Heo
2008-04-03  2:48         ` Mark Lord [this message]
2008-04-03  3:15           ` Tejun Heo
2008-04-03 14:01             ` Mark Lord
2008-04-03 14:04               ` Mark Lord
2008-04-03 14:09                 ` Tejun Heo
2008-04-03 14:21                   ` Mark Lord
2008-04-03 14:35                     ` Tejun Heo
2008-04-03 15:05                       ` Mark Lord
2008-04-03 14:05               ` Tejun Heo
2008-03-31 23:36 ` [PATCH 5/5] sata_mv remove mv_phy_reset and mv_postreset Mark Lord
2008-04-04  8:02   ` Jeff Garzik
2008-04-04 14:25     ` Mark Lord
2008-04-11  0:21     ` [PATCH] sata_mv rework hardreset sequence Mark Lord
2008-04-16  1:17       ` Mark Lord

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=47F44572.5010100@rtr.ca \
    --to=liml@rtr.ca \
    --cc=htejun@gmail.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@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;
as well as URLs for NNTP newsgroup(s).