Skip to contentSkip to conversation

ISI modem version detection with plugin

PATCH In review Jessica Nilsson 5 participants 17 messages Feb 1, 2011 – Feb 8, 2011 Kbuild

lore
Share & tools
lore
#0 lore raw

v2 cover ISI modem version detection with plugin

The same patch as before, but split up in three parts as per your suggestion.

As before, please note that this does not build unless the gisi patch "gisi: Updated subscriptions and pipe handling to accomodate additional isimodem versions" is added first. We are currently looking at your comments on that one and will send in an update as soon as we can.

Best Regards,
Jessica Nilsson

u8500: add plugin for u8500
udev: u8500 support and style fix
isimodem: header updates for ISI2.5

 Makefile.am                |    4 +
 drivers/isimodem/debug.c   |  132 ++++++++++++
 drivers/isimodem/debug.h   |    9 +
 drivers/isimodem/mtc.h     |   38 ++++
 drivers/isimodem/version.h |   26 +++
 plugins/ofono.rules        |    3 +
 plugins/u8500.c            |  507 ++++++++++++++++++++++++++++++++++++++++++++
 plugins/udev.c             |    5 +-
 8 files changed, 723 insertions(+), 1 deletions(-)
 create mode 100644 drivers/isimodem/version.h
 create mode 100644 plugins/u8500.c

--
1.7.3.5

#1 lore raw

PATCH v2 1/3 u8500: add plugin for u8500

---
 Makefile.am         |    4 +
 plugins/ofono.rules |    3 +
 plugins/u8500.c     |  507 +++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 514 insertions(+), 0 deletions(-)
 create mode 100644 plugins/u8500.c
Makefile.am +4 -0
index a38fcb9..4762cc8 100644
@@ -110,6 +110,7 @@ builtin_sources += $(gisi_sources) \
 				drivers/isimodem/mtc.h \
 				drivers/isimodem/debug.h \
 				drivers/isimodem/isiutil.h \
+				drivers/isimodem/version.h \
 				drivers/isimodem/debug.c \
 				drivers/isimodem/phonebook.c \
 				drivers/isimodem/devinfo.c \
@@ -144,6 +145,9 @@ builtin_sources += plugins/isiusb.c
 
 builtin_modules += n900
 builtin_sources += plugins/n900.c plugins/nokia-gpio.h plugins/nokia-gpio.c
+
+builtin_modules += u8500
+builtin_sources += plugins/u8500.c
 endif
 
 if ATMODEM
plugins/ofono.rules +3 -0
index 111f071..333bff0 100644
@@ -356,6 +356,9 @@ SUBSYSTEMS=="usb", ENV{OFONO_DRIVER}="isiusb", ENV{OFONO_ISI_ADDRESS}="16"
 # Nokia N900 modem
 SUBSYSTEMS=="hsi", ENV{OFONO_DRIVER}="n900", ENV{OFONO_ISI_ADDRESS}="108"
 
+# STE u8500
+KERNEL=="shrm0", ENV{OFONO_DRIVER}="u8500"
+
 LABEL="ofono_isi_end"
 
 SUBSYSTEM!="usb", GOTO="ofono_end"
plugins/u8500.c new file +507 -0

507 lines not on this page · raw message

Signature · 1 line
1.7.3.5
#3 lore raw

PATCH v2 2/3 udev: u8500 support and style fix

In reply to Jessica Nilsson
---
 plugins/udev.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
