Skip to content

FIQ interrupt not triggering IRQ interrupt causing USB to dropout #151

Closed

Description

@gholling

This is the ethernet drop out many people are seeing when running their boxes for extended periods...

To test this wait until it drops out and then do:

sudo -s
echo 08 > /sys/devices/platform/bcm2708_usb/regoffset
cat /sys/devices/platform/bcm2708_usb/regvalue

I expect the value to be 0x00000031

If the value is 0x00000030 then do this:

echo 0x31 > /sys/devices/platform/bcm2708_usb/regvalue

If this fixes the ethernet it will be very useful to know...

Activity

  1. tgghtp commented on Nov 5, 2012

    @tgghtp

    it fixes,

    a test script found elsewhere, modified, running every minute from cron:

    #--------------------------------------------------
    #!/bin/sh
    # cron script for checking wlan connectivity
    IP_FOR_TEST="a.b.c.d"
    PING_COUNT=1
    PING="/bin/ping"
    INTERFACE="eth0"
    FFLAG="/opt/check_lan/stuck.fflg"
    # ping test
    $PING -c $PING_COUNT $IP_FOR_TEST > /dev/null 2> /dev/null
    if [ $? -ge 1 ]
    then
        logger "check_lan: $INTERFACE is down"
    touch $FFLAG
    date >> $FFLAG
    echo 08 > /sys/devices/platform/bcm2708_usb/regoffset
    cat /sys/devices/platform/bcm2708_usb/regvalue >> $FFLAG
    echo 0x31 > /sys/devices/platform/bcm2708_usb/regvalue
    cat /sys/devices/platform/bcm2708_usb/regvalue >> $FFLAG
    else
        logger "check_lan: $INTERFACE is up"
    #    rm -f $FFLAG 2>/dev/null
    fi
    #---------------------------------------------------------------
    

    the resulting file:

    root@raspberrypi:~# cat /opt/check_lan/stuck.fflg
    Mo 5. Nov 06:58:11 CET 2012
    Reg@0x000008 = 0x00000030
    Reg@0x000008 = 0x00000031
    Mo 5. Nov 08:42:01 CET 2012
    Reg@0x000008 = 0x00000030
    Reg@0x000008 = 0x00000031
    Mo 5. Nov 09:21:11 CET 2012
    Reg@0x000008 = 0x00000030
    Reg@0x000008 = 0x00000031
    Mo 5. Nov 09:57:11 CET 2012
    Reg@0x000008 = 0x00000030
    Reg@0x000008 = 0x00000031
    Mo 5. Nov 10:24:11 CET 2012
    Reg@0x000008 = 0x00000030
    Reg@0x000008 = 0x00000031
    Mo 5. Nov 11:35:04 CET 2012
    Reg@0x000008 = 0x00000030
    Reg@0x000008 = 0x00000031
    

    parts from syslog:

    Nov  5 11:34:01 raspberrypi logger: check_lan: eth0 is up
    Nov  5 11:34:10 ..................
    Nov  5 11:34:20 raspberrypi kernel: [75050.559308] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
    Nov  5 11:34:25 raspberrypi kernel: [75055.559353] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
    Nov  5 11:34:30 raspberrypi kernel: [75060.559384] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
    Nov  5 11:34:35 raspberrypi kernel: [75065.559438] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
    Nov  5 11:34:40 raspberrypi kernel: [75070.559486] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
    Nov  5 11:34:45 raspberrypi kernel: [75075.559530] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
    Nov  5 11:34:50 raspberrypi kernel: [75080.559585] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
    Nov  5 11:34:55 raspberrypi kernel: [75085.559620] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
    Nov  5 11:35:01 raspberrypi kernel: [75091.659677] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
    Nov  5 11:35:04 raspberrypi logger: check_lan: eth0 is down
    Nov  5 11:35:04 ............................
    Nov  5 11:35:05 ............................
    Nov  5 11:35:11 ............................
    Nov  5 11:36:01 raspberrypi logger: check_lan: eth0 is up
    Nov  5 11:34:01 raspberrypi logger: check_lan: eth0 is up
    Nov  5 11:34:10 ..................
    Nov  5 11:34:20 raspberrypi kernel: [75050.559308] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
    Nov  5 11:34:25 raspberrypi kernel: [75055.559353] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
    Nov  5 11:34:30 raspberrypi kernel: [75060.559384] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
    Nov  5 11:34:35 raspberrypi kernel: [75065.559438] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
    Nov  5 11:34:40 raspberrypi kernel: [75070.559486] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
    Nov  5 11:34:45 raspberrypi kernel: [75075.559530] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
    Nov  5 11:34:50 raspberrypi kernel: [75080.559585] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
    Nov  5 11:34:55 raspberrypi kernel: [75085.559620] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
    Nov  5 11:35:01 raspberrypi kernel: [75091.659677] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
    Nov  5 11:35:04 raspberrypi logger: check_lan: eth0 is down
    Nov  5 11:35:04 ........................
    Nov  5 11:36:01 raspberrypi logger: check_lan: eth0 is up
    

    hope this helps

  2. ghollingworth commented on Nov 5, 2012

    @ghollingworth

    Can you now update and check again?

    I believe this is now fixed, can you run a long term test and make sure the
    problem has gone away?

    On 5 November 2012 13:25, tgghtp notifications@github.com wrote:

    it fixes,

    a test script running evry minute from cron:

    #--------------------------------------------------
    #!/bin/sh
    cron script for checking wlan connectivity

    IP_FOR_TEST="a.b.c.d"
    PING_COUNT=1

    PING="/bin/ping"

    INTERFACE="eth0"

    FFLAG="/opt/check_lan/stuck.fflg"
    ping test

    $PING -c $PING_COUNT $IP_FOR_TEST > /dev/null 2> /dev/null
    if [ $? -ge 1 ]
    then
    logger "check_lan: $INTERFACE is down"

    touch $FFLAG
    date >> $FFLAG
    echo 08 > /sys/devices/platform/bcm2708_usb/regoffset
    cat /sys/devices/platform/bcm2708_usb/regvalue >> $FFLAG

    echo 0x31 > /sys/devices/platform/bcm2708_usb/regvalue
    cat /sys/devices/platform/bcm2708_usb/regvalue >> $FFLAG

    else
    logger "check_lan: $INTERFACE is up"
    rm -f $FFLAG 2>/dev/null

    fi
    #---------------------------------------------------------------

    the resulting file:

    root@raspberrypi:~# cat /opt/check_lan/stuck.fflg
    Mo 5. Nov 06:58:11 CET 2012
    Reg@0x000008 = 0x00000030
    Reg@0x000008 = 0x00000031
    Mo 5. Nov 08:42:01 CET 2012
    Reg@0x000008 = 0x00000030
    Reg@0x000008 = 0x00000031
    Mo 5. Nov 09:21:11 CET 2012
    Reg@0x000008 = 0x00000030
    Reg@0x000008 = 0x00000031
    Mo 5. Nov 09:57:11 CET 2012
    Reg@0x000008 = 0x00000030
    Reg@0x000008 = 0x00000031
    Mo 5. Nov 10:24:11 CET 2012
    Reg@0x000008 = 0x00000030
    Reg@0x000008 = 0x00000031
    Mo 5. Nov 11:35:04 CET 2012
    Reg@0x000008 = 0x00000030
    Reg@0x000008 = 0x00000031

    parts from syslog:

    Nov 5 11:34:01 raspberrypi logger: check_lan: eth0 is up
    Nov 5 11:34:10 ..................
    Nov 5 11:34:20 raspberrypi kernel: [75050.559308] smsc95xx 1-1.1:1.0:
    eth0: Failed to read register index 0x00000114
    Nov 5 11:34:25 raspberrypi kernel: [75055.559353] smsc95xx 1-1.1:1.0:
    eth0: Failed to write register index 0x00000114
    Nov 5 11:34:30 raspberrypi kernel: [75060.559384] smsc95xx 1-1.1:1.0:
    eth0: Failed to read register index 0x00000114
    Nov 5 11:34:35 raspberrypi kernel: [75065.559438] smsc95xx 1-1.1:1.0:
    eth0: Failed to read register index 0x00000118
    Nov 5 11:34:40 raspberrypi kernel: [75070.559486] smsc95xx 1-1.1:1.0:
    eth0: Failed to read register index 0x00000114
    Nov 5 11:34:45 raspberrypi kernel: [75075.559530] smsc95xx 1-1.1:1.0:
    eth0: Failed to write register index 0x00000114
    Nov 5 11:34:50 raspberrypi kernel: [75080.559585] smsc95xx 1-1.1:1.0:
    eth0: Failed to read register index 0x00000114
    Nov 5 11:34:55 raspberrypi kernel: [75085.559620] smsc95xx 1-1.1:1.0:
    eth0: Failed to read register index 0x00000118
    Nov 5 11:35:01 raspberrypi kernel: [75091.659677] smsc95xx 1-1.1:1.0:
    eth0: Failed to read register index 0x00000114
    Nov 5 11:35:04 raspberrypi logger: check_lan: eth0 is down
    Nov 5 11:35:04 ............................
    Nov 5 11:35:05 ............................
    Nov 5 11:35:11 ............................
    Nov 5 11:36:01 raspberrypi logger: check_lan: eth0 is up

    Nov 5 11:34:01 raspberrypi logger: check_lan: eth0 is up
    Nov 5 11:34:10 ..................
    Nov 5 11:34:20 raspberrypi kernel: [75050.559308] smsc95xx 1-1.1:1.0:
    eth0: Failed to read register index 0x00000114
    Nov 5 11:34:25 raspberrypi kernel: [75055.559353] smsc95xx 1-1.1:1.0:
    eth0: Failed to write register index 0x00000114
    Nov 5 11:34:30 raspberrypi kernel: [75060.559384] smsc95xx 1-1.1:1.0:
    eth0: Failed to read register index 0x00000114
    Nov 5 11:34:35 raspberrypi kernel: [75065.559438] smsc95xx 1-1.1:1.0:
    eth0: Failed to read register index 0x00000118
    Nov 5 11:34:40 raspberrypi kernel: [75070.559486] smsc95xx 1-1.1:1.0:
    eth0: Failed to read register index 0x00000114
    Nov 5 11:34:45 raspberrypi kernel: [75075.559530] smsc95xx 1-1.1:1.0:
    eth0: Failed to write register index 0x00000114
    Nov 5 11:34:50 raspberrypi kernel: [75080.559585] smsc95xx 1-1.1:1.0:
    eth0: Failed to read register index 0x00000114
    Nov 5 11:34:55 raspberrypi kernel: [75085.559620] smsc95xx 1-1.1:1.0:
    eth0: Failed to read register index 0x00000118
    Nov 5 11:35:01 raspberrypi kernel: [75091.659677] smsc95xx 1-1.1:1.0:
    eth0: Failed to read register index 0x00000114
    Nov 5 11:35:04 raspberrypi logger: check_lan: eth0 is down
    Nov 5 11:35:04 ........................
    Nov 5 11:36:01 raspberrypi logger: check_lan: eth0 is up

    hope this helps

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/151#issuecomment-10070210.

  3. tgghtp commented on Nov 6, 2012

    @tgghtp

    Update: from where ?

    root@raspberrypi:~# cat /etc/issue
    Debian GNU/Linux wheezy/sid \n \l
    root@raspberrypi:~# uname -a
    Linux raspberrypi 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l GNU/Linux
    root@raspberrypi:~# apt-get update
    Holen: 1 http://mirrordirector.raspbian.org wheezy InRelease [12,5 kB]
    OK   http://archive.raspberrypi.org wheezy InRelease
    OK   http://archive.raspberrypi.org wheezy/main armhf Packages
    Holen: 2 http://mirrordirector.raspbian.org wheezy/main armhf Packages [7.377 kB]
    Ign http://archive.raspberrypi.org wheezy/main Translation-de_DE
    Ign http://archive.raspberrypi.org wheezy/main Translation-de
    Ign http://archive.raspberrypi.org wheezy/main Translation-en
    Holen: 3 http://mirrordirector.raspbian.org wheezy/contrib armhf Packages [23,3 kB]
    Holen: 4 http://mirrordirector.raspbian.org wheezy/non-free armhf Packages [47,3 kB]
    Holen: 5 http://mirrordirector.raspbian.org wheezy/rpi armhf Packages [14 B]
    Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-de_DE
    Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-de
    Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en
    Ign http://mirrordirector.raspbian.org wheezy/main Translation-de_DE
    Ign http://mirrordirector.raspbian.org wheezy/main Translation-de
    Ign http://mirrordirector.raspbian.org wheezy/main Translation-en
    Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-de_DE
    Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-de
    Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en
    Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-de_DE
    Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-de
    Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en
    Es wurden 7.460 kB in 58 s geholt (128 kB/s).
    Paketlisten werden gelesen... Fertig
    
  4. asb commented on Nov 6, 2012

    @asb

    From the git firmware repo, using e.g. rpi-update.

    On 6 November 2012 16:58, tgghtp notifications@github.com wrote:

    Update: from where ?

    root@raspberrypi:~# cat /etc/issue
    Debian GNU/Linux wheezy/sid \n \l

    root@raspberrypi:~# uname -a
    Linux raspberrypi 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l GNU/Linux

    root@raspberrypi:~# apt-get update
    Holen: 1 http://mirrordirector.raspbian.org wheezy InRelease [12,5 kB]
    OK http://archive.raspberrypi.org wheezy InRelease
    OK http://archive.raspberrypi.org wheezy/main armhf Packages
    Holen: 2 http://mirrordirector.raspbian.org wheezy/main armhf Packages [7.377 kB]
    Ign http://archive.raspberrypi.org wheezy/main Translation-de_DE
    Ign http://archive.raspberrypi.org wheezy/main Translation-de
    Ign http://archive.raspberrypi.org wheezy/main Translation-en
    Holen: 3 http://mirrordirector.raspbian.org wheezy/contrib armhf Packages [23,3 kB]
    Holen: 4 http://mirrordirector.raspbian.org wheezy/non-free armhf Packages [47,3 kB]
    Holen: 5 http://mirrordirector.raspbian.org wheezy/rpi armhf Packages [14 B]
    Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-de_DE
    Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-de
    Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en
    Ign http://mirrordirector.raspbian.org wheezy/main Translation-de_DE
    Ign http://mirrordirector.raspbian.org wheezy/main Translation-de
    Ign http://mirrordirector.raspbian.org wheezy/main Translation-en
    Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-de_DE
    Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-de
    Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en
    Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-de_DE
    Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-de
    Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en
    Es wurden 7.460 kB in 58 s geholt (128 kB/s).
    Paketlisten werden gelesen... Fertig

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/151#issuecomment-10118176.

  5. ghollingworth commented on Nov 7, 2012

    @ghollingworth

    This seems to work as expected and fixes the ethernet dropping out problem

  6. RussNelson commented on Feb 7, 2013

    @RussNelson
    Contributor

    This is a good fix for me, too. Any idea when this is going to get into the Raspbian distribution? Or should I just bite the bullet and start using rpi-update?

  7. licaon-kter commented on Feb 7, 2013

    @licaon-kter

    Just wait for it to update in 1 or 2 months? :D Oh, come on,gogogo https://github.com/Hexxeh/rpi-update

  8. popcornmix commented on Feb 8, 2013

    @popcornmix
    Collaborator

    I think apt-get will be updated to current rpi-update in the next few days.

  9. Fabio72 commented on Mar 3, 2015

    @Fabio72

    I'm on xbian
    Distribution: XBian 1.0 (knockout)
    Kernel version: Linux 3.18.8+ armv6l
    Firmware: 115f63aa0915cdb5b6dff23822eb16699b72ae8b (4 Feb 2015 21:04:27)

    Sometimes I'm facing system freezes without errors in logs. I don't know it they are system or network/usb freezes.
    I'm getting

    cat /sys/devices/platform/bcm2708_usb/regoffset
    0xffffffff
    cat /sys/devices/platform/bcm2708_usb/regvalue
    invalid offset
    

    I'm trying to fix following this article
    https://raspberrypispot.wordpress.com/2013/07/08/wifi-and-ethernet-dropout-problems-in-raspberry-pi/

    I opened a thread about this problem in
    http://forum.xbian.org/thread-2785-post-27814.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions