* [PATCH] extras/modem-modeswitch: fix eject of fake CD-ROMs
@ 2009-10-20 22:00 Herton Ronaldo Krzesinski
2009-10-20 22:14 ` Martin Pitt
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Herton Ronaldo Krzesinski @ 2009-10-20 22:00 UTC (permalink / raw)
To: linux-hotplug
Fix the udev rule so we make sure it is called when the block device is
really added, so eject is called with proper block device for ZTE
modems.
---
extras/modem-modeswitch/61-mobile-action.rules | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
please CC me if replying, I'm not subscribed to linux-hotplug
diff --git a/extras/modem-modeswitch/61-mobile-action.rules b/extras/modem-modeswitch/61-mobile-action.rules
index 9116b25..9d5ca02 100644
--- a/extras/modem-modeswitch/61-mobile-action.rules
+++ b/extras/modem-modeswitch/61-mobile-action.rules
@@ -1,4 +1,4 @@
-ACTION!="add", GOTO="mobile_action_end"
+ACTION!="add", GOTO="zerocd_eject_end"
SUBSYSTEM="usb", ATTR{bDeviceClass}="00|ff", ATTR{bDeviceSubClass}="00|ff", ENV{DEVTYPE}="usb_device", GOTO="mobile_action_switch"
GOTO="mobile_action_end"
@@ -6,9 +6,14 @@ GOTO="mobile_action_end"
LABEL="mobile_action_switch"
ATTRS{idVendor}="0df7", ATTRS{idProduct}="0800", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t mobile-action-8280p"
+LABEL="mobile_action_end"
+
# modem-modeswitch does not work with these devices, the fake CD-ROM needs to be ejected
-# ZTE MF6xx
+SUBSYSTEM="block", ENV{ID_BUS}="usb", ENV{ID_USB_DRIVER}="usb-storage", ENV{ID_CDROM}="1", GOTO="zerocd_eject"
+GOTO="zerocd_eject_end"
+
+LABEL="zerocd_eject"
ATTRS{idVendor}="19d2", ATTRS{idProduct}="2000", RUN+="/usr/bin/eject %k"
-LABEL="mobile_action_end"
+LABEL="zerocd_eject_end"
--
1.6.4.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] extras/modem-modeswitch: fix eject of fake CD-ROMs
2009-10-20 22:00 [PATCH] extras/modem-modeswitch: fix eject of fake CD-ROMs Herton Ronaldo Krzesinski
@ 2009-10-20 22:14 ` Martin Pitt
2009-10-20 22:30 ` Herton Ronaldo Krzesinski
2009-10-21 2:53 ` Andrey Borzenkov
2 siblings, 0 replies; 4+ messages in thread
From: Martin Pitt @ 2009-10-20 22:14 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 642 bytes --]
Hello Herton,
Herton Ronaldo Krzesinski [2009-10-20 20:00 -0200]:
> Fix the udev rule so we make sure it is called when the block device is
> really added, so eject is called with proper block device for ZTE
> modems.
Heh, nice timing. As it happened, I just proposed fix for this an hour
ago in https://launchpad.net/bugs/281335 .
Same idea, but a bit simpler structure:
http://launchpadlibrarian.net/34075603/61-mobile-action.rules
Does this work for you as well?
Thanks,
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] extras/modem-modeswitch: fix eject of fake CD-ROMs
2009-10-20 22:00 [PATCH] extras/modem-modeswitch: fix eject of fake CD-ROMs Herton Ronaldo Krzesinski
2009-10-20 22:14 ` Martin Pitt
@ 2009-10-20 22:30 ` Herton Ronaldo Krzesinski
2009-10-21 2:53 ` Andrey Borzenkov
2 siblings, 0 replies; 4+ messages in thread
From: Herton Ronaldo Krzesinski @ 2009-10-20 22:30 UTC (permalink / raw)
To: linux-hotplug
Em Ter 20 Out 2009, Ã s 20:14:03, Martin Pitt escreveu:
> Hello Herton,
>
> Herton Ronaldo Krzesinski [2009-10-20 20:00 -0200]:
> > Fix the udev rule so we make sure it is called when the block device is
> > really added, so eject is called with proper block device for ZTE
> > modems.
>
> Heh, nice timing. As it happened, I just proposed fix for this an hour
> ago in https://launchpad.net/bugs/281335 .
>
> Same idea, but a bit simpler structure:
> http://launchpadlibrarian.net/34075603/61-mobile-action.rules
>
> Does this work for you as well?
Yes should work too, thanks. Unfortunately I'm not with the zte modem here
anymore, had to give back it to the owner, so can't test it again.
>
> Thanks,
>
> Martin
>
--
[]'s
Herton
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] extras/modem-modeswitch: fix eject of fake CD-ROMs
2009-10-20 22:00 [PATCH] extras/modem-modeswitch: fix eject of fake CD-ROMs Herton Ronaldo Krzesinski
2009-10-20 22:14 ` Martin Pitt
2009-10-20 22:30 ` Herton Ronaldo Krzesinski
@ 2009-10-21 2:53 ` Andrey Borzenkov
2 siblings, 0 replies; 4+ messages in thread
From: Andrey Borzenkov @ 2009-10-21 2:53 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: Text/Plain, Size: 288 bytes --]
On Wednesday 21 of October 2009 02:14:03 Martin Pitt wrote:
> hour ago in https://launchpad.net/bugs/281335 .
>
> Same idea, but a bit simpler structure:
> http://launchpadlibrarian.net/34075603/61-mobile-action.rules
>
Just curious - is eject really needed on ACTION != add?
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-10-21 2:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-20 22:00 [PATCH] extras/modem-modeswitch: fix eject of fake CD-ROMs Herton Ronaldo Krzesinski
2009-10-20 22:14 ` Martin Pitt
2009-10-20 22:30 ` Herton Ronaldo Krzesinski
2009-10-21 2:53 ` Andrey Borzenkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).