Re: [RFC PATCH 00/10] isci: core

Dan Williams
2011-03-31T00:20:26Z

On Wed, Mar 30, 2011 at 12:23 AM, Christoph Hellwig <hch@infradead.org> wrote:
> On Tue, Mar 29, 2011 at 06:22:30PM -0700, Dan Williams wrote:
>> The expectation is that the lldd need not understand core internals
>> outside of a set of interface functions.
>
> I think you need to get rid of that stupid core/wrapper split ASAP,
> as it's the root of a lot of the crap in this driver.  Removing all
> the stupid indirections and duplicate structures it causes will
> make the driver a lot smaller, and actually look like a normal Linux
> driver and thus actually maintainable.

I think we were already on this path, but now just need to formally
acknowledge and accelerate in this direction. Let me outline where I
think we are and a rough outline of how to get to the removal of the
wrapper.

1/ Complete the removal of all OS agnostic indirections in the core.
We have done quite a bit here to call kernel and lldd facilities
directly, but still need to get rid of intel_{sas|sata|scsi}.h and
duplicated utilities before this step is complete.

2/ Make the core data structures member position independent (so we
can start adding / removing fields at will). That means getting rid
of unnecessary casting (already started), the base_ structures (you
started this) and the _{get|set}_association macros.

3/ Unify the data structures so they have the same lifetimes. Where
the lldd has a member that duplicates a core member teach it to use
the core version. Quick example isci_phy.aif and
scic_sds_phy.sas.identify_address_frame_buffer.

4/ Remove the lldd/core data structure distinction.

Probably missing some sub-steps between three and four, but that is
the general idea.

--
Dan
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html