plugins/udev.c +4 -1
index ce1efe6..49b5eb8 100644
@@ -185,7 +185,8 @@ static void add_hso(struct ofono_modem *modem,
 		devnode = udev_device_get_devnode(udev_device);
 
 		if (g_str_has_suffix(type, "Application") == TRUE)
-			ofono_modem_set_string(modem, APPLICATION_PORT, devnode);
+			ofono_modem_set_string(modem, APPLICATION_PORT,
+						devnode);
 		else if (g_str_has_suffix(type, "Control") == TRUE)
 			ofono_modem_set_string(modem, CONTROL_PORT, devnode);
 	} else if (g_str_equal(subsystem, "net") == TRUE) {
@@ -636,6 +637,8 @@ done:
 		add_nokia(modem, udev_device);
 	else if (g_strcmp0(driver, "isiusb") == 0)
 		add_isi(modem, udev_device);
+	else if (g_strcmp0(driver, "u8500") == 0)
+		add_isi(modem, udev_device);
 	else if (g_strcmp0(driver, "n900") == 0)
 		add_isi(modem, udev_device);
 	else if (g_strcmp0(driver, "gobi") == 0)
Signature · 1 line
1.7.3.5
#7 lore raw

PATCH v2 3/3 isimodem: header updates for ISI2.5

In reply to Jessica Nilsson
---
 drivers/isimodem/debug.c   |  132 ++++++++++++++++++++++++++++++++++++++++++++
 drivers/isimodem/debug.h   |    9 +++
 drivers/isimodem/mtc.h     |   38 +++++++++++++
 drivers/isimodem/version.h |   26 +++++++++
 4 files changed, 205 insertions(+), 0 deletions(-)
 create mode 100644 drivers/isimodem/version.h
drivers/isimodem/debug.c +132 -0
index 3d667b4..8b5fa16 100644
@@ -165,6 +165,138 @@ const char *mtc_modem_state_name(enum mtc_modem_state value)
 	return "MTC_<UNKNOWN>";
 }
 
+const char *mce_message_id_name(enum mce_message_id value)
+{
+	switch (value) {
+		_(MCE_MODEM_STATE_IND);
+		_(MCE_MODEM_STATE_QUERY_REQ);
+		_(MCE_MODEM_STATE_QUERY_RESP);
+		_(MCE_RF_STATE_REQ);
+		_(MCE_RF_STATE_RESP);
+		_(MCE_RF_STATE_IND);
+		_(MCE_RF_STATE_QUERY_REQ);
+		_(MCE_RF_STATE_QUERY_RESP);
+		_(MCE_POWER_OFF_REQ);
+		_(MCE_POWER_OFF_RESP);
+	}
+	return "MCE_<UNKNOWN>";
+}
+
+const char *mce_modem_state_name(enum mce_modem_state value)
+{
+	switch (value) {
+		_(MCE_NORMAL);
+		_(MCE_LOCAL);
+		_(MCE_SW_RESET);
+		_(MCE_POWER_OFF);
+	}
+	return "MCE_<UNKNOWN>";
+}
+
+const char *mce_status_info(enum mce_status_info value)
+{
+	switch (value) {
+		_(MCE_OK);
+		_(MCE_FAIL);
+		_(MCE_ALREADY_ACTIVE);
+		_(MCE_TRANSITION_ONGOING);
+	}
+	return "MCE_<UNKNOWN>";
+}
+
+const char *mce_rf_state_name(enum mce_rf_state value)
+{
+	switch (value) {
+		_(MCE_RF_OFF);
+		_(MCE_RF_ON);
+	}
+	return "MCE_RF<UNKNOWN>";
+}
+
+const char *uicc_status_name(uint8_t value)
+{
+	switch (value) {
+		/* Request performed successfully */
+		_(UICC_STATUS_OK);
+		/* Error in performing the command */
+		_(UICC_STATUS_FAIL);
+		/* Status is Unknown */
+		_(UICC_STATUS_UNKNOWN);
+		/* Server is not ready */
+		_(UICC_STATUS_NOT_READY);
+		/* Server start up is completed */
+		_(UICC_STATUS_START_UP_COMPLETED);
+		/* Server is shutting down */
+		_(UICC_STATUS_SHUTTING_DOWN);
+		/* Smart card is not ready */
+		_(UICC_STATUS_CARD_NOT_READY);
+		/* Smart card is ready */
+		_(UICC_STATUS_CARD_READY);
+		/* Smart card is disconnected */
+		_(UICC_STATUS_CARD_DISCONNECTED);
+		/* Smart card is not present */
+		_(UICC_STATUS_CARD_NOT_PRESENT);
+		/* Smart card has been rejected */
+		_(UICC_STATUS_CARD_REJECTED);
+		/* Application is active */
+		_(UICC_STATUS_APPL_ACTIVE);
+		/* Application is not active */
+		_(UICC_STATUS_APPL_NOT_ACTIVE);
+		/* PIN verification used */
+		_(UICC_STATUS_PIN_ENABLED);
+		/* PIN verification not used */
+		_(UICC_STATUS_PIN_DISABLED);
+	}
+	return "UICC_STATUS<UNKNOWN>";
+}
+
+const char *uicc_subblock_name(uint8_t value)
+{
+	switch (value) {
+		_(UICC_SB_SHUT_DOWN_CONFIG);
+		_(UICC_SB_CARD_STATUS);
+		_(UICC_SB_CARD_INFO);
+		_(UICC_SB_CARD_REJECT_CAUSE);
+		_(UICC_SB_CLIENT);
+		_(UICC_SB_APPL_DATA_OBJECT);
+		_(UICC_SB_APPLICATION);
+		_(UICC_SB_APPL_INFO);
+		_(UICC_SB_APPL_STATUS);
+		_(UICC_SB_FCP);
+		_(UICC_SB_FCI);
+		_(UICC_SB_CHV);
+		_(UICC_SB_PIN);
+		_(UICC_SB_PIN_REF);
+		_(UICC_SB_PUK);
+		_(UICC_SB_PIN_SUBST);
+		_(UICC_SB_PIN_INFO);
+		_(UICC_SB_APPL_PATH);
+		_(UICC_SB_SESSION);
+		_(UICC_SB_FILE_DATA);
+		_(UICC_SB_APDU);
+		_(UICC_SB_TRANSPARENT_READ);
+		_(UICC_SB_TRANSPARENT_UPDATE);
+		_(UICC_SB_TRANSPARENT);
+		_(UICC_SB_LINEAR_FIXED);
+		_(UICC_SB_CYCLIC);
+		_(UICC_SB_TERMINAL_PROFILE);
+		_(UICC_SB_TERMINAL_RESPONSE);
+		_(UICC_SB_ENVELOPE);
+		_(UICC_SB_POLLING_SET);
+		_(UICC_SB_REFRESH);
+		_(UICC_SB_AID);
+		_(UICC_SB_REFRESH_RESULT);
+		_(UICC_SB_APDU_ACTIONS);
+		_(UICC_SB_OBJECT_ID);
+		_(UICC_SB_STATUS_WORD);
+		_(UICC_SB_APDU_SAP_INFO);
+		_(UICC_SB_ACCESS_MODE);
+		_(UICC_SB_RESP_INFO);
+		_(UICC_SB_APDU_SAP_CONFIG);
+	}
+	return "UICC_<UNKNOWN>";
+}
+
 const char *sms_isi_cause_name(enum sms_isi_cause value)
 {
 	switch (value) {
drivers/isimodem/debug.h +9 -0
index e149c2c..db01f04 100644
@@ -27,6 +27,7 @@
 #include "ss.h"
 #include "mtc.h"
 #include "sms.h"
+#include "uicc.h"
 #include "sim.h"
 #include "info.h"
 #include "call.h"
@@ -41,6 +42,14 @@ const char *ss_ussd_type_name(enum ss_ussd_type value);
 const char *mtc_isi_cause_name(enum mtc_isi_cause value);
 const char *mtc_message_id_name(enum mtc_message_id value);
 const char *mtc_modem_state_name(enum mtc_modem_state value);
+const char *mce_rf_state_name(enum mce_rf_state value);
+
+const char *mce_message_id_name(enum mce_message_id value);
+const char *mce_modem_state_name(enum mce_modem_state value);
+const char *mce_status_info(enum mce_status_info value);
+
+const char *uicc_subblock_name(uint8_t value);
+const char *uicc_status_name(uint8_t value);
 
 const char *sms_gsm_cause_name(enum sms_gsm_cause value);
 const char *sms_isi_cause_name(enum sms_isi_cause value);
drivers/isimodem/mtc.h +38 -0
index 2db3e94..57e5040 100644
@@ -27,9 +27,47 @@ extern "C" {
 #endif
 
 #define PN_MTC				0x15
+#define PN_MODEM_MCE			0xC2
 #define MTC_TIMEOUT			5
 #define MTC_STATE_REQ_TIMEOUT		(6 + 5)
 
+enum mce_message_id {
+	MCE_MODEM_STATE_IND =		0x00,
+	MCE_MODEM_STATE_QUERY_REQ =     0x01,
+	MCE_MODEM_STATE_QUERY_RESP =    0x02,
+	MCE_RF_STATE_REQ =		0x03,
+	MCE_RF_STATE_RESP =		0x04,
+	MCE_RF_STATE_IND =		0x05,
+	MCE_RF_STATE_QUERY_REQ =	0x06,
+	MCE_RF_STATE_QUERY_RESP =       0x07,
+	MCE_POWER_OFF_REQ =		0x08,
+	MCE_POWER_OFF_RESP =		0x09
+};
+
+enum mce_rf_state {
+	MCE_RF_OFF =			0x00,
+	MCE_RF_ON =			0x01
+};
+
+enum mce_status_info {
+	MCE_OK =			0x00,
+	MCE_FAIL =			0x01,
+	MCE_ALREADY_ACTIVE =		0x06,
+	MCE_TRANSITION_ONGOING =	0x16
+};
+
+enum mce_modem_state {
+	MCE_NORMAL =			0x00,
+	MCE_LOCAL =			0x01,
+	MCE_SW_RESET =			0x80,
+	MCE_POWER_OFF =			0x81
+};
+
+enum mce_isi_action {
+	MCE_START =			0x03,
+	MCE_READY =			0x04
+};
+
 enum mtc_isi_cause {
 	MTC_OK =			0x00,
 	MTC_FAIL =			0x01,
drivers/isimodem/version.h new file +26 -0
new file mode 100644
index 0000000..9b0a993
@@ -0,0 +1,26 @@
+
+/*
+ *
+ *  oFono - Open Source Telephony
+ *
+ *  Copyright (C) ST-Ericsson SA 2011.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+enum isi_version {
+	ISI_20 = 0,
+	ISI_25 = 1
+};
Signature · 1 line
1.7.3.5
#4 lore raw

Re: [PATCH v2 2/3] udev: u8500 support and style fix

In reply to Jessica Nilsson

Hi Jessica,

Quoted 2 lines
 plugins/udev.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

so you wanna combine the udev rule change and the udev change together actually. They both belong together. The actual modem plugin driver is not related.

plugins/udev.c static void add_hso(struct ofono_modem *modem, · line 189

Quoted 11 lines
plugins/udev.c +2 -1
index ce1efe6..49b5eb8 100644
@@ -185,7 +185,8 @@ static void add_hso(struct ofono_modem *modem,
 		devnode = udev_device_get_devnode(udev_device);
 
 		if (g_str_has_suffix(type, "Application") == TRUE)
-			ofono_modem_set_string(modem, APPLICATION_PORT, devnode);
+			ofono_modem_set_string(modem, APPLICATION_PORT,
+						devnode);

What is this part doing here?

plugins/udev.c done: · line 644

Quoted 12 lines
plugins/udev.c +2 -0
 		else if (g_str_has_suffix(type, "Control") == TRUE)
 			ofono_modem_set_string(modem, CONTROL_PORT, devnode);
 	} else if (g_str_equal(subsystem, "net") == TRUE) {
@@ -636,6 +637,8 @@ done:
 		add_nokia(modem, udev_device);
 	else if (g_strcmp0(driver, "isiusb") == 0)
 		add_isi(modem, udev_device);
+	else if (g_strcmp0(driver, "u8500") == 0)
+		add_isi(modem, udev_device);
 	else if (g_strcmp0(driver, "n900") == 0)
 		add_isi(modem, udev_device);
 	else if (g_strcmp0(driver, "gobi") == 0)

Regards

Marcel

#2 lore raw

Re: [PATCH v2 1/3] u8500: add plugin for u8500

In reply to Jessica Nilsson

Hi Jessica,

Quoted 5 lines
 Makefile.am         |    4 +
 plugins/ofono.rules |    3 +
 plugins/u8500.c     |  507 +++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 514 insertions(+), 0 deletions(-)
 create mode 100644 plugins/u8500.c

as mentioned in the other email. Put ofono.rules and udev.c changes into one patch.

Makefile.am builtin_sources += $(gisi_sources) \ · line 116

Quoted 12 lines
Makefile.am +1 -0
index a38fcb9..4762cc8 100644
@@ -110,6 +110,7 @@ builtin_sources += $(gisi_sources) \
 				drivers/isimodem/mtc.h \
 				drivers/isimodem/debug.h \
 				drivers/isimodem/isiutil.h \
+				drivers/isimodem/version.h \
 				drivers/isimodem/debug.c \
 				drivers/isimodem/phonebook.c \
 				drivers/isimodem/devinfo.c \

This does not belong here. Please be careful what is in your patches.

Quoted 15 lines
Makefile.am +3 -0
@@ -144,6 +145,9 @@ builtin_sources += plugins/isiusb.c
 
 builtin_modules += n900
 builtin_sources += plugins/n900.c plugins/nokia-gpio.h plugins/nokia-gpio.c
+
+builtin_modules += u8500
+builtin_sources += plugins/u8500.c
 endif
 
 if ATMODEM
plugins/ofono.rules +0 -0
index 111f071..333bff0 100644

plugins/ofono.rules SUBSYSTEMS=="usb", ENV{OFONO_DRIVER}="isiusb", ENV{OFONO_ISI_ADDRESS}="16" · line 364

Quoted 9 lines
plugins/ofono.rules +3 -0
@@ -356,6 +356,9 @@ SUBSYSTEMS=="usb", ENV{OFONO_DRIVER}="isiusb", ENV{OFONO_ISI_ADDRESS}="16"
 # Nokia N900 modem
 SUBSYSTEMS=="hsi", ENV{OFONO_DRIVER}="n900", ENV{OFONO_ISI_ADDRESS}="108"
 
+# STE u8500
+KERNEL=="shrm0", ENV{OFONO_DRIVER}="u8500"
+
 LABEL="ofono_isi_end"
 
 SUBSYSTEM!="usb", GOTO="ofono_end"

Regards

Marcel

#8 lore raw

Re: [PATCH v2 3/3] isimodem: header updates for ISI2.5

In reply to Jessica Nilsson

Hi Jessica,

Quoted 6 lines
 drivers/isimodem/debug.c   |  132 ++++++++++++++++++++++++++++++++++++++++++++
 drivers/isimodem/debug.h   |    9 +++
 drivers/isimodem/mtc.h     |   38 +++++++++++++
 drivers/isimodem/version.h |   26 +++++++++
 4 files changed, 205 insertions(+), 0 deletions(-)
 create mode 100644 drivers/isimodem/version.h

<snip>

drivers/isimodem/version.h line 26

Quoted 4 lines
drivers/isimodem/version.h new file +4 -0
+enum isi_version {
+	ISI_20 = 0,
+	ISI_25 = 1
+};

so what is the final decision here now. ISI doing auto-detection and this gets not exposed to the modem drivers or we do.

Aki, I remember you saying that this is not needed at all.

Regards

Marcel

#5 lore raw

Re: [PATCH v2 2/3] udev: u8500 support and style fix

In reply to Marcel Holtmann

Hi Marcel,

Jessica is out of office.

Quoted 8 lines · Marcel Holtmann

Hi Jessica,

Quoted 2 lines
  plugins/udev.c |    5 ++++-
  1 files changed, 4 insertions(+), 1 deletions(-)

so you wanna combine the udev rule change and the udev change together actually. They both belong together. The actual modem plugin driver is not related.

Ok, will correct.

Quoted 7 lines
Quoted 7 lines
plugins/udev.c +0 -0
index ce1efe6..49b5eb8 100644
@@ -185,7 +185,8 @@ static void add_hso(struct ofono_modem *modem,
  		devnode = udev_device_get_devnode(udev_device);
 
Quoted 6 lines

plugins/udev.c static void add_hso(struct ofono_modem *modem, · line 189

Quoted 4 lines
plugins/udev.c +2 -1
  		if (g_str_has_suffix(type, "Application") == TRUE)
-			ofono_modem_set_string(modem, APPLICATION_PORT, devnode);
+			ofono_modem_set_string(modem, APPLICATION_PORT,
+						devnode);

What is this part doing here?

Style fix, should it be removed ?

Quoted 4 lines
Quoted 4 lines
plugins/udev.c +0 -0
  		else if (g_str_has_suffix(type, "Control") == TRUE)
  			ofono_modem_set_string(modem, CONTROL_PORT, devnode);
  	} else if (g_str_equal(subsystem, "net") == TRUE) {
@@ -636,6 +637,8 @@ done:
Quoted 9 lines

plugins/udev.c done: · line 644

Quoted 8 lines
plugins/udev.c +2 -0
  		add_nokia(modem, udev_device);
  	else if (g_strcmp0(driver, "isiusb") == 0)
  		add_isi(modem, udev_device);
+	else if (g_strcmp0(driver, "u8500") == 0)
+		add_isi(modem, udev_device);
  	else if (g_strcmp0(driver, "n900") == 0)
  		add_isi(modem, udev_device);
  	else if (g_strcmp0(driver, "gobi") == 0)

Regards
Andreas

#6 lore raw

Re: [PATCH v2 2/3] udev: u8500 support and style fix

Hi Andreas,

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
plugins/udev.c +0 -0
index ce1efe6..49b5eb8 100644
@@ -185,7 +185,8 @@ static void add_hso(struct ofono_modem *modem,
  		devnode = udev_device_get_devnode(udev_device);
 
Quoted 8 lines
Quoted 6 lines

plugins/udev.c static void add_hso(struct ofono_modem *modem, · line 189

Quoted 4 lines
plugins/udev.c +2 -1
  		if (g_str_has_suffix(type, "Application") == TRUE)
-			ofono_modem_set_string(modem, APPLICATION_PORT, devnode);
+			ofono_modem_set_string(modem, APPLICATION_PORT,
+						devnode);

What is this part doing here?

Style fix, should it be removed ?

style fixes should always be a separate patch. Do not intermix totally unrelated style fixes with actual changes.

Regards

Marcel

#9 lore raw

Re: [PATCH v2 3/3] isimodem: header updates for ISI2.5

In reply to Marcel Holtmann

Hi Marcel,

Quoted 19 lines · Marcel Holtmann

Hi Jessica,

Quoted 6 lines
  drivers/isimodem/debug.c   |  132 ++++++++++++++++++++++++++++++++++++++++++++
  drivers/isimodem/debug.h   |    9 +++
  drivers/isimodem/mtc.h     |   38 +++++++++++++
  drivers/isimodem/version.h |   26 +++++++++
  4 files changed, 205 insertions(+), 0 deletions(-)

create mode 100644 drivers/isimodem/version.h

<snip>

drivers/isimodem/version.h line 26

Quoted 4 lines
drivers/isimodem/version.h new file +4 -0
+enum isi_version {
+	ISI_20 = 0,
+	ISI_25 = 1
+};

so what is the final decision here now. ISI doing auto-detection and this gets not exposed to the modem drivers or we do.

Quoted 2 lines

Aki, I remember you saying that this is not needed at all.

We need to know which version of ISI we are using in the driver, messages differ. But we are open to other suggestions.

Marcel, as to your other comments we will correct them and send new patches.

Regards
Andreas

#10 lore raw

Re: [PATCH v2 3/3] isimodem: header updates for ISI2.5

In reply to Marcel Holtmann

Hi Marcel,

Quoted 7 lines · ext Marcel Holtmann

drivers/isimodem/version.h line 26

Quoted 4 lines
drivers/isimodem/version.h new file +4 -0
+enum isi_version {
+	ISI_20 = 0,
+	ISI_25 = 1
+};

so what is the final decision here now. ISI doing auto-detection and this gets not exposed to the modem drivers or we do.

Like I replied earlier, I don't see the need for this. Also, it will not work well with the isiusb plugin, which has the potential to work with any ISI modem. I'm not willing to break that potential until we just absolutely have to.

So, my stance holds: we quirk based on resource ID and based on the server's ISI version.

I'm starting to think me just saying this out loud is not concrete enough, so I guess one way forward here could be for me to go ahead and adapt e.g. the netreg driver to work with N900 and later ISI modems. The netreg driver would make a good example, as it is one of those where the resource ID changes post N900, and the messages do vary based on it.

Cheers,
Aki

#11 lore raw

Re: [PATCH v2 3/3] isimodem: header updates for ISI2.5

Hi Aki,

Quoted 4 lines · Aki Niemi

Like I replied earlier, I don't see the need for this. Also, it will not work well with the isiusb plugin, which has the potential to work with any ISI modem. I'm not willing to break that potential until we just absolutely have to.

U8500 uses shrm driver and will not be recognized via isiusb.

Quoted 2 lines

So, my stance holds: we quirk based on resource ID and based on the server's ISI version.

From the information we have regarding ISI version from each server is
that it is not consistent, meaning the value you get is not really the ISI version but the version of the server.

/Andreas

#15 lore raw

Re: [PATCH v2 3/3] isimodem: header updates for ISI2.5

In reply to Aki Niemi

Hi Aki,

Quoted 8 lines
Quoted 7 lines

drivers/isimodem/version.h line 26

Quoted 4 lines
drivers/isimodem/version.h new file +4 -0
+enum isi_version {
+	ISI_20 = 0,
+	ISI_25 = 1
+};

so what is the final decision here now. ISI doing auto-detection and this gets not exposed to the modem drivers or we do.

Quoted 7 lines

Like I replied earlier, I don't see the need for this. Also, it will not work well with the isiusb plugin, which has the potential to work with any ISI modem. I'm not willing to break that potential until we just absolutely have to.

So, my stance holds: we quirk based on resource ID and based on the server's ISI version.

good to know. I was just double-checking in case you guys agreed on something different on a private channel.

Quoted 5 lines

I'm starting to think me just saying this out loud is not concrete enough, so I guess one way forward here could be for me to go ahead and adapt e.g. the netreg driver to work with N900 and later ISI modems. The netreg driver would make a good example, as it is one of those where the resource ID changes post N900, and the messages do vary based on it.

I think having an example on how you want this handled would be a good idea. I don't have time to get myself familiar enough with ISI that I can do any proper review here. So this is in your hands.

Regards

Marcel

#12 lore raw

Re: [PATCH v2 3/3] isimodem: header updates for ISI2.5

In reply to Andreas WESTIN
Quoted 7 lines · ext Andreas WESTIN
Quoted 4 lines · Aki Niemi

Like I replied earlier, I don't see the need for this. Also, it will not work well with the isiusb plugin, which has the potential to work with any ISI modem. I'm not willing to break that potential until we just absolutely have to.

U8500 uses shrm driver and will not be recognized via isiusb.

I don't see what that has to do with the device supporting the "PC suite" USB profile, which allows modem access using cdc_phonet.

Quoted 6 lines
Quoted 2 lines

So, my stance holds: we quirk based on resource ID and based on the server's ISI version.

From the information we have regarding ISI version from each server is
that it is not consistent, meaning the value you get is not really the ISI version but the version of the server.

That is exactly what I meant. This version allows building quirks inside the drivers. An example in pseudo-code:

if GIsiVersion.major == 15 and GIsiVersion.minor >= 3:
send( { FOO, value, filler, filler}, callback1 )
else:
send( { FOO, value }, callback2 )

Cheers,
Aki

#13 lore raw

Re: [PATCH v2 3/3] isimodem: header updates for ISI2.5

Hi Aki,

Quoted 2 lines · Aki Niemi

I don't see what that has to do with the device supporting the "PC suite" USB profile, which allows modem access using cdc_phonet.

Currently our platform does not support this.

Quoted 8 lines

That is exactly what I meant. This version allows building quirks inside the drivers. An example in pseudo-code:

if GIsiVersion.major == 15 and GIsiVersion.minor>= 3:
send( { FOO, value, filler, filler}, callback1 )
else:
send( { FOO, value }, callback2 )

Yes, we use a similar solution in gisi, but Rémi pointed out that it would be a maintenance problem once there are more versions to support and I tend to agree. A solution could be to use a lookup function, but this function would need to return something to compare with, an enum perhaps.
Also are you certain that e.g major == 15 and minor == 25 is still the same ISI version, if not then the lookup function could become messy.

Regards
Andreas

#14 lore raw

Re: [PATCH v2 3/3] isimodem: header updates for ISI2.5

Hi Andreas,

2011/2/3 Andreas WESTIN <[email protected]>:

Quoted 4 lines
Quoted 2 lines

I don't see what that has to do with the device supporting the "PC suite" USB profile, which allows modem access using cdc_phonet.

Currently our platform does not support this.

Well, I know of platforms that do, and have different versions of ISI modems.

Quoted 9 lines
Quoted 8 lines

That is exactly what I meant. This version allows building quirks inside the drivers. An example in pseudo-code:

if GIsiVersion.major == 15 and GIsiVersion.minor>= 3:
       send( { FOO, value, filler, filler}, callback1 ) else:
       send( { FOO, value }, callback2 )

Quoted 6 lines

Yes, we use a similar solution in gisi, but Rémi pointed out that it would be a maintenance problem once there are more versions to support and I tend to agree. A solution could be to use a lookup function, but this function would need to return something to compare with, an enum perhaps. Also are you certain that e.g major == 15 and minor == 25 is still the same ISI version, if not then the lookup function could become messy.

The PNS_SUBSCRIBED_RESOURCES_EXTEND_IND is a bit of a special case, as it requires quirking inside GIsiModem. But see my other response in that thread.

Cheers,
Aki

#16 lore raw

Re: [PATCH v2 3/3] isimodem: header updates for ISI2.5

In reply to Aki Niemi

Hi,

2011/2/1 Aki Niemi <[email protected]>:

Quoted 5 lines

I'm starting to think me just saying this out loud is not concrete enough, so I guess one way forward here could be for me to go ahead and adapt e.g. the netreg driver to work with N900 and later ISI modems. The netreg driver would make a good example, as it is one of those where the resource ID changes post N900, and the messages do vary based on it.

I went ahead and pushed some patches refactoring the isimodem netreg driver to work with both the old modem API as well as the new wgmodem 2.5 version.

Please take a look if it works for you.

Cheers,
Aki