Netgear R7800 exploration (IPQ8065, QCA9984)

Well yeah, the point is it requires physical presence.

It`s certainly better than hard freeze as I experienced with the ct drivers (YMMV, since at some point, using various versions/RC of Openwrt, the ct drivers rebooted the router instead of hard freeze, although the reboots were constantly)

I took the opportunity to upgrade to .1 release, same configuration but added irqbalance. Lets see how this fares..been stable a few days now. Its not that of a big deal, but I mean, all the other routers up through the years have been super stable, tomato/DD-wrt/openwrt. Even the R7800 was totally stable with LEDE. But after the ct drivers got added by default in V18, it`s been nothing but problems. (I wasnt aware of there being new «ct» drivers at the time so I thought it was weird that newer releases were so unstable) also, one of my machines needs the ethernet cable replugged to get a new dhcp lease (I will get one of those borked ip adresses when the router reboots).

Yep, a couple of frozes recently. I'm thinking to go back to 18.06 ...

If there is no mandatory requirement for new functionality like WPA3 support, I won't upgrade to 19.07 with production use R7800 at this time.

But also: if nobody tests and works on the new release the stability won't get improved.

Here's a story about my recently acquired used R7800. The device had been
unable to boot any firmware images, but through some serious hacking I figured
out why and fixed it. :smiley:

I learned a number of things along the way and am leaving my story and tips
here to be resourceful for anyone that may benefit from it.

Table of Contents

  • Background
  • Story
  • debug_ll kernel
  • Kernel Load Address (kla) Modification

Background

I'm the same Bazz that got the Netgear WNR2000v4 Board Support Package (BSP)
working properly in OpenWrt following the work of franz.flasch and
bukington.
https://patchwork.ozlabs.org/project/openwrt/list/?submitter=66219&state=*

I'm happy to say 5 years later that code is still alive in the OpenWrt
kernel codebase, and it happened to have inspired work from others.
https://forum.archive.openwrt.org/viewtopic.php?id=65576

Story

Upon receiving my device upgrade, the R7800, I was surprised to see that it
had been shipped in only its bare item packaging, with no additional padding or
boxes to help protect it. Besides the promotional packaging, this was it:

Well, with the power on, the unit would exhibit only a steady amber power
light (after all the LEDS flashed once). No SSID. No ping over ethernet at the
default gateway address. It was time to try factory reset.

So while the unit was powered on, I tried holding down the factory reset button
on the back for awhile, expecting a reset, but nothing happened. Then I
learned about holding that button down before powering up, continuing to hold
while the button blinks amber, and letting go after it blinks white. This is
TFTP recovery mode.

I tried uploading stock firmware images from Netgear's site
https://www.netgear.com/support/product/R7800.aspx#download as well as
firmware from hnyman and Kong, but they all had the same problem on my
device: when the device rebooted, it once again produced a steady amber
light(kernel not booting), and Occasionally the device would suddenly
soft-reboot itself (boot loop). But the fact that I could enter TFTP
recovery mode was certainly hopeful. Let's do serial connection!

