[PATCH v3 28/35] nfc: netlink: Add mode parameter to deactivate_target functions

2015-10-25 Thread Christophe Ricard
In order to manage in a better way the nci poll mode state machine, add mode parameter to deactivate_target functions. This way we can manage different target state. mode parameter make sense only in nci core. Signed-off-by: Christophe Ricard --- include/net/nfc/nfc.h | 2 +- net/nfc/core.c

[PATCH v3 30/35] nfc: st21nfca: Add few code style fixes

2015-10-25 Thread Christophe Ricard
Add a minor code style fixes Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca/core.c | 2 -- drivers/nfc/st21nfca/i2c.c | 1 + drivers/nfc/st21nfca/se.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/nfc/st21nfca/core.c b

[PATCH v3 32/35] nfc: st21nfca: Add error messages when an unexpected HCI event occurs

2015-10-25 Thread Christophe Ricard
Potentially an unexpected HCI event may occur because of a firmware bug. It could be transparent for the user but at least log this. Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca/core.c | 2 ++ drivers/nfc/st21nfca/dep.c | 1 + drivers/nfc/st21nfca/se.c | 4 3 files changed

[PATCH v3 34/35] nfc: st-nci: remove duplicated skb dump

2015-10-25 Thread Christophe Ricard
Remove SPI_DUMP_SKB and I2C_DUMP_SKB as skb is already dumped in ndlc layer. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/i2c.c | 11 --- drivers/nfc/st-nci/spi.c | 11 --- 2 files changed, 22 deletions(-) diff --git a/drivers/nfc/st-nci

[PATCH v3 31/35] nfc: st21nfca: Add support for proprietary commands for factory tests

2015-10-25 Thread Christophe Ricard
-collision is done. - HCI_LOOPBACK: Allow to echo a command and test the Dh to CLF connectivity. Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca/Makefile | 2 +- drivers/nfc/st21nfca/core.c| 3 + drivers/nfc/st21nfca/se.c | 4 +- drivers/nfc/st21nfca/st21nfca.

[PATCH v3 27/35] nfc: st21nfca: Fix host_list verification after secure element activation

2015-10-25 Thread Christophe Ricard
A secure element can be activated in different order. The host_list is updated keeping a fixed order: . Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca/se.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/nfc/st21nfca/se.c

[PATCH v3 26/35] nfc: st-nci: Fix host_list verification after secure element activation

2015-10-25 Thread Christophe Ricard
A secure element can be activated in different order. The host_list is updated keeping a fixed order: . Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/se.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/nfc/st-nci/se.c b

[PATCH v3 29/35] nfc: st-nci: Add few code style fixes

2015-10-25 Thread Christophe Ricard
Add some few code style fixes. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/i2c.c | 2 +- drivers/nfc/st-nci/se.c | 2 +- net/nfc/nci/hci.c| 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/nfc/st-nci/i2c.c b/drivers/nfc

[PATCH v3 33/35] nfc: st-nci: Make sure irq is not already active when powering the device

2015-10-25 Thread Christophe Ricard
Upon some conditions (timing, CLF errors, platform errors...), the irq might be already active when powering the device. Add irq_active variable as a guard to avoid kernel warning message Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/i2c.c | 8 +++- drivers/nfc/st-nci/spi.c | 8

[PATCH v3 35/35] nfc: st-nci: Replace st21nfcb by st_nci in makefile

2015-10-25 Thread Christophe Ricard
Replace 1 missing st21nfcb by st_nci Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nfc/st-nci/Makefile b/drivers/nfc/st-nci/Makefile index ea40ace..439b2fa 100644 --- a/drivers/nfc/st-nci/Makefile

[PATCH v3 14/35] nfc: st21nfca: Open NFC_HCI_LINK_MGMT_PIPE

2015-10-25 Thread Christophe Ricard
NFC_HCI_LINK_MGMT_PIPE was never open in nfc_hci_load_session. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca/core.c | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/nfc/st21nfca/core.c b/drivers/nfc/st21nfca

[PATCH v3 20/35] nfc: st21nfca: Change st21nfca_gates offset when looking for a pipe in the table

2015-10-25 Thread Christophe Ricard
It is useless to start from index 0 when looking for a gate because only dynamic pipes are retrieved with ST21NFCA_DM_GETINFO(ST21NFCA_DM_GETINFO_PIPE_LIST). The first dynamic pipe is present at index 3. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca

[PATCH v3 23/35] nfc: netlink: Add missing NFC_ATTR comments

2015-10-25 Thread Christophe Ricard
NFC_CMD_ACTIVATE_TARGET and NFC_ATTR_SE_PARAMS comments are missing. Signed-off-by: Christophe Ricard --- include/uapi/linux/nfc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h index dd3f753..399f39f 100644 --- a/include/uapi/linux

