Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attachedPHYs)

From: Jeff Garzik
Date: Fri Oct 21 2005 - 16:13:09 EST


Luben Tuikov wrote:
On 10/21/05 15:39, Jeff Garzik wrote:

The technical stuff got covered long ago. Here are the basic basics:

* aic94xx needs to have the scsi-host-template in the LLDD, to fix improper layering.
* SAS generic code needs to use SAS transport class, which calls scsi_scan_target(), to avoid code duplication.
* other stuff I listed in my "analysis" email, including updating libata to support SAS+SATA hardware.


All this bastardizes the code and the layering infrastructure.

If you're saying that there is "improper layering" you must be
smoking something really strong.

I already described why. Examples are DMA boundary and s/g limit, among others. When confronted with this, you proposed an additional hardware information struct which duplicates Scsi_Host_Template.

Solution? Just use Scsi_Host_Template. Take a look at how each libata driver is implemented. The host template is in the low level driver, while most of the code is common code, implemented elsewhere.



If you were willing to do this stuff, _working with others_, then I would be off in happy happy SATA land right now, and you would have been nominated to be the Linux SAS maintainer.


You seem to be traveling a path which I've already traveled.

Jeff, if you want an Adaptec SAS driver which has the host template
_in_ the driver, you can use "adp94xx" submitted earlier this year
by Adaptec to "the community".

"The community" rejected it. Why? Because "common SAS tasks should
be in a common layer". Well there you have the Linux SAS Stack and
aic94xx at the link below (my sig), which does separate common SAS
tasks and the interconnect _as per architecture and spec_. Apparently
this still isn't good enough for "the community".

You see how this going around in circles just never seems to end.

One day one thing, another day the opposite, etc.

Your current code is much closer to the desired end result, as it separates out SAS common code. That's why its being used as a base.

Jeff


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/