mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Subject: e1000 driver hangs during probe
Date: Thu, 9 Mar 2017 22:18:08 +0100	[thread overview]
Message-ID: <20170309211808.w6jazqlbrlfigl2r@pengutronix.de> (raw)

Hello,

I work with an i.MX6 based hardware that has an i210 pcie device with
barebox 2016.11.0 (but there didn't happen anything relevant since them
if I'm not mistaken). When enabling all necessary things to make the
e1000 bind, the driver seems to hang. The problem is the following code
in e1000_get_hw_eeprom_semaphore():

        /* Get the FW semaphore. */
        timeout = hw->eeprom.word_size + 1;
        while (timeout) {
                swsm = e1000_read_reg(hw, E1000_SWSM);
                swsm |= E1000_SWSM_SWESMBI;
                e1000_write_reg(hw, E1000_SWSM, swsm);
                /* if we managed to set the bit we got the semaphore. */
                swsm = e1000_read_reg(hw, E1000_SWSM);
                if (swsm & E1000_SWSM_SWESMBI)
                        break;

                udelay(50);
                timeout--;
        }

together with the fact that hw->eeprom.word_size is either 0x200000 or
0x400000. (I saw both values already in three runs) This value is setup
in e1000_init_eeprom_params() in the hw->mac_type == e1000_igb case.

When waiting log enough the code finally terminates with a failure.

In my case there is an 8Mb-Flash equipped on NVM_* that isn't programmed
yet. (M25PE80, Page size: 256 bytes, Subsector erase: 4KB, Sector erase: 64KB,
Bulk erase: 8Mb)

Is someone able to shed some light on where the problem is?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2017-03-09 21:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-09 21:18 Uwe Kleine-König [this message]
2017-03-10  4:04 ` Andrey Smirnov
2017-03-10  9:10   ` Uwe Kleine-König
2017-03-10  9:13     ` Uwe Kleine-König
2017-03-10  9:20     ` Lucas Stach
2017-03-10 13:09       ` Andrey Smirnov

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=20170309211808.w6jazqlbrlfigl2r@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.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