From: Christophe Ricard Date: Sun, 25 Oct 2015 21:54:24 +0000 (+0100) Subject: NFC: nci: Call nci_hci_clear_all_pipes at HCI initial activation. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8a49943f5bc5ff4f835d50451ecf2380eab44d2e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git NFC: nci: Call nci_hci_clear_all_pipes at HCI initial activation. When session_id is filled to 0xff, the pipe configuration is probably incorrect and needs to be cleared. Signed-off-by: Christophe Ricard Signed-off-by: Samuel Ortiz --- diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c index 6f477d21adfd..af401fff72d9 100644 --- a/net/nfc/nci/hci.c +++ b/net/nfc/nci/hci.c @@ -706,6 +706,10 @@ int nci_hci_dev_session_init(struct nci_dev *ndev) /* Restore gate<->pipe table from some proprietary location. */ r = ndev->ops->hci_load_session(ndev); } else { + r = nci_hci_clear_all_pipes(ndev); + if (r < 0) + goto exit; + r = nci_hci_dev_connect_gates(ndev, ndev->hci_dev->init_data.gate_count, ndev->hci_dev->init_data.gates);