SATA Kernel 4.14 failed command: IDENTIFY DEVICE

Booting on 4.14, I have the following message at login prompt.

# uname -a
Linux bpi-r2 4.14.11-00039-ga352d6b52e30 #2 SMP Thu Jan 4 11:27:02 EST 2018 armv7l GNU/Linux

After boot time i got those message.

[   36.971938] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[   36.978961] ata1.00: failed command: IDENTIFY DEVICE
[   36.983944] ata1.00: cmd ec/00:01:00:00:00/00:00:00:00:00/00 tag 20 pio 512 in
[   36.983944]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[   36.998497] ata1.00: status: { DRDY }
[   37.002172] ata1: hard resetting link
[   37.501895] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[   37.509442] ata1.00: configured for UDMA/133
[   37.513767] ata1: EH complete

On a different reboot

[   37.611994] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[   37.619016] ata2.00: failed command: IDENTIFY DEVICE
[   37.623998] ata2.00: cmd ec/00:01:00:00:00/00:00:00:00:00/00 tag 20 pio 512 in
[   37.623998]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[   37.638539] ata2.00: status: { DRDY }
[   37.642209] ata2: hard resetting link
[   38.141997] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[   38.149555] ata2.00: configured for UDMA/133
[   38.153895] ata2: EH complete

as i knew, 4.14 dts doesn’t have pcie nodes. so, pcie is not ready yet.

in my repo i added some pcie-nodes (for pcie-slot)…maybe there is any missing for sata…

&pcie {
	pinctrl-names = "default";
	pinctrl-0 = <&pcie_default>;
	status = "okay";

	pcie@0,0 {
		status = "okay";
	};

	pcie@1,0 {
		status = "okay";
	};
};

&pcie0_phy {
	status = "okay";
};

&pcie1_phy {
	status = "okay";
};

It should be unnecessary to being added additional node into data for sata.

it is enough with just enabling obj-$(CONFIG_SATA_AHCI) += ahci.o libahci.o in drivers/ata/Makefile

the sata is just a pci device, it would be matched and called with the appropriate driver when pci-e slot is link up.

that line in Makefile in that state and config-option CONFIG_SATA_AHCI is set in my defconfig

what change do you mention?

No, your setup should be enough and correct. There should be other causes making the timeout.

@xbgmsharp can you please build debug-branch from my kernel and test again?

added pcie-patch from lede, maybe this fixes your sata-issue

@linkerosa you can also use the debug-branch for pwm :slight_smile:

I boot with the debug-branch however no message appears.

sounds good…can you access your sata-drive?

have you last version of debug-branch (with BT)? hen you can test this also :wink:

I do have the latest version with BT on 4.14.11

# uname -a
Linux bpi-r2 4.14.11-00040-gcec7d2441fda #1 SMP Fri Jan 5 13:23:41 CET 2018 armv7l GNU/Linux

Wifi hotspot - still in debug - and so issue connecting on first time - and loading firmware.

Could not set station b4:9d:0b:4d:4d:ee flags for kernel driver (errno=11).

BT still not working…

[ 1361.315131] Bluetooth: Core ver 2.22
[ 1361.318806] NET: Registered protocol family 31
[ 1361.323306] Bluetooth: HCI device and connection manager initialized
[ 1361.329648] Bluetooth: HCI socket layer initialized
[ 1361.334527] Bluetooth: L2CAP socket layer initialized
[ 1361.339587] Bluetooth: SCO socket layer initialized

Network only in 100Mpbs/Full

[    9.432360] mt7530 mdio-bus:00 lan0: Link is Down
[    9.512404] mt7530 mdio-bus:00 lan3: Link is Down
[    9.512489] mt7530 mdio-bus:00 lan2: Link is Down
[    9.512656] mt7530 mdio-bus:00 lan1: Link is Down
[   10.562987] mt7530 mdio-bus:00 lan3: Link is Up - 100Mbps/Full - flow control rx/tx
[   11.522700] mt7530 mdio-bus:00 lan0: Link is Up - 10Mbps/Half - flow control off
[ 3378.082974] mt7530 mdio-bus:00 lan2: Link is Up - 100Mbps/Full - flow control off

Missing br_netfilter

[    8.345614] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.

Audio missing.

[    2.561293] ALSA device list:
[    2.564265]   No soundcards found.

please first stay on sata…is that working?

this is my net-message:

[   12.400201] mt7530 mdio-bus:00 lan0: Link is Up - 1Gbps/Full - flow control off

for bluetooth…intialisation seems to be initialized without errors…have you found anywhere errors?

gary is working on audio currently for 4.4…if that works i can try to port it (if not already in 4.14)…i have audio not enabled…maybe you find an option to get it working

please note that i’m a private person and not professional developer which is doing that in free-time :slight_smile:

No worries me too.

I am just checking what is the status of the board.

In term of sata no more message. i will keep an eye on it.

Currently i want to get the router-specific functions (ethernet/gmac,hnat,wifi,vlan,…) working first. i that is working, i try to go further :slight_smile: any help is welcome,also on other functions.

do you got any errors on bt? Can you access your sata-drive?

SATA-access successful? can your read/write without erros to your disk attached on sata?

(i want to merge the debug-branch)

Yes no more error, i able to access read/write to the disk.

You can merge the vlan_414 and debug in the main branch.

for vlan_414 i will do additional tests…but must configure my equipment…good to know it is working so far…

can you try hnat?

debug merged to main…

Did not figure out how to test/sue hnat yet i use classic iptable.

me too :slight_smile: i assume that the throughput will be higher throught NAT with HW-acceleration

i also want to define the nat in iptables, but accelerated by SOC