Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 362871
b: refs/heads/master
c: 1e89d26
h: refs/heads/master
i:
  362869: c6d9ff0
  362867: 68e8e88
  362863: e612bbc
v: v3
  • Loading branch information
Jiang Liu authored and Bjorn Helgaas committed Apr 12, 2013
1 parent 850fece commit 3b27d6c
Show file tree
Hide file tree
Showing 21 changed files with 196 additions and 174 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: 30e22b2337be44f4363fa52858d1ca7be6794ee8
refs/heads/master: 1e89d268e7a83d8388d4d09d3f2089ced72cc15f
8 changes: 1 addition & 7 deletions trunk/arch/mips/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ static void pcibios_scanbus(struct pci_controller *hose)
pci_bus_assign_resources(bus);
pci_enable_bridges(bus);
}
bus->dev.of_node = hose->of_node;
}
}

Expand Down Expand Up @@ -168,13 +169,6 @@ void pci_load_of_ranges(struct pci_controller *hose, struct device_node *node)
}
}
}

struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus)
{
struct pci_controller *hose = bus->sysdata;

return of_node_get(hose->of_node);
}
#endif

static DEFINE_MUTEX(pci_scan_mutex);
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,17 +413,17 @@ static const struct pci_device_id ahci_pci_tbl[] = {
/* Marvell */
{ PCI_VDEVICE(MARVELL, 0x6145), board_ahci_mv }, /* 6145 */
{ PCI_VDEVICE(MARVELL, 0x6121), board_ahci_mv }, /* 6121 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9123),
{ PCI_DEVICE(0x1b4b, 0x9123),
.class = PCI_CLASS_STORAGE_SATA_AHCI,
.class_mask = 0xffffff,
.driver_data = board_ahci_yes_fbs }, /* 88se9128 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9125),
{ PCI_DEVICE(0x1b4b, 0x9125),
.driver_data = board_ahci_yes_fbs }, /* 88se9125 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x917a),
{ PCI_DEVICE(0x1b4b, 0x917a),
.driver_data = board_ahci_yes_fbs }, /* 88se9172 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9192),
{ PCI_DEVICE(0x1b4b, 0x9192),
.driver_data = board_ahci_yes_fbs }, /* 88se9172 on some Gigabyte */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x91a3),
{ PCI_DEVICE(0x1b4b, 0x91a3),
.driver_data = board_ahci_yes_fbs },

/* Promise */
Expand Down
82 changes: 46 additions & 36 deletions trunk/drivers/eisa/eisa-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,18 +275,19 @@ static int __init eisa_request_resources(struct eisa_root_device *root,
}

if (slot) {
edev->res[i].name = NULL;
edev->res[i].start = SLOT_ADDRESS(root, slot)
+ (i * 0x400);
edev->res[i].end = edev->res[i].start + 0xff;
edev->res[i].flags = IORESOURCE_IO;
} else {
edev->res[i].name = NULL;
edev->res[i].start = SLOT_ADDRESS(root, slot)
+ EISA_VENDOR_ID_OFFSET;
edev->res[i].end = edev->res[i].start + 3;
edev->res[i].flags = IORESOURCE_IO | IORESOURCE_BUSY;
edev->res[i].flags = IORESOURCE_BUSY;
}

