I2C bus linux: Systems with more than 4 memory slots not supported yet, not instantiating SPD - linux

Problem:
I believe there are enough motherboards with 8 memory slots.
I would like to see the contents of the SPD memory slots via decode-dimms, but
there is only support for up to 4 slots in the Linux kernel I2C bus, inclusive.
Description:
Motherboard Asus P9X79pro 2011 year 8 memory slots
Kernel: Linux 5.15.0-2-amd64 (SMP w/8 CPU threads)
/etc/modules-load.d/:
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# we use any of the following three to choose for: eeprom at24 ee1004
at24
i2c_i801
i2c_smbus
i2c-dev
# i2cdetect -l
i2c-0 smbus SMBus I801 adapter at f000 SMBus adapter
i2c-1 i2c nvkm-0000:01:00.0-bus-0000 I2C adapter
i2c-2 i2c nvkm-0000:01:00.0-bus-0001 I2C adapter
i2c-3 i2c nvkm-0000:01:00.0-bus-0002 I2C adapter
/var/log/messages
[ 1.349519] i801_smbus 0000:00:1f.3: SMBus using PCI interrupt
[ 1.350413] i2c i2c-0: 8/8 memory slots populated (from DMI)
[ 1.350416] i2c i2c-0: Systems with more than 4 memory slots not supported yet, not instantiating SPD
# decode-dimms
# for 4.2-2+b1
No EEPROM found, the kernel probably does not support your hardware.
# decode-dimms
# decode-dimms version 4.3
Memory Serial Presence Detect Decoder
By Philip Edelbrock, Christian Zuckschwerdt, Burkart Lingner,
Jean Delvare, Trent Piepho and others
Number of SDRAM DIMMs detected and decoded: 0
# dmidecode:
Handle 0x002E, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x002C
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 8 GB
Form Factor: DIMM
Set: None
Locator: ChannelA_Dimm1
Bank Locator: ChannelA
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MT/s
Manufacturer: Kingston
Serial Number: 4C0F1E75
Asset Tag: ChannelA_Dimm1_AssetTag
Part Number: KHX1600C10D3/8G
Rank: 2
Configured Memory Speed: 1600 MT/s
Handle 0x0030, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x002C
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 8 GB
Form Factor: DIMM
Set: None
Locator: ChannelA_Dimm2
Bank Locator: ChannelA
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MT/s
Manufacturer: Kingston
Serial Number: 360D8537
Asset Tag: ChannelA_Dimm2_AssetTag
Part Number: 9905403-558.A00LF
Rank: 2
Configured Memory Speed: 1600 MT/s
Handle 0x0032, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x002C
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 8 GB
Form Factor: DIMM
Set: None
Locator: ChannelB_Dimm1
Bank Locator: ChannelB
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MT/s
Manufacturer: Kingston
Serial Number: 4B0F776E
Asset Tag: ChannelB_Dimm1_AssetTag
Part Number: KHX1600C10D3/8G
Rank: 2
Configured Memory Speed: 1600 MT/s
Handle 0x0034, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x002C
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 8 GB
Form Factor: DIMM
Set: None
Locator: ChannelB_Dimm2
Bank Locator: ChannelB
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MT/s
Manufacturer: Kingston
Serial Number: 370DA637
Asset Tag: ChannelB_Dimm2_AssetTag
Part Number: 9905403-558.A00LF
Rank: 2
Configured Memory Speed: 1600 MT/s
Handle 0x0036, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x002C
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 8 GB
Form Factor: DIMM
Set: None
Locator: ChannelC_Dimm1
Bank Locator: ChannelC
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MT/s
Manufacturer: Kingston
Serial Number: 1731AE49
Asset Tag: ChannelC_Dimm1_AssetTag
Part Number: KHX1600C10D3/8G
Rank: 2
Configured Memory Speed: 1600 MT/s
Handle 0x0038, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x002C
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 8 GB
Form Factor: DIMM
Set: None
Locator: ChannelC_Dimm2
Bank Locator: ChannelC
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MT/s
Manufacturer: Kingston
Serial Number: 370D9537
Asset Tag: ChannelC_Dimm2_AssetTag
Part Number: 9905403-558.A00LF
Rank: 2
Configured Memory Speed: 1600 MT/s
Handle 0x003A, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x002C
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 8 GB
Form Factor: DIMM
Set: None
Locator: ChannelD_Dimm1
Bank Locator: ChannelD
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MT/s
Manufacturer: Kingston
Serial Number: 1C31AE49
Asset Tag: ChannelD_Dimm1_AssetTag
Part Number: KHX1600C10D3/8G
Rank: 2
Configured Memory Speed: 1600 MT/s
Handle 0x003C, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x002C
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 8 GB
Form Factor: DIMM
Set: None
Locator: ChannelD_Dimm2
Bank Locator: ChannelD
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MT/s
Manufacturer: Kingston
Serial Number: 360D9637
Asset Tag: ChannelD_Dimm2_AssetTag
Part Number: 9905403-558.A00LF
Rank: 2
Configured Memory Speed: 1600 MT/s
linux-source-5.15/drivers/i2c/i2c-smbus.c
line 358:
if (slot_count > 4) {
dev_warn(&adap->dev,
"Systems with more than 4 memory slots not supported yet, not instantiating SPD\n");
return;
}
Houp:
Can someone suggest how to reach the kernel developers?