[PATCH v3 17/35] nfc: st-nci: initialize gate_count in st_nci_hci_network_init

2015-10-25 Thread Christophe Ricard
When initializing ndev->hci_dev->init_data, only gates field was set. gate_count needs to be initialized as well. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/se.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nfc/st-nci/se.c b/drivers/

[PATCH v3 25/35] nfc: st-nci: Increase waiting time between 2 secure element activation

2015-10-25 Thread Christophe Ricard
After internal discussion, it appears this timing should be increase to 20 ms for interoperability reason. Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/se.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st-nci/se.c index

[PATCH v3 19/35] nfc: st-nci: Change st_nci_gates offset when looking for a pipe in the table

2015-10-25 Thread Christophe Ricard
It is useless to start from index 0 when looking for a gate because only dynamic pipes are retrieved with ST_NCI_DM_GETINFO(ST_NCI_DM_GETINFO_PIPE_LIST). The first dynamic pipe is present at index 3. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/se.c | 2

[PATCH v3 16/35] nfc: st21nfca: Keep st21nfca_gates unchanged in load_session

2015-10-25 Thread Christophe Ricard
: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca/core.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/nfc/st21nfca/core.c b/drivers/nfc/st21nfca/core.c index 819a94a..b4451f8 100644 --- a/drivers/nfc/st21nfca/core.c +++ b

[PATCH v3 18/35] nfc: st-nci: Add support for NCI_HCI_IDENTITY_MGMT_GATE

2015-10-25 Thread Christophe Ricard
NCI_HCI_IDENTITY_MGMT_GATE might be useful to get information for example about hardware or firmware version. Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/se.c| 3 +++ include/net/nfc/nci_core.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/nfc/st-nci/se.c b

[PATCH v3 22/35] nfc: st-nci: Add error messages when an unexpected HCI event occurs

2015-10-25 Thread Christophe Ricard
Potentially an unexpected HCI event may occur because of a firmware bug. It could be transparent for the user but at least log this. Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/se.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st

[PATCH v3 21/35] nfc: st-nci: Add support for proprietary commands for factory tests

2015-10-25 Thread Christophe Ricard
a received during a NCI_CORE_INIT_CMD. Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/Makefile | 2 +- drivers/nfc/st-nci/core.c| 13 +- drivers/nfc/st-nci/se.c | 29 ++- drivers/nfc/st-nci/st-nci.h | 68 ++ drivers/nfc/st-nci/vendor_cm

[PATCH v3 15/35] nfc: st-nci: Keep st_nci_gates unchanged in load_session

2015-10-25 Thread Christophe Ricard
...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/se.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st-nci/se.c index 3522165..df2dc54 100644 --- a/drivers/nfc/st-nci/se.c +++ b/drivers/nfc/st-nci/se.c

[PATCH v3 24/35] nfc: st-nci: Add ese-present/uicc-present dts properties

2015-10-25 Thread Christophe Ricard
: Christophe Ricard --- .../devicetree/bindings/net/nfc/st-nci-i2c.txt | 7 ++ .../devicetree/bindings/net/nfc/st-nci-spi.txt | 9 +- drivers/nfc/st-nci/core.c | 4 +- drivers/nfc/st-nci/i2c.c | 12 ++- drivers/nfc/st-nci/ndlc.c

[PATCH v3 11/35] nfc: st-nci: Remove ndev->hci_dev->init_data.gates initialization in load_session

2015-10-25 Thread Christophe Ricard
ndev->hci_dev->init_data.gates is already initialized in st_nci_hci_network. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/se.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st-nci/se.c index 4acb945..3

[PATCH v3 09/35] nfc: nci: Add a call to nci_hci_clear_all_pipes at HCI initial activation.

2015-10-25 Thread Christophe Ricard
When session_id is filled to ff, the pipe configuration is probably incorrect. Signed-off-by: Christophe Ricard --- net/nfc/nci/hci.c | 4 1 file changed, 4 insertions(+) diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c index 43d7931..a937bc6 100644 --- a/net/nfc/nci/hci.c +++ b/net/nfc

[PATCH v3 00/35] Few fixes and st21nfca/st-nci vendor_cmds support

2015-10-25 Thread Christophe Ricard
lude "st21nfca_vendor_cmds.h" in vendor_cmds as this one does not exist. v2: - Propose a more elegant way to switch between NFC target mode (SLEEP, IDLE). - Remove st21nfca_ and st-nci_ file name prefix. - Merge st21nfca_xxx.h headers into st21nfca.h. Same for st-nci_xxx.h Best Regards Christophe Christo

[PATCH v3 08/35] nfc: nci: add nci_hci_clear_all_pipes functions

