Ignore:
Timestamp:
Mar 23, 2009, 9:13:00 AM (16 years ago)
Author:
Paul Smedley
Message:

Updates from Pasha to improve IRQ handling and resolve long delays at startup in APIC mode when using ACPI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-2.0/drv32/irq.cpp

    r375 r421  
    4747
    4848//******************************************************************************
     49#ifdef ACPI
     50//PS+++ fix description
     51// Problem is in open high IRQ (acpi.psd /SMP /APIC) at boot time.
     52// In my case - this IRQ use SATA and we have flood IRQ. This flood do
     53// MASK this IRQ from kernel. Next danis506.add has very slow read from
     54// disk.
     55// How to fix.
     56// At boot time (from DevInit to DevInitComplete) we use low IRQ. In
     57// DevInitComplete we close low IRQ and open high IRQ. All values for
     58// IRQ we are getting from ACPI call.
     59
     60//PS+++ Array with saving IRQ number
     61#ifdef __cplusplus
     62extern "C" {
     63#endif
     64struct SaveIRQForSlot
     65{
     66    ULONG  ulSlotNo;
     67    BYTE   LowIRQ;
     68    BYTE   HighIRQ;
     69    BYTE   Pin;   
     70} sISRHigh[8];     //FIX me to MAX_DEVICES or same
     71
     72int  SaveIRQCounter = 0;       //PS+++ current position in array
     73extern ULONG InitCompleteWas;  //PS+++ Indication of InitComplete call
     74#ifdef __cplusplus
     75}
     76#endif
     77
     78#endif //ACPI
    4979//******************************************************************************
    5080BOOL ALSA_SetIrq(ULONG ulIrq, ULONG ulSlotNo, BOOL fShared)
     
    6595
    6696    if (rc != 0) {                    // If error ...
    67         dprintf(("ERROR: RMSetIrq %d %d %x - failed to set shared - trying exclusive!!", ulIrq, fShared, ulSlotNo));
     97       dprintf(("ERROR: RMSetIrq %d %d %x - failed to set shared - trying exclusive!!", ulIrq, fShared, ulSlotNo));
    6898        rc = DevIRQSet((WORD16) *pISR[ulSlotNo],
    6999                       (WORD16)ulIrq,
     
    76106        return FALSE;
    77107    }
     108//PS+++ Begin
     109#ifdef ACPI
     110    if (InitCompleteWas == 0)
     111    {
     112        dprintf(("RMSetIrq saved %d %d %x was %d", (ULONG)ulIrq, ulSlotNo,(ULONG)sISRHigh[SaveIRQCounter].LowIRQ));
     113        sISRHigh[SaveIRQCounter].ulSlotNo = ulSlotNo;
     114        SaveIRQCounter++;
     115        return TRUE;
     116    }
     117#endif
     118//PS End
    78119
    79120    return TRUE;
Note: See TracChangeset for help on using the changeset viewer.