[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
3110 robustness fixes (patch)
From: |
Osma Suominen |
Subject: |
3110 robustness fixes (patch) |
Date: |
Thu, 6 Mar 2003 23:16:34 +0200 (EET) |
Hi,
I did some more testing with the 3110 driver and found some glitches in
the driver/phone interaction. Below is a patch that fixes those (the
fbus-3110.c part) and adds error handling for a few cases where it was
missing.
I had trouble connecting to subversions.gnu.org, only one of ten
connections or so got through...
Nice if this makes it to pre10 but no worries if it won't.
-Osma
Index: common/phones/nk3110.c
===================================================================
RCS file: /cvsroot/gnokii/gnokii/common/phones/nk3110.c,v
retrieving revision 1.34
diff -u -r1.34 nk3110.c
--- common/phones/nk3110.c 3 Mar 2003 22:26:11 -0000 1.34
+++ common/phones/nk3110.c 6 Mar 2003 21:10:36 -0000
@@ -305,7 +305,7 @@
dprintf("Identifying...\n");
pnok_manufacturer_get(data->manufacturer);
if (sm_message_send(0, 0x4c, NULL, state) != GN_ERR_NONE) return
GN_ERR_NOTREADY;
- sm_block(0x4d, data, state);
+ if(sm_block(0x4d, data, state) != GN_ERR_NONE) return
GN_ERR_NOTREADY;
/* Check that we are back at state Initialised */
if (gn_sm_loop(0, state) != GN_SM_Initialised) return
GN_ERR_UNKNOWN;
@@ -344,7 +344,8 @@
/* Block for subsequent content frames... */
do {
dprintf("Waiting for content frames...\n");
- sm_block_no_retry(0x27, data, state);
+ error = sm_block_no_retry(0x27, data, state);
+ if (error != GN_ERR_NONE) return error;
} while (DRVINSTANCE(state)->user_data_count <
data->raw_sms->length);
return GN_ERR_NONE;
Index: common/links/fbus-3110.c
===================================================================
RCS file: /cvsroot/gnokii/gnokii/common/links/fbus-3110.c,v
retrieving revision 1.21
diff -u -r1.21 fbus-3110.c
--- common/links/fbus-3110.c 3 Mar 2003 21:50:27 -0000 1.21
+++ common/links/fbus-3110.c 6 Mar 2003 21:10:36 -0000
@@ -393,7 +393,6 @@
static int fb3110_message_type_fold(int type)
{
switch (type) {
- case 0x15:
case 0x16:
case 0x17:
return 0x16; /* initialization */
--
*** Osma Suominen *** address@hidden *** http://www.iki.fi/ozone/ ***
- 3110 robustness fixes (patch),
Osma Suominen <=