* [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109
@ 2008-08-26 8:45 Frans Pop
2008-08-27 17:29 ` saeed bishara
0 siblings, 1 reply; 20+ messages in thread
From: Frans Pop @ 2008-08-26 8:45 UTC (permalink / raw)
To: linux-arm-kernel
Cc: linux-ide, Saeed Bishara, Mark Lord, Nicolas Pitre,
Lennert Buytenhek
[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]
Starting with kernel 2.6.26 I've noticed that the harddisk (HDD) led on my
QNAP TS-109 (which has a Marvel SATA controller as platform device) no
longer flashes when there is disk activity. Instead it will just
stay "on" all the time. The led worked fine with 2.6.25.
I have bisected this to the following series of commits, which are all
libata or sata_mv changes:
9363c3825ea9ad7..094e50b2f74146d8ee
Further bisection is not possible because between those commits the
harddisk is not recognized at all.
Lennert Buytenhek suggested to try disabling NCQ, and that does indeed
make a difference.
After booting the system I did 'echo 1 >/sys/block/sdX/device/queue_depth'
and after that the HDD led showed disk activity again.
After enabling NCQ again ('echo 31 >/sys/...'), the led again becomes
unresponsive and just stays on.
Attached a diff between sata_mv hardware registers between 2.6.25 and
2.6.26 obtained using a patch provided by Mark Lord. (For some reason
"Host" and "ATA Shadow" regs were not available on 2.6.25.)
Cheers,
FJP
[-- Attachment #2: qnap_mv0.regs.diff --]
[-- Type: text/x-diff, Size: 9944 bytes --]
--- qnap_mv0_2.6.25.regs 2008-08-11 20:13:14.000000000 +0200
+++ qnap_mv0.regs 2008-08-11 19:08:18.000000000 +0200
@@ -1,102 +1,106 @@
CRPBs:
- 0: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=52630
- 1: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=54883
- 2: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=57132
- 3: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=59382
- 4: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=61878
- 5: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=64515
- 6: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=1121
- 7: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=3279
- 8: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=5368
- 9: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=7277
- 10: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=9196
- 11: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=11005
- 12: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=12797
- 13: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=14946
- 14: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=16923
- 15: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=18722
- 16: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=20525
- 17: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=30791
- 18: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=11866
- 19: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=56565
- 20: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=64129
- 21: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=4382
- 22: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=52366
- 23: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=28236
-=24: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=30786
- 25: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=33358
- 26: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=35931
- 27: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=38729
- 28: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=41622
- 29: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=44619
- 30: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=47195
- 31: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=49739
+ 0: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=54641
+ 1: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=55675
+ 2: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=62732
+ 3: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=3073
+ 4: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=8681
+ 5: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=9721
+ 6: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=10762
+ 7: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=17302
+ 8: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=23001
+ 9: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=52336
+ 10: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=53359
+ 11: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=56477
+ 12: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=37642
+ 13: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=38704
+ 14: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=39764
+ 15: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=46417
+ 16: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=52200
+ 17: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=32877
+ 18: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=62100
+ 19: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=1606
+ 20: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=34537
+ 21: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=35359
+ 22: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=36419
+ 23: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=51224
+ 24: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=58938
+=25: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=10808
+ 26: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=11848
+ 27: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=12877
+ 28: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=22037
+ 29: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=28404
+ 30: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=26248
+ 31: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=53609
CRQBs:
- 0: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 1: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 2: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 3: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 4: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 5: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 6: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 7: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 8: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 9: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 10: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 11: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 12: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 13: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 14: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 15: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 16: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 17: 07d47000 00000000 00000001 00000000 00c80000 ..
- 18: 07d47000 00000000 00000001 00000000 00c80000 ..
- 19: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 20: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 21: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 22: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 23: 07d47000 00000000 00000001 00000000 00c80000 ..
- 24: 07d47000 00000000 00000001 00000000 00c80000 ..
-=25: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 26: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 27: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 28: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 29: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 30: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 31: 07d47000 00000000 00000000 00000000 00ca0000 ..
+ 0: 07d59000 00000000 00020002 00000000 08610000 ..
+ 1: 07d04000 00000000 00040004 00000000 08610000 ..
+ 2: 07d58000 00000000 00000000 00000000 18610000 ..
+ 3: 07d58000 00000000 00000000 00000000 08610000 ..
+ 4: 07d58000 00000000 00000000 00000000 08610000 ..
+ 5: 07d59000 00000000 00020002 00000000 08610000 ..
+ 6: 07d04000 00000000 00040004 00000000 08610000 ..
+ 7: 07d58000 00000000 00000000 00000000 10610000 ..
+ 8: 07d58000 00000000 00000000 00000000 08610000 ..
+ 9: 07d58000 00000000 00000000 00000000 10610000 ..
+ 10: 07d59000 00000000 00020002 00000000 08610000 ..
+ 11: 07d58000 00000000 00000000 00000000 08610000 ..
+ 12: 07d58000 00000000 00000000 00000000 08610000 ..
+ 13: 07d59000 00000000 00020002 00000000 08610000 ..
+ 14: 07d04000 00000000 00040004 00000000 08610000 ..
+ 15: 07d58000 00000000 00000000 00000000 10610000 ..
+ 16: 07d58000 00000000 00000000 00000000 08610000 ..
+ 17: 07d58000 00000000 00000000 00000000 08610000 ..
+ 18: 07d58000 00000000 00000001 00000000 08600000 ..
+ 19: 07d58000 00000000 00000001 00000000 08600000 ..
+ 20: 07d58000 00000000 00000001 00000000 08600000 ..
+ 21: 07d58000 00000000 00000000 00000000 08610000 ..
+ 22: 07d59000 00000000 00020002 00000000 08610000 ..
+ 23: 07d58000 00000000 00000000 00000000 10610000 ..
+ 24: 07d58000 00000000 00000000 00000000 08610000 ..
+=25: 07d58000 00000000 00000000 00000000 08610000 ..
+ 26: 07d59000 00000000 00020002 00000000 08610000 ..
+ 27: 07d04000 00000000 00040004 00000000 08610000 ..
+ 28: 07d58000 00000000 00000000 00000000 18610000 ..
+ 29: 07d58000 00000000 00000000 00000000 08610000 ..
+ 30: 07d58000 00000000 00000001 00000000 08600000 ..
+ 31: 07d58000 00000000 00000000 00000000 08610000 ..
EDMA regs:
-000: Config: 0000001f Qlen=32 BSz=128 WBlen=256
-004: Timer: 3824da8b
+000: Config: 0000003f NCQ Qlen=32 BSz=128 WBlen=256
+004: Timer: d9ac2965
008: IErrCau: 00000000
00c: IErrMsk: fc1e9fff pDAT pPRD DevErr DevDis DevCon SerrInt bit6 SelfDis TrInt pCQRB pCRPB pInt IORdy cRx2 dRx0 dRx1 dRx2 dRx3 dTx0 dTx1 dTx2 dTx3 dTx4 Proto
010: RqBaseHi: 00000000
-014: RqInPtr: 07c91320 Index=25 Base=0x7c91
+014: RqInPtr: 07d56320 Index=25 Base=0x7d56
018: RqOutPtr: 00000320 Index=25 Base=0x0
01c: RsBaseHi: 00000000
020: RsInPtr: 000000c8 Index=25 Base=0x0
-024: RsOutPtr: 07d460c8 Index=25 Base=0x7d460
+024: RsOutPtr: 07d570c8 Index=25 Base=0x7d570
028: Command: 00000001 Active
02c: TestCtrl: 00000000
-030: Status: 000000e0 Tag=0 D2M cEmpty Idle State=0x0 IOID=0
+030: Status: 000000c0 Tag=0 M2D cEmpty Idle State=0x0 IOID=0
034: IORdyTO: 000000bc
038: Arbiter: 00032190
040: DelayThr: 00000000
060: HaltCond: fc1e0e1f
-064: IErrCau2: 00000000
+064: IErrCau2: 00000004
068: IErrMsk2: 00000000
06c: Reserved: ff000000
080: FsmDctl: 0000ffff
084: FsmDstat: 00000000
088: BusyStat: 00000000
08c: TcqStat: 00000000
-090: RxFISprs: 00504034
+090: RxFISprs: 015040a1
094: Ncq0Done: 00000000
098: Ncq1Done: 00000000
09c: Ncq2Done: 00000000
0a0: Ncq3Done: 00000000
-0a8: DsMemory: 10100001
+0a8: DsMemory: 10100000
+
+HOST regs:
+1d60: MainCaus: 00000000
+1d64: MainMask: 00000000
SATA regs:
300: SStatus: 00000113 DET=Dev+Phy SPD=0x1 IPM=0x1
@@ -104,26 +108,37 @@
340: SErrMsk: 019c0000 W B D S T
308: SControl: 00000300 DET=Off IPM=0x3
30c: LTMode: 010300b0
-310: PhyMod3: aaaac02a
+310: PhyMod3: aaaac022
314: PhyMod4: 00010005
32c: PhyMod1: 40555aa0
330: PhyMod2: 3cf5944f
334: BistCtl: 00800000
338: BistDW1: 00000000
33c: BistDW2: 00000000
-050: IFCfg: 009b7095 RefClk=25Mhz RefClkDiv=2 FeedDiv=1 Gen2iEn bits_12-23=0x9b7
+050: IFCfg: 009b1095 RefClk=25Mhz RefClkDiv=2 FeedDiv=1 Gen2iEn bits_12-23=0x9b1
344: IFCtl: 00000000 PmPortTx=0
348: IFTstCtl: 00000000
-34c: IFStatus: 00404034 FIStypeRx=0x34 PMportRx=0 MBistRdy DevPres LinkRdy
+34c: IFStatus: 004040a1 FIStypeRx=0xa1 PMportRx=0 MBistRdy DevPres LinkRdy
35c: VUnique: 00000000
360: FISCfg: 00000000
364: FISiCaus: 00008000
368: FISiMask: 00000a00
-370: RxFISDW0: 00504034
-374: RxFISDW1: e6bc2800
-378: RxFISDW2: 00000006
+370: RxFISDW0: 005040a1
+374: RxFISDW1: 00000001
+378: RxFISDW2: 00000000
37c: RxFISDW3: 00000000
380: RxFISDW4: 00000000
-384: RxFISDW5: 00000000
+384: RxFISDW5: 00001000
388: RxFISDW6: 00000000
+ATA Shadow regs:
+100: Data: 16a516a5
+104: Error: 00000000
+108: NSect: 08080808
+10c: LbaL: c8c8c8c8
+110: LbaM: 3e3e3e3e
+114: LbaH: 2a2a2a2a
+118: Dev: 40404040
+11c: Stat: 50505050
+120: AltStat: 50505050
+
^ permalink raw reply [flat|nested] 20+ messages in thread
* [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109
@ 2008-08-26 9:24 Frans Pop
2008-08-26 10:25 ` Frans Pop
2008-08-26 14:03 ` Mark Lord
0 siblings, 2 replies; 20+ messages in thread
From: Frans Pop @ 2008-08-26 9:24 UTC (permalink / raw)
To: linux-arm
Cc: linux-ide, Saeed Bishara, Mark Lord, Nicolas Pitre,
Lennert Buytenhek
[-- Attachment #1: Type: text/plain, Size: 1122 bytes --]
(Resend with correct address for linux-arm list; with apologies.)
Starting with kernel 2.6.26 I've noticed that the harddisk (HDD) led on my
QNAP TS-109 (which has a Marvel SATA controller as platform device) no
longer flashes when there is disk activity. Instead it will just
stay "on" all the time. The led worked fine with 2.6.25.
I have bisected this to the following series of commits, which are all
libata or sata_mv changes:
9363c3825ea9ad7..094e50b2f74146d8ee
Further bisection is not possible because between those commits the
harddisk is not recognized at all.
Lennert Buytenhek suggested to try disabling NCQ, and that does indeed
make a difference.
After booting the system I did 'echo 1 >/sys/block/sdX/device/queue_depth'
and after that the HDD led showed disk activity again.
After enabling NCQ again ('echo 31 >/sys/...'), the led again becomes
unresponsive and just stays on.
Attached a diff between sata_mv hardware registers between 2.6.25 and
2.6.26 obtained using a patch provided by Mark Lord. (For some reason
"Host" and "ATA Shadow" regs were not available on 2.6.25.)
Cheers,
FJP
[-- Attachment #2: qnap_mv0.regs.diff --]
[-- Type: text/x-diff, Size: 9944 bytes --]
--- qnap_mv0_2.6.25.regs 2008-08-11 20:13:14.000000000 +0200
+++ qnap_mv0.regs 2008-08-11 19:08:18.000000000 +0200
@@ -1,102 +1,106 @@
CRPBs:
- 0: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=52630
- 1: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=54883
- 2: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=57132
- 3: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=59382
- 4: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=61878
- 5: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=64515
- 6: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=1121
- 7: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=3279
- 8: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=5368
- 9: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=7277
- 10: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=9196
- 11: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=11005
- 12: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=12797
- 13: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=14946
- 14: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=16923
- 15: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=18722
- 16: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=20525
- 17: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=30791
- 18: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=11866
- 19: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=56565
- 20: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=64129
- 21: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=4382
- 22: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=52366
- 23: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=28236
-=24: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=30786
- 25: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=33358
- 26: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=35931
- 27: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=38729
- 28: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=41622
- 29: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=44619
- 30: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=47195
- 31: tag=0 ioid=0 estat=0x00 dstat=0x50 tstmp=49739
+ 0: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=54641
+ 1: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=55675
+ 2: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=62732
+ 3: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=3073
+ 4: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=8681
+ 5: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=9721
+ 6: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=10762
+ 7: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=17302
+ 8: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=23001
+ 9: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=52336
+ 10: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=53359
+ 11: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=56477
+ 12: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=37642
+ 13: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=38704
+ 14: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=39764
+ 15: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=46417
+ 16: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=52200
+ 17: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=32877
+ 18: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=62100
+ 19: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=1606
+ 20: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=34537
+ 21: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=35359
+ 22: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=36419
+ 23: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=51224
+ 24: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=58938
+=25: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=10808
+ 26: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=11848
+ 27: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=12877
+ 28: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=22037
+ 29: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=28404
+ 30: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=26248
+ 31: tag=0 ioid=0 estat=0x00 dstat=0x40 tstmp=53609
CRQBs:
- 0: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 1: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 2: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 3: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 4: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 5: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 6: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 7: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 8: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 9: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 10: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 11: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 12: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 13: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 14: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 15: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 16: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 17: 07d47000 00000000 00000001 00000000 00c80000 ..
- 18: 07d47000 00000000 00000001 00000000 00c80000 ..
- 19: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 20: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 21: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 22: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 23: 07d47000 00000000 00000001 00000000 00c80000 ..
- 24: 07d47000 00000000 00000001 00000000 00c80000 ..
-=25: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 26: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 27: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 28: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 29: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 30: 07d47000 00000000 00000000 00000000 00ca0000 ..
- 31: 07d47000 00000000 00000000 00000000 00ca0000 ..
+ 0: 07d59000 00000000 00020002 00000000 08610000 ..
+ 1: 07d04000 00000000 00040004 00000000 08610000 ..
+ 2: 07d58000 00000000 00000000 00000000 18610000 ..
+ 3: 07d58000 00000000 00000000 00000000 08610000 ..
+ 4: 07d58000 00000000 00000000 00000000 08610000 ..
+ 5: 07d59000 00000000 00020002 00000000 08610000 ..
+ 6: 07d04000 00000000 00040004 00000000 08610000 ..
+ 7: 07d58000 00000000 00000000 00000000 10610000 ..
+ 8: 07d58000 00000000 00000000 00000000 08610000 ..
+ 9: 07d58000 00000000 00000000 00000000 10610000 ..
+ 10: 07d59000 00000000 00020002 00000000 08610000 ..
+ 11: 07d58000 00000000 00000000 00000000 08610000 ..
+ 12: 07d58000 00000000 00000000 00000000 08610000 ..
+ 13: 07d59000 00000000 00020002 00000000 08610000 ..
+ 14: 07d04000 00000000 00040004 00000000 08610000 ..
+ 15: 07d58000 00000000 00000000 00000000 10610000 ..
+ 16: 07d58000 00000000 00000000 00000000 08610000 ..
+ 17: 07d58000 00000000 00000000 00000000 08610000 ..
+ 18: 07d58000 00000000 00000001 00000000 08600000 ..
+ 19: 07d58000 00000000 00000001 00000000 08600000 ..
+ 20: 07d58000 00000000 00000001 00000000 08600000 ..
+ 21: 07d58000 00000000 00000000 00000000 08610000 ..
+ 22: 07d59000 00000000 00020002 00000000 08610000 ..
+ 23: 07d58000 00000000 00000000 00000000 10610000 ..
+ 24: 07d58000 00000000 00000000 00000000 08610000 ..
+=25: 07d58000 00000000 00000000 00000000 08610000 ..
+ 26: 07d59000 00000000 00020002 00000000 08610000 ..
+ 27: 07d04000 00000000 00040004 00000000 08610000 ..
+ 28: 07d58000 00000000 00000000 00000000 18610000 ..
+ 29: 07d58000 00000000 00000000 00000000 08610000 ..
+ 30: 07d58000 00000000 00000001 00000000 08600000 ..
+ 31: 07d58000 00000000 00000000 00000000 08610000 ..
EDMA regs:
-000: Config: 0000001f Qlen=32 BSz=128 WBlen=256
-004: Timer: 3824da8b
+000: Config: 0000003f NCQ Qlen=32 BSz=128 WBlen=256
+004: Timer: d9ac2965
008: IErrCau: 00000000
00c: IErrMsk: fc1e9fff pDAT pPRD DevErr DevDis DevCon SerrInt bit6 SelfDis TrInt pCQRB pCRPB pInt IORdy cRx2 dRx0 dRx1 dRx2 dRx3 dTx0 dTx1 dTx2 dTx3 dTx4 Proto
010: RqBaseHi: 00000000
-014: RqInPtr: 07c91320 Index=25 Base=0x7c91
+014: RqInPtr: 07d56320 Index=25 Base=0x7d56
018: RqOutPtr: 00000320 Index=25 Base=0x0
01c: RsBaseHi: 00000000
020: RsInPtr: 000000c8 Index=25 Base=0x0
-024: RsOutPtr: 07d460c8 Index=25 Base=0x7d460
+024: RsOutPtr: 07d570c8 Index=25 Base=0x7d570
028: Command: 00000001 Active
02c: TestCtrl: 00000000
-030: Status: 000000e0 Tag=0 D2M cEmpty Idle State=0x0 IOID=0
+030: Status: 000000c0 Tag=0 M2D cEmpty Idle State=0x0 IOID=0
034: IORdyTO: 000000bc
038: Arbiter: 00032190
040: DelayThr: 00000000
060: HaltCond: fc1e0e1f
-064: IErrCau2: 00000000
+064: IErrCau2: 00000004
068: IErrMsk2: 00000000
06c: Reserved: ff000000
080: FsmDctl: 0000ffff
084: FsmDstat: 00000000
088: BusyStat: 00000000
08c: TcqStat: 00000000
-090: RxFISprs: 00504034
+090: RxFISprs: 015040a1
094: Ncq0Done: 00000000
098: Ncq1Done: 00000000
09c: Ncq2Done: 00000000
0a0: Ncq3Done: 00000000
-0a8: DsMemory: 10100001
+0a8: DsMemory: 10100000
+
+HOST regs:
+1d60: MainCaus: 00000000
+1d64: MainMask: 00000000
SATA regs:
300: SStatus: 00000113 DET=Dev+Phy SPD=0x1 IPM=0x1
@@ -104,26 +108,37 @@
340: SErrMsk: 019c0000 W B D S T
308: SControl: 00000300 DET=Off IPM=0x3
30c: LTMode: 010300b0
-310: PhyMod3: aaaac02a
+310: PhyMod3: aaaac022
314: PhyMod4: 00010005
32c: PhyMod1: 40555aa0
330: PhyMod2: 3cf5944f
334: BistCtl: 00800000
338: BistDW1: 00000000
33c: BistDW2: 00000000
-050: IFCfg: 009b7095 RefClk=25Mhz RefClkDiv=2 FeedDiv=1 Gen2iEn bits_12-23=0x9b7
+050: IFCfg: 009b1095 RefClk=25Mhz RefClkDiv=2 FeedDiv=1 Gen2iEn bits_12-23=0x9b1
344: IFCtl: 00000000 PmPortTx=0
348: IFTstCtl: 00000000
-34c: IFStatus: 00404034 FIStypeRx=0x34 PMportRx=0 MBistRdy DevPres LinkRdy
+34c: IFStatus: 004040a1 FIStypeRx=0xa1 PMportRx=0 MBistRdy DevPres LinkRdy
35c: VUnique: 00000000
360: FISCfg: 00000000
364: FISiCaus: 00008000
368: FISiMask: 00000a00
-370: RxFISDW0: 00504034
-374: RxFISDW1: e6bc2800
-378: RxFISDW2: 00000006
+370: RxFISDW0: 005040a1
+374: RxFISDW1: 00000001
+378: RxFISDW2: 00000000
37c: RxFISDW3: 00000000
380: RxFISDW4: 00000000
-384: RxFISDW5: 00000000
+384: RxFISDW5: 00001000
388: RxFISDW6: 00000000
+ATA Shadow regs:
+100: Data: 16a516a5
+104: Error: 00000000
+108: NSect: 08080808
+10c: LbaL: c8c8c8c8
+110: LbaM: 3e3e3e3e
+114: LbaH: 2a2a2a2a
+118: Dev: 40404040
+11c: Stat: 50505050
+120: AltStat: 50505050
+
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109
2008-08-26 9:24 Frans Pop
@ 2008-08-26 10:25 ` Frans Pop
2009-01-24 14:57 ` Mark Lord
2008-08-26 14:03 ` Mark Lord
1 sibling, 1 reply; 20+ messages in thread
From: Frans Pop @ 2008-08-26 10:25 UTC (permalink / raw)
To: linux-arm
Cc: linux-ide, Saeed Bishara, Mark Lord, Nicolas Pitre,
Lennert Buytenhek
On Tuesday 26 August 2008, Frans Pop wrote:
> After booting the system I did 'echo 1 >/sys/block/sdX/device/queue_depth'
> and after that the HDD led showed disk activity again.
And to confirm that, applying the following patch to sata_mv for 2.6.26.3
makes the HDD led work again as well:
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -131,7 +131,7 @@ enum {
MV_GENIIE_FLAGS = MV_COMMON_FLAGS | MV_6XXX_FLAGS |
ATA_FLAG_PMP | ATA_FLAG_ACPI_SATA |
- ATA_FLAG_NCQ | ATA_FLAG_AN,
+ ATA_FLAG_AN,
CRQB_FLAG_READ = (1 << 0),
CRQB_TAG_SHIFT = 1,
So somehow enabling NCQ is at the root of the issue.
Cheers,
FJP
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109
2008-08-26 9:24 Frans Pop
2008-08-26 10:25 ` Frans Pop
@ 2008-08-26 14:03 ` Mark Lord
2008-08-27 14:56 ` Martin Michlmayr
1 sibling, 1 reply; 20+ messages in thread
From: Mark Lord @ 2008-08-26 14:03 UTC (permalink / raw)
To: Frans Pop
Cc: linux-arm, linux-ide, Saeed Bishara, Nicolas Pitre,
Lennert Buytenhek
Frans Pop wrote:
> (Resend with correct address for linux-arm list; with apologies.)
>
> Starting with kernel 2.6.26 I've noticed that the harddisk (HDD) led on my
> QNAP TS-109 (which has a Marvel SATA controller as platform device) no
> longer flashes when there is disk activity. Instead it will just
> stay "on" all the time. The led worked fine with 2.6.25.
..
> Lennert Buytenhek suggested to try disabling NCQ, and that does indeed
> make a difference.
..
Well, if you can get us the schematics for that QNAP TS-109 board,
then perhaps we can figure out what controls that LED, and then
determine whether or not it is possible to have it working with NCQ.
Or maybe you can get Saeed Bishara (of Marvell) to investigate.
There may be a standard LED control bit in the chipset somewhere
that is known to internal Marvell engineers.
Cheers
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109
2008-08-26 14:03 ` Mark Lord
@ 2008-08-27 14:56 ` Martin Michlmayr
2008-08-27 17:06 ` saeed bishara
0 siblings, 1 reply; 20+ messages in thread
From: Martin Michlmayr @ 2008-08-27 14:56 UTC (permalink / raw)
To: Mark Lord
Cc: Frans Pop, linux-arm, linux-ide, Saeed Bishara, Nicolas Pitre,
Lennert Buytenhek
* Mark Lord <liml@rtr.ca> [2008-08-26 10:03]:
> Well, if you can get us the schematics for that QNAP TS-109 board,
> then perhaps we can figure out what controls that LED, and then
> determine whether or not it is possible to have it working with NCQ.
>
> Or maybe you can get Saeed Bishara (of Marvell) to investigate.
> There may be a standard LED control bit in the chipset somewhere
> that is known to internal Marvell engineers.
I'm being told that there's a standard LED control bit on Orion, but
hopefully Saeed can comment. If it's a QNAP specific problem, I can
talk to my contacts at QNAP.
--
Martin Michlmayr
http://www.cyrius.com/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109
2008-08-27 14:56 ` Martin Michlmayr
@ 2008-08-27 17:06 ` saeed bishara
0 siblings, 0 replies; 20+ messages in thread
From: saeed bishara @ 2008-08-27 17:06 UTC (permalink / raw)
To: Martin Michlmayr
Cc: Mark Lord, Frans Pop, linux-arm, linux-ide, Saeed Bishara,
Nicolas Pitre, Lennert Buytenhek
>
> I'm being told that there's a standard LED control bit on Orion, but
> hopefully Saeed can comment. If it's a QNAP specific problem, I can
> talk to my contacts at QNAP.
bit 0 of 0x8002c controls the active LED, 1 makes it blink slower
(more user friendly).
I checked 2.6.26 on rd5182 and both LEDs work fine. it's probably QNAP
specific problem.
Frans, can you please try the patch at
http://www.spinics.net/lists/linux-ide/msg25093.html
if it still doesn't work please check the value of the register at
0xf1010004 (MPPs control).
saeed
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109
2008-08-26 8:45 [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109 Frans Pop
@ 2008-08-27 17:29 ` saeed bishara
2008-08-28 9:25 ` Frans Pop
0 siblings, 1 reply; 20+ messages in thread
From: saeed bishara @ 2008-08-27 17:29 UTC (permalink / raw)
To: Frans Pop
Cc: linux-arm-kernel, linux-ide, Saeed Bishara, Mark Lord,
Nicolas Pitre, Lennert Buytenhek
On Tue, Aug 26, 2008 at 11:45 AM, Frans Pop <elendil@planet.nl> wrote:
> Starting with kernel 2.6.26 I've noticed that the harddisk (HDD) led on my
> QNAP TS-109 (which has a Marvel SATA controller as platform device) no
> longer flashes when there is disk activity. Instead it will just
> stay "on" all the time. The led worked fine with 2.6.25.
>
Frans, does the LED stay "on" even when there is no disk activity?
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109
2008-08-27 17:29 ` saeed bishara
@ 2008-08-28 9:25 ` Frans Pop
2008-08-28 10:53 ` saeed bishara
0 siblings, 1 reply; 20+ messages in thread
From: Frans Pop @ 2008-08-28 9:25 UTC (permalink / raw)
To: saeed bishara
Cc: linux-arm-kernel, linux-ide, Saeed Bishara, Mark Lord,
Nicolas Pitre, Lennert Buytenhek
On Wednesday 27 August 2008, saeed bishara wrote:
> Frans, does the LED stay "on" even when there is no disk activity?
Yes, it does.
On Wednesday 27 August 2008, saeed bishara wrote:
> > I'm being told that there's a standard LED control bit on Orion, but
> > hopefully Saeed can comment. If it's a QNAP specific problem, I can
> > talk to my contacts at QNAP.
>
> bit 0 of 0x8002c controls the active LED, 1 makes it blink slower
> (more user friendly).
> I checked 2.6.26 on rd5182 and both LEDs work fine. it's probably QNAP
> specific problem.
> Frans, can you please try the patch at
> http://www.spinics.net/lists/linux-ide/msg25093.html
That patch does not seem to make any difference.
> if it still doesn't work please check the value of the register at
> 0xf1010004 (MPPs control).
$ sudo ./bin/devmem2 0xf1010004
/dev/mem opened.
Memory mapped at address 0x4001f000.
Value at address 0xF1010004 (0x4001f004): 0x55550000
Thanks,
FJP
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109
2008-08-28 9:25 ` Frans Pop
@ 2008-08-28 10:53 ` saeed bishara
2008-08-28 11:17 ` Frans Pop
2008-08-28 17:11 ` Frans Pop
0 siblings, 2 replies; 20+ messages in thread
From: saeed bishara @ 2008-08-28 10:53 UTC (permalink / raw)
To: Frans Pop
Cc: linux-arm-kernel, linux-ide, Saeed Bishara, Mark Lord,
Nicolas Pitre, Lennert Buytenhek
On Thu, Aug 28, 2008 at 12:25 PM, Frans Pop <elendil@planet.nl> wrote:
> On Wednesday 27 August 2008, saeed bishara wrote:
>> Frans, does the LED stay "on" even when there is no disk activity?
>
> Yes, it does.
>
> On Wednesday 27 August 2008, saeed bishara wrote:
>> > I'm being told that there's a standard LED control bit on Orion, but
>> > hopefully Saeed can comment. If it's a QNAP specific problem, I can
>> > talk to my contacts at QNAP.
>>
>> bit 0 of 0x8002c controls the active LED, 1 makes it blink slower
>> (more user friendly).
>> I checked 2.6.26 on rd5182 and both LEDs work fine. it's probably QNAP
>> specific problem.
>> Frans, can you please try the patch at
>> http://www.spinics.net/lists/linux-ide/msg25093.html
>
> That patch does not seem to make any difference.
>
>> if it still doesn't work please check the value of the register at
>> 0xf1010004 (MPPs control).
>
> $ sudo ./bin/devmem2 0xf1010004
> /dev/mem opened.
> Memory mapped at address 0x4001f000.
> Value at address 0xF1010004 (0x4001f004): 0x55550000
thanks for the check, the register seems all right.
can you try setting bit 0 of the 0xf108002c then run some io?
which disk you have there? is there any chance that you can replace it
with different model that support NCQ?
saeed
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109
2008-08-28 10:53 ` saeed bishara
@ 2008-08-28 11:17 ` Frans Pop
2008-08-28 15:53 ` Grant Grundler
2008-08-28 17:11 ` Frans Pop
1 sibling, 1 reply; 20+ messages in thread
From: Frans Pop @ 2008-08-28 11:17 UTC (permalink / raw)
To: saeed bishara
Cc: linux-arm, linux-ide, Mark Lord, Nicolas Pitre, Lennert Buytenhek
On Thursday 28 August 2008, saeed bishara wrote:
> can you try setting bit 0 of the 0xf108002c then run some io?
How can I set that bit?
> which disk you have there?
ata1.00: ATA-7: HDT722516DLA380, V43OA91A, max UDMA/133
ata1.00: 321672960 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata1.00: configured for UDMA/133
ata2: SATA link down (SStatus 0 SControl 300)
scsi 0:0:0:0: Direct-Access ATA HDT722516DLA380 V43O PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 321672960 512-byte hardware sectors (164697 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 0:0:0:0: [sda] 321672960 512-byte hardware sectors (164697 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1 sda2 sda3 sda4 < sda5 sda6 >
sd 0:0:0:0: [sda] Attached SCSI disk
sd 0:0:0:0: Attached scsi generic sg0 type 0
>From smartctl:
Model Family: Hitachi Deskstar T7K250 series
Device Model: HDT722516DLA380
Firmware Version: V43OA91A
User Capacity: 164,696,555,520 bytes
ATA Version is: 7
ATA Standard is: ATA/ATAPI-7 T13 1532D revision 1
> is there any chance that you can replace it with different model that
> support NCQ?
No, sorry. This is the only model SATA disk I have available. However, I use the
exact same model in a x86_64 desktop without any problems.
Possibly another owner of a TS-109 or maybe TS-209 can confirm the issue with a
different model disk.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109
2008-08-28 11:17 ` Frans Pop
@ 2008-08-28 15:53 ` Grant Grundler
0 siblings, 0 replies; 20+ messages in thread
From: Grant Grundler @ 2008-08-28 15:53 UTC (permalink / raw)
To: Frans Pop
Cc: saeed bishara, linux-arm, linux-ide, Mark Lord, Nicolas Pitre,
Lennert Buytenhek
On Thu, Aug 28, 2008 at 4:17 AM, Frans Pop <elendil@planet.nl> wrote:
> On Thursday 28 August 2008, saeed bishara wrote:
>> can you try setting bit 0 of the 0xf108002c then run some io?
>
> How can I set that bit?
Try mmio_rd/mmio_wr at http://svn.gnumonks.org/trunk/mmio_test/
grant
>
>> which disk you have there?
>
> ata1.00: ATA-7: HDT722516DLA380, V43OA91A, max UDMA/133
> ata1.00: 321672960 sectors, multi 0: LBA48 NCQ (depth 31/32)
> ata1.00: configured for UDMA/133
> ata2: SATA link down (SStatus 0 SControl 300)
> scsi 0:0:0:0: Direct-Access ATA HDT722516DLA380 V43O PQ: 0 ANSI: 5
> sd 0:0:0:0: [sda] 321672960 512-byte hardware sectors (164697 MB)
> sd 0:0:0:0: [sda] Write Protect is off
> sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
> sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
> sd 0:0:0:0: [sda] 321672960 512-byte hardware sectors (164697 MB)
> sd 0:0:0:0: [sda] Write Protect is off
> sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
> sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
> sda: sda1 sda2 sda3 sda4 < sda5 sda6 >
> sd 0:0:0:0: [sda] Attached SCSI disk
> sd 0:0:0:0: Attached scsi generic sg0 type 0
>
> From smartctl:
> Model Family: Hitachi Deskstar T7K250 series
> Device Model: HDT722516DLA380
> Firmware Version: V43OA91A
> User Capacity: 164,696,555,520 bytes
> ATA Version is: 7
> ATA Standard is: ATA/ATAPI-7 T13 1532D revision 1
>
>> is there any chance that you can replace it with different model that
>> support NCQ?
>
> No, sorry. This is the only model SATA disk I have available. However, I use the
> exact same model in a x86_64 desktop without any problems.
>
> Possibly another owner of a TS-109 or maybe TS-209 can confirm the issue with a
> different model disk.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ide" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109
2008-08-28 10:53 ` saeed bishara
2008-08-28 11:17 ` Frans Pop
@ 2008-08-28 17:11 ` Frans Pop
2008-08-28 17:26 ` Grant Grundler
2008-08-28 18:11 ` Lennert Buytenhek
1 sibling, 2 replies; 20+ messages in thread
From: Frans Pop @ 2008-08-28 17:11 UTC (permalink / raw)
To: saeed bishara
Cc: linux-arm, linux-ide, Mark Lord, Nicolas Pitre, Lennert Buytenhek
On Thursday 28 August 2008, saeed bishara wrote:
> can you try setting bit 0 of the 0xf108002c then run some io?
Tried that using Grant's suggestion (thanks!), but setting the bit does
not seem to take:
$ sudo mmio_rd f108002c 1
0x0000000000000000
$ sudo mmio_wr f108002c 1
0000000000000000 -> 0000000000000001
$ sudo mmio_rd f108002c 1
0x0000000000000000
Am I doing something wrong here?
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109
2008-08-28 17:11 ` Frans Pop
@ 2008-08-28 17:26 ` Grant Grundler
2008-08-28 18:03 ` Frans Pop
2008-08-29 1:47 ` Harald Welte
2008-08-28 18:11 ` Lennert Buytenhek
1 sibling, 2 replies; 20+ messages in thread
From: Grant Grundler @ 2008-08-28 17:26 UTC (permalink / raw)
To: Frans Pop
Cc: saeed bishara, linux-arm, linux-ide, Mark Lord, Nicolas Pitre,
Lennert Buytenhek, Harald Welte
[-- Attachment #1: Type: text/plain, Size: 721 bytes --]
On Thu, Aug 28, 2008 at 10:11 AM, Frans Pop <elendil@planet.nl> wrote:
> On Thursday 28 August 2008, saeed bishara wrote:
>> can you try setting bit 0 of the 0xf108002c then run some io?
>
> Tried that using Grant's suggestion (thanks!), but setting the bit does
> not seem to take:
>
> $ sudo mmio_rd f108002c 1
> 0x0000000000000000
> $ sudo mmio_wr f108002c 1
> 0000000000000000 -> 0000000000000001
> $ sudo mmio_rd f108002c 1
> 0x0000000000000000
>
> Am I doing something wrong here?
Dunno. Is this a 64-bit kjernel?
I still have a patch outstanding against mmio_test fix to issues with
64-bit addressing from 32-bit user space. I've attached those (and
cc'd Harald Welte) in case that's the problem.
thanks,
grant
[-- Attachment #2: diff-mmio_test-02 --]
[-- Type: application/octet-stream, Size: 4658 bytes --]
Index: mmio_test.xml
===================================================================
--- mmio_test.xml (revision 2099)
+++ mmio_test.xml (working copy)
@@ -203,6 +203,20 @@
<register name="ISRC2 (Yukon2 only)" resource="0" offset="0x1c"/>
</device>
+<device name="sata_mv">
+ <!-- Marvell SATA II ("Thor") -->
+ <pci_id vendor_id="0x11AB" device_id="0x6042"/>
+ <pci_id vendor_id="0x11AB" device_id="0x7042"/>
+
+ <!-- older Marvell controllers -->
+ <!-- pci_id vendor_id="0x11AB" device_id="0x6041"/ -->
+ <!-- pci_id vendor_id="0x11AB" device_id="0x6081"/ -->
+
+ <register name="main_cause" resource="0" offset="0x1d60"/>
+ <register name="main_mask" resource="0" offset="0x1d64"/>
+ <register name="SATAHC0Cause" resource="0" offset="0x20014" />
+</device>
+
<device name="sym2">
<!-- Symbios SCSI -->
<pci_id vendor_id="0x1000" device_id="0x0001"/>
Index: mmio_test.c
===================================================================
--- mmio_test.c (revision 2099)
+++ mmio_test.c (working copy)
@@ -127,23 +127,29 @@
cycles_t avg;
unsigned long long regs =
p->base_addr[reg->resource] & PCI_ADDR_MEM_MASK;
+ unsigned int regoff = reg->offset;
- //printf("Using regs = 0x%llx (%d)\n", regs, reg->mmap_size);
- x = mmap(NULL, reg->mmap_size, PROT_READ, MAP_SHARED,
- dev_mem_fd, regs);
+ /* We do not map the entire register space for a device.
+ * Do some basic math to reduce that to one 4k page.
+ */
+ /* printf("Using regs = 0x%llx + %x", regs, reg->offset); */
+ regs += regoff & ~0xfff;
+ regoff &= 0xfff;
+ /* printf(" --> 0x%llx + %x\n", regs, regoff); */
+ x = mmap(NULL, 0x1000, PROT_READ, MAP_SHARED, dev_mem_fd, regs);
if (x == MAP_FAILED) {
perror("mmap");
return -1;
}
- avg = test_backend(x, reg->offset);
+ avg = test_backend(x, regoff);
if (output_xml) {
printf("<testresult dev_name=\"%s\" "
"pci_vendor_id=\"0x%x\" "
"pci_device_id=\"0x%x\" "
"pci_addr=\"%d:%02d:%02d.%d\" "
"cpu=\"%d\" resource=\"%d\" "
- "reg_offset=\"%d\" cycles=\"%d\"",
+ "reg_offset=\"%d\" cycles=\"%lld\"",
n->name, p->vendor_id, p->device_id,
p->domain, p->bus, p->dev, p->func,
cpu, reg->resource, reg->offset, avg);
Index: mmio_rd.c
===================================================================
--- mmio_rd.c (revision 2099)
+++ mmio_rd.c (working copy)
@@ -13,8 +13,10 @@
int main(int argc, char **argv)
{
int fd = open("/dev/mem", O_RDONLY | O_SYNC);
- unsigned long phys_addr, len; /* arg1, arg2 */
- unsigned long i, page_addr, page_size = getpagesize();
+ unsigned long long phys_addr; /* arg1 */
+ unsigned long long page_addr;
+ unsigned long len; /* arg2 */
+ unsigned long i, page_size = getpagesize();
volatile unsigned long *mem;
if (fd < 0)
@@ -23,7 +25,7 @@
if (argc < 3)
exit(-2);
- phys_addr = strtoul(argv[1], NULL, 16);
+ phys_addr = strtoull(argv[1], NULL, 0);
phys_addr &= ~(sizeof(mem[0]) - 1);
len = strtoul(argv[2], NULL, 16);
@@ -43,7 +45,7 @@
for (; len && (i < (page_size / sizeof(mem[0]))); i++, len--) {
/* printf("%016lx: ", page_addr + i*sizeof(mem[0])); */
- printf("0x%016lx\n", mem[i]);
+ printf("%016lx\n", mem[i]);
}
return 0;
Index: mmio_wr.c
===================================================================
--- mmio_wr.c (revision 2099)
+++ mmio_wr.c (working copy)
@@ -26,7 +26,8 @@
int main(int argc, char **argv)
{
int fd = open("/dev/mem", O_RDWR | O_SYNC);
- unsigned long i, addr, val, offset, old, page_size = getpagesize();
+ unsigned long long i, addr, val, offset, old;
+ unsigned long page_size = getpagesize();
volatile unsigned long *mem;
if (fd < 0)
@@ -35,8 +36,8 @@
if (argc < 3)
exit(-2);
- addr = strtol(argv[1], NULL, 16);
- val = strtol(argv[2], NULL, 16);
+ addr = strtoull(argv[1], NULL, 16);
+ val = strtoull(argv[2], NULL, 16);
offset = addr & ~(page_size - 1);
i = (addr - offset) / sizeof(mem[0]);
@@ -48,7 +49,7 @@
}
old = mem[i];
- printf("%016lx -> %016lx\n", old, val);
+ /* printf("%016llx -> %016llx\n", old, val); */
mem[i] = val;
return 0;
Index: Makefile
===================================================================
--- Makefile (revision 2099)
+++ Makefile (working copy)
@@ -2,18 +2,13 @@
CFLAGS += -I/usr/include/libxml2
# on SPARC64, plese add the below line
#CFLAGS += -Wa,-Av9a
+LDFLAGS += -static
-LIBS:=-lpci -lxml2
+LIBS:=-lpci -lxml2 -lz -lm -lpthread
#LIBS+=-lrt
all: mmio_rd mmio_wr mmio_test
-mmio_rd: mmio_rd.o
- $(CC) -o $@ $^
-
-mmio_wr: mmio_wr.o
- $(CC) -o $@ $^
-
mmio_test: mmio_test.o get_clock.o xmlin.o
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109
2008-08-28 17:26 ` Grant Grundler
@ 2008-08-28 18:03 ` Frans Pop
2008-08-29 1:47 ` Harald Welte
1 sibling, 0 replies; 20+ messages in thread
From: Frans Pop @ 2008-08-28 18:03 UTC (permalink / raw)
To: Grant Grundler
Cc: saeed bishara, linux-arm, linux-ide, Mark Lord, Nicolas Pitre,
Lennert Buytenhek, Harald Welte
On Thursday 28 August 2008, Grant Grundler wrote:
> On Thu, Aug 28, 2008 at 10:11 AM, Frans Pop <elendil@planet.nl> wrote:
> > On Thursday 28 August 2008, saeed bishara wrote:
> >> can you try setting bit 0 of the 0xf108002c then run some io?
> >
> > Tried that using Grant's suggestion (thanks!), but setting the bit
> > does not seem to take:
> >
> > $ sudo mmio_rd f108002c 1
> > 0x0000000000000000
> > $ sudo mmio_wr f108002c 1
> > 0000000000000000 -> 0000000000000001
> > $ sudo mmio_rd f108002c 1
> > 0x0000000000000000
> >
> > Am I doing something wrong here?
>
> Dunno. Is this a 64-bit kjernel?
No, it's a 32-bit armel kernel.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109
2008-08-28 17:11 ` Frans Pop
2008-08-28 17:26 ` Grant Grundler
@ 2008-08-28 18:11 ` Lennert Buytenhek
2008-08-28 18:43 ` Frans Pop
1 sibling, 1 reply; 20+ messages in thread
From: Lennert Buytenhek @ 2008-08-28 18:11 UTC (permalink / raw)
To: Frans Pop; +Cc: saeed bishara, linux-arm, linux-ide, Mark Lord, Nicolas Pitre
On Thu, Aug 28, 2008 at 07:11:27PM +0200, Frans Pop wrote:
> > can you try setting bit 0 of the 0xf108002c then run some io?
>
> Tried that using Grant's suggestion (thanks!), but setting the bit does
> not seem to take:
>
> $ sudo mmio_rd f108002c 1
> 0x0000000000000000
> $ sudo mmio_wr f108002c 1
> 0000000000000000 -> 0000000000000001
> $ sudo mmio_rd f108002c 1
> 0x0000000000000000
>
> Am I doing something wrong here?
Can you try devmem2? (That should be in Debian, I think.)
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109
2008-08-28 18:11 ` Lennert Buytenhek
@ 2008-08-28 18:43 ` Frans Pop
2008-08-28 22:08 ` saeed bishara
0 siblings, 1 reply; 20+ messages in thread
From: Frans Pop @ 2008-08-28 18:43 UTC (permalink / raw)
To: Lennert Buytenhek
Cc: saeed bishara, linux-arm, linux-ide, Mark Lord, Nicolas Pitre
On Thursday 28 August 2008, Lennert Buytenhek wrote:
> On Thu, Aug 28, 2008 at 07:11:27PM +0200, Frans Pop wrote:
> > > can you try setting bit 0 of the 0xf108002c then run some io?
>
> Can you try devmem2?
OK, that works better:
$ sudo devmem2 0xf108002c w 1
/dev/mem opened.
Memory mapped at address 0x4001f000.
Value at address 0xF108002C (0x4001f02c): 0x0
Written 0x1; readback 0x1
After that the HDD led does react again to io activity.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109
2008-08-28 18:43 ` Frans Pop
@ 2008-08-28 22:08 ` saeed bishara
2008-08-28 22:40 ` Frans Pop
0 siblings, 1 reply; 20+ messages in thread
From: saeed bishara @ 2008-08-28 22:08 UTC (permalink / raw)
To: Frans Pop
Cc: Lennert Buytenhek, linux-arm, linux-ide, Mark Lord, Nicolas Pitre
> $ sudo devmem2 0xf108002c w 1
> /dev/mem opened.
> Memory mapped at address 0x4001f000.
> Value at address 0xF108002C (0x4001f02c): 0x0
> Written 0x1; readback 0x1
>
> After that the HDD led does react again to io activity.
do you mean it's blinking on io activity? is it off when no io running?
saeed
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109
2008-08-28 22:08 ` saeed bishara
@ 2008-08-28 22:40 ` Frans Pop
0 siblings, 0 replies; 20+ messages in thread
From: Frans Pop @ 2008-08-28 22:40 UTC (permalink / raw)
To: saeed bishara
Cc: Lennert Buytenhek, linux-arm, linux-ide, Mark Lord, Nicolas Pitre
On Friday 29 August 2008, saeed bishara wrote:
> > $ sudo devmem2 0xf108002c w 1
> > /dev/mem opened.
> > Memory mapped at address 0x4001f000.
> > Value at address 0xF108002C (0x4001f02c): 0x0
> > Written 0x1; readback 0x1
> >
> > After that the HDD led does react again to io activity.
>
> do you mean it's blinking on io activity?
Yes.
> is it off when no io running?
No. It is on when there is no activity, but that is how it has always
been. Same as the LAN led which is also always on when there is a
connection and blinks on activity.
I don't know if that's how that's intended, but IMHO it makes sense for an
embedded device to have the led on by default to show the device is
"present and recognized" and to blink when there is activity.
Cheers,
FJP
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109
2008-08-28 17:26 ` Grant Grundler
2008-08-28 18:03 ` Frans Pop
@ 2008-08-29 1:47 ` Harald Welte
1 sibling, 0 replies; 20+ messages in thread
From: Harald Welte @ 2008-08-29 1:47 UTC (permalink / raw)
To: Grant Grundler
Cc: Frans Pop, saeed bishara, linux-arm, linux-ide, Mark Lord,
Nicolas Pitre, Lennert Buytenhek
[-- Attachment #1: Type: text/plain, Size: 630 bytes --]
On Thu, Aug 28, 2008 at 10:26:32AM -0700, Grant Grundler wrote:
> I still have a patch outstanding against mmio_test fix to issues with
> 64-bit addressing from 32-bit user space. I've attached those (and
> cc'd Harald Welte) in case that's the problem.
Thanks, I'll merge your patches to mmio_test right now.
--
- Harald Welte <laforge@gnumonks.org> http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109
2008-08-26 10:25 ` Frans Pop
@ 2009-01-24 14:57 ` Mark Lord
0 siblings, 0 replies; 20+ messages in thread
From: Mark Lord @ 2009-01-24 14:57 UTC (permalink / raw)
To: Frans Pop
Cc: linux-arm, linux-ide, Saeed Bishara, Mark Lord, Nicolas Pitre,
Lennert Buytenhek
Frans Pop wrote:
> On Tuesday 26 August 2008, Frans Pop wrote:
>> After booting the system I did 'echo 1 >/sys/block/sdX/device/queue_depth'
>> and after that the HDD led showed disk activity again.
>
> And to confirm that, applying the following patch to sata_mv for 2.6.26.3
> makes the HDD led work again as well:
>
> --- a/drivers/ata/sata_mv.c
> +++ b/drivers/ata/sata_mv.c
..
> ATA_FLAG_PMP | ATA_FLAG_ACPI_SATA |
> - ATA_FLAG_NCQ | ATA_FLAG_AN,
> + ATA_FLAG_AN,
..
> So somehow enabling NCQ is at the root of the issue.
..
Pardon me digging up this old thread again,
but I'm back working on sata_mv now.
There is a reported chipset errata for *exactly* this symptom,
though the errata is supposedly for the older 6041/6081 variants.
But it is possible that the same problem still exists in the
chip you are using there (SOC, right?).
The problem is exactly as you described it: turning on NCQ
causes the activity LEDs to remain on constantly.
No known workaround or fix is available from Marvell,
so "just live with it" is the only solution. :)
Cheers
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2009-01-24 14:57 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-26 8:45 [regression] sata_mv: harddisk activity led no longer responsive on QNAP TS-109 Frans Pop
2008-08-27 17:29 ` saeed bishara
2008-08-28 9:25 ` Frans Pop
2008-08-28 10:53 ` saeed bishara
2008-08-28 11:17 ` Frans Pop
2008-08-28 15:53 ` Grant Grundler
2008-08-28 17:11 ` Frans Pop
2008-08-28 17:26 ` Grant Grundler
2008-08-28 18:03 ` Frans Pop
2008-08-29 1:47 ` Harald Welte
2008-08-28 18:11 ` Lennert Buytenhek
2008-08-28 18:43 ` Frans Pop
2008-08-28 22:08 ` saeed bishara
2008-08-28 22:40 ` Frans Pop
-- strict thread matches above, loose matches on Subject: below --
2008-08-26 9:24 Frans Pop
2008-08-26 10:25 ` Frans Pop
2009-01-24 14:57 ` Mark Lord
2008-08-26 14:03 ` Mark Lord
2008-08-27 14:56 ` Martin Michlmayr
2008-08-27 17:06 ` saeed bishara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).