SATA on Banana Pi M2 Ultra (R40) broken

68 views
Skip to first unread message

Danny Milosavljevic

unread,
Jan 29, 2020, 3:55:37 PM1/29/20
to linux...@googlegroups.com
Hi,

SATA seems to be broken on the mainline kernel for Banana Pi M2 Ultra
(with sunxi_defconfig).

Bisecting, I get:

4.19.99: broken (no sata, no ethernet)
5.2: broken (no working sata)
5.3: broken (no working sata)
5.4.4: broken (no working sata)
5.5: broken (no working sata)

"No working sata" means:

/dev/sda is initially there, but reading from it using dd, it disappears after a
timeout (after at least 20 seconds).

dmesg sometimes says that the drive is frozen and then deactivates it.

For comparison, the vendor kernel 3.10.108-BPI-M2U-Kernel works just fine (with
the same drive at 190 MB/s, and for days of activity).

In order to locate the problem I've replaced: drive, sata cable and the Banana
Pi M2 Ultra board, and the power supply (I_max = 2 A).

I've not tested replacing u-boot (using two different sd cards so far).
Could that make a difference?

If someone has it working fine, could you post the SD card image for testing?

I could have sworn that SATA worked on mainline before. Weird...

Excerpt of dmesg (Linux 5.2):

[ 1.808891] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 1.816579] ohci-platform 1c1c400.usb: irq 29, io mem 0x01c1c400
[ 1.824051] ata1.00: supports DRM functions and may not be fully accessible
[ 1.835479] ata1.00: ATA-9: Samsung SSD 850 EVO 250GB, EMT02B6Q, max UDMA/133
[ 1.842625] ata1.00: 488397168 sectors, multi 1: LBA48 NCQ (depth 32)
[ 1.850318] ata1.00: supports DRM functions and may not be fully accessible
[ 1.858190] ata1.00: configured for UDMA/133
[ 1.863010] scsi 0:0:0:0: Direct-Access ATA Samsung SSD 850 2B6Q PQ
: 0 ANSI: 5
[ 1.871980] sd 0:0:0:0: [sda] 488397168 512-byte logical blocks: (250 GB/233 GiB)
[ 1.879550] sd 0:0:0:0: [sda] Write Protect is off
[ 1.884350] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 1.884438] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1.902270] sda: sda1 sda2
[ 1.910360] sd 0:0:0:0: [sda] Attached SCSI disk
[ 1.938889] EXT4-fs (mmcblk0p2): mounted filesystem without journal. Opts: (null)
[...]
[ 21.745488] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
[ 628.488949] ata1: SATA link down (SStatus 0 SControl 300)
[ 633.868924] ata1: SATA link down (SStatus 0 SControl 300)
[ 639.228940] ata1: SATA link down (SStatus 0 SControl 300)
[ 639.228967] ata1.00: disabled
[ 639.229855] ata1.00: detaching (SCSI 0:0:0:0)
[ 639.233384] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 639.233578] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=0x04 driverbyte=0x00
[ 639.233587] sd 0:0:0:0: [sda] Stopping disk
[ 639.233641] sd 0:0:0:0: [sda] Start/Stop Unit failed: Result: hostbyte=0x04 driverbyte=0x00

Corentin Labbe

unread,
Jan 30, 2020, 1:01:20 AM1/30/20
to Danny Milosavljevic, linux...@googlegroups.com
Hello

My own bpi m2u is working fine on 5.5.0-rc2-next-20191220+ (doing luks on the sata drive).
I will test some stable version on it.

Regards

Danny Milosavljevic

unread,
Mar 9, 2020, 12:07:16 PM3/9/20
to Corentin Labbe, linux...@googlegroups.com
Hi Corentin,

On Thu, 30 Jan 2020 07:01:15 +0100
Corentin Labbe <clabbe....@gmail.com> wrote:

>My own bpi m2u is working fine on 5.5.0-rc2-next-20191220+ (doing luks on the sata drive).

That's good to know!

Which config do you use? If it's not sunxi_defconfig, could I have the config
you are using?

BR,
Danny

Danny Milosavljevic

unread,
Sep 21, 2020, 8:21:45 AM9/21/20
to Corentin Labbe, linux...@googlegroups.com
Hi,

On Thu, 30 Jan 2020 07:01:15 +0100
Corentin Labbe <clabbe....@gmail.com> wrote:

> My own bpi m2u is working fine on 5.5.0-rc2-next-20191220+ (doing luks on the sata drive).
> I will test some stable version on it.

Did you find the time to do this? I really need a known-working SD
card image for BPI M2U on mainline u-boot and mainline Linux in order
to find the problem.

The BPI M2U this happens on is the build host for GNU Mes for ARM[1] btw.

It is in all our interest that this works on that machine--otherwise I'll
have to bootstrap *all Linux distributions* starting from u-boot-sunxi
and Linux 3.4 from Allwinner (which work just fine--even though they
do lots of weird stuff in the source) rather than mainline U-Boot and
mainline Linux.

[1] https://nlnet.nl/project/GNUMes-arm/

Corentin Labbe

unread,
Sep 22, 2020, 3:08:29 PM9/22/20
to Danny Milosavljevic, linux...@googlegroups.com
Hello

Latest stable 5.8 (5.8.10) is working.
See http://kernel.montjoie.ovh/lava/local/20200922T18:19:19-105894.log.html
I use an old uboot 2018.11-00365-g93e72ac472b

Regards
Reply all
Reply to author
Forward
0 new messages