Re: [PATCH] Fix Let data device be optional for mbm driver

2010-04-21 Thread Denis Kenzior
Hi Zhenhua,

 ttyACM0 is described as 'Dell Wireless 5530 HSPA Mobile Broadband
 Minicard Modem'.
 
 ttyACM1 is described as 'Dell Wireless 5530 HSPA Mobile Broadband
 Minicard Modem 2'.

Patch has been applied.  Thanks.

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: Re: [PATCH] Fix Let data device be optional for mbm driver

2010-04-19 Thread Vdovichev Alexander
Hi Marcel,

On 04/16/2010 10:52 PM, Marcel Holtmann wrote:
 Hi Zhenhua,

 Dell 5530 modem has no data device port. So data device should be
 optional in mbm drvier.

 can you please include the content of /proc/bus/usb/devices for this
 device and the sysfs descriptions for each TTY port.

I realize my previous fix is not proper to 5530. I can see three ports 
(ttyACM0~ttyACM2) for Dell 5530 modem. The sysfs descriptions are posted 
at below URLs:

ttyACM0 http://pastebin.com/aW4PyHBw
ttyACM1 http://pastebin.com/igZxccVe
ttyACM2 http://pastebin.com/T7DFmXTv

ttyACM0 is described as 'Dell Wireless 5530 HSPA Mobile Broadband 
Minicard Modem'.

ttyACM1 is described as 'Dell Wireless 5530 HSPA Mobile Broadband 
Minicard Modem 2'.

I cann't tell which one is modem device or data device. But obviously, 
we should add 'Minicard Modem 2' as suffix candidate. So my updated 
patch is attached. Now we can probe 5530 correctly again. the output is:

ofonod[3737]: src/modem.c:ofono_modem_create() name: 3558620217367190, 
type: mbm
ofonod[3737]: src/modem.c:set_modem_property() modem 0x8a576c0 property Path
ofonod[3737]: src/modem.c:set_modem_property() modem 0x8a576c0 property 
Registered
ofonod[3737]: plugins/udev.c:add_mbm() desc: Dell Wireless 5530 HSPA 
Mobile Broadband Minicard Modem
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property 
Registered
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property 
ModemDevice
ofonod[3737]: src/modem.c:set_modem_property() modem 0x8a576c0 property 
ModemDevice
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property 
ModemDevice
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property 
NetworkInterface
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property Path
ofonod[3737]: plugins/udev.c:add_mbm() desc: Dell Wireless 5530 HSPA 
Mobile Broadband Minicard Modem 2
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property 
Registered
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property 
ModemDevice
ofonod[3737]: src/modem.c:set_modem_property() modem 0x8a576c0 property 
DataDevice
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property 
ModemDevice
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property 
NetworkInterface
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property Path
ofonod[3737]: plugins/udev.c:add_mbm() desc: Dell Wireless 5530 HSPA 
Mobile Broadband Minicard NetworkAdapter
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property 
Registered
ofonod[3737]: src/modem.c:set_modem_property() modem 0x8a576c0 property 
NetworkInterface
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property 
ModemDevice
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property 
NetworkInterface
ofonod[3737]: src/modem.c:set_modem_property() modem 0x8a576c0 property 
Registered
ofonod[3737]: src/modem.c:unregister_property() property 0x8a57ee0

 Regards

 Marcel


 ___
 ofono mailing list
 ofono@ofono.org
 http://lists.ofono.org/listinfo/ofono


attachment: winmail.dat___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH] Fix Let data device be optional for mbm driver

2010-04-18 Thread Zhenhua Zhang

Hi Marcel,

On 04/16/2010 10:52 PM, Marcel Holtmann wrote:

Hi Zhenhua,


Dell 5530 modem has no data device port. So data device should be
optional in mbm drvier.


can you please include the content of /proc/bus/usb/devices for this
device and the sysfs descriptions for each TTY port.


I realize my previous fix is not proper to 5530. I can see three ports 
(ttyACM0~ttyACM2) for Dell 5530 modem. The sysfs descriptions are posted 
at below URLs:


ttyACM0 http://pastebin.com/aW4PyHBw
ttyACM1 http://pastebin.com/igZxccVe
ttyACM2 http://pastebin.com/T7DFmXTv

ttyACM0 is described as 'Dell Wireless 5530 HSPA Mobile Broadband 
Minicard Modem'.


ttyACM1 is described as 'Dell Wireless 5530 HSPA Mobile Broadband 
Minicard Modem 2'.


I cann't tell which one is modem device or data device. But obviously, 
we should add 'Minicard Modem 2' as suffix candidate. So my updated 
patch is attached. Now we can probe 5530 correctly again. the output is:


ofonod[3737]: src/modem.c:ofono_modem_create() name: 3558620217367190, 
type: mbm

