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

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/20200129215530.58334d19%40scratchpost.org.

Attachment: pgpuo3wI6A0Ae.pgp
Description: OpenPGP digital signature

Reply via email to