On Tue, Dec 29, 2020 at 6:16 AM Jakub Kicinski <kuba(a)kernel.org> wrote:
> On Mon, 28 Dec 2020 18:45:07 +0900 Bongsu Jeon wrote:
> > From: Bongsu Jeon <bongsu.jeon(a)samsung.com>
> > A NCI virtual device can be made to simulate a NCI device in user space.
> > Using the virtual NCI device, The NCI module and application can be
> > validated. This driver supports to communicate between the virtual NCI
> > device and NCI module.
> > Signed-off-by: Bongsu Jeon <bongsu.jeon(a)samsung.com>
> net-next is still closed:
> Please repost in a few days.
> As far as the patch goes - please include some tests for the NCI/NFC
> subsystem based on this virtual device, best if they live in tree under
thank you for your answer.
I think that neard(NFC deamon) is necessary to test the NCI subsystem
The NCI virtual device in user space can communicate with neard
through this driver.
Is it enough to make NCI virtual device at tools/nfc for some test?
From: Bongsu Jeon <bongsu.jeon(a)samsung.com>
If there is a NCI command in work queue after closing the NCI device at
nci_unregister_device, The NCI command timer starts at flush_workqueue
function and then NCI command timeout handler would be called 5 second
after flushing the NCI command work queue and destroying the queue.
At that time, the timeout handler would try to use NCI command work queue
that is destroyed already. it will causes the problem. To avoid this
abnormal situation, change the sequence to prevent the NCI command timeout
handler from being called after destroying the NCI command work queue.
Signed-off-by: Bongsu Jeon <bongsu.jeon(a)samsung.com>
Changes in v2:
- Change the commit message.
net/nfc/nci/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index e64727e1a72f..79bebf4b0796 100644
@@ -579,11 +579,11 @@ static int nci_close_device(struct nci_dev *ndev)
/* Flush cmd wq */
/* Clear flags */
ndev->flags = 0;
If interrupt trigger is not set when requesting the interrupt, the core
will take care of reading trigger type from Devicetree. There is no
point to do it in the driver.
Signed-off-by: Krzysztof Kozlowski <krzk(a)kernel.org>
drivers/nfc/s3fwrn5/i2c.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/nfc/s3fwrn5/i2c.c b/drivers/nfc/s3fwrn5/i2c.c
index 42f1f610ac2c..897394167522 100644
@@ -179,8 +179,6 @@ static int s3fwrn5_i2c_probe(struct i2c_client *client,
const struct i2c_device_id *id)
struct s3fwrn5_i2c_phy *phy;
- struct irq_data *irq_data;
- unsigned long irqflags;
phy = devm_kzalloc(&client->dev, sizeof(*phy), GFP_KERNEL);
@@ -214,11 +212,8 @@ static int s3fwrn5_i2c_probe(struct i2c_client *client,
if (ret < 0)
- irq_data = irq_get_irq_data(client->irq);
- irqflags = irqd_get_trigger_type(irq_data) | IRQF_ONESHOT;
ret = devm_request_threaded_irq(&client->dev, phy->i2c_dev->irq, NULL,
- s3fwrn5_i2c_irq_thread_fn, irqflags,
+ s3fwrn5_i2c_irq_thread_fn, IRQF_ONESHOT,