A good place to read about the way Linux Kernel development works is https://kernelnewbies.org/ site. For more information how to reach kernel developers, you could read the FoundBug subpage.
In this particular case, you could find a developer who wrote/maintains this code and contact him directly with your request. All kernel development is done in open so you can find the patch submission for example on patchwork
As you can see there, the patches were signed off by Jean Delvare, who happens to be the maintainer for most of the I2C/SMBus controller drivers in Linux, as can be seen in maintainers list.
Contacting the developer directly is not the only possibility. Probably the better choice would be to use a proper mailing list, which, again, can be found in the mainainters list linked above.
That being said, the fact you can reach kernel developers like that, does not mean you should, unless of course, you want to propose the patch yourself.

Related

u-boot gives Error 22 for ubi partition, but mounts ok in linux

I have a buildroot system, which mounts ubi ok in linux, but in u-boot I get error 22
When starting in linux this is in dmesg:
ubi0: scanning is finished
ubi0: attached mtd2 (name "rootfs", size 32 MiB)
ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
ubi0: good PEBs: 256, bad PEBs: 0, corrupted PEBs: 0
ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 894512245
ubi0: available PEBs: 0, total reserved PEBs: 256, PEBs reserved for bad PEB handling: 40
ubi0: background thread "ubi_bgt0d" started, PID 1103
--
UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs", R/O mode
UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
UBIFS (ubi0:0): FS size: 25649152 bytes (24 MiB, 202 LEBs), journal size 4444160 bytes (4 MiB, 35 LEBs)
UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
UBIFS (ubi0:0): media format: w4/r0 (latest is w4/r0), UUID 29B5D4CF-8B0B-465A-8D03-F3A464E6250E, small LPT model
UBIFS (ubi0:0): full atime support is enabled.
VFS: Mounted root (ubifs filesystem) readonly on device 0:13.
in u-boot mtd returns:
device nand0 <nand0>, # parts = 4
#: name size offset mask_flags
0: u-boot 0x00200000 0x00000000 0
1: kernel 0x01e00000 0x00200000 0
2: rootfs 0x02000000 0x02000000 0
3: user 0x0c000000 0x04000000 0
active partition: nand0,0 - (u-boot) 0x00200000 # 0x00000000
defaults:
mtdids : nand0=nand0
mtdparts: mtdparts=nand0:0x200000#0x0(u-boot),0x1e00000#0x200000(kernel),0x2000000#0x2000000(rootfs),-(user)
but when it try to attach:
=> ubi part rootfs
ubi0: attaching mtd1
UBI init error 22
It's on an embedded system which uses older versions U-Boot 2016.11 and Linux/arm 4.4.289 Kernel
I suppose some parameter is wrong somewhere, can somebody give me some advise where to look?

ubiformat in barebox giving timeout

