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

Lukasz Stelmach l.stelmach at samsung.com
Mon Oct 19 08:56:08 EDT 2020


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20201019/5206b7e8/attachment-0001.sig>


More information about the linux-arm-kernel mailing list