-#if HT_CHAIN_END_UNITID_BASE != 0x20
- if(offset_unitid && (ht_dev_num>1) && (real_last_unitid != HT_CHAIN_END_UNITID_BASE) && !end_used) {
- uint16_t flags;
- int i;
- device_t last_func = 0;
- flags = pci_read_config16(real_last_dev, real_last_pos + PCI_CAP_FLAGS);
- flags &= ~0x1f;
- flags |= HT_CHAIN_END_UNITID_BASE & 0x1f;
- pci_write_config16(real_last_dev, real_last_pos + PCI_CAP_FLAGS, flags);
-
- for(func = real_last_dev; func; func = func->sibling) {
- func->path.u.pci.devfn -= ((real_last_unitid - HT_CHAIN_END_UNITID_BASE) << 3);
+#if CONFIG_HT_CHAIN_END_UNITID_BASE != 0x20
+ if (offset_unitid && (ht_dev_num > 1)
+ && (real_last_unitid != CONFIG_HT_CHAIN_END_UNITID_BASE)
+ && !end_used) {
+ u16 flags;
+ flags = pci_read_config16(real_last_dev,
+ real_last_pos + PCI_CAP_FLAGS);
+ flags &= ~0x1f;
+ flags |= CONFIG_HT_CHAIN_END_UNITID_BASE & 0x1f;
+ pci_write_config16(real_last_dev,
+ real_last_pos + PCI_CAP_FLAGS, flags);
+
+ for (func = real_last_dev; func; func = func->sibling) {
+ func->path.pci.devfn -= ((real_last_unitid
+ - CONFIG_HT_CHAIN_END_UNITID_BASE) << 3);