I have a custom iMX 6UL board with Barebox (partially) functional. I have on board a Semper s25hs512t Flash being detected (after adding the necessary device id indrivers/mtd/spi-nor/spi-nor.c)
The problem - My board does not have ethernet or removable SD. I need to burn the boot loader/ flash on the s25hs512. I need to format the flash accordingly and copy the files on it.
my dtsi has
&qspi {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_qspi>;
status = "okay";
flash0: s25hs512t#0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spansion,s25hs512t", "jedec,spi-nor";
spi-max-frequency = <40000000>;
spi-rx-bus-width = <4>;
spi-tx-bus-width = <4>;
reg = <0>;
spi-mode = <0>;
m25p,fast-read;
status = "okay";
partition#0 {
label = "barebox";
reg = <0x00000000 0x00100000>;
};
partition#1 {
label = "barebox-env";
reg = <0x00100000 0x00040000>;
};
partition#2 {
label = "barebox-of";
reg = <0x00140000 0x00040000>;
};
partition#3 {
label = "kernel";
reg = <0x00180000 0x00800000>;
};
partition#4 {
label = "root";
reg = <0x00980000 0x03640000>;
};
};
};
on boot barebox detects the flash
Board: Freescale i.MX6 UltraLite Caisteal Board
detected i.MX6 UltraLite revision 1.0
i.MX6 UltraLite unique ID: 241e09d4e317402a
m25p80 s25hs512t#00: s25hs512t (65536 Kbytes). <=====
imx-esdhc 2194000.mmc#2194000.of: registered as mmc1
rng_self_test: RNG software self-test passed
caam 2140000.crypto#2140000.of: Instantiated RNG4 SH0
caam 2140000.crypto#2140000.of: Instantiated RNG4 SH1
malloc space: 0x8eefcf80 -> 0x9ddf9eff (size 239 MiB)
barebox-environment chosen:environment.of: probe failed: No such file or directory
devinfo shows
`-- 21e0000.spi#21e0000.of
`-- s25hs512t#00
`-- m25p0
`-- 0x00000000-0x03ffffff ( 64 MiB): /dev/m25p0
`-- m25p0.barebox
`-- 0x00000000-0x000fffff ( 1 MiB): /dev/m25p0.barebox
`-- m25p0.barebox-env
`-- 0x00000000-0x0003ffff ( 256 KiB): /dev/m25p0.barebox-env
`-- m25p0.barebox-of
`-- 0x00000000-0x0003ffff ( 256 KiB): /dev/m25p0.barebox-of
`-- m25p0.kernel
`-- 0x00000000-0x007fffff ( 8 MiB): /dev/m25p0.kernel
`-- m25p0.root
`-- 0x00000000-0x0363ffff ( 54.3 MiB): /dev/m25p0.root
but when I run ubiformat, I am oddly getting this
barebox#Freescale i.MX6 UltraLite Caisteal Board:/ ubiformat /dev/m25p0.barebox -y
ubiformat: m25p0.barebox (nor), size 1048576 bytes (1 MiB), 4 eraseblocks of 262144 bytes (256 KiB), min. I/O size 1 bytes
libscan: scanning eraseblock 3 -- 100 % complete
ubiformat: 1 eraseblocks are supposedly empty
ubiformat: warning!: 3 of 4 eraseblocks contain non-ubifs data
ubiformat: warning!: only 0 of 4 eraseblocks have valid erase counter
ubiformat: erase counter 0 will be used for all eraseblocks
ubiformat: note, arbitrary erase counter value may be specified using -e option
ubiformat: use erase counter 0 for all eraseblocks
ubiformat: formatting eraseblock 3 -- 100 % complete
ERROR: m25p80 s25hs512t#00: flash operation timed out
ERROR: m25p0.barebox: error -110 while writing 262144 bytes to PEB 0:0, written 0 bytes
libubigen: error!: cannot write 262144 bytes
ubiformat: error!: cannot write layout volume
ubiformat: Operation not permitted
Any way ahead from this?
PS : Update
Thanks for help from #TrentP - I am focusing only on formatting the larger partitions so that I can write the kernel and root partition. but I have not been able to mount the ubi partition. I get the following issue (Readonly filesystem)
barebox#Freescale i.MX6 UltraLite Caisteal Board:/ erase /dev/m25p0.kernel
barebox#Freescale i.MX6 UltraLite Caisteal Board:/ ubiattach /dev/m25p0.kernel
NOTICE: ubi0: scanning is finished
NOTICE: ubi0: empty MTD device detected
NOTICE: ubi0: registering /dev/m25p0.kernel.ubi
NOTICE: ubi0: attached mtd0 (name "m25p0.kernel", size 8 MiB) to ubi0
NOTICE: ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 262016 bytes
NOTICE: ubi0: min./max. I/O unit sizes: 1/256, sub-page size 1
NOTICE: ubi0: VID header offset: 64 (aligned 64), data offset: 128
NOTICE: ubi0: good PEBs: 32, bad PEBs: 0, corrupted PEBs: 0
NOTICE: ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128
NOTICE: ubi0: max/mean erase counter: 1/0, WL threshold: 65536, image sequence number: 1700878141
NOTICE: ubi0: available PEBs: 28, total reserved PEBs: 4, PEBs reserved for bad PEB handling: 0
barebox#Freescale i.MX6 UltraLite Caisteal Board:/ ubimkvol /dev/m25p0.kernel.ubi kernel 0
NOTICE: ubi0: registering kernel as /dev/m25p0.kernel.ubi.kernel
barebox#Freescale i.MX6 UltraLite Caisteal Board:/ mount -t ubifs /dev/m25p0.kernel.ubi.kernel /mnt/kernel/
ERROR: UBIFS error (ubi0:0): 9de5a2d5: can't format empty UBI volume: read-only mount
ERROR: ubifs ubifs0: probe failed: Read-only file system
mount: Invalid argument
If I use ubiformat I get this
barebox#Freescale i.MX6 UltraLite Caisteal Board:/ ubiformat /dev/m25p0.kernel -y
ubiformat: m25p0.kernel (nor), size 8388608 bytes (8 MiB), 32 eraseblocks of 262144 bytes (256 KiB), min. I/O size 1 bytes
libscan: scanning eraseblock 31 -- 100 % complete
ubiformat: warning!: 32 of 32 eraseblocks contain non-ubifs data
ubiformat: warning!: only 0 of 32 eraseblocks have valid erase counter
ubiformat: erase counter 0 will be used for all eraseblocks
ubiformat: note, arbitrary erase counter value may be specified using -e option
ubiformat: use erase counter 0 for all eraseblocks
ubiformat: formatting eraseblock 31 -- 100 % complete
barebox#Freescale i.MX6 UltraLite Caisteal Board:/ ubiattach /dev/m25p0.kernel
NOTICE: ubi0: scanning is finished
ERROR: ubi0 error: ubi_read_volume_table: the layout volume was not found
ERROR: ubi0 error: ubi_attach_mtd_dev: failed to attach mtd0, error -22
failed to attach: Invalid argument
devinfo
Parent: m25p0.kernel
Parameters:
available_pebs: 0 (type: uint32)
bad_peb_count: 0 (type: uint32)
good_peb_count: 32 (type: uint32)
leb_size: 262016 (type: uint32)
max_erase_counter: 2 (type: uint32)
mean_erase_counter: 0 (type: uint32)
min_io_size: 1 (type: uint32)
peb_size: 262144 (type: uint32)
reserved_pebs: 32 (type: uint32) <=== why all PEBs are reserved?
sub_page_size: 1 (type: uint32)
vid_header_offset: 64 (type: uint32)
Any suggestions on what I am doing wrong. I know its something ridiculously simple. just unknown to me
You aren't supposed to use ubiformat on the barebox partition. It's too small. That's why it fails.
UBI is a Linux layer for putting UBI filesystems into NAND or NOR flash. The iMX6UL CPU boot ROM does not understand UBI. It can't boot something in a UBI formatted partition. It's for the root filesystem in the root partition.
Read section 8 of the iMX6UL reference manual, especially §8.6 about QuadSPI booting. This will tell you what you must put into flash to make it bootable.
Also look at the barebox_update command, which can be used to flash the bootloader from Barebox. The board needs to support it and I don't know about your board. The code is in various imx6_bbu_* functions. I'm not sure if qspi is supported, as I only see eMMC/SD,eMMC boot, NAND, and I2C/SPI. The qspi interface isn't the same as a serial EEPROM on one of the eCSPI controllers (again, see RM §8!). But perhaps it would work with an appropriate header already on the image.

Conflict in Free and dmidecode

I notice that System RAM is Conflict at actual.
Free:
total used free shared buffers cached
Mem: 2948084 1710456 1237628 60700 637336 418016
-/+ buffers/cache: 655104 2292980
Swap: 3080188 0 3080188
dmidecode:
Handle 0x0006, DMI type 6, 12 bytes
Memory Module Information
Socket Designation: A0
Bank Connections: 0 1
Current Speed: Unknown
Type: Other
Installed Size: 1024 MB (Double-bank Connection)
Enabled Size: 1024 MB (Double-bank Connection)
Error Status: OK
Handle 0x0007, DMI type 6, 12 bytes
Memory Module Information
Socket Designation: A1
Bank Connections: 2 3
Current Speed: Unknown
Type: Other
Installed Size: 1024 MB (Double-bank Connection)
Enabled Size: 1024 MB (Double-bank Connection)
Error Status: OK
Handle 0x001B, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x001A
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 1024 MB
Form Factor: DIMM
Set: None
Locator: A0
Bank Locator: Bank0/1
Type: DDR2
Type Detail: Synchronous
Speed: Unknown
Manufacturer: None
Serial Number: None
Asset Tag: None
Part Number: None
Handle 0x001C, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x001A
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 1024 MB
Form Factor: DIMM
Set: None
Locator: A1
Bank Locator: Bank2/3
Type: DDR2
Type Detail: Synchronous
Speed: Unknown
Manufacturer: None
Serial Number: None
Asset Tag: None
Part Number: None
System is 64 Bit , centos 6.8.
Intel(R) Core(TM)2 Duo CPU E4500 # 2.20GHz
Here is Big Conflict that dmidecode show 2 GB RAM , Free show 3 GB RAM and System Bios show 3.3 GB RAM DDR2. I also changing RAM with with New one but getting same result.
please see below result.(computers world it 1024)
free -h total used free shared buffers cached Mem: 2.8G 2.7G 95M 171M 33M 336M -/+ buffers/cache: 2.4G 465M Swap: 2.9G 458M 2.5G

