From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Paul Mundt <lethal@linux-sh.org>,
linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
garyhade@us.ibm.com
Subject: Re: [PATCH] libata: implement ata_wait_after_reset()
Date: Tue, 29 May 2007 09:33:37 +0200 [thread overview]
Message-ID: <465BD751.8000708@gmail.com> (raw)
In-Reply-To: <465B8277.9010001@garzik.org>
Jeff Garzik wrote:
> Tejun Heo wrote:
>> - msleep(150);
>> + /* wait a while before checking status */
>> + ata_wait_after_reset(ap, deadline);
> [...]
>> - msleep(150);
>> + /* wait a while before checking status */
>> + ata_wait_after_reset(ap, deadline);
>>
>> /* Before we perform post reset processing we want to see if
>> * the bus shows 0xFF because the odd clown forgets the D7
>> @@ -3543,8 +3583,8 @@ int sata_std_hardreset(struct ata_port *
>> return 0;
>> }
>>
>> - /* wait a while before checking status, see SRST for more info */
>> - msleep(150);
>> + /* wait a while before checking status */
>> + ata_wait_after_reset(ap, deadline);
>>
>> rc = ata_wait_ready(ap, deadline);
> [...]
>> - msleep(150);
>> + /* wait a while before checking status */
>> + ata_wait_after_reset(ap, deadline);
>>
>> /* Before we perform post reset processing we want to see if
>> * the bus shows 0xFF because the odd clown forgets the D7
>> Index: work/drivers/ata/sata_inic162x.c
>> ===================================================================
>> --- work.orig/drivers/ata/sata_inic162x.c
>> +++ work/drivers/ata/sata_inic162x.c
>> @@ -446,7 +446,7 @@ static int inic_hardreset(struct ata_por
>> struct ata_taskfile tf;
>>
>> /* wait a while before checking status */
>> - msleep(150);
>> + ata_wait_after_reset(ap, deadline);
>>
>> rc = ata_wait_ready(ap, deadline);
> [...]
>
> The main thing that bothers me is not the increase in delay, but the
> fact that this create converts a delay/Status-poll sequence into a
> delay/Status-poll/Status-poll sequence.
>
> ata_wait_after_reset() immediately before ata_wait_ready() seems highly
> redundant. Why not just poll Status once?
I was trying to minimize code disturbance around reset such that
ata_wait_after_reset() can be drop-in replacement for msleep(150). This
was for two reasons 1. as this patch was to fix regression I didn't want
to introduce a lot of change into -rcX and 2. I was lazy. :-)
As dont-consider-0xff-as-port-empty-if-sstatus-available patch fixes the
regression nicely, I think we can delay this to 2.6.23. I'll merge
ata_wait_after_reset() into ata_wait_ready() (or the other way around).
Thanks.
--
tejun
prev parent reply other threads:[~2007-05-29 7:34 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-10 7:20 libata reset-seq merge broke sata_sil on sh Paul Mundt
2007-05-10 11:28 ` Tejun Heo
2007-05-10 11:53 ` Tejun Heo
2007-05-10 12:46 ` Paul Mundt
2007-05-10 13:08 ` Tejun Heo
2007-05-11 0:52 ` Paul Mundt
2007-05-11 9:39 ` Tejun Heo
2007-05-12 3:49 ` Paul Mundt
2007-05-16 0:30 ` Paul Mundt
2007-05-16 16:44 ` [PATCH] libata: implement ata_wait_after_reset() Tejun Heo
2007-05-17 0:50 ` Paul Mundt
2007-05-17 0:59 ` Paul Mundt
2007-05-19 15:54 ` Indan Zupancic
2007-05-19 15:54 ` Indan Zupancic
2007-05-19 18:23 ` Tejun Heo
2007-05-19 22:54 ` Indan Zupancic
2007-05-20 9:50 ` Tejun Heo
2007-05-20 13:26 ` Indan Zupancic
2007-05-20 17:09 ` Tejun Heo
2007-05-20 19:35 ` Indan Zupancic
2007-05-19 16:39 ` Indan Zupancic
2007-05-19 16:39 ` Indan Zupancic
2007-05-19 18:43 ` Tejun Heo
2007-05-19 19:04 ` Tejun Heo
2007-05-19 22:33 ` sd_resume redundant? [was: [PATCH] libata: implement ata_wait_after_reset()] Indan Zupancic
2007-05-19 22:33 ` Indan Zupancic
2007-05-20 9:54 ` Tejun Heo
2007-05-20 14:27 ` Indan Zupancic
2007-05-20 17:17 ` Tejun Heo
2007-05-20 19:47 ` Indan Zupancic
2007-05-21 6:02 ` [PATCH] libata: implement ata_wait_after_reset() Paul Mundt
2007-05-29 1:31 ` Jeff Garzik
2007-05-29 7:33 ` Tejun Heo [this message]
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=465BD751.8000708@gmail.com \
--to=htejun@gmail.com \
--cc=garyhade@us.ibm.com \
--cc=jeff@garzik.org \
--cc=lethal@linux-sh.org \
--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 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.