linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 9/20] libata: reimplement LLD init_one()'s using new init helpers
       [not found] <11559779721014-git-send-email-htejun@gmail.com>
@ 2006-09-19  5:41 ` Jeff Garzik
  2006-09-19  6:11   ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Garzik @ 2006-09-19  5:41 UTC (permalink / raw)
  To: Tejun Heo; +Cc: alan, mlord, albertcc, uchang, forrest.zhao, brking, linux-ide

Tejun Heo wrote:
> Reimplement LLD init_one()'s using new init helpers.  LLDs now follow
> the following init model.
> 
> 1. allocate host
> 2. acquire resources and initialize controller and host accordingly
> 3. attach host
> 
> At each step, libata provides comprehensive helpers and helps tracking
> allocated resources.
> 
> The new init model...
> 
> * allows LLD init_one()'s to be more flexible and concentrate on
>   higher-level logic
> 
> * results in code reduction in LLD init_one()'s even with more
>   comments and proper error hanlding
> 
> * makes init_one()'s of different LLDs much more consistent making
>   them easier to understand and harder to mess up
> 
> * makes init/deinit codes more easily shared with other parts by
>   using the same target data structure (host and ap)
> 
> The following bug fixes/behavior changes are introduced by this patch.
> 
> * all LLDs deallocate resources properly on init failure
> 
> * pdev_busy handling made generic.  pdc_adma, sata_sil24, sata_nv,
>   sata_qstor now deals with pdev_busy condition.
> 
> * PDC20619 (PATA) doesn't set ATA_FLAG_SATA for its lower two ports
>   and doesn't initialize scr_addr's.
> 
> * PDC20375/20575 PATA port uses pdc_pata_ops instead of pdc_sata_ops
> 
> Signed-off-by: Tejun Heo <htejun@gmail.com>

Unfortunately, while this patch seems correct, it is also difficult to 
review, and I'm thinking it reflects that another approach may need to 
be considered.

Usually the drivers and API are often change in small chunks, whereas 
this patchset is more along the lines of
1) add new helpers
2) update everything to use new helpers
3) delete old helpers

The previous approach was closer to
* small update to API & drivers
* small update to API & drivers
* small update to API & drivers
...

I recognize that we are changing the LLDD init model, but I bet if you 
think really hard, you could come up with a less-drastic transition path.



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

* Re: [PATCH 9/20] libata: reimplement LLD init_one()'s using new init helpers
  2006-09-19  5:41 ` [PATCH 9/20] libata: reimplement LLD init_one()'s using new init helpers Jeff Garzik
@ 2006-09-19  6:11   ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2006-09-19  6:11 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: alan, albertcc, uchang, forrest.zhao, brking, linux-ide

Helloooo,

Jeff Garzik wrote:
> Unfortunately, while this patch seems correct, it is also difficult to 
> review, and I'm thinking it reflects that another approach may need to 
> be considered.
> 
> Usually the drivers and API are often change in small chunks, whereas 
> this patchset is more along the lines of
> 1) add new helpers
> 2) update everything to use new helpers
> 3) delete old helpers
> 
> The previous approach was closer to
> * small update to API & drivers
> * small update to API & drivers
> * small update to API & drivers
> ...
> 
> I recognize that we are changing the LLDD init model, but I bet if you 
> think really hard, you could come up with a less-drastic transition path.

This patchset has been one of the most painful to carry around due to 
dependencies on everything and the wide range of changes.  I agree that 
there can be a better way to split this patch if I think *really* hard, 
but was kind of hoping I could avoid that.  :-)

I'll try to reshuffle the whole set as you suggested but I can't say for 
sure.  Please note that lots of previous EH changes were done this way - 
implement new framework while leaving old one alone, convert LLDs, kill 
old framework.  I have to admit that this patchset is more drastic tho.

Thanks.

-- 
tejun

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

end of thread, other threads:[~2006-09-19  6:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <11559779721014-git-send-email-htejun@gmail.com>
2006-09-19  5:41 ` [PATCH 9/20] libata: reimplement LLD init_one()'s using new init helpers Jeff Garzik
2006-09-19  6:11   ` 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).