atiixp.c (bdfbdcec6a165c8edff78f3666f757173c56c954) | atiixp.c (79b783c7219cbee39081a03b549d8e8fefadbf55) |
---|---|
1/*- 2 * Copyright (c) 2005 Ariff Abdullah <ariff@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 885 unchanged lines hidden (view full) --- 894 /* mark missing codecs as not ready */ 895 detected_codecs = status & CODEC_CHECK_BITS; 896 sc->codec_not_ready_bits |= detected_codecs; 897 898 /* disable detected interupt sources */ 899 enable = atiixp_rd(sc, ATI_REG_IER); 900 enable &= ~detected_codecs; 901 atiixp_wr(sc, ATI_REG_IER, enable); | 1/*- 2 * Copyright (c) 2005 Ariff Abdullah <ariff@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 885 unchanged lines hidden (view full) --- 894 /* mark missing codecs as not ready */ 895 detected_codecs = status & CODEC_CHECK_BITS; 896 sc->codec_not_ready_bits |= detected_codecs; 897 898 /* disable detected interupt sources */ 899 enable = atiixp_rd(sc, ATI_REG_IER); 900 enable &= ~detected_codecs; 901 atiixp_wr(sc, ATI_REG_IER, enable); |
902 wakeup(sc); |
|
902 } 903 904 /* acknowledge */ 905 atiixp_wr(sc, ATI_REG_ISR, status); 906 atiixp_unlock(sc); 907 908 if (trigger & 1) 909 chn_intr(sc->pch.channel); --- 90 unchanged lines hidden (view full) --- 1000 if (sc->delayed_attach.ich_func) { 1001 config_intrhook_disestablish(&sc->delayed_attach); 1002 sc->delayed_attach.ich_func = NULL; 1003 } 1004 1005 polling = sc->polling; 1006 sc->polling = 0; 1007 | 903 } 904 905 /* acknowledge */ 906 atiixp_wr(sc, ATI_REG_ISR, status); 907 atiixp_unlock(sc); 908 909 if (trigger & 1) 910 chn_intr(sc->pch.channel); --- 90 unchanged lines hidden (view full) --- 1001 if (sc->delayed_attach.ich_func) { 1002 config_intrhook_disestablish(&sc->delayed_attach); 1003 sc->delayed_attach.ich_func = NULL; 1004 } 1005 1006 polling = sc->polling; 1007 sc->polling = 0; 1008 |
1008 /* wait for the interrupts to happen */ 1009 timeout = 100; 1010 do { 1011 msleep(sc, sc->lock, PWAIT, "ixpslp", 1); 1012 if (sc->codec_not_ready_bits) 1013 break; 1014 } while (--timeout); | 1009 timeout = 10; 1010 if (sc->codec_not_ready_bits == 0) { 1011 /* wait for the interrupts to happen */ 1012 do { 1013 msleep(sc, sc->lock, PWAIT, "ixpslp", max(hz / 10, 1)); 1014 if (sc->codec_not_ready_bits != 0) 1015 break; 1016 } while (--timeout); 1017 } |
1015 1016 sc->polling = polling; 1017 atiixp_disable_interrupts(sc); 1018 | 1018 1019 sc->polling = polling; 1020 atiixp_disable_interrupts(sc); 1021 |
1019 if (timeout == 0) { | 1022 if (sc->codec_not_ready_bits == 0 && timeout == 0) { |
1020 device_printf(sc->dev, 1021 "WARNING: timeout during codec detection; " 1022 "codecs might be present but haven't interrupted\n"); 1023 atiixp_unlock(sc); 1024 goto postinitbad; 1025 } 1026 1027 found = 0; --- 380 unchanged lines hidden --- | 1023 device_printf(sc->dev, 1024 "WARNING: timeout during codec detection; " 1025 "codecs might be present but haven't interrupted\n"); 1026 atiixp_unlock(sc); 1027 goto postinitbad; 1028 } 1029 1030 found = 0; --- 380 unchanged lines hidden --- |