2015-10-25 Thread Christophe Ricard
nci_hci_clear_all_pipes might be use full in some cases for example after a firmware update. Signed-off-by: Christophe Ricard --- include/net/nfc/nci_core.h | 1 + net/nfc/nci/hci.c | 15 +++ 2 files changed, 16 insertions(+) diff --git a/include/net/nfc/nci_core.h b

[PATCH v3 03/35] nfc: st21nfca: Align st21nfca driver with other nfc driver

2015-10-25 Thread Christophe Ricard
Align st21nfca driver with or nfc driver: - Remove st21nfca_ prefix - Merge st21nfca_se.h, st21nfca_dep.h in st21nfca.h Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca/Makefile |2 +- drivers/nfc/st21nfca/core.c | 1062 ++ drivers/nfc

[PATCH v3 07/35] nfc: nci: extract pipe value using NCI_HCP_MSG_GET_PIPE

2015-10-25 Thread Christophe Ricard
When receiving data in nci_hci_msg_rx_work, extract pipe value using NCI_HCP_MSG_GET_PIPE macro. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- net/nfc/nci/hci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c index

[PATCH v3 04/35] nfc: st-nci: Fix incorrect spi buffer size

2015-10-25 Thread Christophe Ricard
When sending data over SPI, the maximum expected length is the maximum nci packet payload + data header size + the frame head room (1 for the ndlc header) + the frame trail room (0). Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/spi.c | 4 +++- 1 file

[PATCH v3 02/35] nfc: st-nci: include st-nci.h instead of ndlc.h

2015-10-25 Thread Christophe Ricard
st-nci.h already include ndlc.h. Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/i2c.c | 2 +- drivers/nfc/st-nci/ndlc.c | 1 - drivers/nfc/st-nci/spi.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/nfc/st-nci/i2c.c b/drivers/nfc/st-nci/i2c.c index

[PATCH v3 10/35] nfc: nci: add capability to create pipe on specific gate in nci_hci_connect_gate

2015-10-25 Thread Christophe Ricard
-off-by: Christophe Ricard --- net/nfc/nci/hci.c | 55 ++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c index a937bc6..1d6aa5d 100644 --- a/net/nfc/nci/hci.c +++ b/net/nfc/nci/hci.c @@ -79,6

[PATCH v3 06/35] nfc: nci: Fix improper management of HCI return code

2015-10-25 Thread Christophe Ricard
value. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- net/nfc/nci/hci.c | 60 --- 1 file changed, 44 insertions(+), 16 deletions(-) diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c index bc6b9d5..73afb47 100644 --- a/net/nfc

[PATCH v3 05/35] nfc: nci: Fix incorrect data chaining when sending data

2015-10-25 Thread Christophe Ricard
When sending HCI data over NCI, cmd information should be present only on the first packet. Each packet shall be specifically allocated and sent to the NCI layer. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- net/nfc/nci/hci.c | 19 --- 1 file changed, 12

[PATCH v3 13/35] nfc: st-nci: Open NCI_HCI_LINK_MGMT_PIPE

2015-10-25 Thread Christophe Ricard
NCI_HCI_LINK_MGMT_PIPE was never open in st_nci_hci_load_session. Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/se.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st-nci/se.c index 3ffac0e..3522165 100644 --- a/drivers/nfc/st-nci

[PATCH v3 12/35] nfc: st21nfca: Remove hdev->init_data.gates initialization in load_session

2015-10-25 Thread Christophe Ricard
hdev->init_data.gates is already initialized in st21nfca_hci_probe. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca/core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/nfc/st21nfca/core.c b/drivers/nfc/st21nfca/core.c index 42f1974..67d1

[PATCH v3 01/35] nfc: st-nci: Align st-nci driver with other nfc driver

2015-10-25 Thread Christophe Ricard
Align st-nci driver with or nfc driver: - Remove st-nci_ prefix - Merge se.h in st-nci.h Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/core.c | 1 - drivers/nfc/st-nci/se.c | 1 - drivers/nfc/st-nci/se.h | 61 - drivers/nfc/st

Re: [PATCH v2 00/35] Few fixes and st21nfca/st-nci vendor_cmds support

2015-10-25 Thread Christophe Ricard
, Samuel Ortiz wrote: Hi Christophe, On Sun, Oct 25, 2015 at 10:54:15PM +0100, Christophe Ricard wrote: Hi Samuel, Please find in the following patchset severals fixes as well as vendor_cmds support for st21nfca and st-nci. vendor_cmds includes production test, trimmings & firmware update comm

[PATCH v2 25/35] nfc: st-nci: Increase waiting time between 2 secure element activation

2015-10-25 Thread Christophe Ricard
After internal discussion, it appears this timing should be increase to 20 ms for interoperability reason. Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/se.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st-nci/se.c index

[PATCH v2 22/35] nfc: st-nci: Add error messages when an unexpected HCI event occurs

2015-10-25 Thread Christophe Ricard
Potentially an unexpected HCI event may occur because of a firmware bug. It could be transparent for the user but at least log this. Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/se.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st

[PATCH v2 23/35] nfc: netlink: Add missing NFC_ATTR comments

2015-10-25 Thread Christophe Ricard
NFC_CMD_ACTIVATE_TARGET and NFC_ATTR_SE_PARAMS comments are missing. Signed-off-by: Christophe Ricard --- include/uapi/linux/nfc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h index dd3f753..399f39f 100644 --- a/include/uapi/linux

[PATCH v2 26/35] nfc: st-nci: Fix host_list verification after secure element activation

2015-10-25 Thread Christophe Ricard
A secure element can be activated in different order. The host_list is updated keeping a fixed order: . Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/se.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/nfc/st-nci/se.c b

[PATCH v2 27/35] nfc: st21nfca: Fix host_list verification after secure element activation

2015-10-25 Thread Christophe Ricard
A secure element can be activated in different order. The host_list is updated keeping a fixed order: . Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca/se.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/nfc/st21nfca/se.c

[PATCH v2 35/35] nfc: st-nci: Replace st21nfcb by st_nci in makefile

2015-10-25 Thread Christophe Ricard
Replace 1 missing st21nfcb by st_nci Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nfc/st-nci/Makefile b/drivers/nfc/st-nci/Makefile index ea40ace..439b2fa 100644 --- a/drivers/nfc/st-nci/Makefile

[PATCH v2 24/35] nfc: st-nci: Add ese-present/uicc-present dts properties

2015-10-25 Thread Christophe Ricard
: Christophe Ricard --- .../devicetree/bindings/net/nfc/st-nci-i2c.txt | 7 ++ .../devicetree/bindings/net/nfc/st-nci-spi.txt | 9 +- drivers/nfc/st-nci/core.c | 4 +- drivers/nfc/st-nci/i2c.c | 12 ++- drivers/nfc/st-nci/ndlc.c

[PATCH v2 28/35] nfc: netlink: Add mode parameter to deactivate_target functions

2015-10-25 Thread Christophe Ricard
In order to manage in a better way the nci poll mode state machine, add mode parameter to deactivate_target functions. This way we can manage different target state. mode parameter make sense only in nci core. Signed-off-by: Christophe Ricard --- include/net/nfc/nfc.h | 2 +- net/nfc/core.c

[PATCH v2 06/35] nfc: nci: Fix improper management of HCI return code

2015-10-25 Thread Christophe Ricard
value. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- net/nfc/nci/hci.c | 60 --- 1 file changed, 44 insertions(+), 16 deletions(-) diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c index bc6b9d5..73afb47 100644 --- a/net/nfc

[PATCH v2 17/35] nfc: st-nci: initialize gate_count in st_nci_hci_network_init

2015-10-25 Thread Christophe Ricard
When initializing ndev->hci_dev->init_data, only gates field was set. gate_count needs to be initialized as well. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/se.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nfc/st-nci/se.c b/drivers/

[PATCH v2 30/35] nfc: st21nfca: Add few code style fixes

2015-10-25 Thread Christophe Ricard
Add a minor code style fixes Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca/core.c | 2 -- drivers/nfc/st21nfca/i2c.c | 1 + drivers/nfc/st21nfca/se.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/nfc/st21nfca/core.c b

[PATCH v2 32/35] nfc: st21nfca: Add error messages when an unexpected HCI event occurs

2015-10-25 Thread Christophe Ricard
Potentially an unexpected HCI event may occur because of a firmware bug. It could be transparent for the user but at least log this. Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca/core.c | 2 ++ drivers/nfc/st21nfca/dep.c | 1 + drivers/nfc/st21nfca/se.c | 4 3 files changed

[PATCH v2 31/35] nfc: st21nfca: Add support for proprietary commands for factory tests

2015-10-25 Thread Christophe Ricard
-collision is done. - HCI_LOOPBACK: Allow to echo a command and test the Dh to CLF connectivity. Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca/Makefile | 2 +- drivers/nfc/st21nfca/core.c| 3 + drivers/nfc/st21nfca/se.c | 4 +- drivers/nfc/st21nfca/st21nfca.

[PATCH v2 15/35] nfc: st-nci: Keep st_nci_gates unchanged in load_session

2015-10-25 Thread Christophe Ricard
...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/se.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st-nci/se.c index 3522165..df2dc54 100644 --- a/drivers/nfc/st-nci/se.c +++ b/drivers/nfc/st-nci/se.c

[PATCH v2 34/35] nfc: st-nci: remove duplicated skb dump

