linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 08/12] libata: convert drivers with combined SATA/PATA ports to new init model
@ 2007-03-09 22:35 Mikael Pettersson
  2007-03-10  5:02 ` Tejun Heo
  0 siblings, 1 reply; 8+ messages in thread
From: Mikael Pettersson @ 2007-03-09 22:35 UTC (permalink / raw)
  To: alan, htejun, jeff, linux-ide

On Fri, 9 Mar 2007 20:15:36 +0900, Tejun Heo wrote:
> Convert sata_via and sata_promise to nwe init model.  Both controllers
> can have combined configuration (SATA + PATA) and used twisted
> initialization method (modifying port in ->port_start) to overcome
> probe_ent limitations.
> 
> This patch converts both drivers to new init model in which such
> configuration is natively supported.
> 
> * promise: Combined pata port now uses separate port_info entry right
>   after the sata counterpart entry.
> 
> * promise: Controller configuration is discerned using ap->flags.
>   This simplifies init path and makes it look more like other LLDs.
> 
> * promise: SATA/PATA branches are converted into separate ops.
>   Remaining ones are converted to more standard ap->cbl ==
>   ATA_CBL_SATA check.

I don't object to the new init model in principle.
My only reservation here is that you are folding what
logically are separate changes into one big change to
sata_promise, and that makes the patch more difficult
to review (and regressions more difficult to trace).

I would like to do the SATA/PATA splitup into distinct
operations as a separate first step, with you doing the
new init model adaptation in a followup step.

Also, at least the error handler changes would seem to
be in conflict with Alan's cable type changes.

/Mikael

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: [PATCH 08/12] libata: convert drivers with combined SATA/PATA ports to new init model
@ 2007-04-11  8:58 Mikael Pettersson
  0 siblings, 0 replies; 8+ messages in thread
From: Mikael Pettersson @ 2007-04-11  8:58 UTC (permalink / raw)
  To: alan, brking, htejun, jeff, linux-ide

On Wed, 11 Apr 2007 15:42:05 +0900, Tejun Heo wrote:
...
> diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c
> index baa8368..8e8fe59 100644
> --- a/drivers/ata/sata_promise.c
> +++ b/drivers/ata/sata_promise.c
...
> @@ -333,7 +349,7 @@ static struct pci_driver pdc_ata_pci_driver = {
>  };
>  
>  
> -static int pdc_common_port_start(struct ata_port *ap)
> +static int pdc_pata_port_start(struct ata_port *ap)
>  {
>  	struct device *dev = ap->host->dev;
>  	struct pdc_port_priv *pp;
> @@ -358,15 +374,14 @@ static int pdc_common_port_start(struct ata_port *ap)
>  
>  static int pdc_sata_port_start(struct ata_port *ap)
>  {
> -	struct pdc_host_priv *hp = ap->host->private_data;
>  	int rc;
>  
> -	rc = pdc_common_port_start(ap);
> +	rc = pdc_pata_port_start(ap);

NAK this rename. It's conceptually wrong to unconditionally
invoke a PATA operation from a SATA operation. The old name
made it clear that that operation was common for all types
of ports.

The rest looks good, but I'll have to take a closer look
to verify the details.

/Mikael

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCHSET] libata: implement new initialization model, take #4
@ 2007-04-11  6:42 Tejun Heo
  2007-04-11  6:42 ` [PATCH 08/12] libata: convert drivers with combined SATA/PATA ports to new init model Tejun Heo
  0 siblings, 1 reply; 8+ messages in thread
From: Tejun Heo @ 2007-04-11  6:42 UTC (permalink / raw)
  To: jeff, alan, linux-ide, brking, htejun

Hello, all.

This is the fourth take of new-init-model patchset.  Changes from the
last take[L] are...

* memory leak fixed in patch#1
* s/attach/register/g
* ap->cbl == ATA_CBL_* test replaced with ATA_FLAG_SATA test
* updated to the current upstream
* dependency to pci_configure_dma_masks() dropped

