linux-sunxi icon indicating copy to clipboard operation
linux-sunxi copied to clipboard

SATA and kernel 3.4.75

Open oldpenguin opened this issue 11 years ago • 8 comments

Hello all

I am testing a SATA hard disk with Olimex A10-LIME board. It works correctly, but if I disable the sunxi_nand driver in the kernel configuration, SATA stops working with error:

[ 66.033059] ata1: SATA max UDMA/133 mmio [mem 0x01c18000-0x01c18fff] port 0x100 irq 56 [ 66.393493] ata1: SATA link down (SStatus 0 SControl 300)

What is the dependency on sunxi_nand ? What if I want to use mtd + SATA ?

Best regards

oldpenguin avatar Feb 11 '14 16:02 oldpenguin

mtd requires mainline kernel, so that's a non-issue As for nand +sata requirements, that's strange, maybe something else got disabled aswel?

oliv3r avatar Feb 11 '14 18:02 oliv3r

Recompiled with SUNXI_NAND as a module. Tried loading sw_ahci_platform first and nand after This is what I get:

root@debian:~# ll /dev/s* shm/ snd/ stderr stdin stdout sunxi-lcd
root@debian:~# modprobe sw_ahci_platform <6>sw_ahci sw_ahci.0: controller can't do PMP, turning off CAP_PMP [ 84.752700] sw_ahci sw_ahci.0: controller can't do PMP, turning off CAP_PMP <4>sw_ahci sw_ahci.0: forcing PORTS_IMPL to 0x1 [ 84.778096] sw_ahci sw_ahci.0: forcing PORTS_IMPL to 0x1 <6>sw_ahci sw_ahci.0: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl platform mode [ 84.791777] sw_ahci sw_ahci.0: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl platform mode <6>sw_ahci sw_ahci.0: flags: ncq sntf pm led clo only pio slum part ccc [ 84.807280] sw_ahci sw_ahci.0: flags: ncq sntf pm led clo only pio slum part ccc <6>scsi0 : sw_ahci_platform [ 84.825220] scsi0 : sw_ahci_platform <6>ata1: SATA max UDMA/133 mmio [mem 0x01c18000-0x01c18fff] port 0x100 irq 56 [ 84.843344] ata1: SATA max UDMA/133 mmio [mem 0x01c18000-0x01c18fff] port 0x100 irq 56 <6>ata1: SATA link down (SStatus 0 SControl 300) [ 85.201778] ata1: SATA link down (SStatus 0 SControl 300) root@debian:~# root@debian:~# modprobe nand [NAND] nand driver version: 0x2 0x9 [ 99.327347] [NAND] nand driver version: 0x2 0x9 <3>ata1: exception Emask 0x10 SAct 0x0 SErr 0x4050002 action 0xe frozen [ 99.578311] ata1: exception Emask 0x10 SAct 0x0 SErr 0x4050002 action 0xe frozen <3>ata1: irq_stat 0x00000040, connection status changed [ 99.591372] ata1: irq_stat 0x00000040, connection status changed <3>ata1: SError: { RecovComm PHYRdyChg CommWake DevExch } [ 99.603105] ata1: SError: { RecovComm PHYRdyChg CommWake DevExch } <6>ata1: hard resetting link [ 99.612700] ata1: hard resetting link <6>ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [ 101.393218] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) <6>ata1.00: ATA-9: ADATA SP600, 2.4, max UDMA/100 [ 101.424164] ata1.00: ATA-9: ADATA SP600, 2.4, max UDMA/100 <6>ata1.00: 62533296 sectors, multi 16: LBA48 NCQ (depth 31/32) [ 101.453733] ata1.00: 62533296 sectors, multi 16: LBA48 NCQ (depth 31/32) <6>ata1.00: configured for UDMA/100 [ 101.471261] ata1.00: configured for UDMA/100 <6>ata1: EH complete [ 101.477672] ata1: EH complete <5>scsi 0:0:0:0: Direct-Access ATA ADATA SP600 2.4 PQ: 0 ANSI: 5 [ 101.494090] scsi 0:0:0:0: Direct-Access ATA ADATA SP600 2.4 PQ: 0 ANSI: 5 [ 101.533464] sd 0:0:0:0: [sda] 62533296 512-byte logical blocks: (32.0 GB/29.8 GiB) <5>sd 0:0:0:0: [sda] Write Protect is off [ 101.584005] sd 0:0:0:0: [sda] Write Protect is off <7>sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 [ 101.612368] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 <5>sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 101.635045] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 101.673434] sda: sda1 <5>sd 0:0:0:0: [sda] Attached SCSI disk [ 101.697178] sd 0:0:0:0: [sda] Attached SCSI disk root@debian:~# ll /dev/sda* brw-rw---T 1 root disk 8, 0 Feb 11 18:29 [0m[40;33;01m/dev/sda[0m brw-rw---T 1 root disk 8, 1 Feb 11 18:29 [40;33;01m/dev/sda1[0m root@debian:~#

After loading nand, SATA link is restarted and hard disk is properly recognized. Any ideas ?

oldpenguin avatar Feb 11 '14 18:02 oldpenguin

can you paste somewhere (sprunge.us?) the deserialized fex of the script.bin you are using?

amery avatar Feb 11 '14 20:02 amery

http://sprunge.us/QXPa

Thanks for looking into this.

oldpenguin avatar Feb 12 '14 09:02 oldpenguin

I do have to ask you to upgrade to the latest 3.4 series as 3.4.75 is pretty ancient!

oliv3r avatar Feb 12 '14 19:02 oliv3r

Updated to 3.4.79. Same happens. I believe other people on Olimex forum have also verified this behavior. My config for 3.479 is here http://sprunge.us/BhXh

oldpenguin avatar Feb 13 '14 09:02 oldpenguin

the sata_para section of your .fex doesn't include any of the needed pinmixes

amery avatar Feb 14 '14 18:02 amery

My script.fex is based on Olimex one. Documentation on http://linux-sunxi.org/Fex_Guide#.5Bsata_para.5D only mentions:

[sata_para] sata_used = 1 sata_power_en = port:PB08< 1 >< default >< default >< 0 >

Can you tell me what else is missing ?

oldpenguin avatar Feb 14 '14 18:02 oldpenguin