Re: [PATCH] ahci: display all AHCI 1.3 HBA capability flags

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

 



On 09/20/2009 02:16 PM, Robert Hancock wrote:
@@ -2534,13 +2535,14 @@ static void ahci_print_info(struct ata_host *host)
  	struct ahci_host_priv *hpriv = host->private_data;
  	struct pci_dev *pdev = to_pci_dev(host->dev);
  	void __iomem *mmio = host->iomap[AHCI_PCI_BAR];
-	u32 vers, cap, impl, speed;
+	u32 vers, cap, cap2, impl, speed;
  	const char *speed_s;
  	u16 cc;
  	const char *scc_s;

  	vers = readl(mmio + HOST_VERSION);
  	cap = hpriv->cap;
+	cap2 = readl(mmio + HOST_CAP2);


1) We cannot unconditionally read from this register location on all chips, as it's undefined for many chips. Add a chip version check or somesuch.

2) Treat cap2 in the same manner as cap, to prepare for potential future usages.

	Jeff


--
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