Ignore:
Timestamp:
Jan 2, 2021, 1:06:02 AM (5 years ago)
Author:
David Azarewicz
Message:

Fixed ADD RM id.

File:
1 edited

Legend:

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

    r204 r205  
    1 /******************************************************************************
     1/**
    22 * ahci.c - ahci hardware access functions
    33 *
    44 * Copyright (c) 2011 thi.guten Software Development
    55 * Copyright (c) 2011 Mensys B.V.
    6  * Copyright (c) 2013-2018 David Azarewicz
     6 * Copyright (c) 2013-2021 David Azarewicz <david@88watts.net>
    77 *
    88 * Authors: Christian Mueller, Markus Thielen
     
    2929#include "ata.h"
    3030#include "atapi.h"
    31 
    32 /* -------------------------- macros and constants ------------------------- */
    3331
    3432/* produce ata/atapi function pointer with the given func name */
     
    3836                              ? atapi_##func : ata_##func
    3937
    40 
    41 /* ------------------------ global/static variables ------------------------ */
    4238
    4339/* Initial driver status flags indexed by the board_* constants in os2ahci.h
     
    7672static u16 irq_used[MAX_IRQ_HANDLERS]; /* IRQ level for each used IRQ */
    7773static int irq_used_cnt; /* number of IRQs used */
    78 
    79 /* ----------------------------- start of code ----------------------------- */
    8074
    8175#ifdef DEBUG
     
    680674  char dev_name[RM_MAX_PREFIX_LEN+ATA_ID_PROD_LEN+1];
    681675  char *pDevName;
    682   static u8 total_dev_cnt;
    683676
    684677  if (p >= AHCI_MAX_PORTS) return;
     
    737730  adj.AdjLength           = sizeof(adj);
    738731  adj.AdjType             = ADJ_ADD_UNIT;
    739   adj.Add_Unit.ADDHandle  = rm_drvh;
    740   adj.Add_Unit.UnitHandle = (USHORT)total_dev_cnt;
     732  adj.Add_Unit.ADDHandle  = add_handle;
     733  adj.Add_Unit.UnitHandle = iorb_unit(ad_no(ai), p, d);
    741734
    742735  /* create Resource Manager device key string;
     
    759752
    760753  RMCreateDevice(rm_drvh, &dh, &ds, ai->rm_adh, NULL);
    761 
    762   total_dev_cnt++;
    763754
    764755  /* try to detect virtualbox environment to enable a hack for IRQ routing */
     
    14201411    if (rc)
    14211412    {
    1422       DPRINTF(3," timeout for IORB %x", vIorb);
     1413      DPRINTF(3," timeout for IORB %x port=%x", vIorb, p);
    14231414      iorb_seterr(pIorb, IOERR_ADAPTER_TIMEOUT);
    14241415    }
Note: See TracChangeset for help on using the changeset viewer.