From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754513AbXGIIt7 (ORCPT ); Mon, 9 Jul 2007 04:49:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751358AbXGIItw (ORCPT ); Mon, 9 Jul 2007 04:49:52 -0400 Received: from an-out-0708.google.com ([209.85.132.251]:42779 "EHLO an-out-0708.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751043AbXGIItv (ORCPT ); Mon, 9 Jul 2007 04:49:51 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=bHUGpqDzESX9IgldVKxL37Xnxgg1lkmglO+dsFYLujnMwCwt8gGNc0nWPQat60oEOfqYgSB4kJL/Y3gU6XqklL0JETJWbjFcRCWeMZ4mjF9G0ECxVp/3wPB3QexN414QlVaEByaZVf7d62HdZl7kBtD9/SSn1nKJM/mjK61uFQc= Message-ID: Date: Mon, 9 Jul 2007 10:49:49 +0200 From: mikie To: "Indan Zupancic" Subject: Re: understanding firmware loader for speedtouch (kernel 2.6.21.5) Cc: "Duncan Sands" , linux-kernel@vger.kernel.org In-Reply-To: <58019.81.207.0.53.1183749400.squirrel@secure.samage.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200707061620.44348.duncan.sands@math.u-psud.fr> <58019.81.207.0.53.1183749400.squirrel@secure.samage.net> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 2007/7/6, Indan Zupancic : > On Fri, July 6, 2007 16:20, Duncan Sands wrote: > > On Friday 6 July 2007 14:54:18 mikie wrote: > >> Hi, > >> > >> I experience some problems with the speedtch.c module, especially in > >> regards to its firmware loader. > >> I am not quite sure if this module is going to load the firmware > >> itself or does it use some external software to do that ? > > > > It loads it itself, using some external software! > > For information, it generates a hotplug event and the kernel calls the > program written at /proc/sys/kernel/hotplug with certain information. > That used to be /sbin/hotplug, became later udev, but today in general > udev reads the uevents generated by the kernel. On my system the /proc/sys/kernel/hotplug points to /sbin/hotplug. I copied your script to /sbin/hotplug and also added simple logging, so I can see whenever the script is being started. It turns out that the script is not started at all by the kernel... I am afraid that the kernel generates uevents only, could this be true? The timeout value in /sys/class/firmware/timeout is 60 and it seems to be working correctly (see logs with exactly 1 minute delay before next find_firmware event) As I check the debug log I can see some uevents : Jul 9 09:03:19 srv kernel: speedtch 1-2:1.0: usbatm_usb_probe: using 3392 byte buffer for rx channel 0xc5577ca0 Jul 9 09:03:19 srv kernel: speedtch 1-2:1.0: usbatm_usb_probe: using 3392 byte buffer for tx channel 0xc5577ce8 Jul 9 09:03:19 srv kernel: speedtch 1-2:1.0: speedtch_find_firmware: looking for speedtch-1.bin.2.00 Jul 9 09:03:19 srv kernel: DEV: registering device: ID = '1-2:1.0' Jul 9 09:03:19 srv kernel: PM: Adding info for No Bus:1-2:1.0 Jul 9 09:03:19 srv kernel: dev_uevent: class uevent() returned -19 Jul 9 09:03:19 srv kernel: bound device '1-2:1.0' to driver 'speedtch' Jul 9 09:03:19 srv kernel: usb: Bound Device 1-2:1.0 to Driver speedtch Jul 9 09:04:07 srv kernel: drivers/usb/atm/speedtch.c: speedtch_usb_cleanup Jul 9 09:04:07 srv kernel: bus usb: remove driver speedtch Jul 9 09:04:07 srv kernel: speedtch 1-2:1.0: usbatm_usb_disconnect entered Jul 9 09:04:19 srv kernel: DEV: Unregistering device. ID = '1-2:1.0' Jul 9 09:04:19 srv kernel: PM: Removing info for No Bus:1-2:1.0 Jul 9 09:04:19 srv kernel: speedtch 1-2:1.0: speedtch_find_firmware: looking for speedtch-1.bin.2 Jul 9 09:04:19 srv kernel: DEV: registering device: ID = '1-2:1.0' Jul 9 09:04:19 srv kernel: PM: Adding info for No Bus:1-2:1.0 Jul 9 09:04:19 srv kernel: dev_uevent: class uevent() returned -19 Jul 9 09:05:19 srv kernel: DEV: Unregistering device. ID = '1-2:1.0' Jul 9 09:05:19 srv kernel: PM: Removing info for No Bus:1-2:1.0 Jul 9 09:05:19 srv kernel: speedtch 1-2:1.0: speedtch_find_firmware: looking for speedtch-1.bin Jul 9 09:05:19 srv kernel: DEV: registering device: ID = '1-2:1.0' Jul 9 09:05:19 srv kernel: PM: Adding info for No Bus:1-2:1.0 Jul 9 09:05:19 srv kernel: dev_uevent: class uevent() returned -19 Jul 9 09:06:19 srv kernel: DEV: Unregistering device. ID = '1-2:1.0' Jul 9 09:06:19 srv kernel: PM: Removing info for No Bus:1-2:1.0 Jul 9 09:06:19 srv kernel: speedtch 1-2:1.0: speedtch_unbind entered Jul 9 09:06:19 srv kernel: speedtch 1-2:1.1: usbatm_usb_disconnect entered Jul 9 09:06:19 srv kernel: speedtch 1-2:1.1: usbatm_usb_disconnect: NULL instance! Mostly I think I should be worried about "dev_uevent: class uevent() returned -19". It sounds like the uevent failed? I do not have udevd, but still I thought that in such case the kernel will use the script from /proc/sys/kernel/hotplug but apparently it does not. Is there any config option to choose between udev or hotplug in the kernel source ? Regards, MK