From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kristian Amlie Subject: Re: How to add a new MIDI device to the usbaudio driver Date: Wed, 24 Aug 2011 10:09:09 +0200 Message-ID: <4E54B1A5.5080507@amlie.name> References: <4E5234F0.8000502@amlie.name> <4E52401C.8030605@amlie.name> <4E537524.9010303@ladisch.de> <4E537BE9.4050004@amlie.name> <4E53959A.7090702@amlie.name> <4E53A748.4070404@amlie.name> <4E53AAE4.2070303@amlie.name> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from oproxy9.bluehost.com (oproxy9.bluehost.com [69.89.24.6]) by alsa0.perex.cz (Postfix) with SMTP id BB238248E4 for ; Wed, 24 Aug 2011 10:09:36 +0200 (CEST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Daniel Mack Cc: alsa-devel@alsa-project.org, Clemens Ladisch List-Id: alsa-devel@alsa-project.org On 08/23/11 15:44, Daniel Mack wrote: > On Tue, Aug 23, 2011 at 3:28 PM, Kristian Amlie wrote: >> On 08/23/11 15:16, Daniel Mack wrote: >>> On Tue, Aug 23, 2011 at 3:12 PM, Kristian Amlie wrote: >>>> Here is the output from one complete run of cu, including connecting, >>>> pressing a key once on the instrument and killing cu afterwards: >>> ... >>> And now once again without killing cu, please. I'm interested in the >>> last commands that occur before the device starts working. >> >> Here you go: >> >> [21535.096008] change_speed(): urb_value: 16696, urb_index: 0 >> [21535.097918] update_mctrl(): urb_value: 771, priv->interface: 0 >> [21535.099917] change_speed(): urb_value: 49230, urb_index: 0 >> [21535.103055] change_speed(): urb_value: 49230, urb_index: 0 >> [21535.106037] change_speed(): urb_value: 49230, urb_index: 0 > > Ok, then let's try the attached patch. In case it doesn't work, you > might need to check whether there are any more ctrl requests sent by > the fdti_sio driver that need to be added to the MIDI driver as well. That resulted in the following oops: ------- BUG: unable to handle kernel NULL pointer dereference at (null) IP: [< (null)>] (null) PGD 0 Oops: 0010 [#1] SMP CPU 0 Modules linked in: snd_usb_audio snd_usbmidi_lib snd_rawmidi freq_table mperf ipv6 snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss usbhid dm_mod snd_hda_codec_idt arc4 iwl4965 snd_hda_intel iwl_legacy snd_hda_codec ehci_hcd mac80211 snd_hwdep snd_pcm firmware_class i2c_i801 cfg80211 video processor snd_timer backlight i2c_core uhci_hcd thermal snd rfkill usbcore sky2 thermal_sys dcdbas snd_page_alloc ac joydev button pcspkr battery sg rtc Pid: 1042, comm: khubd Not tainted 3.0.0 #3 Dell Inc. XPS M1530 / RIP: 0010:[<0000000000000000>] [< (null)>] (null) RSP: 0018:ffff8801188df918 EFLAGS: 00010283 RAX: 000000000000000c RBX: ffff8801188df960 RCX: ffffffffa021edc0 RDX: ffffffffa0224a80 RSI: ffff88011982c600 RDI: ffff880118058900 RBP: ffff8801188df920 R08: 000000000000000c R09: ffff88011b3ff47f R10: 000000000000000c R11: ffff8801188df870 R12: ffff880118058900 R13: 0000000000000000 R14: ffff880118a0f800 R15: ffffffffa021edc0 FS: 0000000000000000(0000) GS:ffff88011fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 0000000000000000 CR3: 0000000001645000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process khubd (pid: 1042, threadinfo ffff8801188de000, task ffff88011f7633a0) Stack: ffffffffa021a823 ffff8801188df9b0 ffffffffa0216983 ffff88011f7055a0 ffff880118058a80 ffff880118a0f888 ffff88011982c600 00000000ffffffff ffff880119b22d88 3a33303430425355 ffffff0038643862 ffff88011982c600 Call Trace: [] ? snd_usb_create_quirk+0x20/0x22 [snd_usb_audio] [] usb_audio_probe+0x56f/0x6e8 [snd_usb_audio] [] usb_probe_interface+0xcb/0x115 [usbcore] [] driver_probe_device+0xa3/0x151 [] ? __driver_attach+0x7b/0x7b [] __device_attach+0x33/0x3c [] bus_for_each_drv+0x51/0x88 [] device_attach+0x64/0x7c [] bus_probe_device+0x22/0x39 [] device_add+0x41c/0x58f [] ? device_pm_init+0x3c/0x6e [] usb_set_configuration+0x4a5/0x4f7 [usbcore] [] generic_probe+0x4a/0x78 [usbcore] [] usb_probe_device+0x15/0x17 [usbcore] [] driver_probe_device+0xa3/0x151 [] ? __driver_attach+0x7b/0x7b [] __device_attach+0x33/0x3c [] bus_for_each_drv+0x51/0x88 [] device_attach+0x64/0x7c [] bus_probe_device+0x22/0x39 [] device_add+0x41c/0x58f [] usb_new_device+0x74/0xb7 [usbcore] [] hub_thread+0xcf8/0x11e5 [usbcore] [] ? schedule+0x7c8/0x861 [] ? wake_up_bit+0x23/0x23 [] ? hub_probe+0x72e/0x72e [usbcore] [] kthread+0x81/0x89 [] kernel_thread_helper+0x4/0x10 [] ? kthread_worker_fn+0x145/0x145 [] ? gs_change+0xb/0xb Code: Bad RIP value. RIP [< (null)>] (null) RSP CR2: 0000000000000000 ---[ end trace 69eca745138acea4 ]--- ------- -- Kristian