On Wed, 16 Aug 2006, Peter Oehry wrote:
> Yes I tried it with your pach. The usb_set_configuration() would not have been
> available by the include <linux/usb.h>
>
> I tried the following code in the snd_usb_audio_probe() Function (usbaudio.c)
>
> if (id == USB_ID(0x0763, 0x2012)) { /* warn for configuration */
> if(dev->actconfig->desc.bConfigurationValue==1){
> usb_driver_set_configuration(dev,2);
> goto __err_val;
> }
> }
That looks basically right. Maybe add a dev_info() line saying that the
driver is going to install configuration #2.
> Without the goto __err_val I get nearly every time a deadlock.
That shouldn't happen. Can you find out what tasks were deadlocked and
where?
> If I
> return I have different random problem. I one cas I had only no keyboard
> after the USB device plugged in. I was able to get the follwoing errors
> from the kernel:
>
> usb 1-1: new full speed USB device using uhci_hcd and address 7
> usb 1-1: configuration #1 chosen from 2 choices
> snd-usb-audio: probe of 1-1:1.0 failed with error -5
> snd-usb-audio: probe of 1-1:1.1 failed with error -5
Okay, this reveals one small problem. Your driver was probed for two
interfaces, so it sent two requests to usb_driver_set_configuration. You
should check that the current interface number is 0 before sending the
request, so that there's only one. But even so, it should have worked
okay.
> BUG: unable to handle kernel paging request at virtual address 69766725
> printing eip:
> c03cd914
> *pde = 00000000
> Oops: 0000 [#1]
> PREEMPT SMP
> Modules linked in: snd_usb_audio snd_usb_lib snd_rawmidi snd_hwdep
> snd_pcm_oss s
> nd_mixer_oss snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device radeon drm
> i2
> c_i801 ehci_hcd usbhid uhci_hcd intel_agp agpgart rtc raid0 snd_intel8x0
> snd_ac9
> 7_codec snd_ac97_bus snd_pcm snd_timer snd snd_page_alloc realtime w83627hf
> hwmo
> n_vid i2c_isa bttv video_buf ir_common compat_ioctl32 btcx_risc lirc_i2c
> lirc_de
> v msp3400 saa7115 tda9887 tuner v4l2_common ivtv firmware_class i2c_algo_bit
> v4l
> 1_compat tveeprom i2c_core videodev md_mod
> CPU: 0
> EIP: 0060:[<c03cd914>] Not tainted VLI
> EFLAGS: 00010296 (2.6.17-gentoo-r4 #2)
> EIP is at usb_set_configuration+0x1d/0x493
> eax: 69766564 ebx: dfec1340 ecx: 00000001 edx: f69f4400
> esi: dfec134c edi: 00000000 ebp: 69766564 esp: f7c6fecc
> ds: 007b es: 007b ss: 0068
> Process events/0 (pid: 8, threadinfo=f7c6e000 task=f7c4d0b0)
> Stack: f7c4d0b0 c044b9cf c044b429 00000001 f7c4d0b0 c0118d89 00100100
> 00200200
> f7dd6070 e545a040 f7c6ff50 dfec1340 00000000 00000000 dfec1340
> dfec134c
> c17fe340 dfec1340 c03cddb2 69766564 40736563 dfec1348 c012f0ed
> dfec1340
> Call Trace:
> <c044b9cf> _spin_unlock_irqrestore+0xf/0x23 <c044b429> __down+0xcc/0xdb
> <c0118d89> default_wake_function+0x0/0x12 <c03cddb2>
> driver_set_config_work+0x
> 28/0x4e
I don't understand why this happened. It looks like the arguments passed
to usb_set_configuration are garbage.
Can you add a printk line at the start of the driver_set_config_work
routine? Have it display the values of req, req->udev, and req->config.
Alan Stern
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel