netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Kinar <n.kinar@usask.ca>
To: netdev@vger.kernel.org
Subject: ENC28J60 driver causes kernel to be unresponsive
Date: Fri, 06 Mar 2009 10:17:45 -0600	[thread overview]
Message-ID: <49B14CA9.2000400@usask.ca> (raw)

Hello--

I am testing the new ENC28J60 SPI-to-Ethernet driver on a custom AVR32 
embedded system running  Linux.  The kernel that I am using is 
2.6.27.6.atmel.1, and I have compiled the ENC28J60 as a module.  The SPI 
setup code in my setup.c file is:

static struct spi_board_info spi1_board_info[] __initdata = {
    /*SPI Atmel dataflash*/
    {
        .modalias    = "mtd_dataflash",
        .max_speed_hz    = 8000000,
        .chip_select    = 0,
    },

    /*Ethernet controller*/
    {
        .modalias         = "enc28j60",
        .controller_data    = (void*)GPIO_PIN_PB(3),
        .mode             = SPI_MODE_0,
        .irq            = (GPIO_PIN_PB(25) + GPIO_IRQ_BASE),
        .max_speed_hz        = 20000000,
        .chip_select        = 1,   
    },
};

At runtime, I load the module via modprobe, and there are no errors 
written to the kernel log when the driver loads.  However, the behavior 
of the driver is sporadic, and the embedded system often becomes 
unresponsive when:

(1) I plug in a cross-wired Ethernet cable;
(2) I run dropbear on the embedded system and try to SSH into the 
embedded system via telnet

In the case of dropbear, when I try to SSH, the dropbear version is 
sometimes displayed on the host system's telnet terminal, but the prompt 
never appears. 

I have noticed that the current consumption of the ENC28J60 chip goes up 
(and remains up) when the kernel becomes unresponsive.  The lights on 
the Ethernet connector continue to blink.  This leads me to think that 
something is happening in a loop, and never exits from the loop.

Sometimes, I cannot ping the embedded system from the host.  The ping is 
sporadic; sometimes it works, and sometimes it does not.

I am not certain if this is a problem related to improper setup of the 
spi_board_info struct, or whether I have to change some setting using 
ethtool.  I've tried to use ethtool to change the duplex from full to 
half, but the unresponsive behavior still continues.  I've tried to 
Google for a solution to this, but I can't seem to find any setup code 
for the spi_board_info struct, or any setup information on how to use 
the ENC28J60 driver.

I searched this mailing list, and I've found some patches that have been 
submitted regarding kernel oops and problems with the ENC28J60 driver 
after entering and exiting the low power mode.

I pulled the latest version of the mainstream kernel from the kernel 
tree, but comparing the 2.6.27.6.atmel.1 version of the ENC28J60 driver 
with the version of the ENC28J60 driver in the kernel tree, I do not see 
some of the most recent patches.

Where could I download the most up-to-date version of the ENC28J60 
driver (including the patches on the mailing list)?  Could trying a 
newer version of the driver help?  Or do I need to adjust my settings 
via Ethtool?

Does the configuration of the LEDs of the ENC28J60 affect the driver 
operation?  Would I have to physically change my hardware to use the 
ENC28J60 driver?


Nicholas Kinar
n.kinar@usask.ca









             reply	other threads:[~2009-03-06 16:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-06 16:17 Nicholas Kinar [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-03-06 16:23 ENC28J60 driver causes kernel to be unresponsive Nicholas Kinar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49B14CA9.2000400@usask.ca \
    --to=n.kinar@usask.ca \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).