Hi, At Mon, 24 Nov 2003 18:00:17 -0800, Andrew Morton wrote: > > Torrey Hoffman wrote: > > > > I get this every time I boot 2.6.0-test10. I think this problem has > > been around for a while. > > > > Debug: sleeping function called from invalid context at > > include/asm/semaphore.h:119 > > in_atomic():1, irqs_disabled():0 > > Call Trace: > > [] __might_sleep+0xab/0xc9 > > [] ap_cs8427_sendbytes+0x38/0xd2 [snd_ice1712] > > [] snd_i2c_sendbytes+0x22/0x26 [snd_i2c] > > [] snd_cs8427_reg_read+0x2c/0x8c [snd_cs8427] > > [] snd_cs8427_create+0xa4/0x347 [snd_cs8427] > > [] snd_device_new+0x20/0x6a > > [] snd_ice1712_init_cs8427+0x2f/0x6f [snd_ice1712] > > [] snd_ice1712_delta_init+0x230/0x2b9 [snd_ice1712] > > [] snd_ice1712_probe+0x323/0x34c [snd_ice1712] > > snd_cs8427_create() does: > > snd_i2c_lock(bus); > if ((err = snd_cs8427_reg_read(device, CS8427_REG_ID_AND_VER)) != CS8427_VER8427A) { > > the first statement takes a spinlock. snd_cs8427_reg_read() then calls > ap_cs8427_sendbytes() which downs a semaphore. > > > It might be more appropriate to use a semaphore for ice1712_t.gpio_mutex? the attached patch fixes this, simply replacing spinlock with mutex. it's already in ALSA 1.0.0pre release. -- Takashi Iwai ALSA Developer - www.alsa-project.org