iface-modem: don't flash port during disable
At least just for now. Flashing should be done as part of the disconnection.
This commit is contained in:
@@ -897,7 +897,7 @@ mm_iface_modem_signal_quality_check (MMIfaceModem *self,
|
|||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
DISABLING_STEP_FIRST,
|
DISABLING_STEP_FIRST,
|
||||||
DISABLING_STEP_FLASH_PORT,
|
/* DISABLING_STEP_FLASH_PORT, */
|
||||||
DISABLING_STEP_MODEM_POWER_DOWN,
|
DISABLING_STEP_MODEM_POWER_DOWN,
|
||||||
DISABLING_STEP_CLOSE_PORT,
|
DISABLING_STEP_CLOSE_PORT,
|
||||||
DISABLING_STEP_LAST
|
DISABLING_STEP_LAST
|
||||||
@@ -994,23 +994,23 @@ mm_iface_modem_disable_finish (MMIfaceModem *self,
|
|||||||
|
|
||||||
VOID_REPLY_READY_FN (modem_power_down)
|
VOID_REPLY_READY_FN (modem_power_down)
|
||||||
|
|
||||||
static void
|
/* static void */
|
||||||
interface_disabling_flash_done (MMSerialPort *port,
|
/* interface_disabling_flash_done (MMSerialPort *port, */
|
||||||
GError *error,
|
/* GError *error, */
|
||||||
gpointer user_data)
|
/* gpointer user_data) */
|
||||||
{
|
/* { */
|
||||||
DisablingContext *ctx = user_data;
|
/* DisablingContext *ctx = user_data; */
|
||||||
|
|
||||||
if (error) {
|
/* if (error) { */
|
||||||
g_simple_async_result_set_from_error (ctx->result, error);
|
/* g_simple_async_result_set_from_error (ctx->result, error); */
|
||||||
disabling_context_complete_and_free (ctx);
|
/* disabling_context_complete_and_free (ctx); */
|
||||||
return;
|
/* return; */
|
||||||
}
|
/* } */
|
||||||
|
|
||||||
/* Go on to next step */
|
/* /\* Go on to next step *\/ */
|
||||||
ctx->step++;
|
/* ctx->step++; */
|
||||||
interface_disabling_step (ctx);
|
/* interface_disabling_step (ctx); */
|
||||||
}
|
/* } */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
interface_disabling_step (DisablingContext *ctx)
|
interface_disabling_step (DisablingContext *ctx)
|
||||||
@@ -1020,18 +1020,18 @@ interface_disabling_step (DisablingContext *ctx)
|
|||||||
/* Fall down to next step */
|
/* Fall down to next step */
|
||||||
ctx->step++;
|
ctx->step++;
|
||||||
|
|
||||||
case DISABLING_STEP_FLASH_PORT:
|
/* case DISABLING_STEP_FLASH_PORT: */
|
||||||
/* If primary port connected, flash port */
|
/* /\* If primary port connected, flash port *\/ */
|
||||||
if (mm_port_get_connected (MM_PORT (ctx->primary))) {
|
/* if (mm_port_get_connected (MM_PORT (ctx->primary))) { */
|
||||||
mm_serial_port_flash (MM_SERIAL_PORT (ctx->primary),
|
/* mm_serial_port_flash (MM_SERIAL_PORT (ctx->primary), */
|
||||||
100,
|
/* 100, */
|
||||||
TRUE,
|
/* TRUE, */
|
||||||
interface_disabling_flash_done,
|
/* interface_disabling_flash_done, */
|
||||||
ctx);
|
/* ctx); */
|
||||||
return;
|
/* return; */
|
||||||
}
|
/* } */
|
||||||
/* Fall down to next step */
|
/* /\* Fall down to next step *\/ */
|
||||||
ctx->step++;
|
/* ctx->step++; */
|
||||||
|
|
||||||
case DISABLING_STEP_MODEM_POWER_DOWN:
|
case DISABLING_STEP_MODEM_POWER_DOWN:
|
||||||
/* CFUN=0 is dangerous and often will shoot devices in the head (that's
|
/* CFUN=0 is dangerous and often will shoot devices in the head (that's
|
||||||
|
Reference in New Issue
Block a user