This patchset is against

 upstream(c602a03a610d0626599dbfb28e073c58699e5f94)
 + [1] libata-fix-native-mode-disabled-port-handling
 + [2] ahci-implement-ata_save-restore_initial_config
 + [3] ahci-move-port_map-handling-to-ahci_save_initial_config

Thanks.

--
tejun

[L] http://thread.gmane.org/gmane.linux.ide/16810
[1] http://article.gmane.org/gmane.linux.ide/16804
[2] http://article.gmane.org/gmane.linux.ide/17302
[3] http://article.gmane.org/gmane.linux.ide/17303



^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCHSET] libata: implement new initialization model, take #3
@ 2007-03-09 11:15 Tejun Heo
  2007-03-09 11:15 ` [PATCH 08/12] libata: convert drivers with combined SATA/PATA ports to new init model Tejun Heo
  0 siblings, 1 reply; 8+ messages in thread
From: Tejun Heo @ 2007-03-09 11:15 UTC (permalink / raw)
  To: jeff, alan, linux-ide, htejun

Hello, all.

This is the third take of new init model.  Previously, libata LLDs
should have filled probe_ent with appropriate info and pass it to
ata_device_add() which will allocate and initialize ata_host
accordingly, request IRQs and attache the host.

The problem with the previous approach was that the info which can be
passed via probe_ent is inflexible.  This made init path of peculiar
controllers twisted.  For example, sata_promise and sata_via support
heterogeneous configuration where PATA and SATA ports reside on the
same host.  As probe_ent couldn't carry this information to
ata_device_add(), those controllers had to override stuff in
->port_start() and add branches in various places.

New init model is a bit more conventional than the old one.  It
follows the good old allocate-init-attach model.  A LLD allocates a
host populated with the specified number of ports, initializes the
host as it wishes and tell libata to attach the initialized host.  So,
LLDs can intialize the host anyway it wants to.

Helpers to do a series of things in one go are provided such that
simple/common initialization can be performed easily.  Requesting IRQ
is now LLD's responsibility and libata knows nothing about it (except
in activation helper).  This nicely allows MSIX support if ever
needed.

This patchset increases code in libata core layer but makes LLDs
simpler.  For details, please read description in each patch.

As devres is now in place, libata core layer can offload resource
management to it.  This makes this take very different and much
simpler than the last take[L].  As it's a vastly different
implementation, detailed change list isn't very meaningful and
thus omitted.

This patchset is against...

libata-dev#upstream (bbaa9bb11c6854781ac13c64954f42bc0e067c09)
+ [1] libata-fix-ata_host_release-free-order
+ [2] libata-fix-native-mode-disabled-port-handling
+ [3] iomap-implement-pcim-iounmap-regions
+ [4] ahci-separate-port-number-determination-from-host-initialization

Thanks.

--
tejun

[L] http://thread.gmane.org/gmane.linux.ide/12741
[1] http://article.gmane.org/gmane.linux.ide/16802
[2] http://article.gmane.org/gmane.linux.ide/16804
[3] http://article.gmane.org/gmane.linux.ide/16805
[4] http://article.gmane.org/gmane.linux.ide/16806



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-04-11  8:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-09 22:35 [PATCH 08/12] libata: convert drivers with combined SATA/PATA ports to new init model Mikael Pettersson
2007-03-10  5:02 ` Tejun Heo
  -- strict thread matches above, loose matches on Subject: below --
2007-04-11  8:58 Mikael Pettersson
2007-04-11  6:42 [PATCHSET] libata: implement new initialization model, take #4 Tejun Heo
2007-04-11  6:42 ` [PATCH 08/12] libata: convert drivers with combined SATA/PATA ports to new init model Tejun Heo
2007-03-09 11:15 [PATCHSET] libata: implement new initialization model, take #3 Tejun Heo
2007-03-09 11:15 ` [PATCH 08/12] libata: convert drivers with combined SATA/PATA ports to new init model Tejun Heo
2007-03-09 12:46   ` Alan Cox
2007-03-09 11:55     ` Jeff Garzik
2007-03-09 13:04       ` Tejun Heo

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).