Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192588
b: refs/heads/master
c: 439fcae
h: refs/heads/master
v: v3
  • Loading branch information
Anton Vorontsov authored and Jeff Garzik committed May 14, 2010
1 parent 710d514 commit 944cb5e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 781d655083f8fb0a343bb694e83b96f04e934b4f
refs/heads/master: 439fcaec10cef14a08557623d6f5fa240aaf3e2b
40 changes: 23 additions & 17 deletions trunk/drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2845,15 +2845,12 @@ static int ahci_configure_dma_masks(struct pci_dev *pdev, int using_dac)
return 0;
}

static void ahci_print_info(struct ata_host *host)
static void ahci_print_info(struct ata_host *host, const char *scc_s)
{
struct ahci_host_priv *hpriv = host->private_data;
struct pci_dev *pdev = to_pci_dev(host->dev);
void __iomem *mmio = hpriv->mmio;
u32 vers, cap, cap2, impl, speed;
const char *speed_s;
u16 cc;
const char *scc_s;

vers = readl(mmio + HOST_VERSION);
cap = hpriv->cap;
Expand All @@ -2870,17 +2867,7 @@ static void ahci_print_info(struct ata_host *host)
else
speed_s = "?";

pci_read_config_word(pdev, 0x0a, &cc);
if (cc == PCI_CLASS_STORAGE_IDE)
scc_s = "IDE";
else if (cc == PCI_CLASS_STORAGE_SATA)
scc_s = "SATA";
else if (cc == PCI_CLASS_STORAGE_RAID)
scc_s = "RAID";
else
scc_s = "unknown";

dev_printk(KERN_INFO, &pdev->dev,
dev_info(host->dev,
"AHCI %02x%02x.%02x%02x "
"%u slots %u ports %s Gbps 0x%x impl %s mode\n"
,
Expand All @@ -2896,7 +2883,7 @@ static void ahci_print_info(struct ata_host *host)
impl,
scc_s);

dev_printk(KERN_INFO, &pdev->dev,
dev_info(host->dev,
"flags: "
"%s%s%s%s%s%s%s"
"%s%s%s%s%s%s%s"
Expand Down Expand Up @@ -2926,6 +2913,25 @@ static void ahci_print_info(struct ata_host *host)
);
}

static void ahci_pci_print_info(struct ata_host *host)
{
struct pci_dev *pdev = to_pci_dev(host->dev);
u16 cc;
const char *scc_s;

pci_read_config_word(pdev, 0x0a, &cc);
if (cc == PCI_CLASS_STORAGE_IDE)
scc_s = "IDE";
else if (cc == PCI_CLASS_STORAGE_SATA)
scc_s = "SATA";
else if (cc == PCI_CLASS_STORAGE_RAID)
scc_s = "RAID";
else
scc_s = "unknown";

ahci_print_info(host, scc_s);
}

/* On ASUS P5W DH Deluxe, the second port of PCI device 00:1f.2 is
* hardwired to on-board SIMG 4726. The chipset is ICH8 and doesn't
* support PMP and the 4726 either directly exports the device
Expand Down Expand Up @@ -3459,7 +3465,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
return rc;

ahci_pci_init_controller(host);
ahci_print_info(host);
ahci_pci_print_info(host);

pci_set_master(pdev);
return ata_host_activate(host, pdev->irq, ahci_interrupt, IRQF_SHARED,
Expand Down

0 comments on commit 944cb5e

Please sign in to comment.