2015-10-25 Thread Christophe Ricard
Remove SPI_DUMP_SKB and I2C_DUMP_SKB as skb is already dumped in ndlc layer. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/i2c.c | 11 --- drivers/nfc/st-nci/spi.c | 11 --- 2 files changed, 22 deletions(-) diff --git a/drivers/nfc/st-nci

[PATCH v2 05/35] nfc: nci: Fix incorrect data chaining when sending data

2015-10-25 Thread Christophe Ricard
When sending HCI data over NCI, cmd information should be present only on the first packet. Each packet shall be specifically allocated and sent to the NCI layer. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- net/nfc/nci/hci.c | 19 --- 1 file changed, 12

[PATCH v2 29/35] nfc: st-nci: Add few code style fixes

2015-10-25 Thread Christophe Ricard
Add some few code style fixes. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/i2c.c | 2 +- drivers/nfc/st-nci/se.c | 2 +- net/nfc/nci/hci.c| 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/nfc/st-nci/i2c.c b/drivers/nfc

[PATCH v2 04/35] nfc: st-nci: Fix incorrect spi buffer size

2015-10-25 Thread Christophe Ricard
When sending data over SPI, the maximum expected length is the maximum nci packet payload + data header size + the frame head room (1 for the ndlc header) + the frame trail room (0). Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/spi.c | 4 +++- 1 file

[PATCH v2 16/35] nfc: st21nfca: Keep st21nfca_gates unchanged in load_session

2015-10-25 Thread Christophe Ricard
: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca/core.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/nfc/st21nfca/core.c b/drivers/nfc/st21nfca/core.c index 819a94a..b4451f8 100644 --- a/drivers/nfc/st21nfca/core.c +++ b

[PATCH v2 33/35] nfc: st-nci: Make sure irq is not already active when powering the device

2015-10-25 Thread Christophe Ricard
Upon some conditions (timing, CLF errors, platform errors...), the irq might be already active when powering the device. Add irq_active variable as a guard to avoid kernel warning message Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/i2c.c | 8 +++- drivers/nfc/st-nci/spi.c | 8

[PATCH v2 14/35] nfc: st21nfca: Open NFC_HCI_LINK_MGMT_PIPE

2015-10-25 Thread Christophe Ricard
NFC_HCI_LINK_MGMT_PIPE was never open in nfc_hci_load_session. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca/core.c | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/nfc/st21nfca/core.c b/drivers/nfc/st21nfca

[PATCH v2 20/35] nfc: st21nfca: Change st21nfca_gates offset when looking for a pipe in the table

2015-10-25 Thread Christophe Ricard
It is useless to start from index 0 when looking for a gate because only dynamic pipes are retrieved with ST21NFCA_DM_GETINFO(ST21NFCA_DM_GETINFO_PIPE_LIST). The first dynamic pipe is present at index 3. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca

[PATCH v2 02/35] nfc: st-nci: include st-nci.h instead of ndlc.h

2015-10-25 Thread Christophe Ricard
st-nci.h already include ndlc.h. Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/i2c.c | 2 +- drivers/nfc/st-nci/ndlc.c | 1 - drivers/nfc/st-nci/spi.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/nfc/st-nci/i2c.c b/drivers/nfc/st-nci/i2c.c index

[PATCH v2 03/35] nfc: st21nfca: Align st21nfca driver with other nfc driver

2015-10-25 Thread Christophe Ricard
Align st21nfca driver with or nfc driver: - Remove st21nfca_ prefix - Merge st21nfca_se.h, st21nfca_dep.h in st21nfca.h Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca/Makefile |2 +- drivers/nfc/st21nfca/core.c | 1062 ++ drivers/nfc

[PATCH v2 07/35] nfc: nci: extract pipe value using NCI_HCP_MSG_GET_PIPE

2015-10-25 Thread Christophe Ricard
When receiving data in nci_hci_msg_rx_work, extract pipe value using NCI_HCP_MSG_GET_PIPE macro. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- net/nfc/nci/hci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c index

[PATCH v2 12/35] nfc: st21nfca: Remove hdev->init_data.gates initialization in load_session

2015-10-25 Thread Christophe Ricard
hdev->init_data.gates is already initialized in st21nfca_hci_probe. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca/core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/nfc/st21nfca/core.c b/drivers/nfc/st21nfca/core.c index 42f1974..67d1

[PATCH v2 19/35] nfc: st-nci: Change st_nci_gates offset when looking for a pipe in the table

2015-10-25 Thread Christophe Ricard
It is useless to start from index 0 when looking for a gate because only dynamic pipes are retrieved with ST_NCI_DM_GETINFO(ST_NCI_DM_GETINFO_PIPE_LIST). The first dynamic pipe is present at index 3. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/se.c | 2

[PATCH v2 09/35] nfc: nci: Add a call to nci_hci_clear_all_pipes at HCI initial activation.

2015-10-25 Thread Christophe Ricard
When session_id is filled to ff, the pipe configuration is probably incorrect. Signed-off-by: Christophe Ricard --- net/nfc/nci/hci.c | 4 1 file changed, 4 insertions(+) diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c index 43d7931..a937bc6 100644 --- a/net/nfc/nci/hci.c +++ b/net/nfc

[PATCH v2 18/35] nfc: st-nci: Add support for NCI_HCI_IDENTITY_MGMT_GATE

2015-10-25 Thread Christophe Ricard
NCI_HCI_IDENTITY_MGMT_GATE might be useful to get information for example about hardware or firmware version. Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/se.c| 3 +++ include/net/nfc/nci_core.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/nfc/st-nci/se.c b

[PATCH v2 08/35] nfc: nci: add nci_hci_clear_all_pipes functions

2015-10-25 Thread Christophe Ricard
nci_hci_clear_all_pipes might be use full in some cases for example after a firmware update. Signed-off-by: Christophe Ricard --- include/net/nfc/nci_core.h | 1 + net/nfc/nci/hci.c | 15 +++ 2 files changed, 16 insertions(+) diff --git a/include/net/nfc/nci_core.h b

[PATCH v2 13/35] nfc: st-nci: Open NCI_HCI_LINK_MGMT_PIPE

2015-10-25 Thread Christophe Ricard
NCI_HCI_LINK_MGMT_PIPE was never open in st_nci_hci_load_session. Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/se.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st-nci/se.c index 3ffac0e..3522165 100644 --- a/drivers/nfc/st-nci

[PATCH v2 11/35] nfc: st-nci: Remove ndev->hci_dev->init_data.gates initialization in load_session

2015-10-25 Thread Christophe Ricard
ndev->hci_dev->init_data.gates is already initialized in st_nci_hci_network. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/se.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st-nci/se.c index 4acb945..3

[PATCH v2 10/35] nfc: nci: add capability to create pipe on specific gate in nci_hci_connect_gate

2015-10-25 Thread Christophe Ricard
-off-by: Christophe Ricard --- net/nfc/nci/hci.c | 55 ++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c index a937bc6..1d6aa5d 100644 --- a/net/nfc/nci/hci.c +++ b/net/nfc/nci/hci.c @@ -79,6

[PATCH v2 21/35] nfc: st-nci: Add support for proprietary commands for factory tests

2015-10-25 Thread Christophe Ricard
a received during a NCI_CORE_INIT_CMD. Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/Makefile | 2 +- drivers/nfc/st-nci/core.c| 13 +- drivers/nfc/st-nci/se.c | 29 ++- drivers/nfc/st-nci/st-nci.h | 68 ++ drivers/nfc/st-nci/vendor_cm

[PATCH v2 01/35] nfc: st-nci: Align st-nci driver with other nfc driver

2015-10-25 Thread Christophe Ricard
Align st-nci driver with or nfc driver: - Remove st-nci_ prefix - Merge se.h in st-nci.h Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/core.c | 1 - drivers/nfc/st-nci/se.c | 1 - drivers/nfc/st-nci/se.h | 61 - drivers/nfc/st

[PATCH v2 00/35] Few fixes and st21nfca/st-nci vendor_cmds support

2015-10-25 Thread Christophe Ricard
move st21nfca_ and st-nci_ file name prefix. - Merge st21nfca_xxx.h headers into st21nfca.h. Same for st-nci_xxx.h Best Regards Christophe Christophe Ricard (35): nfc: st-nci: Align st-nci driver with other nfc driver nfc: st-nci: include st-nci.h instead of ndlc.h nfc: st21nfca: Align st21nfca dr

Re: [PATCH 18/30] nfc: st-nci: Add support for proprietary commands for factory tests

2015-10-25 Thread Christophe Ricard
right considering a system should not be locked because of a buggy NFC controller. Also an error message will be enough to notify a potential bug... I will apply your remark where possible. Sorry for that. Best Regards Christophe On 24/10/2015 14:19, Christophe Ricard wrote: Hi Samuel, On 24/1

Re: [PATCH 18/30] nfc: st-nci: Add support for proprietary commands for factory tests

2015-10-24 Thread Christophe Ricard
Hi Samuel, On 24/10/2015 08:48, Samuel Ortiz wrote: Hi Christophe, Just a couple of nitpicks: On Tue, Oct 20, 2015 at 11:48:09PM +0200, Christophe Ricard wrote: diff --git a/drivers/nfc/st-nci/Makefile b/drivers/nfc/st-nci/Makefile index 348ce76..60e569b 100644 --- a/drivers/nfc/st-nci

[PATCH 02/30] nfc: nci: Fix incorrect data chaining when sending data

2015-10-20 Thread Christophe Ricard
When sending HCI data over NCI, cmd information should be present only on the first packet. Each packet shall be specifically allocated and sent to the NCI layer. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- net/nfc/nci/hci.c | 19 --- 1 file changed, 12

[PATCH 01/30] nfc: st-nci: Fix incorrect spi buffer size

2015-10-20 Thread Christophe Ricard
When sending data over SPI, the maximum expected length is the maximum nci packet payload + data header size + the frame head room (1 for the ndlc header) + the frame trail room (0). Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/spi.c | 4 +++- 1 file

[PATCH 00/30] Few fixes and st21nfca/st-nci vendor_cmds support

2015-10-20 Thread Christophe Ricard
Hi Samuel, Please find in the following patchset severals fixes as well as vendor_cmds support for st21nfca and st-nci. vendor_cmds includes production test, trimmings & firmware update commands. Best Regards Christophe Christophe Ricard (30): nfc: st-nci: Fix incorrect spi buffer size

[PATCH 03/30] nfc: nci: Fix improper management of HCI return code

2015-10-20 Thread Christophe Ricard
value. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- net/nfc/nci/hci.c | 60 --- 1 file changed, 44 insertions(+), 16 deletions(-) diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c index bc6b9d5..73afb47 100644 --- a/net/nfc

[PATCH 08/30] nfc: st-nci: Remove ndev->hci_dev->init_data.gates initialization in load_session

2015-10-20 Thread Christophe Ricard
ndev->hci_dev->init_data.gates is already initialized in st_nci_hci_network. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/st-nci_se.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/nfc/st-nci/st-nci_se.c b/drivers/nfc/st-nci/st-nci_se.c

[PATCH 10/30] nfc: st-nci: Open NCI_HCI_LINK_MGMT_PIPE

2015-10-20 Thread Christophe Ricard
NCI_HCI_LINK_MGMT_PIPE was never open in st_nci_hci_load_session. Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/st-nci_se.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/nfc/st-nci/st-nci_se.c b/drivers/nfc/st-nci/st-nci_se.c index 15fb0bb..3ea5384 100644 --- a

[PATCH 12/30] nfc: st-nci: Keep st_nci_gates unchanged in load_session

2015-10-20 Thread Christophe Ricard
...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/st-nci_se.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/nfc/st-nci/st-nci_se.c b/drivers/nfc/st-nci/st-nci_se.c index 3ea5384..2a475ce 100644 --- a/drivers/nfc/st-nci/st-nci_se.c

[PATCH 09/30] nfc: st21nfca: Remove hdev->init_data.gates initialization in load_session

2015-10-20 Thread Christophe Ricard
hdev->init_data.gates is already initialized in st21nfca_hci_probe. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca/st21nfca.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/nfc/st21nfca/st21nfca.c b/drivers/nfc/st21nfca/st21nfca.c index 0512

[PATCH 26/30] nfc: st21nfca: Add few code style fixes

2015-10-20 Thread Christophe Ricard
Add a minor code style fixes Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca/i2c.c | 1 + drivers/nfc/st21nfca/st21nfca.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/nfc/st21nfca/i2c.c b/drivers/nfc/st21nfca/i2c.c index

[PATCH 30/30] nfc: st-nci: Replace st21nfcb by st_nci in makefile

2015-10-20 Thread Christophe Ricard
Replace 1 missing st21nfcb by st_nci Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nfc/st-nci/Makefile b/drivers/nfc/st-nci/Makefile index 60e569b..bd74c60 100644 --- a/drivers/nfc/st-nci/Makefile

[PATCH 11/30] nfc: st21nfca: Open NFC_HCI_LINK_MGMT_PIPE

2015-10-20 Thread Christophe Ricard
NFC_HCI_LINK_MGMT_PIPE was never open in nfc_hci_load_session. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca/st21nfca.c | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/nfc/st21nfca/st21nfca.c b/drivers/nfc

[PATCH 29/30] nfc: st-nci: remove duplicated skb dump

2015-10-20 Thread Christophe Ricard
Remove SPI_DUMP_SKB and I2C_DUMP_SKB as skb is already dumped in ndlc layer. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/i2c.c | 11 --- drivers/nfc/st-nci/spi.c | 11 --- 2 files changed, 22 deletions(-) diff --git a/drivers/nfc/st-nci

[PATCH 05/30] nfc: nci: add nci_hci_clear_all_pipes functions

2015-10-20 Thread Christophe Ricard
nci_hci_clear_all_pipes might be use full in some cases for example after a firmware update. Signed-off-by: Christophe Ricard --- include/net/nfc/nci_core.h | 1 + net/nfc/nci/hci.c | 15 +++ 2 files changed, 16 insertions(+) diff --git a/include/net/nfc/nci_core.h b

