Re: [PATCH] SCSI: export sas_hash_addr()

Jeff Garzik
2007-09-28T01:01:42Z

James Bottomley wrote:
> On Wed, 2007-09-26 at 03:35 -0400, Jeff Garzik wrote:
>> sas_hash_addr() is the spec-defined standard hashing function. Make it
>> available to drivers that need it.
>
> I'm not opposed in principle to exporting this, but I have a hard time
> understanding why a driver would need it.
>
> The hashed address is a property of the constructed SAS frames, which is
> done in libsas. The driver shouldn't really be calculating its own hash
> instead of using what libsas provides ... or is this because the hashed
> self address isn't calculated by the HBA so it needs to be programmed or
> something?

It is needed to build the SSP frame header.

If there is common code that does that, I will definitely use that, but
do not see any such code.

Jeff