flowgraph fails with "LLLL..." for one network adapter, succeeds with other adapter

I want to execute the usrp_echotimer_dual_cw example from the GNURadio gr-radar OOT module.
The flowgraph works fine with the internal gigabit ethernet adapter but fails with the external PCI gigabit ethernet adapter.
Here is the output of the successful execution (eth0) of the flowgraph:
Executing: "/home/christophe/new/examples/usrp/usrp_echotimer_dual_cw.py"
linux; GNU C++ version 4.8.4; Boost_105400; UHD_003.010.git-101-g4a1cb1f2
Using Volk machine: avx_64_mmx_orc
-- Opening a USRP2/N-Series device...
-- Current recv frame size: 1472 bytes
-- Current send frame size: 1472 bytes
UHD Warning:
The recv buffer could not be resized sufficiently.
Target sock buff size: 50000000 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.rmem_max=50000000
UHD Warning:
The recv buffer could not be resized sufficiently.
Target sock buff size: 50000000 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.rmem_max=50000000
UHD Warning:
The send buffer could not be resized sufficiently.
Target sock buff size: 1048576 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.wmem_max=1048576
Using USRP Device (TX):
Single USRP:
Device: USRP2 / N-Series Device
Mboard 0: N210r4
RX Channel: 0
RX DSP: 0
RX Dboard: A
RX Subdev: RFX2400 RX
TX Channel: 0
TX DSP: 0
TX Dboard: A
TX Subdev: RFX2400 TX
Setting TX Rate: 14250000
UHD Warning:
The requested interpolation is odd; the user should expect CIC rolloff.
Select an even interpolation to ensure that a halfband filter is enabled.
interpolation = dsp_rate/samp_rate -> 7 = (100.000000 MHz)/(14.250000 MHz)
UHD Warning:
The hardware does not support the requested TX sample rate:
Target sample rate: 14.250000 MSps
Actual sample rate: 14.285714 MSps
Actual TX Rate: 1.42857e+07
UHD Warning:
The requested interpolation is odd; the user should expect CIC rolloff.
Select an even interpolation to ensure that a halfband filter is enabled.
interpolation = dsp_rate/samp_rate -> 7 = (100.000000 MHz)/(14.285714 MHz)
-- Opening a USRP2/N-Series device...
-- Current recv frame size: 1472 bytes
-- Current send frame size: 1472 bytes
UHD Warning:
The recv buffer could not be resized sufficiently.
Target sock buff size: 50000000 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.rmem_max=50000000
UHD Warning:
The recv buffer could not be resized sufficiently.
Target sock buff size: 50000000 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.rmem_max=50000000
UHD Warning:
The send buffer could not be resized sufficiently.
Target sock buff size: 1048576 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.wmem_max=1048576
Using USRP Device (RX):
Single USRP:
Device: USRP2 / N-Series Device
Mboard 0: USRP2 r3
RX Channel: 0
RX DSP: 0
RX Dboard: A
RX Subdev: RFX2400 RX
TX Channel: 0
TX DSP: 0
TX Dboard: A
TX Subdev: RFX2400 TX
Setting RX Rate: 14250000
UHD Warning:
The requested decimation is odd; the user should expect CIC rolloff.
Select an even decimation to ensure that a halfband filter is enabled.
decimation = dsp_rate/samp_rate -> 7 = (100.000000 MHz)/(14.250000 MHz)
UHD Warning:
The hardware does not support the requested RX sample rate:
Target sample rate: 14.250000 MSps
Actual sample rate: 14.285714 MSps
Actual RX Rate: 1.42857e+07
UHD Warning:
The requested decimation is odd; the user should expect CIC rolloff.
Select an even decimation to ensure that a halfband filter is enabled.
decimation = dsp_rate/samp_rate -> 7 = (100.000000 MHz)/(14.285714 MHz)
set_min_output_buffer on block 5 to 4194304
set_min_output_buffer on block 6 to 4194304
set_min_output_buffer on block 7 to 4194304
set_min_output_buffer on block 8 to 4194304
set_min_output_buffer on block 9 to 4194304
set_min_output_buffer on block 17 to 4194304
set_min_output_buffer on block 18 to 4194304
set_min_output_buffer on block 19 to 4194304
set_min_output_buffer on block 20 to 4194304
set_min_output_buffer on block 21 to 4194304
set_min_output_buffer on block 22 to 4194304
// Print results
rx_time: 2:0.0476682
velocity: -5.82422
range: 4.83493
// Print results
rx_time: 2:0.411017
velocity: 0.416016
range: 4.80168
// Print results
rx_time: 2:0.770647
velocity: 1.24805
range: 4.66541
// Print results
rx_time: 3:0.122836
velocity: 1.24805
range: 4.86308
// Print results
rx_time: 3:0.489277
velocity: 1.66406
range: 4.80136
// Print results
rx_time: 3:0.848081
velocity: -15.8086
range: 5.37644
// Print results
rx_time: 4:0.198079
velocity: 4.57617
range: 5.10404
// Print results
rx_time: 4:0.558055
velocity: 4.99219
range: 4.4827
// Print results
rx_time: 4:0.917475
velocity: -0.832031
range: 4.62831
// Print results
rx_time: 5:0.266247
velocity: 6.65625
range: 5.24577
// Print results
rx_time: 5:0.625892
velocity: -6.65625
range: 5.5386
The failed execution (eth1) looks like this:
Executing: "/home/christophe/new/examples/usrp/usrp_echotimer_dual_cw.py"
linux; GNU C++ version 4.8.4; Boost_105400; UHD_003.010.git-101-g4a1cb1f2
Using Volk machine: avx_64_mmx_orc
-- Opening a USRP2/N-Series device...
-- Current recv frame size: 1472 bytes
-- Current send frame size: 1472 bytes
UHD Warning:
The recv buffer could not be resized sufficiently.
Target sock buff size: 50000000 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.rmem_max=50000000
UHD Warning:
The recv buffer could not be resized sufficiently.
Target sock buff size: 50000000 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.rmem_max=50000000
UHD Warning:
The send buffer could not be resized sufficiently.
Target sock buff size: 1048576 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.wmem_max=1048576
Using USRP Device (TX):
Single USRP:
Device: USRP2 / N-Series Device
Mboard 0: N210r4
RX Channel: 0
RX DSP: 0
RX Dboard: A
RX Subdev: RFX2400 RX
TX Channel: 0
TX DSP: 0
TX Dboard: A
TX Subdev: RFX2400 TX
Setting TX Rate: 14250000
UHD Warning:
The requested interpolation is odd; the user should expect CIC rolloff.
Select an even interpolation to ensure that a halfband filter is enabled.
interpolation = dsp_rate/samp_rate -> 7 = (100.000000 MHz)/(14.250000 MHz)
UHD Warning:
The hardware does not support the requested TX sample rate:
Target sample rate: 14.250000 MSps
Actual sample rate: 14.285714 MSps
Actual TX Rate: 1.42857e+07
UHD Warning:
The requested interpolation is odd; the user should expect CIC rolloff.
Select an even interpolation to ensure that a halfband filter is enabled.
interpolation = dsp_rate/samp_rate -> 7 = (100.000000 MHz)/(14.285714 MHz)
-- Opening a USRP2/N-Series device...
-- Current recv frame size: 1472 bytes
-- Current send frame size: 1472 bytes
UHD Warning:
The recv buffer could not be resized sufficiently.
Target sock buff size: 50000000 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.rmem_max=50000000
UHD Warning:
The recv buffer could not be resized sufficiently.
Target sock buff size: 50000000 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.rmem_max=50000000
UHD Warning:
The send buffer could not be resized sufficiently.
Target sock buff size: 1048576 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.wmem_max=1048576
Using USRP Device (RX):
Single USRP:
Device: USRP2 / N-Series Device
Mboard 0: USRP2 r3
RX Channel: 0
RX DSP: 0
RX Dboard: A
RX Subdev: RFX2400 RX
TX Channel: 0
TX DSP: 0
TX Dboard: A
TX Subdev: RFX2400 TX
Setting RX Rate: 14250000
UHD Warning:
The requested decimation is odd; the user should expect CIC rolloff.
Select an even decimation to ensure that a halfband filter is enabled.
decimation = dsp_rate/samp_rate -> 7 = (100.000000 MHz)/(14.250000 MHz)
UHD Warning:
The hardware does not support the requested RX sample rate:
Target sample rate: 14.250000 MSps
Actual sample rate: 14.285714 MSps
Actual RX Rate: 1.42857e+07
UHD Warning:
The requested decimation is odd; the user should expect CIC rolloff.
Select an even decimation to ensure that a halfband filter is enabled.
decimation = dsp_rate/samp_rate -> 7 = (100.000000 MHz)/(14.285714 MHz)
set_min_output_buffer on block 5 to 4194304
set_min_output_buffer on block 6 to 4194304
set_min_output_buffer on block 7 to 4194304
set_min_output_buffer on block 8 to 4194304
set_min_output_buffer on block 9 to 4194304
set_min_output_buffer on block 17 to 4194304
set_min_output_buffer on block 18 to 4194304
set_min_output_buffer on block 19 to 4194304
set_min_output_buffer on block 20 to 4194304
set_min_output_buffer on block 21 to 4194304
set_min_output_buffer on block 22 to 4194304
DReceive timeout before all samples received...
ULLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL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LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLterminate called after throwing an instance of 'std::runtime_error'
what(): Receiver error ERROR_CODE_OVERFLOW (Out of sequence error)
These are my network cards:
[0] christophe:~ % lspci -nn | grep -i ethernet
00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit Network Connection [8086:1502] (rev 04)
02:05.0 Ethernet controller [0200]: Intel Corporation 82541PI Gigabit Ethernet Controller [8086:107c] (rev 05)
I don't think it has to do with the performance of the computer, because that flowgraph works fine on a much weaker laptop pc (intel core 2 duo), but fails on my i7 desktop pc.
00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit Network Connection [8086:1502] (rev 04)
The 82579LM is the single known non-USB gigabit ethernet adapter that randomly drops packets without giving notice to the Operating System.
I'm afraid you will have to use a different PCIe-Gigabit adapter.
By the way, L means that your packet (containing some command for the USRP to execute, normally) is later than the time that was specified for the command to happen.
The source code where the L get's printed:
else if (metadata.event_code &
async_metadata_t::EVENT_CODE_TIME_ERROR
) UHD_MSG(fastpath) << "L";
Now, EVENT_CODE_TIME_ERROR means that
Packet had time that was late.
Which might be an effect of your network card dropping packets earlier, so that somehow the timing commands got out of order, or your application got confused. Normally, it's an indication of an application misdesign, but as your network hardware definitely is buggy (seen that controller fail many times, sorry), I would fix that first before investigating further.