[PATCH 04/30] nfc: nci: extract pipe value using NCI_HCP_MSG_GET_PIPE

2015-10-20 Thread Christophe Ricard
When receiving data in nci_hci_msg_rx_work, extract pipe value using NCI_HCP_MSG_GET_PIPE macro. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- net/nfc/nci/hci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c index

[PATCH 28/30] nfc: st-nci: Make sure irq is not already active when powering the device

2015-10-20 Thread Christophe Ricard
Upon some conditions (timing, CLF errors, platform errors...), the irq might be already active when powering the device. Add irq_active variable as a guard to avoid kernel warning message Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/i2c.c | 8 +++- drivers/nfc/st-nci/spi.c | 8

[PATCH 25/30] nfc: st-nci: Add few code style fixes

2015-10-20 Thread Christophe Ricard
Add some few code style fixes. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/i2c.c | 2 +- drivers/nfc/st-nci/st-nci_se.c | 2 +- net/nfc/nci/hci.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/nfc/st-nci

[PATCH 24/30] nfc: netlink: Add suspend_target handler and nfc_reactivate_target

2015-10-20 Thread Christophe Ricard
In order to manage in a better way the nci poll mode state machine, add a suspend_target handler. In this way the netlink nfc_genl_activate_target rely on a new function nfc_reactivate_target calling suspend_target handler if available (only in nci core). Signed-off-by: Christophe Ricard

[PATCH 27/30] nfc: st21nfca: Add support for proprietary commands for factory tests

2015-10-20 Thread Christophe Ricard
-collision is done. - HCI_LOOPBACK: Allow to echo a command and test the Dh to CLF connectivity. Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca/Makefile | 2 +- drivers/nfc/st21nfca/st21nfca.c | 4 + drivers/nfc/st21nfca/st21nfca.h | 4 +- d

[PATCH 07/30] nfc: nci: add capability to create pipe on specific gate in nci_hci_connect_gate

2015-10-20 Thread Christophe Ricard
-off-by: Christophe Ricard --- net/nfc/nci/hci.c | 55 ++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c index 1b83219..5212ef2 100644 --- a/net/nfc/nci/hci.c +++ b/net/nfc/nci/hci.c @@ -79,6

[PATCH 22/30] nfc: st-nci: Fix host_list verification after secure element activation

2015-10-20 Thread Christophe Ricard
A secure element can be activated in different order. The host_list is updated keeping a fixed order: . Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/st-nci_se.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/nfc/st-nci/st

[PATCH 15/30] nfc: st-nci: Add support for NCI_HCI_IDENTITY_MGMT_GATE

2015-10-20 Thread Christophe Ricard
NCI_HCI_IDENTITY_MGMT_GATE might be useful to get information for example about hardware or firmware version. Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/st-nci_se.c | 3 +++ include/net/nfc/nci_core.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/nfc/st-nci/st

[PATCH 18/30] nfc: st-nci: Add support for proprietary commands for factory tests

2015-10-20 Thread Christophe Ricard
a received during a NCI_CORE_INIT_CMD. Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/Makefile | 2 +- drivers/nfc/st-nci/core.c | 14 +- drivers/nfc/st-nci/st-nci.h | 4 + drivers/nfc/st-nci/st-nci_se.c | 30 +- drivers/nfc

[PATCH 16/30] nfc: st-nci: Change st_nci_gates offset when looking for a pipe in the table

2015-10-20 Thread Christophe Ricard
It is useless to start from index 0 when looking for a gate because only dynamic pipes are retrieved with ST_NCI_DM_GETINFO(ST_NCI_DM_GETINFO_PIPE_LIST). The first dynamic pipe is present at index 3. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st-nci/st-nci_se.c

[PATCH 17/30] nfc: st21nfca: Change st21nfca_gates offset when looking for a pipe in the table

2015-10-20 Thread Christophe Ricard
It is useless to start from index 0 when looking for a gate because only dynamic pipes are retrieved with ST21NFCA_DM_GETINFO(ST21NFCA_DM_GETINFO_PIPE_LIST). The first dynamic pipe is present at index 3. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Ricard --- drivers/nfc/st21nfca

[PATCH 20/30] nfc: st-nci: Add ese-present/uicc-present dts properties

2015-10-20 Thread Christophe Ricard
several trials on commercial and qualified firmware it appears that nci_nfcee_mode_set(ENABLE) and nci_nfcee_mode_set(DISABLE) are properly supported. Such feature also help us to eventually save some time (~5ms) if only one secure element is connected. Signed-off-by: Christophe Ricard

  1   2   3   4   5   >