All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Tejun Heo <htejun@gmail.com>
Cc: IDE/ATA development list <linux-ide@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH 1/3] libata: implement dev->acpi_init_gtm
Date: Sat, 03 Nov 2007 08:33:04 -0400	[thread overview]
Message-ID: <472C6A80.3030206@garzik.org> (raw)
In-Reply-To: <472C1ED0.5080407@gmail.com>

Tejun Heo wrote:
> Tejun Heo wrote:
>> Jeff Garzik wrote:
>>> Tejun Heo wrote:
>>>> Add dev->acpi_init_gtm and store initial GTM values on host
>>>> initialization.  If the field is valid, ATA_PFLAG_INIT_GTM_VALID flag
>>>> is set.  This is to remember BIOS/firmware programmed initial timing
>>>> for later use before reset and mode configuration modify it.
>>>>
>>>> Signed-off-by: Tejun Heo <htejun@gmail.com>
>>> It sounds like pata_via and pata_amd need a foo_save_initial_config()
>>> much like AHCI, during which they would fill ppriv->init_gtm rather than
>>> ap->init_gtm.  Thoughts?  Both drivers are calling ata_acpi_cbl()
>>> themselves, permitting the possibility of ppriv->init_gtm.
>>>
>>> This avoids forcing everyone else to bear the memory cost in ata_port
>>> for just these two drivers.
>> The memory overhead is pretty small and more importantly there isn't a
>> good place to load initial GTM.  ACPI is associated with the host during
>> host registration after all private host initialization is complete.
>> When the EH gets invoked, the first thing which is done is forcing PIO0
>> before initial reset.
>>
>> Unless we add another hook, the only place to put this is in private
>> ->error_handler().  A driver can check whether it's being called for the
>> first time and record it in private structure, which isn't too pretty,
>> so I thought doing it this way was fair tradeoff.
> 
> Jeff, do you agree or still think it's better done in LLDs?  I'm okay
> either way.

I trust your judgement...  My reply was more of a "gut feeling" sort of 
thing.

In general, I want to keep libata as close as possible to the "LLD 
call-out model" as possible:  LLD registers itself with system services 
[perhaps using generic helpers to do so].  LLD fills in its own scsi 
host template and ata_port_operations [perhaps using generic helpers to 
do so].  LLD implements specific helpers that control LLD-specific 
behavior, calling out to libata helpers as need arises.

So I tend to prefer adding direct LLD control points to ATA_FLAG_xxx 
control points or other solutions, if the situation permits me to choose.

If you have to ask...  I will always prefer "it" (for some value of...) 
to be done in the LLD.  ;-)

	Jeff




  reply	other threads:[~2007-11-03 12:33 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-02 15:20 [PATCH 1/3] libata: implement dev->acpi_init_gtm Tejun Heo
2007-11-02 15:21 ` [PATCH 2/3] libata: extend ata_acpi_cbl_80wire() and fix cable detection in pata_via and pata_amd Tejun Heo
2007-11-02 15:22   ` [PATCH 3/3] pata_amd: fix and improve cable detection Tejun Heo
2007-11-02 15:44     ` Alan Cox
2007-11-02 22:22       ` Tejun Heo
2007-11-03  0:10         ` Alan Cox
2007-11-03  0:35           ` Tejun Heo
2007-11-03  0:42           ` Tejun Heo
2007-11-02 15:42   ` [PATCH 2/3] libata: extend ata_acpi_cbl_80wire() and fix cable detection in pata_via and pata_amd Alan Cox
2007-11-02 22:18     ` Tejun Heo
2007-11-02 23:45       ` Alan Cox
2007-11-03  0:46         ` Tejun Heo
2007-11-03  1:12           ` Alan Cox
2007-11-03  1:16             ` Tejun Heo
2007-11-03  1:23               ` Alan Cox
2007-11-03  7:03                 ` Tejun Heo
2007-11-03  0:57     ` Bartlomiej Zolnierkiewicz
2007-11-03  1:12       ` Bartlomiej Zolnierkiewicz
2007-11-02 15:36 ` [PATCH 1/3] libata: implement dev->acpi_init_gtm Jeff Garzik
2007-11-02 22:12   ` Tejun Heo
2007-11-03  7:10     ` Tejun Heo
2007-11-03 12:33       ` Jeff Garzik [this message]
2007-11-02 15:44 ` Alan Cox
2007-11-02 22:08   ` Tejun Heo

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=472C6A80.3030206@garzik.org \
    --to=jeff@garzik.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=htejun@gmail.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 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.