ofonod[3737]: src/modem.c:set_modem_property() modem 0x8a576c0 property Path
ofonod[3737]: src/modem.c:set_modem_property() modem 0x8a576c0 property 
Registered
ofonod[3737]: plugins/udev.c:add_mbm() desc: Dell Wireless 5530 HSPA 
Mobile Broadband Minicard Modem
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property 
Registered
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property 
ModemDevice
ofonod[3737]: src/modem.c:set_modem_property() modem 0x8a576c0 property 
ModemDevice
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property 
ModemDevice
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property 
NetworkInterface

ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property Path
ofonod[3737]: plugins/udev.c:add_mbm() desc: Dell Wireless 5530 HSPA 
Mobile Broadband Minicard Modem 2
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property 
Registered
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property 
ModemDevice
ofonod[3737]: src/modem.c:set_modem_property() modem 0x8a576c0 property 
DataDevice
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property 
ModemDevice
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property 
NetworkInterface

ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property Path
ofonod[3737]: plugins/udev.c:add_mbm() desc: Dell Wireless 5530 HSPA 
Mobile Broadband Minicard NetworkAdapter
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property 
Registered
ofonod[3737]: src/modem.c:set_modem_property() modem 0x8a576c0 property 
NetworkInterface
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property 
ModemDevice
ofonod[3737]: src/modem.c:get_modem_property() modem 0x8a576c0 property 
NetworkInterface
ofonod[3737]: src/modem.c:set_modem_property() modem 0x8a576c0 property 
Registered

ofonod[3737]: src/modem.c:unregister_property() property 0x8a57ee0


Regards

Marcel


___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono



From 44c8aba6261c95258c3b8918bbc321b1a3512d5f Mon Sep 17 00:00:00 2001
From: Zhenhua Zhang zhenhua.zh...@intel.com
Date: Mon, 19 Apr 2010 09:39:49 +0800
Subject: [PATCH] Fix Add Dell5530 modem port suffix for data device

---
 plugins/udev.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/plugins/udev.c b/plugins/udev.c
index a89b9d9..964ac65 100644
--- a/plugins/udev.c
+++ b/plugins/udev.c
@@ -112,6 +112,7 @@ static void add_mbm(struct ofono_modem *modem,
 		return;
 
 	if (g_str_has_suffix(desc, Minicard Modem) ||
+			g_str_has_suffix(desc, Minicard Modem 2) ||
 			g_str_has_suffix(desc, Mini-Card Modem) ||
 			g_str_has_suffix(desc, Broadband Modem) ||
 			g_str_has_suffix(desc, Broadband USB Modem)) {
-- 
1.6.6.1

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH] Fix Let data device be optional for mbm driver

2010-04-16 Thread Marcel Holtmann
Hi Zhenhua,

 Dell 5530 modem has no data device port. So data device should be
 optional in mbm drvier.

can you please include the content of /proc/bus/usb/devices for this
device and the sysfs descriptions for each TTY port.

Regards

Marcel


___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


[PATCH] Fix Let data device be optional for mbm driver

2010-04-15 Thread Zhenhua Zhang
Dell 5530 modem has no data device port. So data device should be
optional in mbm drvier.
---
 plugins/mbm.c |   18 +-
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/plugins/mbm.c b/plugins/mbm.c
index 439d3b9..aeea81d 100644
--- a/plugins/mbm.c
+++ b/plugins/mbm.c
@@ -84,7 +84,9 @@ static void mbm_remove(struct ofono_modem *modem)
 
ofono_modem_set_data(modem, NULL);
 
-   g_at_chat_unref(data-data_port);
+   if (data-data_port)
+   g_at_chat_unref(data-data_port);
+
g_at_chat_unref(data-modem_port);
g_free(data);
 }
@@ -212,7 +214,7 @@ static int mbm_enable(struct ofono_modem *modem)
 
DBG(%s, %s, modem_dev, data_dev);
 
-   if (modem_dev == NULL || data_dev == NULL)
+   if (modem_dev == NULL)
return -EINVAL;
 
data-modem_port = create_port(modem_dev);
@@ -223,6 +225,9 @@ static int mbm_enable(struct ofono_modem *modem)
if (getenv(OFONO_AT_DEBUG))
g_at_chat_set_debug(data-modem_port, mbm_debug, Modem:);
 
+   if (!data_dev)
+   goto done;
+
data-data_port = create_port(data_dev);
 
if (data-data_port == NULL) {
@@ -235,6 +240,7 @@ static int mbm_enable(struct ofono_modem *modem)
if (getenv(OFONO_AT_DEBUG))
g_at_chat_set_debug(data-data_port, mbm_debug, Data:);
 
+done:
g_at_chat_register(data-modem_port, *EMRDY:, emrdy_notifier,
FALSE, modem, NULL);
 
@@ -257,9 +263,11 @@ static void cfun_disable(gboolean ok, GAtResult *result, 
gpointer user_data)
g_at_chat_unref(data-modem_port);
data-modem_port = NULL;
 
-   g_at_chat_shutdown(data-data_port);
-   g_at_chat_unref(data-data_port);
-   data-data_port = NULL;
+   if (data-data_port) {
+   g_at_chat_shutdown(data-data_port);
+   g_at_chat_unref(data-data_port);
+   data-data_port = NULL;
+   }
 
if (ok)
ofono_modem_set_powered(modem, FALSE);
-- 
1.6.6.1

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono