diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-01-29 19:52:14 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-01-29 19:52:14 +0100 |
commit | 5180188d834e86562353794c433b17f2e374657f (patch) | |
tree | a6dc842e592c7b88f0504de64edb7114a5446afe /linux/dev/drivers/block | |
parent | b282c5d4fa0a99556d9b977b3a9b92e06c66db85 (diff) |
ahci: print PCI bus/dev/fun in hexadecimal
* linux/dev/drivers/block/ahci.c: Print PCI bus/dev/fun number in
hexadecimal
Diffstat (limited to 'linux/dev/drivers/block')
-rw-r--r-- | linux/dev/drivers/block/ahci.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/linux/dev/drivers/block/ahci.c b/linux/dev/drivers/block/ahci.c index c243982..aaa0eab 100644 --- a/linux/dev/drivers/block/ahci.c +++ b/linux/dev/drivers/block/ahci.c @@ -826,38 +826,38 @@ static void ahci_probe_dev(unsigned char bus, unsigned char device) /* Get configuration */ if (pcibios_read_config_byte(bus, device, PCI_HEADER_TYPE, &hdrtype) != PCIBIOS_SUCCESSFUL) { - printk("ahci: %02u:%02u.%u: Can not read configuration", bus, dev, fun); + printk("ahci: %02x:%02x.%x: Can not read configuration", bus, dev, fun); return; } if (hdrtype != 0) { - printk("ahci: %02u:%02u.%u: Unknown hdrtype %d\n", bus, dev, fun, hdrtype); + printk("ahci: %02x:%02x.%x: Unknown hdrtype %d\n", bus, dev, fun, hdrtype); return; } if (pcibios_read_config_dword(bus, device, PCI_BASE_ADDRESS_5, &bar) != PCIBIOS_SUCCESSFUL) { - printk("ahci: %02u:%02u.%u: Can not read BAR 5", bus, dev, fun); + printk("ahci: %02x:%02x.%x: Can not read BAR 5", bus, dev, fun); return; } if (bar & 0x01) { - printk("ahci: %02u:%02u.%u: BAR 5 is I/O?!", bus, dev, fun); + printk("ahci: %02x:%02x.%x: BAR 5 is I/O?!", bus, dev, fun); return; } bar &= ~0x0f; if (pcibios_read_config_byte(bus, device, PCI_INTERRUPT_LINE, &irq) != PCIBIOS_SUCCESSFUL) { - printk("ahci: %02u:%02u.%u: Can not read IRQ", bus, dev, fun); + printk("ahci: %02x:%02x.%x: Can not read IRQ", bus, dev, fun); return; } - printk("AHCI SATA %02u:%02u.%u BAR 0x%x IRQ %u\n", bus, dev, fun, bar, irq); + printk("AHCI SATA %02x:%02x.%x BAR 0x%x IRQ %u\n", bus, dev, fun, bar, irq); /* Map mmio */ ahci_host = vremap(bar, 0x2000); /* Request IRQ */ if (request_irq(irq, &ahci_interrupt, SA_SHIRQ, "ahci", (void*) ahci_host)) { - printk("ahci: %02u:%02u.%u: Can not get irq %u\n", bus, dev, fun, irq); + printk("ahci: %02x:%02x.%x: Can not get irq %u\n", bus, dev, fun, irq); return; } @@ -869,7 +869,7 @@ static void ahci_probe_dev(unsigned char bus, unsigned char device) n++; if (nports != n) { - printk("ahci: %02u:%02u.%u: Odd number of ports %u, assuming %u is correct\n", bus, dev, fun, n, nports); + printk("ahci: %02x:%02x.%x: Odd number of ports %u, assuming %u is correct\n", bus, dev, fun, n, nports); port_map = 0; } if (!port_map) { @@ -893,16 +893,16 @@ static void ahci_probe_dev(unsigned char bus, unsigned char device) /* Device not present */ continue; case 0x1: - printk("ahci: %02u:%02u.%u: Port %u communication not established. TODO: power on device\n", bus, dev, fun, i); + printk("ahci: %02x:%02x.%x: Port %u communication not established. TODO: power on device\n", bus, dev, fun, i); continue; case 0x3: /* Present and communication established */ break; case 0x4: - printk("ahci: %02u:%02u.%u: Port %u phy offline?!\n", bus, dev, fun, i); + printk("ahci: %02x:%02x.%x: Port %u phy offline?!\n", bus, dev, fun, i); continue; default: - printk("ahci: %02u:%02u.%u: Unknown port %u SPD %x\n", bus, dev, fun, i, spd); + printk("ahci: %02x:%02x.%x: Unknown port %u SPD %x\n", bus, dev, fun, i, spd); continue; } @@ -916,13 +916,13 @@ static void ahci_probe_dev(unsigned char bus, unsigned char device) /* Active */ break; case 0x2: - printk("ahci: %02u:%02u.%u: Port %u in Partial power management. TODO: power on device\n", bus, dev, fun, i); + printk("ahci: %02x:%02x.%x: Port %u in Partial power management. TODO: power on device\n", bus, dev, fun, i); continue; case 0x6: - printk("ahci: %02u:%02u.%u: Port %u in Slumber power management. TODO: power on device\n", bus, dev, fun, i); + printk("ahci: %02x:%02x.%x: Port %u in Slumber power management. TODO: power on device\n", bus, dev, fun, i); continue; default: - printk("ahci: %02u:%02u.%u: Unknown port %u IPM %x\n", bus, dev, fun, i, ipm); + printk("ahci: %02x:%02x.%x: Unknown port %u IPM %x\n", bus, dev, fun, i, ipm); continue; } |