So it was time to get serial hooked up. The picture that is shown on OpenWrt's toh
(https://openwrt.org/toh/netgear/r7800) of how to open the device is
kinda intimidating, but that's OK. I've been down this road before,
it's easier than it looks. You just gotta get started, then it'll work
itself out. Honestly the most frustrating part of opening the damned thing is the very
last step, where you need to somehow "unhinge" the back. Unhinge is really
not the right word for it. It's more like, gently have a struggle until
somehow you do the right thing. I'm sure the modders who come ahead of us
would like a better guidance on that step. I can't explain it lol.

So happy that the pin headers were already on the board. That is love.

Ah time to find my Arduino Uno, which I find so convenient for 3.3v serial
despite it being 5v. Short the reset pin to GND and wham! Good to go.

screen /dev/ttyACM0 115200

That did the trick. Yay, and it's my ol' friend U-Boot. Love this
guy, he always comes to teh rescue. <3

I dive into the help and learn all I can from my env. I've posted my U-boot env
along with various other u-boot printouts near the end of this post.

But here is the bootup sequence at that point in time.


U-Boot 2012.07 [local,local] (Sep 03 2015 - 17:33:28)

  U-boot 2012.07 dni1 V0.4 for DNI HW ID: 29764958 NOR flash 0MB; NAND flash 128MB; RAM 512MB; 1st Radio 4x4; 2nd Radio 4x4; Cascade
  smem ram ptable found: ver: 0 len: 5
  DRAM:  491 MiB
  NAND:  SF: Unsupported manufacturer 00
  ipq_spi: SPI Flash not found (bus/cs/speed/mode) = (0/0/48000000/0)
  128 MiB
  MMC:   
  *** Warning - bad CRC, using default environment

  PCI0 Link Intialized
  PCI1 Link Intialized
  In:    serial
  Out:   serial
  Err:   serial
  131072 bytes read: OK
  MMC Device 0 not found
  cdp: get part failed for 0:HLOS
  Net:   MAC1 addr:3c:37:xx:xx:xx:xx
  athrs17_reg_init: complete
  athrs17_vlan_config ...done
  S17c init  done
  MAC2 addr:3c:37:xx:xx:xx:xx
  eth0, eth1
  Hit any key to stop autoboot:  0 

  Client starts...[Listening] for ADVERTISE...TTT
  Retry count exceeded; boot the image as usual

  nmrp server is stopped or failed !

  Loading from device 0: nand0 (offset 0x1480000)

  ** check kernel image **
  Verifying Checksum ... OK

  ** check rootfs image **
  Verifying Checksum ... OK
  MMC Device 0 not found

  Loading from nand0, offset 0x1480000
  Image Name:   Linux-3.4.103
  Image Type:   ARM Linux Kernel Image (uncompressed)
  Data Size:    2157608 Bytes = 2.1 MiB
  Load Address: 41508000
  Entry Point:  41508000
  Automatic boot of image at addr 0x44000000 ...
  Image Name:   Linux-3.4.103
  Image Type:   ARM Linux Kernel Image (uncompressed)
  Data Size:    2157608 Bytes = 2.1 MiB
  Load Address: 41508000
  Entry Point:  41508000
  Verifying Checksum ... OK
  Loading Kernel Image ... OK
  OK
  mtdparts variable not set, see 'help mtdparts'
  no partitions defined

  defaults:
mtdids  : nand0=msm_nand
mtdparts: none
info: "mtdparts" not set
Using machid 0x136c from environment

Starting kernel ...

It's nice to see more into what was happening, I was so glad for the boot
logs that others have posted. If it wasn't for you, I wouldn't have known
that some of those scary error messages are normal and have nothing to do
with the problem I was trying to solve!

I will prevent the story from becoming tirefully long, but I gotta tell
you about this one moment. After a certain tedious set of experiments, I
hit a point where the tty, at boot time, seemed like the usual kernel
hang, but after a few seconds, the power light turned white and was
blinking
faster than usual!! Unfortunately, a few seconds later it would soft reboot.
But I remember it was a very exciting moment for me in this journey.

So anyways, this serial was giving more info. I could now see I was stuck
at an inconclusive "Starting Kernel ..." message.

I uncovered the problem by compiling an OpenWrt RAM image with
debug_ll enabled. I provide plenty of info on making one of these later in
this post.

At this point, it's important to note that the stock
Netgear U-boot env bootargs` have a tty setting that will prevent output on
OpenWrt firmware. In order to make serial output visible, the bootargs
"console" setting must be cleared.

Original bootargs:

bootargs=console=ttyHSL1,115200n8

To clear bootargs:

setenv bootargs 

To make that permanent across reboots:

saveenv

Once I realized tty output, I got a big hint from Linux on what was
failing:

Starting kernel ...
Uncompressing Linux...

XZ-compressed data is corrupt

-- System halted

This confirmed that the system was able to get past the bootloader stage
and into the beginning of kernel execution. That gave me a lot of hope
that I could restore full functionality to the device. The kernel
decompression (which is done "in-place" / on top of itself) was failing
crc32 check. Therefore, I concluded that a portion of RAM at the
decompression location was faulty.

Here are the default RAM locations that kernels get loaded to:

  • OpenWrt: 0x42208000
  • Netgear: 0x41508000

From these locations, the kernel is decompressed. From the images I built,
I noticed the kernel alone (vmlinux) was about 8MB uncompressed. So
techincally speaking, the problem likely occurs in ~8MB window from those
starting addresses. But, just to steer clear of any further headaches, I
decided not to interrogate the area and simply avoid using it.

Getting back to the story; Of course I had no guarantees that higher RAM
was not also damaged, but I knew the next step was to try to
run a kernel from a higher location. If I could succeed in doing that, I
would be home free.

So, I customized my kernel to boot from an elevated address to bypass the
problematic RAM area. It's been running well for 5 days now. (success!)

This wasn't so easily done, though. I underwent other trials and
tribulations, but that's enough story time. From here on out, I just want
to leave helpful stuff.

To make everything automatic, I had to modify my bootcmd U-boot
environment variable. I ran the following from u-boot:

setenv bootcmd 'sleep 2; nmrp; if loadn_dniimg 0 0x1480000 0x55000000 && chk_dniimg 0x55000000; then bootm 0x55000000; else fw_recovery; fi'

Notice that I'm using bootm. I had worked so hard to get everything working right
without using "bootipq2" that I was scared to even try it, lol. I don't think
I'm missing anything from it, though.

From here on out, I'd like to share various information that I have
accumulated from this journey.

debug_ll kernel

Compiling a kernel with debug_ll enabled is useful when you can't debug
the system directly (eg JTAG) and need a way to diagnose an early boot
issue that is perhaps kernel related. debug_ll will allow you to further
deduce how far the kernel has executed, and provide more helpful verbose
debug messages. Build one for R7800 as follows:

Here are the OpenWrt menuconfig items:

Global Build Settings ->
  Kernel Build Options ->
    Enable Support for printk
    Compile the kernel with early printk (NEW)    

Here is a diffconfig made with scripts/diffconfig.sh. I also specified
to not suppress preinit and init stderr messages.

CONFIG_TARGET_ipq806x=y
CONFIG_TARGET_ipq806x_generic=y
CONFIG_TARGET_ipq806x_generic_DEVICE_netgear_r7800=y
CONFIG_DEVEL=y
CONFIG_IMAGEOPT=y
CONFIG_INITOPT=y
CONFIG_KERNEL_DEBUG_LL=y
CONFIG_KERNEL_DEBUG_LL_UART_NONE=y
CONFIG_KERNEL_EARLY_PRINTK=y
CONFIG_PREINITOPT=y
# CONFIG_TARGET_INIT_SUPPRESS_STDERR is not set
# CONFIG_TARGET_PREINIT_SUPPRESS_STDERR is not set

You may incorporate these settings to your .config file as guided in
https://openwrt.org/docs/guide-developer/build-system/use-buildsystem#using_diff_file

cat diffconfig >> .config   # append changes to bottom of .config
make defconfig   # apply changes

Now let's talk about the build stage. the debug_ll setting will cause
OpenWrt to require some info from you during the kernel config stage. You
have a couple ways to handle this.

One way is to build with make V=s. Doing a regular make will not
provide the results we are after. I can't quite recall what
happens, either the build will fail, or the default debug uart settings
will get selected, and we don't want those. We need the custom r7800
values. With make V=s, we will be able to do the user interaction when
the kernel config stage occurs.

The other way is doing a kernel config, seperate from the higher level
openwrt config. The benefit to doing this is you won't have to input the
same values every time in the middle of building a kernel. So if you are
doing a lot of testing, I would recommend this.

First I'll detail the user-interaction stage, as this will answer a lot on
what to do for both methods.

Eventually the build will stop to ask you to fill in some questions. Here
are the prompts along with the answers needed for R7800:

Some of these will get filled in automatically.

Kernel low-level debugging functions (read help!) (DEBUG_LL) [Y/n/?] y
Kernel low-level debugging port
> 1. Kernel low-level debugging messages via QCOM UARTDM
(DEBUG_QCOM_UARTDM) (NEW)
2. Kernel low-level debugging via EmbeddedICE DCC channel
(DEBUG_ICEDCC)
3. Kernel low-level debug output via semihosting I/O
(DEBUG_SEMIHOSTING)
4. Kernel low-level debugging via 8250 UART (DEBUG_LL_UART_8250)
5. Kernel low-level debugging via ARM Ltd PL01x Primecell UART
(DEBUG_LL_UART_PL01X)
choice[1-5]: 1
Physical base address of debug UART (DEBUG_UART_PHYS) [0xf991e000]
(NEW) 0x16340000
Virtual base address of debug UART (DEBUG_UART_VIRT) [0xfa71e000]
(NEW) [doesn't matter; you can hit enter here]

So you select 1, the QCOM UARTDM, followed by specifying physical base
address 0x16340000.

You might be wondering from where could you have deduced 0x16340000? It
can be found in the r7800 dts file,
target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8065-r7800.dts:207

 serial@16340000 {

Now, the virtual address is absolutely irrelevant since our
platform does not call iotable_init() (in which case we would get the
virtual address from the table provided to the call). This knowledge was
discovered from:
https://community.arm.com/developer/ip-products/processors/f/classic-processors-forum/8962/how-to-specify-virtual-address-for-pl011-uart-in-linux-kernel
https://lists.openwrt.org/pipermail/openwrt-devel/2016-August/002173.html

Now that you understand fully about these settings, I will show how to
make them permanent.

make kernel_menuconfig CONFIG_TARGET=subtarget

Kernel Hacking ->
  [*] Kernel low-level debugging functions (read help!)

Once you enable this, it'll open up the menus to apply the rest of the
settings that have already been discussed.

Kernel Load Address (kla) Modification

For ipq806x, the kernel load address (kla) must be synced between two
different files. This is due to a certain OpenWrt Linux patch,
target/linux/ipq806x/patches-4.14/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch.
Actually, the write-up in that patch file is a good one. In reference to its
comments, I'll add in my own words that although r7800 supports Device Tree
(DT), since the patch changes zreladdr forcefully to also provide support for
older devices using ATAGS, the kernel will listen to the patch's setting even
for DT supported devices, ignoring their reserved mem settings located within.
This zreladdr setting affects where kernel is decompressed to (kernel xz sorta
decompresses upon itself).

Here is my patch that you can learn from.

diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile
index e1eb090de3..c0504135da 100644
--- a/target/linux/ipq806x/image/Makefile
+++ b/target/linux/ipq806x/image/Makefile
@@ -15,7 +15,7 @@ define Device/Default
 	KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
 	KERNEL_INITRAMFS_PREFIX := $$(IMG_PREFIX)-$(1)-initramfs
 	KERNEL_PREFIX := $$(IMAGE_PREFIX)
-	KERNEL_LOADADDR = 0x42208000
+	KERNEL_LOADADDR = 0x43208000
 	SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
 	IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata
 	IMAGE/sysupgrade.bin/squashfs :=
diff --git a/target/linux/ipq806x/patches-4.14/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch b/target/linux/ipq806x/patches-4.14/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch
index f810f6ac46..a503a1c898 100644
--- a/target/linux/ipq806x/patches-4.14/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch
+++ b/target/linux/ipq806x/patches-4.14/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch
@@ -59,4 +59,4 @@ Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>
 --- /dev/null
 +++ b/arch/arm/mach-qcom/Makefile.boot
 @@ -0,0 +1 @@
-+zreladdr-y+= 0x42208000
++zreladdr-y+= 0x43208000

SO YES!! I HAVE DONE IT!!!

10 Likes

This is the continuation of my last post.

Table of Contents

  • 19.07 Kernel Boot Log
  • U-boot printouts
  • atftp commands
  • Links
  • Extranneous Notes
    • mtest
    • U-boot USB

19.07 Kernel Boot Log

http://dpaste.com/2B3E5WQ

U-boot printouts

Hit any key to stop autoboot:  0 
(IPQ) # ?
?       - alias for 'help'
ar8xxx_dump- Dump ar8xxx registers
base    - print or set address offset
board_hw_id_set- Set board_hw_id
board_hw_id_show- Show board_hw_id
board_model_id_set- Set board_model_id
board_model_id_show- Show board_model_id
board_parameters_set- Set WPS PIN code, Serial number, SSID, Passphrase, MAC address
board_parameters_show- Show WPS PIN code, Serial number, SSID, Passphrase, MAC address.
board_passphrase_set- Set passphrase on board
board_passphrase_show- Show board_passphrase
board_ssid_set- Set ssid on board
board_ssid_show- Show board_ssid
bootipq - bootipq from flash device
bootipq2- bootipq2 from flash device
bootm   - boot application image from memory
bootp   - boot image via network using BOOTP/TFTP protocol
bootz   - boot Linux zImage image from memory
button_test- Test buttons
chk_dniimg- check integrity of dni firmware image.
chpart  - change active partition
cmp     - memory compare
cp      - memory copy
crc32   - checksum calculation
dhcp    - boot image via network using DHCP/TFTP protocol
echo    - echo args to console
env     - environment handling commands
ethspeed- Force ethernet speed to 10/100/autoneg
exit    - exit script
false   - do nothing, unsuccessfully
fdt     - flattened device tree utility commands
fw_recovery- start tftp server to recovery dni firmware image.
go      - start application at address 'addr'
help    - print command description/usage
i2c     - I2C sub-system
iminfo  - print header information for application image
imxtract- extract a part of a multi-image
ipq_nand- Switch between SBL and Linux kernel page layout.
ledctl  - Test LEDs
loadn_dniimg- load dni firmware image from NAND.
loop    - infinite loop on address range
macset  - Set ethernet MAC address
macshow - Show ethernet MAC addresses
md      - memory display
mii     - MII utility commands
mm      - memory modify (auto-incrementing address)
mmc     - MMC sub system
mmcinfo - display MMC info
mtdparts- define flash/nand partitions
mtest   - simple RAM read/write test
mw      - memory write (fill)
nand    - NAND sub-system
nboot   - boot from NAND device
nm      - memory modify (constant address)
nmrp    - start nmrp mechanism to upgrade firmware-image or string-table.
pci     - list and access PCI Configuration Space
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
reset   - Perform RESET of the CPU
rnset   - set region number
rnshow  - Show Region Number on Board
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv  - set environment variables
sf      - SPI flash sub-system
showvar - print local hushshell variables
sleep   - delay execution for some time
smeminfo- print SMEM FLASH information
snset   - Set serial number
source  - run script from memory
test    - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
true    - do nothing, successfully
ubi     - ubi commands
usb     - USB sub-system
usbboot - boot from USB device
version - print monitor, compiler and linker version
wpspinset- Set wpspin number

NOTE! This is my "stock" netgear env. Now, the bootargs are cleared and
the bootcmd has been updated according to my story

(IPQ) # printenv
baudrate=115200
bootargs=console=ttyHSL1,115200n8
bootcmd=sleep 2;   nmrp;  if loadn_dniimg 0 0x1480000 0x44000000 && chk_dniimg 0x44000000; then bootipq2; else fw_recovery; fi
bootdelay=2
eth1addr=3c:37:xx:xx:xx:xx
ethact=eth0
ethaddr=3c:37:xx:xx:xx:xx
ipaddr=192.168.1.1
loadaddr=0x42000000
machid=136c
modelid=R7800
mtdids=nand0=msm_nand
serverip=192.168.1.10
stderr=serial
stdin=serial
stdout=serial
updateloader=ipq_nand linux && nand erase 0x01180000 0x00080000 && imgaddr=0x42000000 && source $imgaddr:script

Environment size: 549/262140 bytes
(IPQ) # board_ssid_show
131072 bytes read: OK
board_ssid : NETGEAR75
(IPQ) # board_hw_id_show
131072 bytes read: OK
board_hw_id : 29764958+0+128+512+4x4+4x4+cascade
(IPQ) # board_model_id_show
131072 bytes read: OK
board_model_id : R7800
(IPQ) # board_parameters_show
131072 bytes read: OK
WPSPIN code: xxxxxxxxx
Serial Number: xxxxxxxx
SSID: NETGEAR75
PASSPHRASE: blackonion980
lan mac: 3c:37:xx:xx:xx:xx
wan mac: 3c:37:xx:xx:xx:xx
wlan5g mac: 3c:37:xx:xx:xx:xx
(IPQ) # showvar
HUSH_VERSION=0.01
(IPQ) # smeminfo
flash_type:             0x2
flash_index:            0x0
flash_chip_select:      0x0
flash_block_size:       0x20000
partition table offset 0x0
No.: Name             Attributes            Start             Size
0: 0:SBL1           0x0000ffff              0x0          0x40000
1: 0:MIBIB          0x0000ffff          0x40000         0x140000
2: 0:SBL2           0x0000ffff         0x180000         0x140000
3: 0:SBL3           0x0000ffff         0x2c0000         0x280000
4: 0:DDRCONFIG      0x0000ffff         0x540000         0x120000
5: 0:SSD            0x0000ffff         0x660000         0x120000
6: 0:TZ             0x0000ffff         0x780000         0x280000
7: 0:RPM            0x0000ffff         0xa00000         0x280000
8: 0:APPSBL         0x0000ffff         0xc80000         0x500000
9: 0:APPSBLENV      0x0000ffff        0x1180000          0x80000
10: 0:ART            0x0000ffff        0x1200000         0x140000
11: rootfs           0x0000ffff        0x1340000        0x4000000
(IPQ) # nand bad

Device 0 bad blocks:
Bad eraseblock 759 at 0x05ee0000
(IPQ) # version

U-Boot 2012.07 [local,local] (Sep 03 2015 - 17:33:28)
arm-openwrt-linux-uclibcgnueabi-gcc (Linaro GCC 4.6-2012.02) 4.6.3 20120201 (prerelease)
GNU ld (GNU Binutils) 2.22
(IPQ) # pci
Scanning PCI devices on bus 0
BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
_____________________________________________________________
00.00.00   0x17cb     0x0101     Does not fit any class  0x00
00.01.00   0x17cb     0x0101     Does not fit any class  0x00
00.02.00   0x17cb     0x0101     Does not fit any class  0x00
00.03.00   0x17cb     0x0101     Does not fit any class  0x00
00.04.00   0x17cb     0x0101     Does not fit any class  0x00
00.05.00   0x17cb     0x0101     Does not fit any class  0x00
00.06.00   0x17cb     0x0101     Does not fit any class  0x00
00.07.00   0x17cb     0x0101     Does not fit any class  0x00
00.08.00   0x17cb     0x0101     Does not fit any class  0x00
00.09.00   0x17cb     0x0101     Does not fit any class  0x00
00.0a.00   0x17cb     0x0101     Does not fit any class  0x00
00.0b.00   0x17cb     0x0101     Does not fit any class  0x00
00.0c.00   0x17cb     0x0101     Does not fit any class  0x00
00.0d.00   0x17cb     0x0101     Does not fit any class  0x00
00.0e.00   0x17cb     0x0101     Does not fit any class  0x00
00.0f.00   0x17cb     0x0101     Does not fit any class  0x00
00.10.00   0x17cb     0x0101     Does not fit any class  0x00
00.11.00   0x17cb     0x0101     Does not fit any class  0x00
00.12.00   0x17cb     0x0101     Does not fit any class  0x00
00.13.00   0x17cb     0x0101     Does not fit any class  0x00
00.14.00   0x17cb     0x0101     Does not fit any class  0x00
00.15.00   0x17cb     0x0101     Does not fit any class  0x00
00.16.00   0x17cb     0x0101     Does not fit any class  0x00
00.17.00   0x17cb     0x0101     Does not fit any class  0x00
00.18.00   0x17cb     0x0101     Does not fit any class  0x00
00.19.00   0x17cb     0x0101     Does not fit any class  0x00
00.1a.00   0x17cb     0x0101     Does not fit any class  0x00
00.1b.00   0x17cb     0x0101     Does not fit any class  0x00
00.1c.00   0x17cb     0x0101     Does not fit any class  0x00
00.1d.00   0x17cb     0x0101     Does not fit any class  0x00
00.1e.00   0x17cb     0x0101     Does not fit any class  0x00
00.1f.00   0x17cb     0x0101     Does not fit any class  0x00
(IPQ) # i2c probe
Valid chip addresses: 51 52
(IPQ) # rnshow
131072 bytes read: OK
region on board: 0x0001

atftp commands

These commands will only be successful after you can ping the router
over ethernet. Here is how I prepare my eth interface on Gentoo.

/etc/init.d/net.eth0 stop # Make sure dhcp is off
ifconfig eth0 up
ifconfig eth0 192.168.1.10
ping -c3 192.168.1.1

If I did the static assignment while the eth0 DHCP service was running,
I would't be able to ping the router.

Use the following to upload images to TFTP Recovery

atftp 192.168.1.1
mode octet
put [your-image]

Before using tftpboot over serial, I have a world-writeable directory
/tftpboot. mkdir /tftpboot; chmod 777 !$

Start server:

atftpd --tftpd-timeout 300 --retry-timeout 5 --port=69 --maxthread 100 \
--verbose=5 /tftpboot --daemon --no-fork

Links

Most links are interspersed in the writing. But here are links I had no use for
the article but may be helpful to you.

Netgear GPL source for R7800
https://kb.netgear.com/2649/NETGEAR-Open-Source-Code-for-Programmers-GPL

Extranneous Notes

mtest

There is a memory test command available in U-boot
called mtest. I tried it early on, before I had a great idea of where
the problem area was. IIRC, I ran an mtest 0x42000000 for about 7 hours
yielding no error reports. I have heard it is a slow command. It's also
worth noting that there are other parameters to tweak it. Since we now
know the kernel decompression error ocurred on OpenWrt somewhere at approx.
0x42208000 - 0x43208000, I wonder how long it should have taken for
mtest to find that error from the start address I provided (0x42000000).
Unfortunately, since the device is now in full operation, there is no need
to further study and understand r7800's mtest. It might be an option if
you are having RAM troubles.

U-boot USB

Sidenote: I don't believe that the r7800 bootloader actually supports USB
firmware loading, although the commands are there. after a usb start, my usb
3.0 thumb drive formatted FAT32 was not detected as a mass storage device,
and that ended that. I wonder if it's possible? The device should be
detected as mass storage based on its device driver, irrespesctive of the
partition formats... I also tried an older usb 2.0 thumb drive that also
was not successful.

13 Likes

Dear God, what a post!.
:clap: :clap: :clap: :clap: :clap: :clap: :clap:

1 Like

BTW, i had some problems with my PLCs and they were the culprits of the freezes. So 19.07 with candelatech ct-htt firmware still good enough.

I’ve found all “stability” issues were actually client side problems, not openwrt firmware or r7800 problems. I’ve had no issues running the master build after getting a couple bad clients off my network (all older hardware that it was time to let go).

I've noticed there might be a bug with txpower. Setting it to 0 that is supposed to be the lowest power results in full throttle power instead.

  • Can somebody test it on the different platform?
  • Is it firmware, kmod or hostapd dependent?

So far tested only with 5GHz radio.

Edit: apparently there is already a patch by @greearb submitted to fix that:
https://www.spinics.net/lists/linux-wireless/msg193586.html

Whoops. So the 19.07.1 release rebooted after a few days as well, which was the case with 19.07.0 too. (both with non-ct drivers). I guess I can probably live with that for the time being, since they don't hard lock.

I think you need a master build with kernel 4.19 which fixes the large packet crashes, though I had one restart with it too.

1 Like

I need someone that gives me output of this command with a usb 3.0 device connected and mounted.
(pls make sure that the device is usb 3.0 running in SuperSpeed mode)

cat /sys/kernel/debug/*dwc3*/regdump

Here you go - with a USB 3.0 SuperSpeed flash drive connected to USB 1 (and nothing to USB 2).

cat /sys/kernel/debug/10000000.dwc3/regdump
GSBUSCFG0 = 0x2222000e
GSBUSCFG1 = 0x00001700
GTXTHRCFG = 0x00000000
GRXTHRCFG = 0x00000000
GCTL = 0x00101401
GEVTEN = 0x00000000
GSTS = 0x3e800002
GUCTL1 = 0x00000000
GSNPSID = 0x5533230a
GGPIO = 0x00000000
GUID = 0x00040ea7
GUCTL = 0x0c808010
GBUSERRADDR0 = 0x00000000
GBUSERRADDR1 = 0x00000000
GPRTBIMAP0 = 0x00000000
GPRTBIMAP1 = 0x00000000
GHWPARAMS0 = 0x4020400a
GHWPARAMS1 = 0x01614938
GHWPARAMS2 = 0x12220a33
GHWPARAMS3 = 0x10420085
GHWPARAMS4 = 0x4882200c
GHWPARAMS5 = 0x04202088
GHWPARAMS6 = 0x065c0c20
GHWPARAMS7 = 0x03080cea
GDBGFIFOSPACE = 0x00820000
GDBGLTSSM = 0x01570442
GPRTBIMAP_HS0 = 0x00000000
GPRTBIMAP_HS1 = 0x00000000
GPRTBIMAP_FS0 = 0x00000000
GPRTBIMAP_FS1 = 0x00000000
GUSB2PHYCFG(0) = 0x00002540
GUSB2PHYCFG(1) = 0x00000000
GUSB2PHYCFG(2) = 0x00000000
GUSB2PHYCFG(3) = 0x00000000
GUSB2PHYCFG(4) = 0x00000000
GUSB2PHYCFG(5) = 0x00000000
GUSB2PHYCFG(6) = 0x00000000
GUSB2PHYCFG(7) = 0x00000000
GUSB2PHYCFG(8) = 0x00000000
GUSB2PHYCFG(9) = 0x00000000
GUSB2PHYCFG(10) = 0x00000000
GUSB2PHYCFG(11) = 0x00000000
GUSB2PHYCFG(12) = 0x00000000
GUSB2PHYCFG(13) = 0x00000000
GUSB2PHYCFG(14) = 0x00000000
GUSB2PHYCFG(15) = 0x00000000
GUSB2I2CCTL(0) = 0x00000000
GUSB2I2CCTL(1) = 0x00000000
GUSB2I2CCTL(2) = 0x00000000
GUSB2I2CCTL(3) = 0x00000000
GUSB2I2CCTL(4) = 0x00000000
GUSB2I2CCTL(5) = 0x00000000
GUSB2I2CCTL(6) = 0x00000000
GUSB2I2CCTL(7) = 0x00000000
GUSB2I2CCTL(8) = 0x00000000
GUSB2I2CCTL(9) = 0x00000000
GUSB2I2CCTL(10) = 0x00000000
GUSB2I2CCTL(11) = 0x00000000
GUSB2I2CCTL(12) = 0x00000000
GUSB2I2CCTL(13) = 0x00000000
GUSB2I2CCTL(14) = 0x00000000
GUSB2I2CCTL(15) = 0x00000000
GUSB2PHYACC(0) = 0x00000000
GUSB2PHYACC(1) = 0x00000000
GUSB2PHYACC(2) = 0x00000000
GUSB2PHYACC(3) = 0x00000000
GUSB2PHYACC(4) = 0x00000000
GUSB2PHYACC(5) = 0x00000000
GUSB2PHYACC(6) = 0x00000000
GUSB2PHYACC(7) = 0x00000000
GUSB2PHYACC(8) = 0x00000000
GUSB2PHYACC(9) = 0x00000000
GUSB2PHYACC(10) = 0x00000000
GUSB2PHYACC(11) = 0x00000000
GUSB2PHYACC(12) = 0x00000000
GUSB2PHYACC(13) = 0x00000000
GUSB2PHYACC(14) = 0x00000000
GUSB2PHYACC(15) = 0x00000000
GUSB3PIPECTL(0) = 0x030c0003
GUSB3PIPECTL(1) = 0x00000000
GUSB3PIPECTL(2) = 0x00000000
GUSB3PIPECTL(3) = 0x00000000
GUSB3PIPECTL(4) = 0x00000000
GUSB3PIPECTL(5) = 0x00000000
GUSB3PIPECTL(6) = 0x00000000
GUSB3PIPECTL(7) = 0x00000000
GUSB3PIPECTL(8) = 0x00000000
GUSB3PIPECTL(9) = 0x00000000
GUSB3PIPECTL(10) = 0x00000000
GUSB3PIPECTL(11) = 0x00000000
GUSB3PIPECTL(12) = 0x00000000
GUSB3PIPECTL(13) = 0x00000000
GUSB3PIPECTL(14) = 0x00000000
GUSB3PIPECTL(15) = 0x00000000
GTXFIFOSIZ(0) = 0x00000082
GTXFIFOSIZ(1) = 0x00820103
GTXFIFOSIZ(2) = 0x01850205
GTXFIFOSIZ(3) = 0x038a0000
GTXFIFOSIZ(4) = 0x038a0000
GTXFIFOSIZ(5) = 0x038a0000
GTXFIFOSIZ(6) = 0x038a0000
GTXFIFOSIZ(7) = 0x038a0000
GTXFIFOSIZ(8) = 0x038a0000
GTXFIFOSIZ(9) = 0x038a0000
GTXFIFOSIZ(10) = 0x038a0000
GTXFIFOSIZ(11) = 0x038a0000
GTXFIFOSIZ(12) = 0x038a0000
GTXFIFOSIZ(13) = 0x038a0000
GTXFIFOSIZ(14) = 0x038a0000
GTXFIFOSIZ(15) = 0x038a0000
GTXFIFOSIZ(16) = 0x00000000
GTXFIFOSIZ(17) = 0x00000000
GTXFIFOSIZ(18) = 0x00000000
GTXFIFOSIZ(19) = 0x00000000
GTXFIFOSIZ(20) = 0x00000000
GTXFIFOSIZ(21) = 0x00000000
GTXFIFOSIZ(22) = 0x00000000
GTXFIFOSIZ(23) = 0x00000000
GTXFIFOSIZ(24) = 0x00000000
GTXFIFOSIZ(25) = 0x00000000
GTXFIFOSIZ(26) = 0x00000000
GTXFIFOSIZ(27) = 0x00000000
GTXFIFOSIZ(28) = 0x00000000
GTXFIFOSIZ(29) = 0x00000000
GTXFIFOSIZ(30) = 0x00000000
GTXFIFOSIZ(31) = 0x00000000
GRXFIFOSIZ(0) = 0x00000084
GRXFIFOSIZ(1) = 0x00840104
GRXFIFOSIZ(2) = 0x01880180
GRXFIFOSIZ(3) = 0x00000000
GRXFIFOSIZ(4) = 0x00000000
GRXFIFOSIZ(5) = 0x00000000
GRXFIFOSIZ(6) = 0x00000000
GRXFIFOSIZ(7) = 0x00000000
GRXFIFOSIZ(8) = 0x00000000
GRXFIFOSIZ(9) = 0x00000000
GRXFIFOSIZ(10) = 0x00000000
GRXFIFOSIZ(11) = 0x00000000
GRXFIFOSIZ(12) = 0x00000000
GRXFIFOSIZ(13) = 0x00000000
GRXFIFOSIZ(14) = 0x00000000
GRXFIFOSIZ(15) = 0x00000000
GRXFIFOSIZ(16) = 0x00000000
GRXFIFOSIZ(17) = 0x00000000
GRXFIFOSIZ(18) = 0x00000000
GRXFIFOSIZ(19) = 0x00000000
GRXFIFOSIZ(20) = 0x00000000
GRXFIFOSIZ(21) = 0x00000000
GRXFIFOSIZ(22) = 0x00000000
GRXFIFOSIZ(23) = 0x00000000
GRXFIFOSIZ(24) = 0x00000000
GRXFIFOSIZ(25) = 0x00000000
GRXFIFOSIZ(26) = 0x00000000
GRXFIFOSIZ(27) = 0x00000000
GRXFIFOSIZ(28) = 0x00000000
GRXFIFOSIZ(29) = 0x00000000
GRXFIFOSIZ(30) = 0x00000000
GRXFIFOSIZ(31) = 0x00000000
GEVNTADRLO(0) = 0x00000000
GEVNTADRHI(0) = 0x00000000
GEVNTSIZ(0) = 0x00000000
GEVNTCOUNT(0) = 0x00000000
GHWPARAMS8 = 0x0000065c
DCFG = 0x00080804
DCTL = 0x00000000
DEVTEN = 0x00000000
DSTS = 0x00d60004
DGCMDPAR = 0x00000000
DGCMD = 0x00000000
DALEPENA = 0x00000000
DEPCMDPAR2(0) = 0x00000000
DEPCMDPAR1(0) = 0x00000002
DEPCMDPAR0(0) = 0x5efa2001
DEPCMD(0) = 0x00000000
DEPCMDPAR2(1) = 0x00000000
DEPCMDPAR1(1) = 0x00000000
DEPCMDPAR0(1) = 0x00000000
DEPCMD(1) = 0x00000000
DEPCMDPAR2(2) = 0x5efa1000
DEPCMDPAR1(2) = 0x00000000
DEPCMDPAR0(2) = 0x00000040
DEPCMD(2) = 0x00000000
DEPCMDPAR2(3) = 0x00000000
DEPCMDPAR1(3) = 0x00000000
DEPCMDPAR0(3) = 0x00000000
DEPCMD(3) = 0x00000000
DEPCMDPAR2(4) = 0x5eec2000
DEPCMDPAR1(4) = 0x00000000
DEPCMDPAR0(4) = 0x5eed8000
DEPCMD(4) = 0x00000000
DEPCMDPAR2(5) = 0x00000000
DEPCMDPAR1(5) = 0x00000000
DEPCMDPAR0(5) = 0x00000000
DEPCMD(5) = 0x00000000
DEPCMDPAR2(6) = 0x00000000
DEPCMDPAR1(6) = 0x00000000
DEPCMDPAR0(6) = 0x00000000
DEPCMD(6) = 0x00000000
DEPCMDPAR2(7) = 0x00000000
DEPCMDPAR1(7) = 0x00000000
DEPCMDPAR0(7) = 0x00000000
DEPCMD(7) = 0x00000000
DEPCMDPAR2(8) = 0x00000000
DEPCMDPAR1(8) = 0x00000000
DEPCMDPAR0(8) = 0x00000000
DEPCMD(8) = 0x00000000
DEPCMDPAR2(9) = 0x00000000
DEPCMDPAR1(9) = 0x00000000
DEPCMDPAR0(9) = 0x00000000
DEPCMD(9) = 0x00000000
DEPCMDPAR2(10) = 0x00000000
DEPCMDPAR1(10) = 0x00000000
DEPCMDPAR0(10) = 0x00000000
DEPCMD(10) = 0x00000000
DEPCMDPAR2(11) = 0x00000000
DEPCMDPAR1(11) = 0x00000000
DEPCMDPAR0(11) = 0x00000000
DEPCMD(11) = 0x00000000
DEPCMDPAR2(12) = 0x00000000
DEPCMDPAR1(12) = 0x00000000
DEPCMDPAR0(12) = 0x00000000
DEPCMD(12) = 0x00000000
DEPCMDPAR2(13) = 0x00000000
DEPCMDPAR1(13) = 0x00000000
DEPCMDPAR0(13) = 0x00000000
DEPCMD(13) = 0x00000000
DEPCMDPAR2(14) = 0x00000000
DEPCMDPAR1(14) = 0x00000000
DEPCMDPAR0(14) = 0x00000000
DEPCMD(14) = 0x00000000
DEPCMDPAR2(15) = 0x00000000
DEPCMDPAR1(15) = 0x00000000
DEPCMDPAR0(15) = 0x00000000
DEPCMD(15) = 0x00000000
DEPCMDPAR2(16) = 0x00000000
DEPCMDPAR1(16) = 0x00000000
DEPCMDPAR0(16) = 0x00000000
DEPCMD(16) = 0x00000000
DEPCMDPAR2(17) = 0x00000000
DEPCMDPAR1(17) = 0x00000000
DEPCMDPAR0(17) = 0x00000000
DEPCMD(17) = 0x00000000
DEPCMDPAR2(18) = 0x00000000
DEPCMDPAR1(18) = 0x00000000
DEPCMDPAR0(18) = 0x00000000
DEPCMD(18) = 0x00000000
DEPCMDPAR2(19) = 0x00000000
DEPCMDPAR1(19) = 0x00000000
DEPCMDPAR0(19) = 0x00000000
DEPCMD(19) = 0x00000000
DEPCMDPAR2(20) = 0x00000000
DEPCMDPAR1(20) = 0x00000000
DEPCMDPAR0(20) = 0x00000000
DEPCMD(20) = 0x00000000
DEPCMDPAR2(21) = 0x00000000
DEPCMDPAR1(21) = 0x00000000
DEPCMDPAR0(21) = 0x00000000
DEPCMD(21) = 0x00000000
DEPCMDPAR2(22) = 0x00000000
DEPCMDPAR1(22) = 0x00000000
DEPCMDPAR0(22) = 0x00000000
DEPCMD(22) = 0x00000000
DEPCMDPAR2(23) = 0x00000000
DEPCMDPAR1(23) = 0x00000000
DEPCMDPAR0(23) = 0x00000000
DEPCMD(23) = 0x00000000
DEPCMDPAR2(24) = 0x00000000
DEPCMDPAR1(24) = 0x00000000
DEPCMDPAR0(24) = 0x00000000
DEPCMD(24) = 0x00000000
DEPCMDPAR2(25) = 0x00000000
DEPCMDPAR1(25) = 0x00000000
DEPCMDPAR0(25) = 0x00000000
DEPCMD(25) = 0x00000000
DEPCMDPAR2(26) = 0x00000000
DEPCMDPAR1(26) = 0x00000000
DEPCMDPAR0(26) = 0x00000000
DEPCMD(26) = 0x00000000
DEPCMDPAR2(27) = 0x00000000
DEPCMDPAR1(27) = 0x00000000
DEPCMDPAR0(27) = 0x00000000
DEPCMD(27) = 0x00000000
DEPCMDPAR2(28) = 0x00000000
DEPCMDPAR1(28) = 0x00000000
DEPCMDPAR0(28) = 0x00000000
DEPCMD(28) = 0x00000000
DEPCMDPAR2(29) = 0x00000000
DEPCMDPAR1(29) = 0x00000000
DEPCMDPAR0(29) = 0x00000000
DEPCMD(29) = 0x00000000
DEPCMDPAR2(30) = 0x00000000
DEPCMDPAR1(30) = 0x00000000
DEPCMDPAR0(30) = 0x00000000
DEPCMD(30) = 0x00000000
DEPCMDPAR2(31) = 0x00000000
DEPCMDPAR1(31) = 0x00000000
DEPCMDPAR0(31) = 0x00000000
DEPCMD(31) = 0x00000000
OCFG = 0x00000000
OCTL = 0x00000040
OEVT = 0x00000000
OEVTEN = 0x00000000
OSTS = 0x0000000e 
cat /sys/kernel/debug/11000000.dwc3/regdump
GSBUSCFG0 = 0x2222000e
GSBUSCFG1 = 0x00001700
GTXTHRCFG = 0x00000000
GRXTHRCFG = 0x00000000
GCTL = 0x00101401
GEVTEN = 0x00000000
GSTS = 0x3e800002
GUCTL1 = 0x00000000
GSNPSID = 0x5533230a
GGPIO = 0x00000000
GUID = 0x00040ea7
GUCTL = 0x0c808010
GBUSERRADDR0 = 0x00000000
GBUSERRADDR1 = 0x00000000
GPRTBIMAP0 = 0x00000000
GPRTBIMAP1 = 0x00000000
GHWPARAMS0 = 0x4020400a
GHWPARAMS1 = 0x01614938
GHWPARAMS2 = 0x12220a33
GHWPARAMS3 = 0x10420085
GHWPARAMS4 = 0x4882200c
GHWPARAMS5 = 0x04202088
GHWPARAMS6 = 0x065c0c20
GHWPARAMS7 = 0x03080cea
GDBGFIFOSPACE = 0x00820000
GDBGLTSSM = 0x00020042
GPRTBIMAP_HS0 = 0x00000000
GPRTBIMAP_HS1 = 0x00000000
GPRTBIMAP_FS0 = 0x00000000
GPRTBIMAP_FS1 = 0x00000000
GUSB2PHYCFG(0) = 0x00002540
GUSB2PHYCFG(1) = 0x00000000
GUSB2PHYCFG(2) = 0x00000000
GUSB2PHYCFG(3) = 0x00000000
GUSB2PHYCFG(4) = 0x00000000
GUSB2PHYCFG(5) = 0x00000000
GUSB2PHYCFG(6) = 0x00000000
GUSB2PHYCFG(7) = 0x00000000
GUSB2PHYCFG(8) = 0x00000000
GUSB2PHYCFG(9) = 0x00000000
GUSB2PHYCFG(10) = 0x00000000
GUSB2PHYCFG(11) = 0x00000000
GUSB2PHYCFG(12) = 0x00000000
GUSB2PHYCFG(13) = 0x00000000
GUSB2PHYCFG(14) = 0x00000000
GUSB2PHYCFG(15) = 0x00000000
GUSB2I2CCTL(0) = 0x00000000
GUSB2I2CCTL(1) = 0x00000000
GUSB2I2CCTL(2) = 0x00000000
GUSB2I2CCTL(3) = 0x00000000
GUSB2I2CCTL(4) = 0x00000000
GUSB2I2CCTL(5) = 0x00000000
GUSB2I2CCTL(6) = 0x00000000
GUSB2I2CCTL(7) = 0x00000000
GUSB2I2CCTL(8) = 0x00000000
GUSB2I2CCTL(9) = 0x00000000
GUSB2I2CCTL(10) = 0x00000000
GUSB2I2CCTL(11) = 0x00000000
GUSB2I2CCTL(12) = 0x00000000
GUSB2I2CCTL(13) = 0x00000000
GUSB2I2CCTL(14) = 0x00000000
GUSB2I2CCTL(15) = 0x00000000
GUSB2PHYACC(0) = 0x00000000
GUSB2PHYACC(1) = 0x00000000
GUSB2PHYACC(2) = 0x00000000
GUSB2PHYACC(3) = 0x00000000
GUSB2PHYACC(4) = 0x00000000
GUSB2PHYACC(5) = 0x00000000
GUSB2PHYACC(6) = 0x00000000
GUSB2PHYACC(7) = 0x00000000
GUSB2PHYACC(8) = 0x00000000
GUSB2PHYACC(9) = 0x00000000
GUSB2PHYACC(10) = 0x00000000
GUSB2PHYACC(11) = 0x00000000
GUSB2PHYACC(12) = 0x00000000
GUSB2PHYACC(13) = 0x00000000
GUSB2PHYACC(14) = 0x00000000
GUSB2PHYACC(15) = 0x00000000
GUSB3PIPECTL(0) = 0x030c0003
GUSB3PIPECTL(1) = 0x00000000
GUSB3PIPECTL(2) = 0x00000000
GUSB3PIPECTL(3) = 0x00000000
GUSB3PIPECTL(4) = 0x00000000
GUSB3PIPECTL(5) = 0x00000000
GUSB3PIPECTL(6) = 0x00000000
GUSB3PIPECTL(7) = 0x00000000
GUSB3PIPECTL(8) = 0x00000000
GUSB3PIPECTL(9) = 0x00000000
GUSB3PIPECTL(10) = 0x00000000
GUSB3PIPECTL(11) = 0x00000000
GUSB3PIPECTL(12) = 0x00000000
GUSB3PIPECTL(13) = 0x00000000
GUSB3PIPECTL(14) = 0x00000000
GUSB3PIPECTL(15) = 0x00000000
GTXFIFOSIZ(0) = 0x00000082
GTXFIFOSIZ(1) = 0x00820103
GTXFIFOSIZ(2) = 0x01850205
GTXFIFOSIZ(3) = 0x038a0000
GTXFIFOSIZ(4) = 0x038a0000
GTXFIFOSIZ(5) = 0x038a0000
GTXFIFOSIZ(6) = 0x038a0000
GTXFIFOSIZ(7) = 0x038a0000
GTXFIFOSIZ(8) = 0x038a0000
GTXFIFOSIZ(9) = 0x038a0000
GTXFIFOSIZ(10) = 0x038a0000
GTXFIFOSIZ(11) = 0x038a0000
GTXFIFOSIZ(12) = 0x038a0000
GTXFIFOSIZ(13) = 0x038a0000
GTXFIFOSIZ(14) = 0x038a0000
GTXFIFOSIZ(15) = 0x038a0000
GTXFIFOSIZ(16) = 0x00000000
GTXFIFOSIZ(17) = 0x00000000
GTXFIFOSIZ(18) = 0x00000000
GTXFIFOSIZ(19) = 0x00000000
GTXFIFOSIZ(20) = 0x00000000
GTXFIFOSIZ(21) = 0x00000000
GTXFIFOSIZ(22) = 0x00000000
GTXFIFOSIZ(23) = 0x00000000
GTXFIFOSIZ(24) = 0x00000000
GTXFIFOSIZ(25) = 0x00000000
GTXFIFOSIZ(26) = 0x00000000
GTXFIFOSIZ(27) = 0x00000000
GTXFIFOSIZ(28) = 0x00000000
GTXFIFOSIZ(29) = 0x00000000
GTXFIFOSIZ(30) = 0x00000000
GTXFIFOSIZ(31) = 0x00000000
GRXFIFOSIZ(0) = 0x00000084
GRXFIFOSIZ(1) = 0x00840104
GRXFIFOSIZ(2) = 0x01880180
GRXFIFOSIZ(3) = 0x00000000
GRXFIFOSIZ(4) = 0x00000000
GRXFIFOSIZ(5) = 0x00000000
GRXFIFOSIZ(6) = 0x00000000
GRXFIFOSIZ(7) = 0x00000000
GRXFIFOSIZ(8) = 0x00000000
GRXFIFOSIZ(9) = 0x00000000
GRXFIFOSIZ(10) = 0x00000000
GRXFIFOSIZ(11) = 0x00000000
GRXFIFOSIZ(12) = 0x00000000
GRXFIFOSIZ(13) = 0x00000000
GRXFIFOSIZ(14) = 0x00000000
GRXFIFOSIZ(15) = 0x00000000
GRXFIFOSIZ(16) = 0x00000000
GRXFIFOSIZ(17) = 0x00000000
GRXFIFOSIZ(18) = 0x00000000
GRXFIFOSIZ(19) = 0x00000000
GRXFIFOSIZ(20) = 0x00000000
GRXFIFOSIZ(21) = 0x00000000
GRXFIFOSIZ(22) = 0x00000000
GRXFIFOSIZ(23) = 0x00000000
GRXFIFOSIZ(24) = 0x00000000
GRXFIFOSIZ(25) = 0x00000000
GRXFIFOSIZ(26) = 0x00000000
GRXFIFOSIZ(27) = 0x00000000
GRXFIFOSIZ(28) = 0x00000000
GRXFIFOSIZ(29) = 0x00000000
GRXFIFOSIZ(30) = 0x00000000
GRXFIFOSIZ(31) = 0x00000000
GEVNTADRLO(0) = 0x00000000
GEVNTADRHI(0) = 0x00000000
GEVNTSIZ(0) = 0x00000000
GEVNTCOUNT(0) = 0x00000000
GHWPARAMS8 = 0x0000065c
DCFG = 0x00080804
DCTL = 0x00000000
DEVTEN = 0x00000000
DSTS = 0x00c20004
DGCMDPAR = 0x00000000
DGCMD = 0x00000000
DALEPENA = 0x00000000
DEPCMDPAR2(0) = 0x00000000
DEPCMDPAR1(0) = 0x00000002
DEPCMDPAR0(0) = 0x5efa6001
DEPCMD(0) = 0x00000000
DEPCMDPAR2(1) = 0x00000000
DEPCMDPAR1(1) = 0x00000000
DEPCMDPAR0(1) = 0x00000000
DEPCMD(1) = 0x00000000
DEPCMDPAR2(2) = 0x5efa7000
DEPCMDPAR1(2) = 0x00000000
DEPCMDPAR0(2) = 0x00000040
DEPCMD(2) = 0x00000000
DEPCMDPAR2(3) = 0x00000000
DEPCMDPAR1(3) = 0x00000000
DEPCMDPAR0(3) = 0x00000000
DEPCMD(3) = 0x00000000
DEPCMDPAR2(4) = 0x5ef61000
DEPCMDPAR1(4) = 0x00000000
DEPCMDPAR0(4) = 0x5ef62148
DEPCMD(4) = 0x00000000
DEPCMDPAR2(5) = 0x00000000
DEPCMDPAR1(5) = 0x00000000
DEPCMDPAR0(5) = 0x00000000
DEPCMD(5) = 0x00000000
DEPCMDPAR2(6) = 0x00000000
DEPCMDPAR1(6) = 0x00000000
DEPCMDPAR0(6) = 0x00000000
DEPCMD(6) = 0x00000000
DEPCMDPAR2(7) = 0x00000000
DEPCMDPAR1(7) = 0x00000000
DEPCMDPAR0(7) = 0x00000000
DEPCMD(7) = 0x00000000
DEPCMDPAR2(8) = 0x00000000
DEPCMDPAR1(8) = 0x00000000
DEPCMDPAR0(8) = 0x00000000
DEPCMD(8) = 0x00000000
DEPCMDPAR2(9) = 0x00000000
DEPCMDPAR1(9) = 0x00000000
DEPCMDPAR0(9) = 0x00000000
DEPCMD(9) = 0x00000000
DEPCMDPAR2(10) = 0x00000000
DEPCMDPAR1(10) = 0x00000000
DEPCMDPAR0(10) = 0x00000000
DEPCMD(10) = 0x00000000
DEPCMDPAR2(11) = 0x00000000
DEPCMDPAR1(11) = 0x00000000
DEPCMDPAR0(11) = 0x00000000
DEPCMD(11) = 0x00000000
DEPCMDPAR2(12) = 0x00000000
DEPCMDPAR1(12) = 0x00000000
DEPCMDPAR0(12) = 0x00000000
DEPCMD(12) = 0x00000000
DEPCMDPAR2(13) = 0x00000000
DEPCMDPAR1(13) = 0x00000000
DEPCMDPAR0(13) = 0x00000000
DEPCMD(13) = 0x00000000
DEPCMDPAR2(14) = 0x00000000
DEPCMDPAR1(14) = 0x00000000
DEPCMDPAR0(14) = 0x00000000
DEPCMD(14) = 0x00000000
DEPCMDPAR2(15) = 0x00000000
DEPCMDPAR1(15) = 0x00000000
DEPCMDPAR0(15) = 0x00000000
DEPCMD(15) = 0x00000000
DEPCMDPAR2(16) = 0x00000000
DEPCMDPAR1(16) = 0x00000000
DEPCMDPAR0(16) = 0x00000000
DEPCMD(16) = 0x00000000
DEPCMDPAR2(17) = 0x00000000
DEPCMDPAR1(17) = 0x00000000
DEPCMDPAR0(17) = 0x00000000
DEPCMD(17) = 0x00000000
DEPCMDPAR2(18) = 0x00000000
DEPCMDPAR1(18) = 0x00000000
DEPCMDPAR0(18) = 0x00000000
DEPCMD(18) = 0x00000000
DEPCMDPAR2(19) = 0x00000000
DEPCMDPAR1(19) = 0x00000000
DEPCMDPAR0(19) = 0x00000000
DEPCMD(19) = 0x00000000
DEPCMDPAR2(20) = 0x00000000
DEPCMDPAR1(20) = 0x00000000
DEPCMDPAR0(20) = 0x00000000
DEPCMD(20) = 0x00000000
DEPCMDPAR2(21) = 0x00000000
DEPCMDPAR1(21) = 0x00000000
DEPCMDPAR0(21) = 0x00000000
DEPCMD(21) = 0x00000000
DEPCMDPAR2(22) = 0x00000000
DEPCMDPAR1(22) = 0x00000000
DEPCMDPAR0(22) = 0x00000000
DEPCMD(22) = 0x00000000
DEPCMDPAR2(23) = 0x00000000
DEPCMDPAR1(23) = 0x00000000
DEPCMDPAR0(23) = 0x00000000
DEPCMD(23) = 0x00000000
DEPCMDPAR2(24) = 0x00000000
DEPCMDPAR1(24) = 0x00000000
DEPCMDPAR0(24) = 0x00011010
DEPCMD(24) = 0x00000000
DEPCMDPAR2(25) = 0x00000000
DEPCMDPAR1(25) = 0x00000000
DEPCMDPAR0(25) = 0x00000000
DEPCMD(25) = 0x00000000
DEPCMDPAR2(26) = 0x00000000
DEPCMDPAR1(26) = 0x00000000
DEPCMDPAR0(26) = 0x00000000
DEPCMD(26) = 0x00000000
DEPCMDPAR2(27) = 0x00000000
DEPCMDPAR1(27) = 0x00000000
DEPCMDPAR0(27) = 0x00000000
DEPCMD(27) = 0x00000000
DEPCMDPAR2(28) = 0x00000000
DEPCMDPAR1(28) = 0x00000000
DEPCMDPAR0(28) = 0x00000000
DEPCMD(28) = 0x00000000
DEPCMDPAR2(29) = 0x00000000
DEPCMDPAR1(29) = 0x00000000
DEPCMDPAR0(29) = 0x00000000
DEPCMD(29) = 0x00000000
DEPCMDPAR2(30) = 0x00000000
DEPCMDPAR1(30) = 0x00000000
DEPCMDPAR0(30) = 0x00000000
DEPCMD(30) = 0x00000000
DEPCMDPAR2(31) = 0x00000000
DEPCMDPAR1(31) = 0x00000000
DEPCMDPAR0(31) = 0x00000000
DEPCMD(31) = 0x00000000
OCFG = 0x00000000
OCTL = 0x00000040
OEVT = 0x00000000
OEVTEN = 0x00000000
OSTS = 0x0000000e 
1 Like

Hey can i ask you another test ??

Do this multiple times and tell me if it does print same data every time or if it does change.
hexdump -n 512 -C /dev/sda

mine is coherent and always the same
kernel 4.19.98
usb 3.0 disk
i assume it's working as usb3 given that kernel log says

[    6.876644] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci-hcd
[    6.908392] usb-storage 2-1:1.0: USB Mass Storage device detected

is there an easier way to check device speed without lsusb?

cat /sys/bus/usb/devices/2-1/speed

Should output 5000 (Mbit/s). If it's detected as a SuperSpeed device, it probably will.

i just needed to know that data was the same with every write in 3.0 (trying to fix data corruptin in 5.4)

2 Likes

yes i know i'm following also the other thread :slight_smile:
i assume after the usb issue is solved you'll move to nss drivers :innocent:

starting to think that would be easier than find wtf happen between 4.19 and 5.4 with usb3...