lkml.org 
[lkml]   [2020]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 2/4] net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver
Date
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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-10-19 14:57    [W:0.139 / U:1.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site