Skip to content

Commit

Permalink
HSI: ssi-protocol: Use handshake logic from n950
Browse files Browse the repository at this point in the history
When using the ssi-protocol driver with the Nokia N950, the
following error is thrown during modem powered up sequence.

[13852.274993]  port0: SSI error: 0x01
[13852.279205] ssi-protocol ssi-protocol: RX error detected
[13852.284820] ssi-protocol ssi-protocol: Main state: 1
[13852.290069] ssi-protocol ssi-protocol: Recv state: 0
[13852.295288] ssi-protocol ssi-protocol: Send state: 0
[13852.300537] ssi-protocol ssi-protocol: CMT Offline
[13852.305603] ssi-protocol ssi-protocol: Wake test 1
[13852.310638] ssi-protocol ssi-protocol: Data RX id: 0
[13852.315887] ssi-protocol ssi-protocol: Data TX id: 0
[13856.001464] ssi-protocol ssi-protocol: Watchdog trigerred
[13856.007293] ssi-protocol ssi-protocol: Main state: 1
[13856.012542] ssi-protocol ssi-protocol: Recv state: 0
[13856.017761] ssi-protocol ssi-protocol: Send state: 0
[13856.023010] ssi-protocol ssi-protocol: CMT Offline
[13856.028045] ssi-protocol ssi-protocol: Wake test 0
[13856.033111] ssi-protocol ssi-protocol: Data RX id: 0
[13856.038330] ssi-protocol ssi-protocol: Data TX id: 0

This patch fixes the issue by using the handshake setup from
the Nokia N950 kernel. The new handshake sequence also works
with the N900, so there is no need to differentiate between
both modems.

Tested-by: Aaro Koskinen <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
  • Loading branch information
sre committed Jan 28, 2016
1 parent 633f67a commit 87d9906
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions drivers/hsi/clients/ssi_protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,13 +521,7 @@ static void ssip_start_rx(struct hsi_client *cl)
* high transition. Therefore we need to ignore the sencond UP event.
*/
if ((ssi->main_state != ACTIVE) || (ssi->recv_state == RECV_READY)) {
if (ssi->main_state == INIT) {
ssi->main_state = HANDSHAKE;
spin_unlock(&ssi->lock);
ssip_send_bootinfo_req_cmd(cl);
} else {
spin_unlock(&ssi->lock);
}
spin_unlock(&ssi->lock);
return;
}
ssip_set_rxstate(ssi, RECV_READY);
Expand Down Expand Up @@ -671,6 +665,7 @@ static void ssip_rx_bootinforeq(struct hsi_client *cl, u32 cmd)
ssip_error(cl);
/* Fall through */
case INIT:
case HANDSHAKE:
spin_lock(&ssi->lock);
ssi->main_state = HANDSHAKE;
if (!ssi->waketest) {
Expand All @@ -688,9 +683,6 @@ static void ssip_rx_bootinforeq(struct hsi_client *cl, u32 cmd)
msg->complete = ssip_release_cmd;
hsi_async_write(cl, msg);
break;
case HANDSHAKE:
/* Ignore */
break;
default:
dev_dbg(&cl->device, "Wrong state M(%d)\n", ssi->main_state);
break;
Expand Down Expand Up @@ -939,9 +931,11 @@ static int ssip_pn_open(struct net_device *dev)
ssi->waketest = 1;
ssi_waketest(cl, 1); /* FIXME: To be removed */
}
ssi->main_state = INIT;
ssi->main_state = HANDSHAKE;
spin_unlock_bh(&ssi->lock);

ssip_send_bootinfo_req_cmd(cl);

return 0;
}

Expand Down

0 comments on commit 87d9906

Please sign in to comment.