Re: [PATCH 2/2] [PATCH] ahci: honor PORTS_IMPL on ICH8s

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff Garzik wrote:
Tejun Heo wrote:
Some ICH8s use non-linear port mapping.  ahci driver didn't use to
honor PORTS_IMPL and this made ports after hole nonfunctional.  This
patch implements port mapping table and use it to handle non-linear
port mapping.

As it's unknown whether other AHCIs implement PORTS_IMPL register
properly, new board id board_ahci_pi is added and selectively applied
to ICH8s.  All other AHCIs continue to use linear mapping regardless
of PORTS_IMPL value.

Signed-off-by: Tejun Heo <htejun@xxxxxxxxx>
Cc: Robin H. Johnson <robbat2@xxxxxxxxxx>

I still disagree with the port mapping table. I want to preserve the direct index properties, and would rather see code fixed up such that assumptions where n_ports implies all lower ports are fixed.

I understand your concern but if you think about it, if you have non-linear port mapping and wanna keep direct index property, something's gotta give. There are three places to deal with the mismatch - in LLD, libata or userland.

* LLD: this is what the current patch does and my favorite. It's isolated, not too complex and easy to spot when something goes wrong.

* libata: we can implement non-linear mapping facility in core layer but I'm doubtful it's worth the effort and complexity. Not many LLDs use non-linear mapping and ones that do are likely to have peculiar properties.

* userland: this is how we currently handle busy legacy ports. Mark them dummy and let the userland see that some ports aren't implemented. This makes sense for legacy ports because they have fixed resources and port numbers are bound to those resources. However, for ahci's case, I think it will cause confusion as the port numbers don't have any specific meaning and the BIOS and other OSes show them as contiguous ports.

So, my place of choice is in LLD.  What do you think?

Thanks.

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

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux