* Re: [PATCH 09/14] ata: Use 32bit DMA in AHCI for Loongson 3. [not found] ` <1339747801-28691-10-git-send-email-chenhc@lemote.com> @ 2012-06-15 10:04 ` Sergei Shtylyov 2012-06-15 12:42 ` huacai chen 0 siblings, 1 reply; 7+ messages in thread From: Sergei Shtylyov @ 2012-06-15 10:04 UTC (permalink / raw) To: Huacai Chen Cc: Ralf Baechle, linux-mips, Fuxin Zhang, Zhangjin Wu, Huacai Chen, Hongliang Tao, Hua Yan, linux-ide Hello. On 15-06-2012 12:09, Huacai Chen wrote: > Signed-off-by: Huacai Chen<chenhc@lemote.com> > Signed-off-by: Hongliang Tao<taohl@lemote.com> > Signed-off-by: Hua Yan<yanh@lemote.com> You should have CCed the 'linux-ide' mailing list. > diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c > index ebaf67e..3e3cfd8 100644 > --- a/drivers/ata/ahci.c > +++ b/drivers/ata/ahci.c > @@ -183,7 +183,12 @@ static const struct ata_port_info ahci_port_info[] = { > }, > [board_ahci_sb700] = /* for SB700 and SB800 */ > { > +#ifndef CONFIG_CPU_LOONGSON3 > AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL), > +#else > + AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL | > + AHCI_HFLAG_32BIT_ONLY), > +#endif No, this #ifdef'ery won't do. You should add a new board type. MBR, Sergei ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 09/14] ata: Use 32bit DMA in AHCI for Loongson 3. 2012-06-15 10:04 ` [PATCH 09/14] ata: Use 32bit DMA in AHCI for Loongson 3 Sergei Shtylyov @ 2012-06-15 12:42 ` huacai chen 2012-06-17 12:05 ` Borislav Petkov 0 siblings, 1 reply; 7+ messages in thread From: huacai chen @ 2012-06-15 12:42 UTC (permalink / raw) To: Sergei Shtylyov Cc: Ralf Baechle, linux-mips, Fuxin Zhang, Zhangjin Wu, Huacai Chen, Hongliang Tao, Hua Yan, linux-ide On Fri, Jun 15, 2012 at 6:04 PM, Sergei Shtylyov <sshtylyov@mvista.com> wrote: > Hello. > > > On 15-06-2012 12:09, Huacai Chen wrote: > >> Signed-off-by: Huacai Chen<chenhc@lemote.com> >> Signed-off-by: Hongliang Tao<taohl@lemote.com> >> Signed-off-by: Hua Yan<yanh@lemote.com> > > > You should have CCed the 'linux-ide' mailing list. > > >> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c >> index ebaf67e..3e3cfd8 100644 >> --- a/drivers/ata/ahci.c >> +++ b/drivers/ata/ahci.c >> @@ -183,7 +183,12 @@ static const struct ata_port_info ahci_port_info[] = >> { >> }, >> [board_ahci_sb700] = /* for SB700 and SB800 */ >> { >> +#ifndef CONFIG_CPU_LOONGSON3 >> AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL), >> +#else >> + AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL | >> + AHCI_HFLAG_32BIT_ONLY), >> +#endif > > > No, this #ifdef'ery won't do. You should add a new board type. All Loongson-3 based machines use AMD SB700 chipsets, add a new board type is better than #ifdef? > > MBR, Sergei ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 09/14] ata: Use 32bit DMA in AHCI for Loongson 3. 2012-06-15 12:42 ` huacai chen @ 2012-06-17 12:05 ` Borislav Petkov 2012-06-18 9:04 ` huacai chen 0 siblings, 1 reply; 7+ messages in thread From: Borislav Petkov @ 2012-06-17 12:05 UTC (permalink / raw) To: huacai chen Cc: Sergei Shtylyov, Ralf Baechle, linux-mips, Fuxin Zhang, Zhangjin Wu, Huacai Chen, Hongliang Tao, Hua Yan, linux-ide On Fri, Jun 15, 2012 at 08:42:47PM +0800, huacai chen wrote: > On Fri, Jun 15, 2012 at 6:04 PM, Sergei Shtylyov <sshtylyov@mvista.com> wrote: > > Hello. > > > > > > On 15-06-2012 12:09, Huacai Chen wrote: > > > >> Signed-off-by: Huacai Chen<chenhc@lemote.com> > >> Signed-off-by: Hongliang Tao<taohl@lemote.com> > >> Signed-off-by: Hua Yan<yanh@lemote.com> > > > > > > You should have CCed the 'linux-ide' mailing list. > > > > > >> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c > >> index ebaf67e..3e3cfd8 100644 > >> --- a/drivers/ata/ahci.c > >> +++ b/drivers/ata/ahci.c > >> @@ -183,7 +183,12 @@ static const struct ata_port_info ahci_port_info[] = > >> { > >> }, > >> [board_ahci_sb700] = /* for SB700 and SB800 */ > >> { > >> +#ifndef CONFIG_CPU_LOONGSON3 > >> AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL), > >> +#else > >> + AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL | > >> + AHCI_HFLAG_32BIT_ONLY), > >> +#endif > > > > > > No, this #ifdef'ery won't do. You should add a new board type. > All Loongson-3 based machines use AMD SB700 chipsets, add a new board > type is better than #ifdef? SB700/800 chipsets don't need to set a 32-bit only DMA flag; why do you need it when you use the same chipset? -- Regards/Gruss, Boris. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 09/14] ata: Use 32bit DMA in AHCI for Loongson 3. 2012-06-17 12:05 ` Borislav Petkov @ 2012-06-18 9:04 ` huacai chen 2012-06-18 10:10 ` Borislav Petkov 0 siblings, 1 reply; 7+ messages in thread From: huacai chen @ 2012-06-18 9:04 UTC (permalink / raw) To: Borislav Petkov Cc: Sergei Shtylyov, Ralf Baechle, linux-mips, Fuxin Zhang, Zhangjin Wu, Huacai Chen, Hongliang Tao, Hua Yan, linux-ide Do you means it is a better idea to modify "enum board_ids" and add a new board id such as board_ahci_sb700_loongson, and then add a new entry in ahci_port_info[]? If so, I think there is a problem: the pci id of our AHCI controller is 1002:4390, if I add board_ahci_sb700_loongson, then I should also add { PCI_VDEVICE(ATI, 0x4390), board_ahci_sb700_loongson }, in ahci_pci_tbl[], but ahci_pci_tbl[] already has a line { PCI_VDEVICE(ATI, 0x4390), board_ahci_sb700 }, Then which entry will match the device? On Sun, Jun 17, 2012 at 8:05 PM, Borislav Petkov <bp@alien8.de> wrote: > On Fri, Jun 15, 2012 at 08:42:47PM +0800, huacai chen wrote: >> On Fri, Jun 15, 2012 at 6:04 PM, Sergei Shtylyov <sshtylyov@mvista.com> wrote: >> > Hello. >> > >> > >> > On 15-06-2012 12:09, Huacai Chen wrote: >> > >> >> Signed-off-by: Huacai Chen<chenhc@lemote.com> >> >> Signed-off-by: Hongliang Tao<taohl@lemote.com> >> >> Signed-off-by: Hua Yan<yanh@lemote.com> >> > >> > >> > You should have CCed the 'linux-ide' mailing list. >> > >> > >> >> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c >> >> index ebaf67e..3e3cfd8 100644 >> >> --- a/drivers/ata/ahci.c >> >> +++ b/drivers/ata/ahci.c >> >> @@ -183,7 +183,12 @@ static const struct ata_port_info ahci_port_info[] = >> >> { >> >> }, >> >> [board_ahci_sb700] = /* for SB700 and SB800 */ >> >> { >> >> +#ifndef CONFIG_CPU_LOONGSON3 >> >> AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL), >> >> +#else >> >> + AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL | >> >> + AHCI_HFLAG_32BIT_ONLY), >> >> +#endif >> > >> > >> > No, this #ifdef'ery won't do. You should add a new board type. >> All Loongson-3 based machines use AMD SB700 chipsets, add a new board >> type is better than #ifdef? > > SB700/800 chipsets don't need to set a 32-bit only DMA flag; why do you > need it when you use the same chipset? > > -- > Regards/Gruss, > Boris. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 09/14] ata: Use 32bit DMA in AHCI for Loongson 3. 2012-06-18 9:04 ` huacai chen @ 2012-06-18 10:10 ` Borislav Petkov 2012-06-18 10:41 ` Huacai Chen 0 siblings, 1 reply; 7+ messages in thread From: Borislav Petkov @ 2012-06-18 10:10 UTC (permalink / raw) To: huacai chen Cc: Sergei Shtylyov, Ralf Baechle, linux-mips, Fuxin Zhang, Zhangjin Wu, Huacai Chen, Hongliang Tao, Hua Yan, linux-ide On Mon, Jun 18, 2012 at 05:04:14PM +0800, huacai chen wrote: > Do you means it is a better idea to modify "enum board_ids" and add a > new board id such as board_ahci_sb700_loongson, and then add a new > entry in ahci_port_info[]? > If so, I think there is a problem: the pci id of our AHCI controller > is 1002:4390, if I add board_ahci_sb700_loongson, then I should also > add > { PCI_VDEVICE(ATI, 0x4390), board_ahci_sb700_loongson }, > in ahci_pci_tbl[], but ahci_pci_tbl[] already has a line > { PCI_VDEVICE(ATI, 0x4390), board_ahci_sb700 }, > Then which entry will match the device? Before you do anything, my question is: SB700/800 chipsets don't need to set a 32-bit only DMA flag; why do you need it when you use the same chipset? So why do you need to do 32-bit DMA only when the chipset supports 64-bit DMA just fine? Thanks. -- Regards/Gruss, Boris. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 09/14] ata: Use 32bit DMA in AHCI for Loongson 3. 2012-06-18 10:10 ` Borislav Petkov @ 2012-06-18 10:41 ` Huacai Chen 2012-06-18 14:52 ` Borislav Petkov 0 siblings, 1 reply; 7+ messages in thread From: Huacai Chen @ 2012-06-18 10:41 UTC (permalink / raw) To: Borislav Petkov Cc: Sergei Shtylyov, Ralf Baechle, linux-mips, Fuxin Zhang, Zhangjin Wu, Huacai Chen, Hongliang Tao, Hua Yan, linux-ide Ohh, this is because Loongson-3 has a hardware bug, when the HT controller receive a 64-bit DMA address, the high bits is lost. So set to 32-bit DMA is just a workaround. I'm sorry that I didn't describe this clearly. On Mon, Jun 18, 2012 at 6:10 PM, Borislav Petkov <bp@alien8.de> wrote: > On Mon, Jun 18, 2012 at 05:04:14PM +0800, huacai chen wrote: >> Do you means it is a better idea to modify "enum board_ids" and add a >> new board id such as board_ahci_sb700_loongson, and then add a new >> entry in ahci_port_info[]? >> If so, I think there is a problem: the pci id of our AHCI controller >> is 1002:4390, if I add board_ahci_sb700_loongson, then I should also >> add >> { PCI_VDEVICE(ATI, 0x4390), board_ahci_sb700_loongson }, >> in ahci_pci_tbl[], but ahci_pci_tbl[] already has a line >> { PCI_VDEVICE(ATI, 0x4390), board_ahci_sb700 }, >> Then which entry will match the device? > > Before you do anything, my question is: > > SB700/800 chipsets don't need to set a 32-bit only DMA flag; why do you > need it when you use the same chipset? > > So why do you need to do 32-bit DMA only when the chipset supports > 64-bit DMA just fine? > > Thanks. > > -- > Regards/Gruss, > Boris. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 09/14] ata: Use 32bit DMA in AHCI for Loongson 3. 2012-06-18 10:41 ` Huacai Chen @ 2012-06-18 14:52 ` Borislav Petkov 0 siblings, 0 replies; 7+ messages in thread From: Borislav Petkov @ 2012-06-18 14:52 UTC (permalink / raw) To: Huacai Chen Cc: Sergei Shtylyov, Ralf Baechle, linux-mips, Fuxin Zhang, Zhangjin Wu, Huacai Chen, Hongliang Tao, Hua Yan, linux-ide On Mon, Jun 18, 2012 at 06:41:58PM +0800, Huacai Chen wrote: > Ohh, this is because Loongson-3 has a hardware bug, when the HT > controller receive a 64-bit DMA address, the high bits is lost. So set > to 32-bit DMA is just a workaround. Ok, this should definitely go into the commit message of your patch then since it explains why you need that flag set. Thanks. -- Regards/Gruss, Boris. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-06-18 14:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1339747801-28691-1-git-send-email-chenhc@lemote.com>
[not found] ` <1339747801-28691-10-git-send-email-chenhc@lemote.com>
2012-06-15 10:04 ` [PATCH 09/14] ata: Use 32bit DMA in AHCI for Loongson 3 Sergei Shtylyov
2012-06-15 12:42 ` huacai chen
2012-06-17 12:05 ` Borislav Petkov
2012-06-18 9:04 ` huacai chen
2012-06-18 10:10 ` Borislav Petkov
2012-06-18 10:41 ` Huacai Chen
2012-06-18 14:52 ` Borislav Petkov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox