summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNitin Dhingra <nitin.dhingra@stericsson.com>2011-12-27 13:56:47 +0530
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:05:58 +0200
commitf5cf5d4c2bb950851f9b4ad53e05acc3da07df9f (patch)
treec2238d0e7b7902dd152db43ef918b4ecc2547d6a
parent99b39f8e3dfb5800dac9c836b3cb9dc4840ca42b (diff)
cg2900: Wrong sequence number from CG2910/05
After hardware reset, firmware patch download fails with error 0xF1 (Wrong Seq Number). Resending the first patch solves the problem. Clearquest ticket for this hardware bug is: CM0032866 ST-Ericsson Linux next: Not Tested, ER 373024 ST-Ericsson ID: 373024 ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10019 Change-Id: I05a193c52efa9fd080691f22722c0660d509f401 Depends-On: 09e279e3710a122eccd1ebd4929f79c244c78c9e Signed-off-by: Nitin Dhingra <nitin.dhingra@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/43860 Reviewed-by: QATOOLS Reviewed-by: QABUILD Reviewed-by: Hemant GUPTA <hemant.gupta@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
-rw-r--r--drivers/staging/cg2900/mfd/cg2900_chip.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/staging/cg2900/mfd/cg2900_chip.c b/drivers/staging/cg2900/mfd/cg2900_chip.c
index 3c8ea1e08e5..5e1a337ed03 100644
--- a/drivers/staging/cg2900/mfd/cg2900_chip.c
+++ b/drivers/staging/cg2900/mfd/cg2900_chip.c
@@ -1535,6 +1535,23 @@ static bool handle_vs_write_file_block_cmd_complete(struct cg2900_chip_dev *dev,
info->download_state != DOWNLOAD_PENDING)
return false;
+ if (HCI_BT_WRONG_SEQ_ERROR == status && info->file_info.chunk_id == 1 &&
+ (CG2905_PG1_1_REV == dev->chip.hci_revision ||
+ CG2910_PG1_REV == dev->chip.hci_revision)) {
+ /*
+ * Because of bug in CG2905/CG2910 PG1 H/W, the first chunk
+ * will return an error of wrong sequence number. As a
+ * workaround the first chunk needs to be sent again.
+ */
+ info->file_info.chunk_id = 0;
+ info->file_info.file_offset = 0;
+ /*
+ * Set the status back to success so that it continues on the
+ * success path rather than failure.
+ */
+ status = HCI_BT_ERROR_NO_ERROR;
+ }
+
if (HCI_BT_ERROR_NO_ERROR == status)
cg2900_create_work_item(info->wq, work_cont_file_download, dev);
else {