Welcome! Log In Create A New Profile

Advanced

DLink DNS-325 second disk problem

Posted by t96 
t96
DLink DNS-325 second disk problem
October 29, 2018 06:38AM
Hi everyone

I compiled and flashed u-boot 2018.07 with dns325_defconfig to my device
It could'n see second ide device

U-Boot 2018.07-dirty (Sep 19 2018 - 22:32:33 +0300)
D-Link DNS-325

SoC: Kirkwood 88F6281_A1
DRAM: 256 MiB
WARNING: Caches not enabled
NAND: 128 MiB
Loading Environment from NAND... OK
In: serial
Out: serial
Err: serial
Net: egiga0
IDE: Bus 0: ........OK Bus 1: not available 
Device 0: Model: WDC WD20EZRX-00DC0B0 Firm: 80.00A80 Ser#: WD-WCC1T0166503
Type: Hard Disk
Supports 48-bit addressing
Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)

It is not disk related problem, both disks are successfully detecting in first slot.

Any ideas for possible solutions?



Edited 1 time(s). Last edit at 10/29/2018 07:15AM by t96.
Re: DLink DNS-325 second disk problem
October 30, 2018 01:32AM
t96,

Did you ever build previous version before 2018.7, and did both SATA work?

Are you building straigth from the source, with no patch?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
t96
Re: DLink DNS-325 second disk problem
October 30, 2018 03:00AM
Hi bodhi

Thank you for your response

I have compiled and tried all stable versions since 2012.04 and launched them with the help of kwboot, only first one shows second disk.
Frankly speaking not all of them, as well as 2018.09, could reach u-boot prompt.
Some of them freezes immediately after uploading, some of them started u-boot code, but freezes after printing NAND:

I'm building straight from source, didn't see any references for the patch.

Also I tried to go a little bit deeper for debugging. IDE driver returns status 7F immediately after first request, that is why it is not available.

I hope this is not a hardware problem, it worked with original firmware, unfortunately I did't save it before new one and not able to check once more.
Re: DLink DNS-325 second disk problem
October 30, 2018 04:23AM
t96,

1. First, the mesage that you saw was not an error:
IDE: Bus 0: ........OK Bus 1: not available
It just means u-boot has initialized bus 0 and 1. And u-boot determined that there is no disk in bus 1.

2. I've looked at the mainline code for clue regarding SATA and it still looks good to me (it has been awhile since I looked at this box u-boot code). If you build the source as is it should work. So you should try to initialize it at u-boot prompt. This is a more reliable time to test the SATA ports

ide reset

3. If trying to force reset did not work in number 2 above. You should boot into Linux with the current flashed u-boot and check to see if both SATA disks are visible in Linux.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
t96
Re: DLink DNS-325 second disk problem
October 30, 2018 04:57AM
Running command ide reset from u-boot prompt shows the same result

In the kernel
...
[ 6.806124] sata_mv f1080000.sata: slots 32 ports 2
[ 6.813739] scsi host0: sata_mv
[ 6.817374] scsi host1: sata_mv
[ 6.820788] ata1: SATA max UDMA/133 irq 33
[ 6.824907] ata2: SATA max UDMA/133 irq 33
...
[ 7.330599] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[ 7.350753] ata1.00: ATA-9: WDC WD20EZRX-00DC0B0, 80.00A80, max UDMA/133
[ 7.357490] ata1.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[ 7.373121] ata1.00: configured for UDMA/133
[ 7.387945] scsi 0:0:0:0: Direct-Access ATA WDC WD20EZRX-00D 0A80 PQ: 0 ANSI: 5
[ 7.411584] sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[ 7.419370] sd 0:0:0:0: [sda] 4096-byte physical blocks
[ 7.430704] sd 0:0:0:0: [sda] Write Protect is off
[ 7.440680] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 7.752020] ata2: SATA link down (SStatus 0 SControl F300)
...
[ 8.146283] sda: sda1 sda2 sda4
[ 8.151429] sd 0:0:0:0: [sda] Attached SCSI disk

No errors at all, seems that second disk is not present at all, but it is not true
It doesn't start spinning, may be there is no power, but I don't know how to check it.

At the label of the box I found that it contains DNS-325 rev.A2, dts contains definition for rev.A1
May be difference is here
Re: DLink DNS-325 second disk problem
October 30, 2018 05:10AM
> No errors at all, seems that second disk is not
> present at all, but it is not true
> It doesn't start spinning, may be there is no
> power, but I don't know how to check it.

By the look of the DTS, both SATA have full definition, including the power supply regulator. So power is unlikely a software problem.

Please post full dmesg.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
t96
Re: DLink DNS-325 second disk problem
October 30, 2018 05:24AM
Full log is attached
Attachments:
open | download - dns325.log (12.1 KB)
t96
Re: DLink DNS-325 second disk problem
October 30, 2018 05:00PM
The reason was with the kernel, which was build by myself and most probably not configured correctly.
With linux-4.19.0-kirkwood-tld-1 there is no problem with second disk
Thank you
Re: DLink DNS-325 second disk problem
October 30, 2018 06:52PM
t96 Wrote:
-------------------------------------------------------
> The reason was with the kernel, which was build by
> myself and most probably not configured
> correctly.
> With linux-4.19.0-kirkwood-tld-1 there is no
> problem with second disk
> Thank you

Cool!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: