mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: mikie <mikie.pl@gmail.com>
To: "Indan Zupancic" <indan@nul.nu>
Cc: "Kay Sievers" <kay.sievers@vrfy.org>,
	"Duncan Sands" <duncan.sands@math.u-psud.fr>,
	linux-kernel@vger.kernel.org
Subject: Re: understanding firmware loader for speedtouch (kernel 2.6.21.5)
Date: Mon, 9 Jul 2007 19:00:48 +0200	[thread overview]
Message-ID: <ca35ce500707091000h780c98bdleb3872849f451c2a@mail.gmail.com> (raw)
In-Reply-To: <33435.81.207.0.53.1183993390.squirrel@secure.samage.net>

2007/7/9, Indan Zupancic <indan@nul.nu>:
> On Mon, July 9, 2007 16:40, mikie wrote:
> > 2007/7/9, Kay Sievers <kay.sievers@vrfy.org>:
> >> On 7/9/07, mikie <mikie.pl@gmail.com> wrote:
> >> > 2007/7/9, Indan Zupancic <indan@nul.nu>:
> >> > > On Mon, July 9, 2007 10:49, mikie wrote:
> >> > > > 2007/7/6, Indan Zupancic <indan@nul.nu>:
> >> > > >> 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?
> >> > >
> >> > > Not really, it would break backward compatibility, and if it were true,
> >> > > they're remove the /proc/sys/kernel/hotplug setting too. As far as I know,
> >> > > if it's set, that program will be executed, and if zero is written to it, only
> >> > > uevents are generated.
> >> > >
> >> > > Make sure that the script is executable (chmod +x)
> >> >
> >> > Yes I have set it to be executable:
> >> > root@srv:/sbin# ls -lah hotplug
> >> > -rwxr-xr-x    1 root     root          934 Jul  9 09:13 hotplug
> >> >
> >> > > and has "#!/bin/sh"
> >> > > at the top, or else it won't work. If that's already the case, I've no idea.
> >> >
> >> > root@srv:/sbin# head hotplug
> >> > #!/bin/sh
> >> > set -e
> >> >
> >> >
> >> > Everything looks OK, but still it does not fire up the script...
> >>
> >> It should run, if the kernel creates events. Can you run "udevmonitor
> >> --env" while loading the driver? That way we can see if events are
> >> generated by the kernel (if you don't have it, no need to install
> >> udev, just download the udev tarball, type "make" and run
> >> "./udevmonitor --env").
> >
> > It seems that uevents are generated:
>
> What if you run a very simple script like
>
> #!/bin/sh
> echo "test" >> /tmp/test
>
> is it called at all?
I tried that. I modified the script so it writes to /tmp/bla a simple
line that the script was started.
Now, when I start it manually by simply typing /sbin/hotplug in the
bash, then the log shows that the script got started (as expected).
However, when I do modprobe speedtch the kernel never runs this
script...
Certainly, I removed the speedtch module earlier (rmmod speedtch) and
checked that it was removed with lsmod.
What I tried to do is manually find the firmware directory in /sys/
after inserting the speedtch. Then I manually did the echo 1>loading,
cat speedtch-1.bin > data, echo 0>loading. And it worked. Everything
after that went fine. So all I am missing is the hotplug script not
being started by kernel at all.

> If it is then it's probably something with the other script. Try removing
> the set -e and/or run it manually with the right parameters set and see if
> anything goes wrong. Or use a minimal udev and let it do the hotplugging,
> having only rules for speedtouch and firmware loading (attached, but
> make sure the paths and pppd call is correct for your system). /dev can stay
> static, just change udev.conf to handle /udev or something.

Thanks for your support and the attached rules. If I can't find other
solution I will have to use the minimal udev environment that you
provided.

One more thing - when the modem finally runs in isochronous mode, yet
I cannot get high transfer rates. I can't get nothing more than
3Mbits/s. When I used kernel 2.4 with bulk mode I had only 2.5 Mbit/s.
So there is a little progress, but still not too much. Is it possible
that weak and old hardware (Celeron 633 on a VIA chipset motherboard)
is causing this ?

-- 
Regards,
MK

  reply	other threads:[~2007-07-09 17:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-06 12:54 mikie
2007-07-06 14:20 ` Duncan Sands
2007-07-06 19:16   ` Indan Zupancic
2007-07-09  8:49     ` mikie
2007-07-09 10:42       ` Indan Zupancic
2007-07-09 11:08         ` mikie
2007-07-09 13:59           ` Kay Sievers
2007-07-09 14:40             ` mikie
2007-07-09 15:03               ` Indan Zupancic
2007-07-09 17:00                 ` mikie [this message]
     [not found]                   ` <200707091923.38577.duncan.sands@math.u-psud.fr>
2007-07-09 17:41                     ` mikie
2007-07-09 17:51                       ` Duncan Sands
2007-07-10  7:54                     ` mikie
2007-07-10  8:57                       ` Duncan Sands
2007-07-10  9:13                         ` mikie
2007-07-10  9:32                           ` Duncan Sands
2007-07-10 10:32                             ` mikie
2007-07-11 11:22                               ` mikie
2007-07-11 12:33                                 ` Duncan Sands
2007-07-11 12:47                                   ` mikie
2007-07-11 13:07                                     ` Duncan Sands
2007-07-11 16:55                                       ` mikie
2007-07-19 10:24                                         ` mikie
2007-07-24 23:03                                           ` Duncan Sands
2008-11-19 12:25                                             ` mikie
2008-11-19 12:49                                               ` Duncan Sands
2007-07-09 15:08               ` Kay Sievers
2007-07-09 10:50       ` Duncan Sands
2007-07-09 11:06         ` mikie
     [not found]   ` <ca35ce500707061006k74754bd6m8a9d2f1cb2910823@mail.gmail.com>
     [not found]     ` <200707061924.57099.duncan.sands@math.u-psud.fr>
2007-07-06 19:30       ` mikie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ca35ce500707091000h780c98bdleb3872849f451c2a@mail.gmail.com \
    --to=mikie.pl@gmail.com \
    --cc=duncan.sands@math.u-psud.fr \
    --cc=indan@nul.nu \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®