Changeset 79 for trunk/src/os2ahci/pci.c


Ignore:
Timestamp:
Feb 24, 2011, 9:56:54 PM (14 years ago)
Author:
chris
Message:
  • fixed debug print code in readl/writel (stack offset after printf() call was wrong after I removed the port offset token a few weeks ago and this was never tested)
  • added some logic to prevent PCI devices from being detected twice -- first by a thorough scan and then again by a class-based scan
  • still not working on ICH8 notebook; already found out that a port reset is required for this particular hardware (Dell D630) but the boot process is still hanging...
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/os2ahci/pci.c

    r77 r79  
    411411  int ad_indx = 0;
    412412  int i;
     413  int n;
    413414
    414415  ddprintf("scanning PCI bus...\n");
     
    461462      if (rc == OH_SUCCESS) {
    462463        /* found a device */
    463         if (ad_ignore & (1U << ad_indx++)) {
    464           /* ignore this adapter */
    465           continue;
    466         }
    467         add_pci_device(pci_ids + i, &data);
     464        int already_found = 0;
     465
     466        /* increment index for next loop */
    468467        if (++index > 180) {
    469468          /* something's wrong here... */
    470469          return;
    471470        }
     471
     472        /* check whether we already found this device */
     473        for (n = 0; n < ad_info_cnt; n++) {
     474          if (ad_infos[n].bus == data.find_device.bus &&
     475              ad_infos[n].dev_func == data.find_device.dev_func) {
     476            /* this device has already been found (e.g. via thorough scan) */
     477            already_found = 1;
     478            break;
     479          }
     480        }
     481           
     482        if (already_found || (ad_ignore & (1U << ad_indx++))) {
     483          /* ignore this device; it has either already been found via a
     484           * thorough scan or has been specified to be ignored via command
     485           * line option */
     486          continue;
     487        }
     488
     489        /* add this PCI device to ad_infos[] */
     490        add_pci_device(pci_ids + i, &data);
    472491      }
    473492
Note: See TracChangeset for help on using the changeset viewer.