ASUS M2A-VM - AMD690G - SB600 Non-Raid-5 SATA - problem
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 18 lines · Srihari Vijayaraghavan
I had a significant breakthrough: when I removed two out of four 1 GB modules (just a stab in the dark to see if the system stability problem I reported to LKML ( http://marc.info/?l=linux-kernel&m=117813911431765&w=2 ; a few sample oops messages attached for reference) goes away, I stuck a gold mine: now the SATA controller detects both the drives :-)).
So, it'd seem the SATA controller wouldn't work fine when one has a lot of RAM on this board. The manual/manufacture's website claim it supports 8 GB of DDR2 800, while I only have 4, yet there are a few severe problems already: like this SATA drive detection problem & the system instability.
I now got things working very reliably (even without pci=nomsi) with 2 GB of RAM (3 times longer kernel compile torture time with 2 GB, without kernel issues, with both pairs of RAM individually, compared with all of 4 GB where the system is plagued with instability). I intent to check how far below 4095M I could use mem= parameter with, without destablising the system, assuming if at all mem= parameters going to help.
Quoted 6 lines
For the record, here's the complete dmesg of the current working system as an attachment (dmesg-2.6.21.1-2gigs):
Thank you for your insight into the problem. If there are any tricks involved in making use of all 4 GB of RAM with SATA drives & with system stability, I'll be very happy to learn them :-)).
It might be that you just have a bad ram module. Does the machine work properly if you exchange the installed two modules with the other two? memtet86 time, I guess.
Signature · 1 line
tejun
Quoted 1 line · --- Tejun Heo
Srihari Vijayaraghavan wrote:
[...]
Quoted 8 lines
Quoted 1 line
Thank you for your insight into the problem. If there are any tricks
involved
Quoted 2 lines
in making use of all 4 GB of RAM with SATA drives & with system stability, I'll be very happy to learn them :-)).
It might be that you just have a bad ram module. Does the machine work properly if you exchange the installed two modules with the other two? memtet86 time, I guess.
With the new case, new power supply & a few extra fans to keep the system ventilated nicely, memtest86+ ran 8 hours of 6 successful runs without an issue. Before that it would be fine on only DDR2 667, but not at DDR2 800 mode. (all the Corsair 6400 DIMMs are DDR 800 by specification, of course. ie, nothing is overclocked)
Having proven the hardware stability (I'm sure now Linux stability will greatly improve also), system stability is no longer a concern for me.
Even now, when 4 GB of RAM is installed, by default, the SATA drives aren't recongnised in Linux, except when I pass mem=4095MB. If I pass mem=4095M, alas only 3.6 of RAM is detected under Linux!
Here's the relevant section from dmesg:
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
BIOS-e820: 000000000009f000 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 00000000dfee0000 (usable)
BIOS-e820: 00000000dfee0000 - 00000000dfee3000 (ACPI NVS)
BIOS-e820: 00000000dfee3000 - 00000000dfef0000 (ACPI data)
BIOS-e820: 00000000dfef0000 - 00000000dff00000 (reserved)
BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved)
BIOS-e820: 0000000100000000 - 0000000120000000 (usable)
Entering add_active_range(0, 0, 159) 0 entries of 3200 used Entering add_active_range(0, 256, 917216) 1 entries of 3200 used end_pfn_map = 1048576
...
Memory: 3570504k/3668864k available (2465k kernel code, 97972k reserved, 1445k data, 332k init)
...
Surprisingly, this usable ~3.6 GB equals to the initial two e820 sections only. I believe, when mem= parameter is used, the third 'usable' section (between 0x100000000 - 0x120000000) isn't used at all by Linux.
I wonder if there is a trick involved in using mem= or memmap= needs to used also (if so, I don't know yet how to construct memmap= parameter).
To recap:
System is very stable with the new case, power supply & fans SATA drives aren't by default detected when 4 GB of RAM is used SATA drives are detected by default when only 2 GB of RAM is physically
installed (ie, with both pairs of 2 GB of DIMMs individually)
SATA drives are detected when mem=4095M (the reported memory size in the
BIOS) is used, but only ~3.6 GB of RAM is used (suspected that the final e820 usable section, though detected, is not used).
Thank you for your help so far. I really appreciated that.
Hari
Send instant messages to your online friends http://au.messenger.yahoo.com
Hello,
Quoted 3 lines · Srihari Vijayaraghavan
Even now, when 4 GB of RAM is installed, by default, the SATA drives aren't recongnised in Linux, except when I pass mem=4095MB. If I pass mem=4095M, alas only 3.6 of RAM is detected under Linux!
Aha, there's the clue.
Quoted 20 lines
Here's the relevant section from dmesg:
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 -000000000009f000(usable)
BIOS-e820:000000000009f000-00000000000a0000(reserved)
BIOS-e820:00000000000f0000- 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 -00000000dfee0000(usable)
BIOS-e820:00000000dfee0000-00000000dfee3000(ACPI NVS)
BIOS-e820:00000000dfee3000-00000000dfef0000(ACPI data)
BIOS-e820:00000000dfef0000-00000000dff00000(reserved)
BIOS-e820:00000000e0000000-00000000f0000000(reserved)
BIOS-e820:00000000fec00000- 0000000100000000 (reserved)
BIOS-e820: 0000000100000000 - 0000000120000000 (usable)
Enteringadd_active_range(0, 0, 159)0 entries of 3200 used Enteringadd_active_range(0, 256, 917216)1 entries of 3200 usedend_pfn_map= 1048576
...
Memory: 3570504k/3668864k available (2465k kernel code, 97972k reserved, 1445k data, 332k init)
...
Quoted 3 lines
Surprisingly, this usable ~3.6 GB equals to the initial two e820 sections only. I believe, when mem= parameter is used, the third 'usable' section (between
0x100000000-0x120000000) isn't used at all by Linux.
Nothing to be surprised about. You're telling the kernel that the highest address it can use is 4G - 1, that is, 0xffffffff, so the kernel correctly ignores any memory above that address.
Quoted 2 lines
I wonder if there is a trick involved in using mem= or memmap= needs to used also (if so, I don't know yet how to construct memmap= parameter).
No no, don't use memmap unless you're sure that the BIOS is completely screwed up and the e820 map is bogus, which BTW isn't true in your case.
Quoted 10 lines
To recap:
System is very stable with the new case, power supply & fans SATA drives aren't by default detected when 4 GB of RAM is used SATA drives are detected by default when only 2 GB of RAM is physically
installed (ie, with both pairs of 2 GB of DIMMs individually)
SATA drives are detected when mem=4095M (the reported memory size in the
BIOS) is used, but only ~3.6 GB of RAM is used (suspected that the final e820 usable section, though detected, is not used).Thank you for your help so far. I really appreciated that.
It just seems sb600 claims that it can do DMA above 4G while it actually can't. Can you test the attached patch?
Conke, can you check whether this is caused by the ahci controller itself or the PCI bridge above it?
Thanks.
Signature · 1 line
tejun
--- drivers/ata/ahci.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/ata/ahci.c +9 -1
@@ -170,6 +170,7 @@ enum {AHCI_FLAG_IGN_IRQ_IF_ERR = (1 <<25 ),/* ignore IRQ_IF_ERR */ AHCI_FLAG_HONOR_PI = (1 <<26 ),/* honor PORTS_IMPL */ AHCI_FLAG_IGN_SERR_INTERNAL = (1 <<27 ),/* ignore SERR_INTERNAL */ + AHCI_FLAG_32BIT_ONLY = (1 << 28), /* force 32bit */ }; struct ahci_cmd_hdr {
@@ -370,7 +371,8 @@ static const struct ata_port_info ahci_p .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |ATA_FLAG_MMIO |ATA_FLAG_PIO_DMA |ATA_FLAG_SKIP_D2H_BSY | - AHCI_FLAG_IGN_SERR_INTERNAL, +AHCI_FLAG_IGN_SERR_INTERNAL | + AHCI_FLAG_32BIT_ONLY, .pio_mask = 0x1f, /* pio0-4 */ .udma_mask = 0x7f, /* udma0-6 ; FIXME */ .port_ops = &ahci_ops,
@@ -1579,6 +1581,12 @@ static int ahci_host_init(struct ata_pro probe_ent->n_ports = cap_n_ports; using_dac = hpriv->cap &HOST_CAP_64 ; +if (using_dac && (probe_ent->port_flags &AHCI_FLAG_32BIT_ONLY )) { +dev_printk (KERN_INFO , &pdev->dev, +"controller can't do 64bit DMA, forcing 32bit\n" ); + using_dac =0 ; + } +if (using_dac && !pci_set_dma_mask (pdev,DMA_64BIT_MASK )) { rc =pci_set_consistent_dma_mask (pdev,DMA_64BIT_MASK );
Quoted 1 line · --- Tejun Heo
Hello,
Hello,
Quoted 2 lines
It just seems sb600 claims that it can do DMA above 4G while it actually can't. Can you test the attached patch?
Makes sense now. Gladly check the patch. Checking ...
Great news: everything just works without any parameters :-)). True genious.
With your patch, with 4 GB of RAM, all SATA drives are detected & working normally. For the record dmesg is attached.
There's always a catch isn't it? Now no DMA over 32 bit memory space for SATA, right? CPU will have to work harder, I presume. Perhaps putting more pressure. While with 4 GB that might not be a problem, perhaps when I upgrade it to over 4 GB, it might be?? I see, even now, because a chunk of 512 MB is mapped over 4 GB (starting at 0x100000000), those are no good for the SATA's DMA access. If so, too sad :-(.
Quoted 1 line
Thanks.
Thank you.
(I'll leave the patch for the poor souls stumble upon these emails some far future :-))
PS: if this turns out to a hardware limitation, then perhaps may I request this patch in better form (as not to impact on other ahci users) find its way to mainstream? Even to -stable if I'm lucky, such that Fedora 7 etc. might work out of the box for poor souls (not counting me; I'm used to quirky things) trying out Linux on this chipset.
Quoted 32 lines
Signature · 1 line
tejunQuoted 1 line
---
drivers/ata/ahci.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)Index:
tree0/drivers/ata/ahci.c
===================================================================drivers/ata/ahci.c +3
-1@@ -170,6 +170,7 @@ enum {AHCI_FLAG_IGN_IRQ_IF_ERR = (1 <<25 ),/* ignore IRQ_IF_ERR */ AHCI_FLAG_HONOR_PI = (1 <<26 ),/* honor PORTS_IMPL */ AHCI_FLAG_IGN_SERR_INTERNAL = (1 <<27 ),/* ignore SERR_INTERNAL */ + AHCI_FLAG_32BIT_ONLY = (1 << 28), /* force 32bit */ }; struct ahci_cmd_hdr {@@ -370,7 +371,8 @@ static const struct ata_port_info ahci_p .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |ATA_FLAG_MMIO |ATA_FLAG_PIO_DMA |ATA_FLAG_SKIP_D2H_BSY | - AHCI_FLAG_IGN_SERR_INTERNAL, +AHCI_FLAG_IGN_SERR_INTERNAL | + AHCI_FLAG_32BIT_ONLY, .pio_mask = 0x1f, /* pio0-4 */ .udma_mask = 0x7f, /* udma0-6 ; FIXME */ .port_ops = &ahci_ops,@@ -1579,6 +1581,12 @@ static int ahci_host_init(struct ata_pro probe_ent->n_ports = cap_n_ports;
drivers/ata/ahci.c static int ahci_host_init(struct ata_pro · line 1592
Quoted 10 lines
drivers/ata/ahci.c +6
-0using_dac = hpriv->cap &HOST_CAP_64 ; +if (using_dac && (probe_ent->port_flags &AHCI_FLAG_32BIT_ONLY )) { +dev_printk (KERN_INFO , &pdev->dev, +"controller can't do 64bit DMA, forcing 32bit\n" ); + using_dac =0 ; + } +if (using_dac && !pci_set_dma_mask (pdev,DMA_64BIT_MASK )) { rc =pci_set_consistent_dma_mask (pdev,DMA_64BIT_MASK );
Send instant messages to your online friends http://au.messenger.yahoo.com
Hello,
Quoted 10 lines · Srihari Vijayaraghavan
Quoted 2 lines · --- Tejun Heo
It just seems sb600 claims that it can do DMA above 4G while it actually can't. Can you test the attached patch?
Makes sense now. Gladly check the patch. Checking ...
Great news: everything just works without any parameters :-)). True genious.
With your patch, with 4 GB of RAM, all SATA drives are detected & working normally. For the record dmesg is attached.
Thanks for testing.
Quoted 6 lines
There's always a catch isn't it? Now no DMA over 32 bit memory space for SATA, right? CPU will have to work harder, I presume. Perhaps putting more pressure. While with 4 GB that might not be a problem, perhaps when I upgrade it to over 4 GB, it might be?? I see, even now, because a chunk of 512 MB is mapped over 4 GB (starting at
0x100000000), those are no good for the SATA's DMA access. If so, too sad :-(.
Oh well, that's the price you have to pay when you 1. have a device which can't access memory above 4G but 2. don't have IOMMU to do it for the device. If performance becomes problem, you can always get a not-so-expensive external controller which can do 64.
Quoted 8 lines
(I'll leave the patch for the poor souls stumble upon these emails some far future :-))
PS: if this turns out to a hardware limitation, then perhaps may I request this patch in better form (as not to impact on other ahci users) find its way to mainstream? Even to -stable if I'm lucky, such that Fedora 7 etc. might work out of the box for poor souls (not counting me; I'm used to quirky things) trying out Linux on this chipset.
Yeap, I'll forward it upstream and probably to -stable too. The problem here is that I'm not sure whether the problem is in the ahci controller itself or some bridge chip above it. It would be best if Conke Hu can verify this but you can also test it by buying a ATA controller which can do 64bit and whether it works properly on the machine. :-)
Signature · 1 line
tejun
Quoted 5 lines · Tejun Heo
Yeap, I'll forward it upstream and probably to -stable too. The problem here is that I'm not sure whether the problem is in the ahci controller itself or some bridge chip above it. It would be best if Conke Hu can verify this but you can also test it by buying a ATA controller which can do 64bit and whether it works properly on the machine. :-)
Just in case, can you post the result of 'lspci -nntv'?
Signature · 1 line
tejun
--- Tejun Heo <[email protected]> wrote:
[...]
Quoted 1 line
Just in case, can you post the result of 'lspci -nntv'?
No worries. Here it is as an attachment.
Thanks
Send instant messages to your online friends http://au.messenger.yahoo.com
-[0000:00]-+-00.0 ATI Technologies Inc Unknown device [1002:7910]
+-02.0-[0000:01]--+-00.0 ATI Technologies Inc RV370 5B60 [Radeon X300 (PCIE)] [1002:5b60]
| \-00.1 ATI Technologies Inc RV370 [Radeon X300SE] [1002:5b70]
+-07.0-[0000:02]----00.0 Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168]
+-12.0 ATI Technologies Inc SB600 Non-Raid-5 SATA [1002:4380]
+-13.0 ATI Technologies Inc SB600 USB (OHCI0) [1002:4387]
+-13.1 ATI Technologies Inc SB600 USB (OHCI1) [1002:4388]
+-13.2 ATI Technologies Inc SB600 USB (OHCI2) [1002:4389]
+-13.3 ATI Technologies Inc SB600 USB (OHCI3) [1002:438a]
+-13.4 ATI Technologies Inc SB600 USB (OHCI4) [1002:438b]
+-13.5 ATI Technologies Inc SB600 USB Controller (EHCI) [1002:4386]
+-14.0 ATI Technologies Inc SB600 SMBus [1002:4385]
+-14.1 ATI Technologies Inc SB600 IDE [1002:438c]
+-14.2 ATI Technologies Inc SB600 Azalia [1002:4383]
+-14.3 ATI Technologies Inc SB600 PCI to LPC Bridge [1002:438d]
+-14.4-[0000:03]--
+-18.0 Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration [1022:1100]
+-18.1 Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map [1022:1101]
+-18.2 Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller [1022:1102]
\-18.3 Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control [1022:1103]Quoted 1 line · --- Tejun Heo
Hello,
Hello,
Quoted 4 lines
Quoted 3 lines · Srihari Vijayaraghavan
Quoted 2 lines · --- Tejun Heo
It just seems sb600 claims that it can do DMA above 4G while it actually can't. Can you test the attached patch?
[...]
Quoted 4 lines
Quoted 2 lines
With your patch, with 4 GB of RAM, all SATA drives are detected & working normally. For the record dmesg is attached.
Thanks for testing.
Thank you for providing a good patch.
[...]
Quoted 4 lines
Oh well, that's the price you have to pay when you 1. have a device which can't access memory above 4G but 2. don't have IOMMU to do it for the device. If performance becomes problem, you can always get a not-so-expensive external controller which can do 64.
Well, I think my AM2 chip is capable of IOMMU (well that's one of the deciding factor even since my original AMD64 3200+ :-)). BTW is there an easier way to prove whether IOMMU is in use?
Quoted 3 lines
Yeap, I'll forward it upstream and probably to -stable too. The problem here is that I'm not sure whether the problem is in the ahci controller itself or some bridge chip above it.
Fair enough.
Quoted 3 lines
It would be best if Conke Hu can
verify this but you can also test it by buying a ATA controller which can do 64bit and whether it works properly on the machine. :-)
Let's hope he does.
Buying an (S)ATA controller now is a lofty goal (for the lack of money more than anything :-)). But doesn't my current on-board IDE doesn't do 64bit DMA?
Here is its lspci -vvv:
00:14.1 IDE interface: ATI Technologies Inc SB600 IDE (prog-if 82 [Master PriP])
Subsystem: ASUSTeK Computer Inc. Unknown device 81ef
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Step
ping- SERR- FastB2B-
Status: Cap+ 66MHz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort
- <MAbort- >SERR- <PERR-
Latency: 64
Interrupt: pin A routed to IRQ 16
Region 0: I/O ports at 01f0 [size=8]
Region 1: I/O ports at 03f4 [size=1]
Region 2: I/O ports at 0170 [size=8]
Region 3: I/O ports at 0374 [size=1]
Region 4: I/O ports at f900 [size=16]
Capabilities: [70] Message Signalled Interrupts: Mask- 64bit-
Queue=0/0
Enable-
Address: 00000000 Data: 0000I'm not sure if this IDE controller is operating in 64 bit DMA?? (well if it didn't my IDE peripherals might not have worked properly without mem=4095M, like the SATA controller, no? They always worked fine.) I thought all PCI-E based devices were capable, no?
Thanks
Send instant messages to your online friends http://au.messenger.yahoo.com
Quoted 8 lines · Srihari Vijayaraghavan
Quoted 4 lines
Oh well, that's the price you have to pay when you 1. have a device which can't access memory above 4G but 2. don't have IOMMU to do it for the device. If performance becomes problem, you can always get a not-so-expensive external controller which can do 64.
Well, I think my AM2 chip is capable of IOMMU (well that's one of the deciding factor even since my original AMD64 3200+ :-)). BTW is there an easier way to prove whether IOMMU is in use?
Right, I somehow thought you're on intel. If IOMMU is active, dmesg should say something about that. Not sure whether there are other ways to determine it tho.
Quoted 8 lines
Quoted 3 lines
It would be best if Conke Hu can
verify this but you can also test it by buying a ATA controller which can do 64bit and whether it works properly on the machine. :-)Let's hope he does.
Buying an (S)ATA controller now is a lofty goal (for the lack of money more than anything :-)). But doesn't my current on-board IDE doesn't do 64bit DMA?
Conke Hu, please respond.
Quoted 22 lines
Here is its lspci -vvv:
00:14.1 IDE interface: ATI Technologies Inc SB600 IDE (prog-if 82 [Master PriP])
Subsystem: ASUSTeK Computer Inc. Unknown device 81ef
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Step
ping- SERR- FastB2B-
Status: Cap+ 66MHz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort
- <MAbort- >SERR- <PERR-Latency: 64 Interrupt: pin A routed to IRQ 16 Region 0: I/O ports at 01f0 [size=8] Region 1: I/O ports at 03f4 [size=1] Region 2: I/O ports at 0170 [size=8] Region 3: I/O ports at 0374 [size=1] Region 4: I/O ports at f900 [size=16] Capabilities: [70] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable- Address: 00000000 Data: 0000
Quoted 4 lines
I'm not sure if this IDE controller is operating in 64 bit DMA?? (well if it didn't my IDE peripherals might not have worked properly without mem=4095M, like the SATA controller, no? They always worked fine.) I thought all PCI-E based devices were capable, no?
For the IDE interface, it's not an issue because IDE BMDMA interface just can't to 64, so the kernel does the right thing and either bounces the buffer or uses IOMMU. The problem with ahci controller is that it's claiming that it can do 64 and then just goes silent when it's actually asked to do it. And, yeap, all PCI or PCI-E devices can implement 64bit DMA but whether a chip actually implements it or not is a different problem. Oh well, not doing it and lying about it is also another problem, I guess. :-)
Signature · 1 line
tejun
Quoted 3 lines · Tejun Heo
(snip)
Conke Hu, please respond.
(snip)
i have left AMD and i doubt if it's still good for me to discuss any questions regarding AMD chipset :(
what's more, now i am busy hunting for my next job, but "I WILL BE BACK" when i get my new job :)
conke
Quoted 10 lines · Conke Hu
Quoted 3 lines · Tejun Heo
(snip)
Conke Hu, please respond.
(snip)i have left AMD and i doubt if it's still good for me to discuss any questions regarding AMD chipset :(
what's more, now i am busy hunting for my next job, but "I WILL BE BACK" when i get my new job :)
Sorry, didn't know that. Good luck with the job hunting. :-)
Signature · 1 line
tejun
Quoted 5 lines · --- Tejun Heo
Quoted 4 lines · Srihari Vijayaraghavan
Quoted 4 lines
Oh well, that's the price you have to pay when you 1. have a device which can't access memory above 4G but 2. don't have IOMMU to do it for the device. If performance becomes problem, you can always get a not-so-expensive external controller which can do 64.
Can the Skymaster S3132, based on Sil3132,
(http://umart.net/au/product_info.php?cPath=21_211&products_id=106108) do 64 bit DMA on Linux?
If so, I'm happy to buy that to isolate whether the current problem is limited to SB600 SATA controller alone on AMD690G chipset.
It'd be nice if somebody from AMD/ATI could confirm the 64 bit DMA capability of SB600 SATA controller. (I observe a few AMD/ATI folks have been submitting a few patches on LKML lately, so who knows.)
Thanks
PS: FWIW, SB600 with your ahci fix has been working fine for the past week. Thank you for that.
Switch to Yahoo!7 Mail: Transfer all your contacts and emails from Hotmail and other providers to Yahoo!7 Mail. http://au.docs.yahoo.com/mail/trueswitch_info.html
Quoted 10 lines · Srihari Vijayaraghavan
Quoted 5 lines · --- Tejun Heo
Quoted 4 lines · Srihari Vijayaraghavan
Quoted 4 lines
Oh well, that's the price you have to pay when you 1. have a device which can't access memory above 4G but 2. don't have IOMMU to do it for the device. If performance becomes problem, you can always get a not-so-expensive external controller which can do 64.
Can the Skymaster S3132, based on Sil3132,
(http://umart.net/au/product_info.php?cPath=21_211&products_id=106108) do 64 bit DMA on Linux?
Yeah, sil3124/32 can do 64bit alright.
Quoted 2 lines
If so, I'm happy to buy that to isolate whether the current problem is limited to SB600 SATA controller alone on AMD690G chipset.
I'm too. Please let me know when you find out. :-P
Quoted 3 lines
It'd be nice if somebody from AMD/ATI could confirm the 64 bit DMA capability of SB600 SATA controller. (I observe a few AMD/ATI folks have been submitting a few patches on LKML lately, so who knows.)
Maybe you can cc the ATI person here if you know the address.
Quoted 2 lines
PS: FWIW, SB600 with your ahci fix has been working fine for the past week. Thank you for that.
Great.
Signature · 1 line
tejun
Quoted 2 lines · --- Tejun Heo
Quoted 1 line · Srihari Vijayaraghavan
--- Tejun Heo <[email protected]> wrote:
[...]
Quoted 6 lines
Quoted 2 lines
Can the Skymaster S3132, based on Sil3132,
(http://umart.net/au/product_info.php?cPath=21_211&products_id=106108) do64
Quoted 1 line
bit DMA on Linux?
Yeah, sil3124/32 can do 64bit alright.
Sorry, I couldn't quite convince myself wasting a little bit of money on that. Temptation is hard to resist though.
Quoted 1 line
Maybe you can cc the ATI person here if you know the address.
Will do. Need to write a good story :-).
Quoted 5 lines
Quoted 1 line
PS: FWIW, SB600 with your ahci fix has been working fine for the past
week.
Quoted 1 line
Thank you for that.
Great.
(I got the clue from yours, thanks for that) Actually, here's a crude one I'm using for 2.6.22-rc:
drivers/ata/ahci.c Fri May 18 22:17:27 2007 +1000 renamed from drivers/ata/ahci.c Thu May 17 20:02:36 2007 -0700 +1 -0
@@ -1563,6 +1563,7 @@ static int ahci_configure_dma_masks(stru static int ahci_configure_dma_masks(struct pci_dev *pdev, int using_dac) { int rc; + using_dac = 0; if (using_dac && !pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
___________________________________________________________________________________
How would you spend $50,000 to create a more sustainable environment in Australia? Go to Yahoo!7 Answers and share your idea.
http://advision.webevents.yahoo.com/aunz/lifestyle/answers/y7ans-babp_reg.html
Quoted 4 lines · Srihari Vijayaraghavan
Quoted 4 lines
Quoted 2 lines
Can the Skymaster S3132, based on Sil3132,
(http://umart.net/au/product_info.php?cPath=21_211&products_id=106108) do64
Quoted 1 line
bit DMA on Linux?
Quoted 8 lines
Quoted 1 line
Yeah, sil3124/32 can do 64bit alright.
Sorry, I couldn't quite convince myself wasting a little bit of money on that. Temptation is hard to resist though.
Quoted 1 line
Maybe you can cc the ATI person here if you know the address.
Will do. Need to write a good story :-).
Earlier today, ATI guy contacted me and verified that the ATA controller is at fault not the bridge. I'm gonna forward the patch upstream soon.
Signature · 1 line
tejun
PATCH 1/1 ahci: disable 64bit dma on sb600
In reply to Srihari VijayaraghavanSB600 claims it can do 64bit DMA but it can't. Disable it.
DON'T APPLY YET
---
Srihari, can you test this against 2.6.22-rc1-git7 just in case? I'll send this upstream after you ack. Thanks.
ahci.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/ata/ahci.c +10 -1
@@ -170,6 +170,7 @@ enum {AHCI_FLAG_IGN_IRQ_IF_ERR = (1 <<25 ),/* ignore IRQ_IF_ERR */ AHCI_FLAG_HONOR_PI = (1 <<26 ),/* honor PORTS_IMPL */ AHCI_FLAG_IGN_SERR_INTERNAL = (1 <<27 ),/* ignore SERR_INTERNAL */ +AHCI_FLAG_32BIT_ONLY = (1 <<28 ),/* force 32bit */ AHCI_FLAG_COMMON =ATA_FLAG_SATA |ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
@@ -354,7 +355,8 @@ static const struct ata_port_info ahci_p/* board_ahci_sb600 */ { .flags = AHCI_FLAG_COMMON | - AHCI_FLAG_IGN_SERR_INTERNAL, +AHCI_FLAG_IGN_SERR_INTERNAL | + AHCI_FLAG_32BIT_ONLY, .pio_mask = 0x1f, /* pio0-4 */ .udma_mask = 0x7f, /* udma0-6 ; FIXME */ .port_ops = &ahci_ops,
@@ -492,6 +494,13 @@ static void ahci_save_initial_config(str hpriv->saved_cap = cap =readl (mmio +HOST_CAP ); hpriv->saved_port_map = port_map =readl (mmio +HOST_PORTS_IMPL ); +/* some chips lie about 64bit support */ +if ((cap &HOST_CAP_64 ) && (pi->flags &AHCI_FLAG_32BIT_ONLY )) { +dev_printk (KERN_INFO , &pdev->dev, +"controller can't do 64bit DMA, forcing 32bit\n" ); + cap &= ~HOST_CAP_64 ; + } +/* fixup zero port_map */ if (!port_map) { port_map = (1 <<ahci_nr_ports (hpriv->cap)) -1 ;
Re: [PATCH] ahci: disable 64bit dma on sb600
Quoted 7 lines · Tejun Heo
SB600 claims it can do 64bit DMA but it can't. Disable it.
DON'T APPLY YET
---Srihari, can you test this against 2.6.22-rc1-git7 just in case? I'll send this upstream after you ack.
Tejun,
Of course. Yes, it's working great without mem=4095M parameter on AMD690G chipset (Asus M2A-VM) with 4 GB of RAM & Seagate SATA drives on SB600 AHCI SATA controller (against the current http://www.kernel.org/hg/linux-2.6 repo at changeset 56901:02db36c53917, which I believe is 2.6.22-rc1-git7 equivalent).
:-)
Quoted 1 line
Thanks.
Thank you.
Quoted 30 lines
ahci.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)drivers/ata/ahci.c +3
-1@@ -170,6 +170,7 @@ enum {AHCI_FLAG_IGN_IRQ_IF_ERR = (1 <<25 ),/* ignore IRQ_IF_ERR */ AHCI_FLAG_HONOR_PI = (1 <<26 ),/* honor PORTS_IMPL */ AHCI_FLAG_IGN_SERR_INTERNAL = (1 <<27 ),/* ignore SERR_INTERNAL */ +AHCI_FLAG_32BIT_ONLY = (1 <<28 ),/* force 32bit */ AHCI_FLAG_COMMON =ATA_FLAG_SATA |ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |@@ -354,7 +355,8 @@ static const struct ata_port_info ahci_p/* board_ahci_sb600 */ { .flags = AHCI_FLAG_COMMON | - AHCI_FLAG_IGN_SERR_INTERNAL, +AHCI_FLAG_IGN_SERR_INTERNAL | + AHCI_FLAG_32BIT_ONLY, .pio_mask = 0x1f, /* pio0-4 */ .udma_mask = 0x7f, /* udma0-6 ; FIXME */ .port_ops = &ahci_ops,@@ -492,6 +494,13 @@ static void ahci_save_initial_config(str hpriv->saved_cap = cap =readl (mmio +HOST_CAP ); hpriv->saved_port_map = port_map =readl (mmio +HOST_PORTS_IMPL );
drivers/ata/ahci.c static void ahci_save_initial_config(str · line 506
Quoted 10 lines
drivers/ata/ahci.c +7
-0+/* some chips lie about 64bit support */ +if ((cap &HOST_CAP_64 ) && (pi->flags &AHCI_FLAG_32BIT_ONLY )) { +dev_printk (KERN_INFO , &pdev->dev, +"controller can't do 64bit DMA, forcing 32bit\n" ); + cap &= ~HOST_CAP_64 ; + } +/* fixup zero port_map */ if (!port_map) { port_map = (1 <<ahci_nr_ports (hpriv->cap)) -1 ;
___________________________________________________________________________________
How would you spend $50,000 to create a more sustainable environment in Australia? Go to Yahoo!7 Answers and share your idea.
http://advision.webevents.yahoo.com/aunz/lifestyle/answers/y7ans-babp_reg.html
PATCH 1/1 ahci: disable 64bit dma on sb600
In reply to Tejun HeoSB600 claims it can do 64bit DMA but it can't. Disable it.
---
Jeff, this one is for #upstream-fixes.
ahci.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/ata/ahci.c +10 -1
@@ -170,6 +170,7 @@ enum {AHCI_FLAG_IGN_IRQ_IF_ERR = (1 <<25 ),/* ignore IRQ_IF_ERR */ AHCI_FLAG_HONOR_PI = (1 <<26 ),/* honor PORTS_IMPL */ AHCI_FLAG_IGN_SERR_INTERNAL = (1 <<27 ),/* ignore SERR_INTERNAL */ +AHCI_FLAG_32BIT_ONLY = (1 <<28 ),/* force 32bit */ AHCI_FLAG_COMMON =ATA_FLAG_SATA |ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
@@ -354,7 +355,8 @@ static const struct ata_port_info ahci_p/* board_ahci_sb600 */ { .flags = AHCI_FLAG_COMMON | - AHCI_FLAG_IGN_SERR_INTERNAL, +AHCI_FLAG_IGN_SERR_INTERNAL | + AHCI_FLAG_32BIT_ONLY, .pio_mask = 0x1f, /* pio0-4 */ .udma_mask = 0x7f, /* udma0-6 ; FIXME */ .port_ops = &ahci_ops,
@@ -492,6 +494,13 @@ static void ahci_save_initial_config(str hpriv->saved_cap = cap =readl (mmio +HOST_CAP ); hpriv->saved_port_map = port_map =readl (mmio +HOST_PORTS_IMPL ); +/* some chips lie about 64bit support */ +if ((cap &HOST_CAP_64 ) && (pi->flags &AHCI_FLAG_32BIT_ONLY )) { +dev_printk (KERN_INFO , &pdev->dev, +"controller can't do 64bit DMA, forcing 32bit\n" ); + cap &= ~HOST_CAP_64 ; + } +/* fixup zero port_map */ if (!port_map) { port_map = (1 <<ahci_nr_ports (hpriv->cap)) -1 ;
Jeff Garzik
AppliedRe: [PATCH] ahci: disable 64bit dma on sb600
Quoted 8 lines · Tejun Heo
SB600 claims it can do 64bit DMA but it can't. Disable it.
Signed-off-by Tejun Heo <[email protected]>---
Jeff, this one is for #upstream-fixes.ahci.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
applied