[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <478B32BC.6070206@eptar.com>
Date: Mon, 14 Jan 2008 11:00:28 +0100
From: Claudio Lanconelli <lanconelli.claudio@...ar.com>
To: netdev@...r.kernel.org
CC: Jeff Garzik <jgarzik@...ox.com>,
Stephen Hemminger <shemminger@...ux-foundation.org>
Subject: [PATCH][resend] add driver for enc28j60 ethernet chip
This patch add support for Microchip enc28j60 10Mbps Ethernet chip used in embedded systems
due to its cheap SPI interface.
This 2nd version include changes from previous comments by Jeff and Stephen,
all but NAPI, see comments below at this regard.
I resend the patch because I didn't receive any feedback.
Changes to 1st version:
- use mutex instead of semaphore
- add carrier detect handling
- add ethtool support
- set_multicast_list when the interface is up using a workqueue
- add restart_work to reset the chip in case of tx_timeout
- removed kmalloc() for spi_transfer_buf (array defined in the priv struct)
Jeff Garzik wrote:
>
> comments:
>
> * Why do interrupt work in a kernel thread? Your comment says you
> cannot, but does not explain.
The enc28j60 is a SPI to Ethernet adapter, so we cannot access register
with simple in() out() instructions, but we need to use the SPI
subsystem. The spi_sync() basic operation to read/write a register is a
blocking operation, so can't be done in interrupt context.
Since every basic operation like read interrupt flag register call
spi_sync() we need the work queue for almost everything.
>
> * should use NAPI
>
For the reason I just explained I don't think NAPI is a viable way for
enc28j60.
Furthermore enc28j60 is a 10Mb only device and probably don't suffer to
interrupt overload.
I'm waiting for any comments, please.
Cheers,
Claudio Lanconelli
View attachment "enc28j60.patch" of type "text/x-patch" (56018 bytes)
Powered by blists - more mailing lists