From: Grzegorz Piotr Jaskiewicz <gj@pointblue.com.pl>
To: JustMan <justman@e1.bmstu.ru>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [OOPS] on usb removal, and minicom closing 2.6.11.7
Date: Thu, 14 Apr 2005 14:40:36 +0200 [thread overview]
Message-ID: <425E64C4.5020704@pointblue.com.pl> (raw)
In-Reply-To: <200504141614.03459.justman@e1.bmstu.ru>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Works great, I would like to ask everyone here on lkml to consider
adding this patch to mainline.
This ain't naughty solution, checking for object/pointer/whatever if
exists before doing anything with it, is good.
Anyone?
Buy the way, I am also looking for usblan for 2.6, can I use usbnet
instead ? Anyone ported usblan to 2.6 (it's on GPL).
JustMan wrote:
>>So,
>>
>>I plugged in e680 motorola phone, played a bit with minicom on
>>/dev/ttyACM0, and when I closed minicom, got this oops. USB is useless,
>>got to reboot computer to use it again!
>>it's vanilla 2.6.11.7
>>
>>oops attached.
>>
>
>
> Try attached patch... (nasty solution, but it work for my C350 motorola phone)
>
>
>>
>
>
> ------------------------------------------------------------------------
>
> diff -uNrp linux/drivers/base/class.orig.c linux/drivers/base/class.c
> --- linux/drivers/base/class.orig.c 2005-03-10 12:19:00.000000000 +0300
> +++ linux/drivers/base/class.c 2005-03-10 13:59:27.000000000 +0300
> @@ -307,12 +307,14 @@ static int class_hotplug(struct kset *ks
> if (class_dev->dev) {
> /* add physical device, backing this device */
> struct device *dev = class_dev->dev;
> - char *path = kobject_get_path(&dev->kobj, GFP_KERNEL);
>
> - add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size,
> - &length, "PHYSDEVPATH=%s", path);
> - kfree(path);
> + if(kobject_name(&dev->kobj)) {
> + char *path = kobject_get_path(&dev->kobj, GFP_KERNEL);
>
> + add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size,
> + &length, "PHYSDEVPATH=%s", path);
> + kfree(path);
> + }
> /* add bus name of physical device */
> if (dev->bus)
> add_hotplug_env_var(envp, num_envp, &i,
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCXmTEi0HtPCVkDAURAvIMAJ4+8tKj6jt/ErTtCrsmNYtM2aDfNACgigLA
4GbLbHStQJBq+Ez1lFe+lPo=
=UWvD
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2005-04-14 12:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-14 11:39 [OOPS] on usb removal, and minicom closing 2.6.11.7 Grzegorz Piotr Jaskiewicz
2005-04-14 12:14 ` JustMan
2005-04-14 12:40 ` Grzegorz Piotr Jaskiewicz [this message]
2005-04-14 19:06 ` Sergey Vlasov
2005-04-15 6:51 ` Oliver Neukum
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=425E64C4.5020704@pointblue.com.pl \
--to=gj@pointblue.com.pl \
--cc=justman@e1.bmstu.ru \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.