]> git.karo-electronics.de Git - linux-beck.git/commitdiff
NFC: digital: Abort last command when dep link goes down
authorThierry Escande <thierry.escande@collabora.com>
Thu, 16 Jun 2016 18:24:45 +0000 (20:24 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Wed, 6 Jul 2016 08:26:52 +0000 (10:26 +0200)
With this patch, the Digital Protocol layer abort the last issued
command when the dep link goes down. That way it does not have to wait
for the driver to reply with a timeout error before sending a new
command (i.e. a start poll command if constant polling is on).

Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/digital_core.c

index 0146e42ee28f402c98cd784d4f8b2c1e50cfc54f..0fd5518bf2522e1d4ab3e660c296ccfafb7cf897 100644 (file)
@@ -612,6 +612,8 @@ static int digital_dep_link_down(struct nfc_dev *nfc_dev)
 {
        struct nfc_digital_dev *ddev = nfc_get_drvdata(nfc_dev);
 
+       digital_abort_cmd(ddev);
+
        ddev->curr_protocol = 0;
 
        return 0;