SATA on kernel 3.4.75

Started by oldpenguin, February 11, 2014, 01:28:53 PM

Previous topic - Next topic

oldpenguin

Hello everyone

I compiled latest kernel for A10 Lime (git clone https://github.com/linux-sunxi/linux-sunxi)

Unfortunately SATA does not seem to be working on this kernel 3.4.75. I tested it against the original 3.4.67 kernel that came with SD card and that is mentioned in article http://olimex.wordpress.com/2013/12/13/building-debian-linux-image-for-a10-olinuxino-lime-with-kernel-3-4-67/

With kernel 3.4.67
root@debian:~# modprobe sw_ahci_platform
<6>sw_ahci sw_ahci.0: controller can't do PMP, turning off CAP_PMP
[  239.746582] 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
[  239.792082] 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
[  239.804888] 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
[  239.824647] sw_ahci sw_ahci.0: flags: ncq sntf pm led clo only pio slum part ccc
<6>scsi0 : sw_ahci_platform
[  239.842823] scsi0 : sw_ahci_platform
<6>ata1: SATA max UDMA/133 mmio [mem 0x01c18000-0x01c18fff] port 0x100 irq 56
[  239.861097] ata1: SATA max UDMA/133 mmio [mem 0x01c18000-0x01c18fff] port 0x100 irq 56
<6>ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[  240.222949] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
<6>ata1.00: ATA-9: ADATA SP600, 2.4, max UDMA/100
[  240.234527] ata1.00: ATA-9: ADATA SP600, 2.4, max UDMA/100
<6>ata1.00: 62533296 sectors, multi 16: LBA48 NCQ (depth 31/32)
[  240.246208] ata1.00: 62533296 sectors, multi 16: LBA48 NCQ (depth 31/32)
<6>ata1.00: configured for UDMA/100
[  240.256869] ata1.00: configured for UDMA/100
<5>scsi 0:0:0:0: Direct-Access     ATA      ADATA SP600      2.4  PQ: 0 ANSI: 5
[  240.285396] scsi 0:0:0:0: Direct-Access     ATA      ADATA SP600      2.4  PQ: 0 ANSI: 5
<5>sd 0:0:0:0: [sda] 62533296 512-byte logical blocks: (32.0 GB/29.8 GiB)
[  240.306943] 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
[  240.331398] sd 0:0:0:0: [sda] Write Protect is off
<7>sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[  240.355034] 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
[  240.374208] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
<6> sda: sda1
[  240.390179]  sda: sda1
<5>sd 0:0:0:0: [sda] Attached SCSI disk
[  240.403249] sd 0:0:0:0: [sda] Attached SCSI disk


With kernel 3.4.75

root@debian:~# modprobe sw_ahci_platform
<6>sw_ahci sw_ahci.0: controller can't do PMP, turning off CAP_PMP
[   65.942632] 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
[   65.967645] 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
[   65.981282] 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
[   65.996754] sw_ahci sw_ahci.0: flags: ncq sntf pm led clo only pio slum part ccc
<6>scsi0 : sw_ahci_platform
[   66.014902] scsi0 : sw_ahci_platform
<6>ata1: SATA max UDMA/133 mmio [mem 0x01c18000-0x01c18fff] port 0x100 irq 56
[   66.033059] ata1: SATA max UDMA/133 mmio [mem 0x01c18000-0x01c18fff] port 0x100 irq 56
<6>ata1: SATA link down (SStatus 0 SControl 300)
[   66.393493] ata1: SATA link down (SStatus 0 SControl 300)


Has anyone else experienced this ?

Regards

oldpenguin

Some updates

Forgot to state that configurations are not exactly equal. kernel 3.4.75 has sunxi-nand disabled.

And that makes all the difference. If I enable sunxi_nand, SATA starts working again.

Any comment ?

iso9660

Same hapens with kernel 3.4.79.
Please, could you specify the menuconfig option you activated to make it work again?

oldpenguin

Yes, same to me also on kernel 3.4.79
What I do is compile nand and sata as modules.
After boot, I do modprobe sw_ahci_platform and SATA link is down.
After that, I do modprobe nand and SATA link resets and starts working correctly

My configuration for kernel 3.4.75 is here http://sprunge.us/SDQX

Verified on kernels 3.4.67, 3.4.75 and 3.4.79

I have an issue open on linux-sunxi about this

Regards

António