Changeset 79


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...
Location:
trunk/src/os2ahci
Files:
5 edited

Legend:

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

    r77 r79  
    626626
    627627  /* wait for communication to be re-established after port reset */
    628   while (((tmp = readl(port_mmio + PORT_SCR_STAT) & 3)) != 3) {
     628  while (((tmp = readl(port_mmio + PORT_SCR_STAT)) & 3) != 3) {
    629629    mdelay(10);
    630630    timeout -= 10;
  • trunk/src/os2ahci/init.asm

    r76 r79  
    148148                PUSH    OFFSET readl_dbg_fmt
    149149                CALL    _printf
    150                 ADD     SP, 12
     150                ADD     SP, 10
    151151                POP     EDX             ; restore value read from MMIO port
    152152
     
    189189                PUSH    OFFSET writel_dbg_fmt
    190190                CALL    _printf
    191                 ADD     SP, 12
     191                ADD     SP, 10
    192192
    193193no_debug2:      LEAVE
  • trunk/src/os2ahci/os2ahci.def

    r77 r79  
    11library os2ahci
    2 Description '$@#thi.guten (www.thiguten.de):1.00.20110221#@OS/2 AHCI Adapter Device Driver'
     2Description '$@#thi.guten (www.thiguten.de):1.00.20110224#@OS/2 AHCI Adapter Device Driver'
    33protmode
    44
  • 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
  • trunk/src/os2ahci/version.h

    r77 r79  
    66
    77
    8 #define VERSION            104       /* driver version (2 implied decimals) */
     8#define VERSION            105       /* driver version (2 implied decimals) */
    99
    1010/* BLDLEVEL information (in C source modules added via macro
Note: See TracChangeset for help on using the changeset viewer.