Can the logical erase block size of an MTD device be increased?

The minimum erase block size for jffs2 (mtd-utils version 1.5.0, mkfs.jffs2 revision 1.60) seems to be 8KiB:
Erase size 0x1000 too small. Increasing to 8KiB minimum
However I am running Linux 3.10 with an at25df321a,
m25p80 spi32766.0: at25df321a (4096 Kbytes),
and the erase block size is only 4KiB:
mtd5
Name: spi32766.0
Type: nor
Eraseblock size: 4096 bytes, 4.0 KiB
Amount of eraseblocks: 1024 (4194304 bytes, 4.0 MiB)
Minimum input/output unit size: 1 byte
Sub-page size: 1 byte
Character device major/minor: 90:10
Bad blocks are allowed: false
Device is writable: true
Is there a way to make the mtd system treat multiple erase blocks as one? Maybe some ioctl or module parameter?
If I flash a jffs2 image with larger erase block size, I get lots of kernel error messages, missing files and sometimes panic.
workaround
I found that flasherase --jffs2 results in a working filesystem inspite of the 4KiB erase block size. So I hacked the mkfs.jfss2.c file and the resulting image seems to work fine. I'll give it some testing.
diff -rupN orig/mkfs.jffs2.c new/mkfs.jffs2.c
--- orig/mkfs.jffs2.c 2014-10-20 15:43:31.751696500 +0200
+++ new/mkfs.jffs2.c 2014-10-20 15:43:12.623431400 +0200
## -1659,11 +1659,11 ## int main(int argc, char **argv)
}
erase_block_size *= units;
- /* If it's less than 8KiB, they're not allowed */
- if (erase_block_size < 0x2000) {
- fprintf(stderr, "Erase size 0x%x too small. Increasing to 8KiB minimum\n",
+ /* If it's less than 4KiB, they're not allowed */
+ if (erase_block_size < 0x1000) {
+ fprintf(stderr, "Erase size 0x%x too small. Increasing to 4KiB minimum\n",
erase_block_size);
- erase_block_size = 0x2000;
+ erase_block_size = 0x1000;
}
break;
}
http://lists.infradead.org/pipermail/linux-mtd/2010-September/031876.html
JFFS2 should be able to fit at least one node to eraseblock. The
maximum node size is 4KiB+few bytes. This is why the minimum
eraseblocks size is 8KiB.
But in practice, even 8KiB is bad because you and up with wasting a
lot of space at the end of eraseblocks.
You should join several erasblock into one virtual eraseblock of 64 or
128 KiB and use it - this will be more optimal.
Some drivers have already implemented this. I know about
MTD_SPI_NOR_USE_4K_SECTORS
Linux configuration option. It have to be set to "n" to enable large erase sectors of size 0x00010000.

Resources