Re: [PATCH v2 2/4] net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver

From: Lukasz Stelmach
Date: Mon Oct 19 2020 - 08:56:47 EST


It was <2020-10-02 pią 22:36>, when Andrew Lunn wrote:
>> +static int
>> +ax88796c_open(struct net_device *ndev)
>> +{
>> + struct ax88796c_device *ax_local = to_ax88796c_device(ndev);
>> + int ret;
>> + unsigned long irq_flag = IRQF_SHARED;
>> +
>> + mutex_lock(&ax_local->spi_lock);
>> +
>> + ret = ax88796c_soft_reset(ax_local);
>> + if (ret < 0)
>> + return -ENODEV;
>> +
>> + ret = request_irq(ndev->irq, ax88796c_interrupt,
>> + irq_flag, ndev->name, ndev);
>
> Maybe look at using request_threaded_irq(). You can then remove your
> work queue, and do the work in the thread_fn.

I looked and I looked and I didn't see how I could reasonably manage
asynchronous start_xmit calls, the work queue also supports at the
moment. Asynchronous start_xmit is important because data are
transmitted via SPI which isn't very fast and it seems better not to
block userspace processes that are sending data. Having both irq and
xmit in the same place doesn't seem bad.

Do you have any recommendations?
--
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics

Attachment: signature.asc
Description: PGP signature