dev_printk(KERN_DEBUG, &edev->dev, "%pR\n", &edev->res[i]);
if (request_resource(root->res, &edev->res[i]))
goto failed;
}
Expand All @@ -313,40 +314,41 @@ static int __init eisa_probe(struct eisa_root_device *root)
{
int i, c;
struct eisa_device *edev;
char *enabled_str;

dev_info(root->dev, "Probing EISA bus %d\n", root->bus_nr);
printk(KERN_INFO "EISA: Probing bus %d at %s\n",
root->bus_nr, dev_name(root->dev));

/* First try to get hold of slot 0. If there is no device
* here, simply fail, unless root->force_probe is set. */

edev = kzalloc(sizeof(*edev), GFP_KERNEL);
if (!edev) {
dev_err(root->dev, "EISA: Couldn't allocate mainboard slot\n");
printk(KERN_ERR "EISA: Couldn't allocate mainboard slot\n");
return -ENOMEM;
}

if (eisa_init_device(root, edev, 0)) {
if (eisa_request_resources(root, edev, 0)) {
printk(KERN_WARNING \
"EISA: Cannot allocate resource for mainboard\n");
kfree(edev);
if (!root->force_probe)
return -ENODEV;
return -EBUSY;
goto force_probe;
}

if (eisa_request_resources(root, edev, 0)) {
dev_warn(root->dev,
"EISA: Cannot allocate resource for mainboard\n");
if (eisa_init_device(root, edev, 0)) {
eisa_release_resources(edev);
kfree(edev);
if (!root->force_probe)
return -EBUSY;
return -ENODEV;
goto force_probe;
}

dev_info(&edev->dev, "EISA: Mainboard %s detected\n", edev->id.sig);
printk(KERN_INFO "EISA: Mainboard %s detected.\n", edev->id.sig);

if (eisa_register_device(edev)) {
dev_err(&edev->dev, "EISA: Failed to register %s\n",
edev->id.sig);
printk(KERN_ERR "EISA: Failed to register %s\n",
edev->id.sig);
eisa_release_resources(edev);
kfree(edev);
}
Expand All @@ -356,47 +358,55 @@ static int __init eisa_probe(struct eisa_root_device *root)
for (c = 0, i = 1; i <= root->slots; i++) {
edev = kzalloc(sizeof(*edev), GFP_KERNEL);
if (!edev) {
dev_err(root->dev, "EISA: Out of memory for slot %d\n",
i);
printk(KERN_ERR "EISA: Out of memory for slot %d\n", i);
continue;
}

if (eisa_init_device(root, edev, i)) {
if (eisa_request_resources(root, edev, i)) {
printk(KERN_WARNING \
"Cannot allocate resource for EISA slot %d\n",
i);
kfree(edev);
continue;
}

if (eisa_request_resources(root, edev, i)) {
dev_warn(root->dev,
"Cannot allocate resource for EISA slot %d\n",
i);
if (eisa_init_device(root, edev, i)) {
eisa_release_resources(edev);
kfree(edev);
continue;
}

if (edev->state == (EISA_CONFIG_ENABLED | EISA_CONFIG_FORCED))
enabled_str = " (forced enabled)";
else if (edev->state == EISA_CONFIG_FORCED)
enabled_str = " (forced disabled)";
else if (edev->state == 0)
enabled_str = " (disabled)";
else
enabled_str = "";

dev_info(&edev->dev, "EISA: slot %d: %s detected%s\n", i,
edev->id.sig, enabled_str);

printk(KERN_INFO "EISA: slot %d : %s detected",
i, edev->id.sig);

switch (edev->state) {
case EISA_CONFIG_ENABLED | EISA_CONFIG_FORCED:
printk(" (forced enabled)");
break;

case EISA_CONFIG_FORCED:
printk(" (forced disabled)");
break;

case 0:
printk(" (disabled)");
break;
}

printk (".\n");

c++;

if (eisa_register_device(edev)) {
dev_err(&edev->dev, "EISA: Failed to register %s\n",
edev->id.sig);
printk(KERN_ERR "EISA: Failed to register %s\n",
edev->id.sig);
eisa_release_resources(edev);
kfree(edev);
}
}

dev_info(root->dev, "EISA: Detected %d card%s\n", c, c == 1 ? "" : "s");
printk(KERN_INFO "EISA: Detected %d card%s.\n", c, c == 1 ? "" : "s");

return 0;
}

Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/eisa/pci_eisa.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ static int __init pci_eisa_init(struct pci_dev *pdev,
int rc;

if ((rc = pci_enable_device (pdev))) {
dev_err(&pdev->dev, "Could not enable device\n");
printk (KERN_ERR "pci_eisa : Could not enable device %s\n",
pci_name(pdev));
return rc;
}

Expand All @@ -37,7 +38,7 @@ static int __init pci_eisa_init(struct pci_dev *pdev,
dev_set_drvdata(pci_eisa_root.dev, &pci_eisa_root);

if (eisa_root_register (&pci_eisa_root)) {
dev_err(&pdev->dev, "Could not register EISA root\n");
printk (KERN_ERR "pci_eisa : Could not register EISA root\n");
return -1;
}

Expand Down
14 changes: 7 additions & 7 deletions trunk/drivers/iommu/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static inline u16 get_device_id(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);

return PCI_DEVID(pdev->bus->number, pdev->devfn);
return calc_devid(pdev->bus->number, pdev->devfn);
}

static struct iommu_dev_data *get_dev_data(struct device *dev)
Expand Down Expand Up @@ -649,26 +649,26 @@ static void iommu_print_event(struct amd_iommu *iommu, void *__evt)
case EVENT_TYPE_ILL_DEV:
printk("ILLEGAL_DEV_TABLE_ENTRY device=%02x:%02x.%x "
"address=0x%016llx flags=0x%04x]\n",
PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid),
PCI_BUS(devid), PCI_SLOT(devid), PCI_FUNC(devid),
address, flags);
dump_dte_entry(devid);
break;
case EVENT_TYPE_IO_FAULT:
printk("IO_PAGE_FAULT device=%02x:%02x.%x "
"domain=0x%04x address=0x%016llx flags=0x%04x]\n",
PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid),
PCI_BUS(devid), PCI_SLOT(devid), PCI_FUNC(devid),
domid, address, flags);
break;
case EVENT_TYPE_DEV_TAB_ERR:
printk("DEV_TAB_HARDWARE_ERROR device=%02x:%02x.%x "
"address=0x%016llx flags=0x%04x]\n",
PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid),
PCI_BUS(devid), PCI_SLOT(devid), PCI_FUNC(devid),
address, flags);
break;
case EVENT_TYPE_PAGE_TAB_ERR:
printk("PAGE_TAB_HARDWARE_ERROR device=%02x:%02x.%x "
"domain=0x%04x address=0x%016llx flags=0x%04x]\n",
PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid),
PCI_BUS(devid), PCI_SLOT(devid), PCI_FUNC(devid),
domid, address, flags);
break;
case EVENT_TYPE_ILL_CMD:
Expand All @@ -682,13 +682,13 @@ static void iommu_print_event(struct amd_iommu *iommu, void *__evt)
case EVENT_TYPE_IOTLB_INV_TO:
printk("IOTLB_INV_TIMEOUT device=%02x:%02x.%x "
"address=0x%016llx]\n",
PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid),
PCI_BUS(devid), PCI_SLOT(devid), PCI_FUNC(devid),
address);
break;
case EVENT_TYPE_INV_DEV_REQ:
printk("INVALID_DEVICE_REQUEST device=%02x:%02x.%x "
"address=0x%016llx flags=0x%04x]\n",
PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid),
PCI_BUS(devid), PCI_SLOT(devid), PCI_FUNC(devid),
address, flags);
break;
default:
Expand Down
Loading

0 comments on commit 3b27d6c

Please sign in to comment.