Changeset 434


Ignore:
Timestamp:
May 31, 2009, 6:14:56 AM (16 years ago)
Author:
Paul Smedley
Message:

Re-implement hack in hda_intel.c to stop looping in azx_update_rirb() when jiffies stops updating + tidy ups

Location:
GPL/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk/alsa-kernel/pci/hda/hda_intel.c

    r427 r434  
    617617        struct azx *chip = bus->private_data;
    618618        unsigned long timeout;
     619#ifdef TARGET_OS2
     620        int count = 0;
     621#endif
    619622
    620623 again:
     
    632635                if (time_after(jiffies, timeout))
    633636                        break;
     637#ifdef TARGET_OS2
     638                if (count >= 5000) /* Hack on OS/2 to stop infinite loop as jiffies sometimes don't increment */
     639                        break;
     640#endif
    634641                if (bus->needs_damn_long_delay)
    635642                        msleep(2); /* temporary workaround */
     
    638645                        cond_resched();
    639646                }
    640         }
    641 
     647#ifdef TARGET_OS2
     648        count++;
     649#endif
     650        }
     651#ifdef TARGET_OS2
     652        if (count >= 5000)
     653                snd_printk(KERN_WARNING "hda_intel: count >= 5000, aborting loop in azx_rirb_get_response\n");
     654
     655#endif
    642656        if (chip->msi) {
    643657                snd_printk(KERN_WARNING "hda_intel: No response from codec, "
     
    9991013        struct azx_dev *azx_dev;
    10001014        u32 status;
    1001 #ifdef TARGET_OS2
    1002         u32 ignore_irq = 0;
    1003 #endif
    10041015        int i, ok;
    10051016
     
    10181029                        if (!azx_dev->substream || !azx_dev->running)
    10191030                                continue;
    1020 #if 0 /* ??????? */
    1021 #ifdef TARGET_OS2
    1022                         ignore_irq |= azx_dev->sd_int_sta_mask;
    1023 #endif
    1024                         continue;
    1025 #endif
    10261031                        /* check whether this IRQ is really acceptable */
    10271032                        ok = azx_position_ok(chip, azx_dev);
     
    10551060        spin_unlock(&chip->reg_lock);
    10561061
    1057    #ifdef TARGET_OS2
    1058    if ((status & RIRB_INT_MASK) || ignore_irq) {
     1062#ifdef TARGET_OS2
     1063   if (status & RIRB_INT_MASK) {
    10591064       return 2;
    10601065   }
    1061    #endif
     1066#endif
    10621067
    10631068        return IRQ_HANDLED;
     
    11081113                             struct azx_dev *azx_dev)
    11091114{
    1110 #ifdef TARGET_OS2xx /* Anyone know why this is set to volatile - causes a warning when it is set */
    1111         volatile u32 *bdl;
    1112 #else
    11131115        u32 *bdl;
    1114 #endif
    11151116        int i, ofs, periods, period_bytes;
    11161117        int pos_adj;
  • GPL/trunk/drv32/devhlp.asm

    r32 r434  
    143143iodelay32_ endp
    144144
     145;iodelay32_ proc near
     146;       mov ax,DOSIODELAYCNT
     147;       top:
     148;       dec ax
     149;       jnz top
     150;iodelay32_ ENDP
     151
    145152CODE32  ends
    146153
Note: See TracChangeset for help on using the changeset viewer.