Changeset 548


Ignore:
Timestamp:
Mar 16, 2011, 11:54:53 PM (14 years ago)
Author:
David Azarewicz
Message:

APIC interrupt fixes from trunk

Location:
GPL/branches/uniaud32-2.1.x
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-2.1.x/drv32/idc.c

    r493 r548  
    3434#include <irqos2.h>
    3535#include <stacktoflat.h>
     36#include <dbgos2.h>
    3637
    3738//16:32 address of 16 bits pdd idc handler
     
    3940extern "C" int pcm_device;
    4041WORD32 OSS32IDC(ULONG cmd, PIDC32_PACKET pPacket);
     42extern "C" BOOL fRewired; //pci.c
    4143
    4244//packet pointer must reference a structure on the stack
     
    4951    ULONG  oldfileid;
    5052    OSSRET rc;
     53
     54        if (fRewired) {
     55                fRewired = FALSE;
     56                rprintf(("AlsaIDC: Resuming"));
     57                OSS32_APMResume();
     58        }
    5159
    5260    //Sets file id in current task structure
  • GPL/branches/uniaud32-2.1.x/drv32/irq.cpp

    r546 r548  
    4646};
    4747
     48extern DBGINT DbgInt;
     49
    4850//******************************************************************************
    4951BOOL ALSA_SetIrq(ULONG ulIrq, ULONG ulSlotNo, BOOL fShared)
     
    6466
    6567    if (rc != 0) {                    // If error ...
    66        dprintf(("ERROR: RMSetIrq %d %d %x - failed to set shared - trying exclusive!!", ulIrq, fShared, ulSlotNo));
     68       rprintf(("ERROR: RMSetIrq %d %d %x - failed to set shared - trying exclusive!!", ulIrq, fShared, ulSlotNo));
    6769        rc = DevIRQSet((WORD16) *pISR[ulSlotNo],
    6870                       (WORD16)ulIrq,
     
    7173
    7274    if (rc != 0) {                    // If error ...
    73         dprintf(("ERROR: RMSetIrq %d %d %x FAILED shared and exclusive mode!!", ulIrq, fShared, ulSlotNo));
     75        rprintf(("ERROR: RMSetIrq %d %d %x FAILED shared and exclusive mode!!", ulIrq, fShared, ulSlotNo));
    7476        DebugInt3();
    7577        return FALSE;
     
    9698   sti();
    9799   if( process_interrupt(ulSlotNo, &ulIrqNo) ) {
     100                DbgInt.ulIntServiced[DbgInt.usState]++;
    98101       // We've cleared all service requests.
    99102       // Clear (disable) Interrupts, Send EOI
     
    104107       return TRUE;
    105108   }
     109        DbgInt.ulIntUnserviced[DbgInt.usState]++;
    106110   // Indicate Interrupt not serviced by setting carry flag before
    107111   // returning to OS/2 kernel.  OS/2 will then shut down the interrupt!
  • GPL/branches/uniaud32-2.1.x/drv32/read.cpp

    r504 r548  
    1616
    1717}
     18
     19extern DBGINT DbgInt;
    1820
    1921ULONG StratRead(RP __far* _rp)
  • GPL/branches/uniaud32-2.1.x/drv32/rmcalls.h

    r32 r548  
    6464APIRET CDECL RMDeallocResource(HDRIVER hDriver, HRESOURCE hResource);
    6565
    66 APIRET CDECL RMGetNodeInfo(RMHANDLE RMHandle,
     66APIRET CDECL RMModifyResources(HDRIVER hDriver, HADAPTER hAdapter, USHORT ModifyAction, HRESOURCE hResource);
     67
     68APIRET CDECL RMGetNodeInfo(RMHANDLE RMHandle,
    6769                           FARPTR16 pNodeInfo,
    6870                           USHORT   BufferSize);
    6971
    70 APIRET CDECL RMDevIDToHandleList(RMHANDLE RMHandle, 
     72APIRET CDECL RMDevIDToHandleList(RMHANDLE RMHandle,
    7173                                 DEVID DeviceID,
    7274                                 DEVID FunctionID,
  • GPL/branches/uniaud32-2.1.x/drv32/rmhelp.cpp

    r546 r548  
    4040ULONG                   RMFlags;
    4141
    42 static HDRIVER          DriverHandle = (HDRIVER)-1;
    43 static ULONG            ctResHandles = 0;
    44 static HRESOURCE        arResHandles[MAX_RESHANDLES];
     42static HDRIVER DriverHandle = (HDRIVER)-1;
     43static HDEVICE DeviceHandle = 0;
     44static HADAPTER AdapterHandle = 0;
     45static ULONG ctResHandles = 0;
     46static HRESOURCE arResHandles[MAX_RESHANDLES];
    4547
    4648
     
    8082     rc = RMCreateDriver( FlatToSel((ULONG)&DriverStruct), FlatToSel((ULONG)&hDriver) );
    8183
    82      dprintf(("RMCreateDriver rc = %d\n", rc));
    83 
    8484     if( rc == RMRC_SUCCESS )   DriverHandle = hDriver;
     85     dprintf(("RMCreateDriver rc=%d DriverHandle=%x", rc, DriverHandle));
    8586  }
    8687
     
    113114  }
    114115
    115   dprintf(("RMAllocResource[%d] IO rc = %d\n", ctResHandles, rc));
     116  dprintf(("RMAllocResource[%d] IO rc = %d", ctResHandles, rc));
    116117
    117118  return FALSE;
     
    141142  }
    142143
    143   dprintf(("RMAllocResource[%d] MEM rc = %d\n", ctResHandles, rc));
     144  dprintf(("RMAllocResource[%d] MEM rc = %d", ctResHandles, rc));
    144145
    145146  return rc == 0;
     
    152153{
    153154        RESOURCESTRUCT  Resource;
    154         HRESOURCE               hres;
     155        HRESOURCE               hRes;
    155156        APIRET          rc;
    156157
     
    161162
    162163        rc = RMAllocResource(DriverHandle,                      // Handle to driver.
    163                        FlatToSel((ULONG)&hres),                 // OUT:  "allocated" resource node handle
     164                       FlatToSel((ULONG)&hRes),                 // OUT:  "allocated" resource node handle
    164165                       FlatToSel((ULONG)&Resource));    // Resource to allocate.
    165166
     167
    166168        if (rc == 0) {
    167                 if (ctResHandles < MAX_RESHANDLES ) arResHandles[ctResHandles++] = hres;
    168                 *phRes = hres;
     169                *phRes = hRes;
     170                if (DeviceHandle) {
     171                        dprintf(("RMRequestIRQ: DriverHandle=%x DeviceHandle=%x hRes=%x", DriverHandle, DeviceHandle, hRes));
     172                        rc = RMModifyResources(DriverHandle, DeviceHandle, RM_MODIFY_ADD, hRes);
     173                } else {
     174                        if (ctResHandles < MAX_RESHANDLES ) arResHandles[ctResHandles++] = hRes;
     175                }
    169176        }
    170177
    171         dprintf(("RMAllocResource[%d] IRQ rc = %d\n", ctResHandles, rc));
     178        dprintf(("RMAllocResource[%d] IRQ=%d rc=%d", ctResHandles, ulIrq, rc));
    172179
    173180        return rc == 0;
     
    178185BOOL RMDeallocateIRQ(HRESOURCE hRes)
    179186{
    180         ULONG ulI;
    181 
    182         RMDeallocResource(DriverHandle, hRes);
    183 
    184         for (ulI=0; ulI<ctResHandles; ulI++) {
    185                 if (arResHandles[ulI] == hRes) {
    186                         arResHandles[ulI] = 0;
    187                         break;
    188                 }               
    189         }
    190 
    191         return 0;
    192 }
    193 
    194 
    195 //******************************************************************************
    196 //******************************************************************************
    197 VOID RMDone(ULONG DevID)
     187        APIRET rc;
     188
     189        dprintf(("RMDeallocateIRQ: DriverHandle=%x DeviceHandle=%x hRes=%x", DriverHandle, DeviceHandle, hRes));
     190        rc = RMModifyResources(DriverHandle, DeviceHandle, RM_MODIFY_DELETE, hRes);
     191
     192        return rc == 0;
     193}
     194
     195
     196//******************************************************************************
     197//******************************************************************************
     198VOID RMDone(ULONG DevID, PHADAPTER phAdapter, PHDEVICE phDevice)
    198199{
    199200  APIRET        rc;
     
    205206  char          szDeviceName[128];
    206207  char          szMixerName[64];
    207   struct
    208   {
     208  struct {
    209209    ULONG       NumResource;
    210210    HRESOURCE   hResource[MAX_RESHANDLES];
     
    214214
    215215  if( DevID && OSS32_QueryNames(OSS32_DEFAULT_DEVICE,
    216                  szDeviceName, sizeof(szDeviceName),
    217                  szMixerName, sizeof(szMixerName), FALSE) == OSSERR_SUCCESS )
     216                szDeviceName, sizeof(szDeviceName),
     217                szMixerName, sizeof(szMixerName), FALSE) == OSSERR_SUCCESS )
    218218  {
    219219    switch(DevID) {
     
    285285        break;
    286286*/
    287     }
     287    } /* switch */
    288288
    289289
     
    317317                           NULL);                               // Allocated resources.
    318318
    319       dprintf(("RMCreateAdapter rc = %d\n", rc));
     319      dprintf(("RMCreateAdapter rc=%d", rc));
    320320
    321321      if( rc == 0 )
    322322      {
    323         if( !szDeviceName[0] )  strcpy(szDeviceName, "Unknown");
    324 
    325         //NOTE: Assumes szDeviceName is a stack pointer!!
    326         memset( (PVOID) &DeviceStruct, 0, sizeof(DeviceStruct) );
    327         DeviceStruct.DevDescriptName = FlatToSel((ULONG)szDeviceName);
    328         DeviceStruct.DevFlags        = DS_FIXED_LOGICALNAME;
    329         DeviceStruct.DevType         = DS_TYPE_AUDIO;
    330         DeviceStruct.pAdjunctList    = NULL;
    331 
    332         rc = RMCreateDevice(DriverHandle,                       // Handle to driver
     323                AdapterHandle = hAdapter;
     324                if (phAdapter) *phAdapter = hAdapter;
     325                if( !szDeviceName[0] )  strcpy(szDeviceName, "Unknown");
     326
     327                //NOTE: Assumes szDeviceName is a stack pointer!!
     328                memset( (PVOID) &DeviceStruct, 0, sizeof(DeviceStruct) );
     329                DeviceStruct.DevDescriptName = FlatToSel((ULONG)szDeviceName);
     330                DeviceStruct.DevFlags        = DS_FIXED_LOGICALNAME;
     331                DeviceStruct.DevType         = DS_TYPE_AUDIO;
     332                DeviceStruct.pAdjunctList    = NULL;
     333
     334                rc = RMCreateDevice(DriverHandle,                       // Handle to driver
    333335                            FlatToSel((ULONG)&hDevice),         // (OUT) Handle to device, unused.
    334336                            FlatToSel((ULONG)&DeviceStruct),    // Device structure
     
    336338                            FlatToSel((ULONG)&ahResource));     // Allocated resources
    337339
    338         dprintf(("RMCreateDevice rc = %d\n", rc));
    339 
    340         if( rc == 0 )
    341         {
    342           // no resource handles to be freed
    343           ctResHandles = 0;     return;
    344         }
    345 
    346 // !!! Not implemented in startup.asm
    347 //      RMDestroyAdapter(DriverHandle, hAdapter);
    348       }
    349     }
    350     else        dprintf(("No resources allocated !!!\n"));
    351   }
     340                dprintf(("RMCreateDevice rc=%d", rc));
     341
     342                if( rc == 0 )
     343                {
     344                  DeviceHandle = hDevice;
     345                  if (phDevice) *phDevice = hDevice;
     346                  ctResHandles = 0;  // no resource handles to be freed
     347                        dprintf(("RMDone: DriverHandle=%x DeviceHandle=%x", DriverHandle, DeviceHandle));
     348                  return;
     349                }
     350
     351                // !!! Not implemented in startup.asm
     352                //      RMDestroyAdapter(DriverHandle, hAdapter);
     353      } /* if rc == 0 */
     354    } /* ctResHandles */
     355    else        dprintf(("No resources allocated !!!"));
     356  } /* if DevID */
    352357
    353358
     
    358363
    359364
    360 
     365/* DAZ - dirty hack so that resource manager is updated correctly
     366 * when using APIC and multiple adapters */
     367VOID RMSetHandles(HADAPTER hAdapter, HDEVICE hDevice)
     368{
     369        AdapterHandle = hAdapter;
     370        DeviceHandle = hDevice;
     371}
     372
  • GPL/branches/uniaud32-2.1.x/drv32/startup.asm

    r493 r548  
    473473                ret32
    474474_RMAllocResource16 endp
     475
     476                ALIGN 2
     477                PUBLIC  _RMModifyResourcesOrg
     478_RMModifyResourcesOrg proc far
     479                enter16
     480                test    byte ptr _RMFlags, 01H
     481                je      short ModifyL1
     482                lea     eax, [bp+6]
     483                push    ss
     484                push    ax
     485                push    001bH
     486                push    cs
     487                call    near ptr _CallRM
     488                mov     sp,bp
     489                ret16
     490ModifyL1:        test    byte ptr _RMFlags,02H
     491                je      short ModifyL2
     492                sub     ax,ax
     493                ret16
     494ModifyL2:        mov     ax,0001H
     495                ret16
     496_RMModifyResourcesOrg endp
     497
     498                ALIGN 2
     499                PUBLIC  _RMModifyResources16
     500_RMModifyResources16 proc far
     501                enter32
     502                xor     eax, eax
     503                push    dword ptr [bp+22]
     504                push    word ptr [bp+18]
     505                push    dword ptr [bp+14]
     506                push    dword ptr [bp+10]
     507                call    _RMModifyResourcesOrg
     508                add     sp, 14
     509                ret32
     510_RMModifyResources16 endp
    475511
    476512                ALIGN 2
     
    13981434;*******************************************************************************
    13991435        public _RMAllocResource
     1436        public _RMModifyResources
    14001437        public _RMDeallocResource
    14011438        public _RMCreateDevice
     
    14201457        retKEERM
    14211458_RMAllocResource endp
     1459
     1460        ALIGN 4
     1461_RMModifyResources proc near
     1462        enterKEERM
     1463        xor     eax, eax
     1464        push    dword ptr [edi+20]
     1465        push    dword ptr [edi+16]
     1466        push    dword ptr [edi+12]
     1467        push    dword ptr [edi+8]
     1468        call    fword ptr RMModifyResources1632
     1469        add     sp, 16
     1470        retKEERM
     1471_RMModifyResources endp
    14221472
    14231473        ALIGN   4
     
    15311581    public  _MSG_TABLE32
    15321582    public  RMAllocResource1632
     1583    public  RMModifyResources1632
    15331584    public  RMDeallocResource1632
    15341585    public  RMCreateDevice1632
     
    15921643    RMAllocResource1632  dd OFFSET CODE16:_RMAllocResource16
    15931644                         dw SEG CODE16:_RMAllocResource16
     1645                         dw 0
     1646    RMModifyResources1632  dd OFFSET CODE16:_RMModifyResources16
     1647                         dw SEG CODE16:_RMModifyResources16
    15941648                         dw 0
    15951649    RMDeallocResource1632 dd OFFSET CODE16:_RMDeallocResource16
  • GPL/branches/uniaud32-2.1.x/drv32/strategy.c

    r546 r548  
    3333#include <ossidc32.h>
    3434#include <dbgos2.h>
     35#include <string.h>
    3536
    3637ULONG StratRead(RP __far *_rp);
     
    4142ULONG deviceOwner = DEV_NO_OWNER;
    4243ULONG numOS2Opens = 0;
     44extern "C" BOOL fRewired; //pci.c
     45
     46DBGINT DbgInt;
    4347
    4448//******************************************************************************
     
    6771        ULONG rc;
    6872
     73        memset(&DbgInt, 0, sizeof(DbgInt));
     74
    6975        RPInit __far* rp = (RPInit __far*)_rp;
    7076        rc = DiscardableInit(rp);
    7177        //dprintf(("StratInit End rc=%d", rc));
     78        DbgInt.usState = 1;
    7279        return rc;
    7380}
     
    8289#pragma on (unreferenced)
    8390{
     91        DbgInt.usState = 2;
    8492#ifdef ACPI
    8593        PciAdjustInterrupts();
    8694#endif
     95        rprintf(("StratInitComplete: Init=%ld/%ld Between=%ld/%ld Complete=%ld/%ld",
     96                DbgInt.ulIntServiced[0], DbgInt.ulIntUnserviced[0],
     97                DbgInt.ulIntServiced[1], DbgInt.ulIntUnserviced[1],
     98                DbgInt.ulIntServiced[2], DbgInt.ulIntUnserviced[2]));
    8799        //dprintf(("StratInitComplete"));
    88100        return(RPDONE);
     
    160172ULONG Strategy(RP __far* rp)
    161173{
    162   if (rp->Command < sizeof(StratDispatch)/sizeof(StratDispatch[0]))
     174        if (fRewired) {
     175                fRewired = FALSE;
     176                rprintf(("Strategy: Resuming"));
     177                OSS32_APMResume();
     178        }
     179
     180        if (rp->Command < sizeof(StratDispatch)/sizeof(StratDispatch[0]))
    163181                return(StratDispatch[rp->Command](rp));
    164   else  return(RPERR_COMMAND | RPDONE);
     182        else return(RPERR_COMMAND | RPDONE);
    165183}
    166184//******************************************************************************
  • GPL/branches/uniaud32-2.1.x/include/dbgos2.h

    r523 r548  
    2525#ifndef __COMMDBG_H__
    2626#define __COMMDBG_H__
     27
     28typedef struct {
     29        unsigned short usState;
     30        unsigned long ulIntServiced[4];
     31        unsigned long ulIntUnserviced[4];
     32} DBGINT;
    2733
    2834#ifdef __cplusplus
  • GPL/branches/uniaud32-2.1.x/include/linux/pci.h

    r519 r548  
    374374        int (*deactivate)(struct pci_dev *dev);
    375375#ifdef TARGET_OS2
    376         void *pcidriver;
     376        unsigned int picirq;
     377        unsigned int apicirq;
     378        unsigned long hAdapter;
     379        unsigned long hDevice;
     380        void *pcidriver;
    377381#endif
    378382};
  • GPL/branches/uniaud32-2.1.x/include/osspci.h

    r546 r548  
    3535BOOL    RMRequestIRQ(ULONG ulIrq, BOOL fShared, ULONG *phRes);
    3636BOOL    RMDeallocateIRQ(ULONG hRes);
    37 VOID    RMDone(ULONG DevID);
     37VOID    RMDone(ULONG DevID, ULONG *phAdapter, ULONG *phDevice);
     38VOID    RMSetHandles(ULONG hAdapter, ULONG hDevice);
    3839
    3940#ifdef __cplusplus
  • GPL/branches/uniaud32-2.1.x/lib32/irq.c

    r546 r548  
    7373        ULONG hRes;
    7474
    75         dprintf(("request_irq: Enter for irq %d", irq & 0xff ));
     75        rprintf(("request_irq: irq %d", irq & 0xff ));
    7676        if ( !pSlot ) {
    7777                // find empty slot
     
    127127                                pSlot->flHandlers &= ~(1 << u);
    128128                                if( pSlot->flHandlers == 0 ) {
    129                                         dprintf(("free_irq: irq %d", irq & 0xff ));
     129                                        rprintf(("free_irq: irq %d", irq & 0xff ));
    130130                                        ALSA_FreeIrq(pSlot->irqNo);
    131131                                        pSlot->irqNo = 0;
     
    177177                //Don't pass it to the linux handler as the device doesn't respond as expected
    178178                //when suspended
    179                 dprintf(("Slot %d IRQ %d suspended",ulSlotNo, *pulIrq));
     179                rprintf(("Slot %d IRQ %d suspended",ulSlotNo, *pulIrq));
    180180                return FALSE;
    181181        }
  • GPL/branches/uniaud32-2.1.x/lib32/ossidc.cpp

    r536 r548  
    113113                return OSSERR_INIT_FAILED;
    114114        }
    115         dprintf(("OSS32_Initialize. Start address: %X", OffsetBeginCS32));
     115        dprintf(("OSS32_Initialize: Start address: %X", OffsetBeginCS32));
    116116
    117117        if(call_module_init(alsa_sound_init) != 0)               return OSSERR_INIT_FAILED;
    118         dprintf(("OSS32_Initialize1. Start address: %X", OffsetBeginCS32));
     118        dprintf(("OSS32_Initialize1: Start address: %X", OffsetBeginCS32));
    119119        if(call_module_init(alsa_pcm_init) != 0)                 return OSSERR_INIT_FAILED;
    120120        if(call_module_init(alsa_hwdep_init) != 0)               return OSSERR_INIT_FAILED;
     
    164164                return OSSERR_SUCCESS;
    165165        }
    166         rprintf(("OSS32_Initialize. FAILED"));
     166        rprintf(("OSS32_Initialize: FAILED"));
    167167        return OSSERR_INIT_FAILED;
    168168}
  • GPL/branches/uniaud32-2.1.x/lib32/pci.c

    r546 r548  
    4848
    4949BOOL    fSuspended = FALSE;
     50BOOL    fRewired = FALSE;
    5051extern int nrCardsDetected;
    5152
     
    248249                                                                                "Uniaud32");                                             // Name for acpi log
    249250                                if (!rc) {
    250                                         // Check APIC IRQ, if we have /SMP /APIC, must be set
    251                                         if (ApicIRQ) ulTmp1 = (ulTmp1 & (~0xff)) | (ApicIRQ & 0xff);
    252                                         else if (PicIRQ) ulTmp1 = (ulTmp1 & (~0xff)) | (PicIRQ & 0xff);
     251                                        if (PicIRQ) ulTmp1 = (ulTmp1 & (~0xff)) | (PicIRQ & 0xff); // Choose Pic interrupt for init time processing
     252                                        else if (ApicIRQ) ulTmp1 = (ulTmp1 & (~0xff)) | (ApicIRQ & 0xff);
    253253                                        rprintf(("pci_query_device: IRQs ACPI PIC=%ld APIC=%ld chosen=%d", PicIRQ, ApicIRQ, ulTmp1&0xff));
     254                                        pcidev->picirq = PicIRQ;   // Save the Pic and
     255                                        pcidev->apicirq = ApicIRQ; // Save the Apic interrupt for switching later
    254256                                }
    255257#endif /* ACPI */
     
    257259                                        pcidev->irq_resource[0].flags = IORESOURCE_IRQ;
    258260                                        pcidev->irq_resource[0].start = pcidev->irq_resource[0].end   = ulTmp1 & 0xffff;
    259                                         pcidev->irq = (u8)ulTmp1;
     261                                        pcidev->irq = (u8)ulTmp1; // This is the interrupt used for init time processing
    260262                                }
    261263
     
    502504
    503505                                // create adapter
    504                                 RMDone((pcidev->device << 16) | pcidev->vendor);
     506                                RMDone((pcidev->device << 16) | pcidev->vendor, &pcidev->hAdapter, &pcidev->hDevice);
    505507                                iNumCards++;
    506508
     
    516518                        }
    517519
    518                         RMDone(0);
     520                        RMDone(0, 0, 0);
    519521                }
    520522        }
     
    938940                if(pci_devices[i].devfn)
    939941                {
     942                        RMSetHandles(pci_devices[i].hAdapter, pci_devices[i].hDevice); /* DAZ - dirty hack */
    940943                        driver = pci_devices[i].pcidriver;
    941944                        if(driver && driver->resume) {
     
    962965                if(pci_devices[i].devfn)
    963966                {
     967                        RMSetHandles(pci_devices[i].hAdapter, pci_devices[i].hDevice); /* DAZ - dirty hack */
    964968                        driver = pci_devices[i].pcidriver;
    965969                        if(driver && driver->suspend) {
     
    977981        struct pci_dev *pcidev;
    978982        struct pci_driver *driver;
    979         ULONG PicIRQ, ApicIRQ, ulTmp1, rc;
     983        ULONG ulTmp1, rc;
    980984
    981985        for (i=0; i<MAX_PCI_DEVICES; i++) {
    982986                if (!pci_devices[i].devfn) continue;
    983987                pcidev = &pci_devices[i];
    984                 rc = ACPIFindPCIDevice( pcidev->bus->number,                             // Bus
    985                                                                 PCI_SLOT(pcidev->devfn),                         // Dev
    986                                                                 PCI_FUNC(pcidev->devfn),                         // Function
    987                                                                 &PicIRQ,                                                         // PIC IRQ
    988                                                                 &ApicIRQ,                                                        // APIC IRQ
    989                                                                 NULL,                                                            // ACPI handle to finding device
    990                                                                 "Uniaud32");                                             // Name for acpi log
    991                 if (!rc) {
    992                         ulTmp1 = 0;
    993                         // Check APIC IRQ, if we have /SMP /APIC, must be set
    994                         if (ApicIRQ) ulTmp1 = (ulTmp1 & (~0xff)) | (ApicIRQ & 0xff);
    995                         else if (PicIRQ) ulTmp1 = (ulTmp1 & (~0xff)) | (PicIRQ & 0xff);
    996                         rprintf(("PciAdjustInterrupts: IRQs ACPI PIC=%ld APIC=%ld was=%d chosen=%ld", PicIRQ, ApicIRQ, pcidev->irq, ulTmp1));
    997                         if( (u8)ulTmp1 && ((u8)ulTmp1 != 0xff) && ((u8)ulTmp1 != pcidev->irq) ) {
    998                                 driver = pcidev->pcidriver;
    999                                 if(driver && driver->suspend) driver->suspend(pcidev, SNDRV_CTL_POWER_D0);
    1000 
    1001                                 pcidev->irq_resource[0].flags = IORESOURCE_IRQ;
    1002                                 pcidev->irq_resource[0].start = pcidev->irq_resource[0].end   = ulTmp1 & 0xffff;
    1003                                 pcidev->irq = (u8)ulTmp1;
    1004 
    1005                                 if(driver && driver->resume) driver->resume(pcidev);
    1006                         }
     988                ulTmp1 = pcidev->irq;
     989                if (pcidev->apicirq) ulTmp1 = pcidev->apicirq;
     990                else if (pcidev->picirq) ulTmp1 = pcidev->picirq;
     991                rprintf(("PciAdjustInterrupts: IRQs ACPI PIC=%ld APIC=%ld was=%d chosen=%ld", pcidev->picirq, pcidev->apicirq, pcidev->irq, ulTmp1));
     992                if( (u8)ulTmp1 && ((u8)ulTmp1 != 0xff) && ((u8)ulTmp1 != pcidev->irq) ) {
     993                        RMSetHandles(pcidev->hAdapter, pcidev->hDevice); /* DAZ - dirty hack */
     994                        driver = pcidev->pcidriver;
     995                        if(driver && driver->suspend) driver->suspend(pcidev, SNDRV_CTL_POWER_D0);
     996                        fSuspended = TRUE;
     997
     998                        pcidev->irq_resource[0].flags = IORESOURCE_IRQ;
     999                        pcidev->irq_resource[0].start = pcidev->irq_resource[0].end   = ulTmp1 & 0xffff;
     1000                        pcidev->irq = (u8)ulTmp1;
     1001
     1002                        fRewired = TRUE;
     1003                        // if(driver && driver->resume) driver->resume(pcidev);
    10071004                }
    10081005        } /* for loop */
  • GPL/branches/uniaud32-2.1.x/uniaud.inc

    r546 r548  
    77# BUILDVERSION must be 3 parts, and only numbers like 5.44.108
    88# It is best that 2'nd number is always 2 digits, eg at least 10
    9 BUILDVERSION = 2.1.2
     9BUILDVERSION = 2.1.3
    1010
    1111# Fixpack version
     
    1313# ex RC3  GA  FIXPACK2 beta_47
    1414# Comment out to avoid a fixpack line in bldlevel
    15 FIXPACK = BETA SVNr546
     15FIXPACK = BETA SVNr548
    1616
    1717# ALSA BUILD VERSION
Note: See TracChangeset for help on using the changeset viewer.