* Re: kernel 2.6.25 with ide driver cs5520 does not boot. [not found] <20080508.165814.197343623.takada@mbf.nifty.com> @ 2008-05-08 13:07 ` Bartlomiej Zolnierkiewicz 2008-05-09 2:22 ` TAKADA Yoshihito 0 siblings, 1 reply; 10+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2008-05-08 13:07 UTC (permalink / raw) To: TAKADA Yoshihito; +Cc: linux-kernel, linux-ide Hi, On Thu, May 8, 2008 at 9:58 AM, TAKADA Yoshihito <takada@mbf.nifty.com> wrote: > HI, all. > (please CC to me, I'm not on LKML) > > kernel 2.6.25 with ide driver cs5520 does not boot. > > Attached part of dmesgs as dmesgs.txt CS5520 is a bit special hardware because it doesn't support "normal" DMA but Virtual DMA (PIO transfers between device<->host but DMA transfers between host<->CPU). In 2.6.25 we added support for Virtual DMA to cs5520 host driver so it could be it (till 2.6.25 PIO has always been used - the info printed by kernel about PIO/DMA BIOS settings was misleading/bogus so it got removed altogether in 2.6.26-rc1). I'll double-check the code and datasheet/errata that we don't miss something important for proper Virtual DMA support (and if not than I guess that we need to disable this feature for now). In the meantime please try 2.6.26-rc1 (just to be sure that the problem was not caused by something else that got fixed already). > kernel 2.6.23 with cs5520 is works correct. cs5520 scans ide0 and ide1. > kernel 2.6.24 with cs5520 is works wrong, but it can boot. cs5520 scans ide0 only. [...] 2.6.24 contained a bug in calculating DMA base for the second port (thus the error message) but it shouldn't affect anything (ide1 is still probed according to dmesg, please let me know if there are some devices on ide1 that are not getting detected). Thanks, Bart ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: kernel 2.6.25 with ide driver cs5520 does not boot. 2008-05-08 13:07 ` kernel 2.6.25 with ide driver cs5520 does not boot Bartlomiej Zolnierkiewicz @ 2008-05-09 2:22 ` TAKADA Yoshihito 2008-05-09 9:27 ` Bartlomiej Zolnierkiewicz 0 siblings, 1 reply; 10+ messages in thread From: TAKADA Yoshihito @ 2008-05-09 2:22 UTC (permalink / raw) To: bzolnier; +Cc: linux-kernel, linux-ide Thanks for quick reply. I tried 2.6.26rc1. It hangs same as 2.6.25. kernel 2.6.26rc1 with cs5520 cannot boot. cs5520 scans ide0 and ide1. It seems 2nd port DMA base issue was solved. dmesg is follow: Uniform Multi-Platform E-EDI driver ide: Assuming 33MHz system bus speed for PIO modes: override with idebus=xx Cyrix 5520: IDE controller (0x1078:0x0002 rev 0x00) at PCI slot 0000:00:12.0 ide0: BM-DMA at 0x5000-0x5007 ide1: BM-DMA at 0x5008-0x500f hda: IC25N030ATCS04-0, ATA DISK drive ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 ide1 at 0x170-0x177,0x376 on irq 14 hda: max request size: 128KiB (hang) From: "Bartlomiej Zolnierkiewicz" <bzolnier@gmail.com> Subject: Re: kernel 2.6.25 with ide driver cs5520 does not boot. Date: Thu, 8 May 2008 15:07:31 +0200 (snip) > 2.6.24 contained a bug in calculating DMA base for the second port (thus > the error message) but it shouldn't affect anything (ide1 is still probed > according to dmesg, please let me know if there are some devices on ide1 > that are not getting detected). I seems that this issue was resolved. Thanks. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: kernel 2.6.25 with ide driver cs5520 does not boot. 2008-05-09 2:22 ` TAKADA Yoshihito @ 2008-05-09 9:27 ` Bartlomiej Zolnierkiewicz 2008-05-09 12:56 ` TAKADA Yoshihito 0 siblings, 1 reply; 10+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2008-05-09 9:27 UTC (permalink / raw) To: TAKADA Yoshihito; +Cc: linux-kernel, linux-ide On Friday 09 May 2008, TAKADA Yoshihito wrote: > Thanks for quick reply. > > I tried 2.6.26rc1. It hangs same as 2.6.25. > kernel 2.6.26rc1 with cs5520 cannot boot. cs5520 scans ide0 and ide1. > It seems 2nd port DMA base issue was solved. [...] Thanks. The following patch for 2.6.26-rc1 disables VDMA, please give it a try (I haven't time to fully audit VDMA support yet but lets see if it is the main source of the problems). --- drivers/ide/pci/cs5520.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: b/drivers/ide/pci/cs5520.c =================================================================== --- a/drivers/ide/pci/cs5520.c +++ b/drivers/ide/pci/cs5520.c @@ -119,6 +119,7 @@ static const struct ide_dma_ops cs5520_d .dma_timeout = ide_dma_timeout, }; +/* FIXME: VDMA is disabled because it caused problems */ #define DECLARE_CS_DEV(name_str) \ { \ .name = name_str, \ @@ -126,7 +127,6 @@ static const struct ide_dma_ops cs5520_d .dma_ops = &cs5520_dma_ops, \ .host_flags = IDE_HFLAG_ISA_PORTS | \ IDE_HFLAG_CS5520 | \ - IDE_HFLAG_VDMA | \ IDE_HFLAG_NO_ATAPI_DMA | \ IDE_HFLAG_ABUSE_SET_DMA_MODE, \ .pio_mask = ATA_PIO4, \ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: kernel 2.6.25 with ide driver cs5520 does not boot. 2008-05-09 9:27 ` Bartlomiej Zolnierkiewicz @ 2008-05-09 12:56 ` TAKADA Yoshihito 2008-05-14 20:44 ` Bartlomiej Zolnierkiewicz 0 siblings, 1 reply; 10+ messages in thread From: TAKADA Yoshihito @ 2008-05-09 12:56 UTC (permalink / raw) To: bzolnier; +Cc: linux-kernel, linux-ide Hi. From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Subject: Re: kernel 2.6.25 with ide driver cs5520 does not boot. Date: Fri, 9 May 2008 11:27:53 +0200 > On Friday 09 May 2008, TAKADA Yoshihito wrote: > > Thanks for quick reply. > > > > I tried 2.6.26rc1. It hangs same as 2.6.25. > > kernel 2.6.26rc1 with cs5520 cannot boot. cs5520 scans ide0 and ide1. > > It seems 2nd port DMA base issue was solved. > > [...] > > Thanks. > > The following patch for 2.6.26-rc1 disables VDMA, please give it a try > (I haven't time to fully audit VDMA support yet but lets see if it is > the main source of the problems). I applied the patch. But kernel was hung. And I attempt to kill IDE_HFLAG_CS5520. It cannot boot, oo. kill IDE_HFLAG_VDMA : hang kill IDE_HFLAG_CS5520: hang kill both flags : boot ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: kernel 2.6.25 with ide driver cs5520 does not boot. 2008-05-09 12:56 ` TAKADA Yoshihito @ 2008-05-14 20:44 ` Bartlomiej Zolnierkiewicz 2008-05-14 22:28 ` Bartlomiej Zolnierkiewicz 2008-05-18 4:37 ` TAKADA Yoshihito 0 siblings, 2 replies; 10+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2008-05-14 20:44 UTC (permalink / raw) To: TAKADA Yoshihito; +Cc: linux-kernel, linux-ide On Friday 09 May 2008, TAKADA Yoshihito wrote: > Hi. > > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> > Subject: Re: kernel 2.6.25 with ide driver cs5520 does not boot. > Date: Fri, 9 May 2008 11:27:53 +0200 > > > On Friday 09 May 2008, TAKADA Yoshihito wrote: > > > Thanks for quick reply. > > > > > > I tried 2.6.26rc1. It hangs same as 2.6.25. > > > kernel 2.6.26rc1 with cs5520 cannot boot. cs5520 scans ide0 and ide1. > > > It seems 2nd port DMA base issue was solved. > > > > [...] > > > > Thanks. > > > > The following patch for 2.6.26-rc1 disables VDMA, please give it a try > > (I haven't time to fully audit VDMA support yet but lets see if it is > > the main source of the problems). > > I applied the patch. But kernel was hung. > And I attempt to kill IDE_HFLAG_CS5520. It cannot boot, oo. > > kill IDE_HFLAG_VDMA : hang > kill IDE_HFLAG_CS5520: hang > kill both flags : boot Thanks for investigating this - I forgot that currently VDMA and CS5520 host flags use the same bit (so it also needs to be fixed). I'm going to send the following patch to Linus (please verify it): From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Subject: [PATCH] cs5520: disable VDMA Disable Virtual DMA support for now (it causes system hangs). Thanks to TAKADA Yoshihito for the help with debugging the problem. Reported-by: TAKADA Yoshihito <takada@mbf.nifty.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> --- drivers/ide/pci/cs5520.c | 2 +- include/linux/ide.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) Index: b/drivers/ide/pci/cs5520.c =================================================================== --- a/drivers/ide/pci/cs5520.c +++ b/drivers/ide/pci/cs5520.c @@ -119,6 +119,7 @@ static const struct ide_dma_ops cs5520_d .dma_timeout = ide_dma_timeout, }; +/* FIXME: VDMA is disabled because it caused system hangs */ #define DECLARE_CS_DEV(name_str) \ { \ .name = name_str, \ @@ -126,7 +127,6 @@ static const struct ide_dma_ops cs5520_d .dma_ops = &cs5520_dma_ops, \ .host_flags = IDE_HFLAG_ISA_PORTS | \ IDE_HFLAG_CS5520 | \ - IDE_HFLAG_VDMA | \ IDE_HFLAG_NO_ATAPI_DMA | \ IDE_HFLAG_ABUSE_SET_DMA_MODE, \ .pio_mask = ATA_PIO4, \ Index: b/include/linux/ide.h =================================================================== --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -1058,8 +1058,8 @@ enum { IDE_HFLAG_NO_SET_MODE = (1 << 9), /* trust BIOS for programming chipset/device for DMA */ IDE_HFLAG_TRUST_BIOS_FOR_DMA = (1 << 10), - /* host uses VDMA (tied with IDE_HFLAG_CS5520 for now) */ - IDE_HFLAG_VDMA = (1 << 11), + /* host is CS5510/CS5520 */ + IDE_HFLAG_CS5520 = (1 << 11), /* ATAPI DMA is unsupported */ IDE_HFLAG_NO_ATAPI_DMA = (1 << 12), /* set if host is a "non-bootable" controller */ @@ -1070,8 +1070,6 @@ enum { IDE_HFLAG_NO_AUTODMA = (1 << 15), /* host uses MMIO */ IDE_HFLAG_MMIO = (1 << 16), - /* host is CS5510/CS5520 */ - IDE_HFLAG_CS5520 = IDE_HFLAG_VDMA, /* no LBA48 */ IDE_HFLAG_NO_LBA48 = (1 << 17), /* no LBA48 DMA */ @@ -1101,6 +1099,8 @@ enum { IDE_HFLAG_NO_IO_32BIT = (1 << 30), /* never unmask IRQs */ IDE_HFLAG_NO_UNMASK_IRQS = (1 << 31), + /* host uses VDMA (disabled for now) */ + IDE_HFLAG_VDMA = 0, }; #ifdef CONFIG_BLK_DEV_OFFBOARD ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: kernel 2.6.25 with ide driver cs5520 does not boot. 2008-05-14 20:44 ` Bartlomiej Zolnierkiewicz @ 2008-05-14 22:28 ` Bartlomiej Zolnierkiewicz 2008-05-30 5:01 ` TAKADA Yoshihito 2008-05-18 4:37 ` TAKADA Yoshihito 1 sibling, 1 reply; 10+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2008-05-14 22:28 UTC (permalink / raw) To: TAKADA Yoshihito; +Cc: linux-kernel, linux-ide On Wednesday 14 May 2008, Bartlomiej Zolnierkiewicz wrote: > On Friday 09 May 2008, TAKADA Yoshihito wrote: > > Hi. > > > > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> > > Subject: Re: kernel 2.6.25 with ide driver cs5520 does not boot. > > Date: Fri, 9 May 2008 11:27:53 +0200 > > > > > On Friday 09 May 2008, TAKADA Yoshihito wrote: > > > > Thanks for quick reply. > > > > > > > > I tried 2.6.26rc1. It hangs same as 2.6.25. > > > > kernel 2.6.26rc1 with cs5520 cannot boot. cs5520 scans ide0 and ide1. > > > > It seems 2nd port DMA base issue was solved. > > > > > > [...] > > > > > > Thanks. > > > > > > The following patch for 2.6.26-rc1 disables VDMA, please give it a try > > > (I haven't time to fully audit VDMA support yet but lets see if it is > > > the main source of the problems). > > > > I applied the patch. But kernel was hung. > > And I attempt to kill IDE_HFLAG_CS5520. It cannot boot, oo. > > > > kill IDE_HFLAG_VDMA : hang > > kill IDE_HFLAG_CS5520: hang > > kill both flags : boot > > Thanks for investigating this - I forgot that currently VDMA and CS5520 > host flags use the same bit (so it also needs to be fixed). > > I'm going to send the following patch to Linus (please verify it): > > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> > Subject: [PATCH] cs5520: disable VDMA [...] Please also try 2.6.26-rc2 without the above patch but with the following patch applied instead - according to comments in OpenFirmware & pata_cs5520 code 0x60 register contains bus-master enable bit, it could be that it was left disabled by BIOS and we need to explicitely enable it (if somebody has CX5510 or CX5520 datasheet please verify this + send me a copy if possible). --- drivers/ide/pci/cs5520.c | 8 ++++++++ 1 file changed, 8 insertions(+) Index: b/drivers/ide/pci/cs5520.c =================================================================== --- a/drivers/ide/pci/cs5520.c +++ b/drivers/ide/pci/cs5520.c @@ -147,6 +147,7 @@ static int __devinit cs5520_init_one(str { const struct ide_port_info *d = &cyrix_chipsets[id->driver_data]; u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; + u8 pcicfg; ide_setup_pci_noise(dev, d); @@ -163,6 +164,13 @@ static int __devinit cs5520_init_one(str return -ENODEV; } + pci_read_config_byte(dev, 0x60, &pcicfg); + + if ((pcicfg & 0x40) == 0) { + printk(KERN_WARNING "cs5520: DMA mode disabled. Enabling.\n"); + pci_write_config_byte(dev, 0x60, pcicfg | 0x40); + } + /* * Now the chipset is configured we can let the core * do all the device setup for us ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: kernel 2.6.25 with ide driver cs5520 does not boot. 2008-05-14 22:28 ` Bartlomiej Zolnierkiewicz @ 2008-05-30 5:01 ` TAKADA Yoshihito 2008-06-11 20:27 ` Bartlomiej Zolnierkiewicz 0 siblings, 1 reply; 10+ messages in thread From: TAKADA Yoshihito @ 2008-05-30 5:01 UTC (permalink / raw) To: bzolnier; +Cc: linux-kernel, linux-ide From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Subject: Re: kernel 2.6.25 with ide driver cs5520 does not boot. Date: Thu, 15 May 2008 00:28:04 +0200 Hi. sorry, I'm too late. I tested the patch to re-enable DMA. But, this patch has no effect. It cannot boot. printk() message disappeared. > On Wednesday 14 May 2008, Bartlomiej Zolnierkiewicz wrote: > > On Friday 09 May 2008, TAKADA Yoshihito wrote: > > > Hi. > > > > > > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> > > > Subject: Re: kernel 2.6.25 with ide driver cs5520 does not boot. > > > Date: Fri, 9 May 2008 11:27:53 +0200 > > > > > > > On Friday 09 May 2008, TAKADA Yoshihito wrote: > > > > > Thanks for quick reply. > > > > > > > > > > I tried 2.6.26rc1. It hangs same as 2.6.25. > > > > > kernel 2.6.26rc1 with cs5520 cannot boot. cs5520 scans ide0 and ide1. > > > > > It seems 2nd port DMA base issue was solved. > > > > > > > > [...] > > > > > > > > Thanks. > > > > > > > > The following patch for 2.6.26-rc1 disables VDMA, please give it a try > > > > (I haven't time to fully audit VDMA support yet but lets see if it is > > > > the main source of the problems). > > > > > > I applied the patch. But kernel was hung. > > > And I attempt to kill IDE_HFLAG_CS5520. It cannot boot, oo. > > > > > > kill IDE_HFLAG_VDMA : hang > > > kill IDE_HFLAG_CS5520: hang > > > kill both flags : boot > > > > Thanks for investigating this - I forgot that currently VDMA and CS5520 > > host flags use the same bit (so it also needs to be fixed). > > > > I'm going to send the following patch to Linus (please verify it): > > > > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> > > Subject: [PATCH] cs5520: disable VDMA > > [...] > > Please also try 2.6.26-rc2 without the above patch but with the following > patch applied instead - according to comments in OpenFirmware & pata_cs5520 > code 0x60 register contains bus-master enable bit, it could be that it was > left disabled by BIOS and we need to explicitely enable it (if somebody has > CX5510 or CX5520 datasheet please verify this + send me a copy if possible). > > --- > drivers/ide/pci/cs5520.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > Index: b/drivers/ide/pci/cs5520.c > =================================================================== > --- a/drivers/ide/pci/cs5520.c > +++ b/drivers/ide/pci/cs5520.c > @@ -147,6 +147,7 @@ static int __devinit cs5520_init_one(str > { > const struct ide_port_info *d = &cyrix_chipsets[id->driver_data]; > u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; > + u8 pcicfg; > > ide_setup_pci_noise(dev, d); > > @@ -163,6 +164,13 @@ static int __devinit cs5520_init_one(str > return -ENODEV; > } > > + pci_read_config_byte(dev, 0x60, &pcicfg); > + > + if ((pcicfg & 0x40) == 0) { > + printk(KERN_WARNING "cs5520: DMA mode disabled. Enabling.\n"); > + pci_write_config_byte(dev, 0x60, pcicfg | 0x40); > + } > + > /* > * Now the chipset is configured we can let the core > * do all the device setup for us > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: kernel 2.6.25 with ide driver cs5520 does not boot. 2008-05-30 5:01 ` TAKADA Yoshihito @ 2008-06-11 20:27 ` Bartlomiej Zolnierkiewicz 0 siblings, 0 replies; 10+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2008-06-11 20:27 UTC (permalink / raw) To: TAKADA Yoshihito; +Cc: linux-kernel, linux-ide On Friday 30 May 2008, TAKADA Yoshihito wrote: > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> > Subject: Re: kernel 2.6.25 with ide driver cs5520 does not boot. > Date: Thu, 15 May 2008 00:28:04 +0200 > > Hi. sorry, I'm too late. > I tested the patch to re-enable DMA. But, this patch has no effect. It cannot boot. > printk() message disappeared. Now I'm late. ;-) Thanks for info, I'll later prepare patch removing IDE_HFLAG_VDMA & co. > > On Wednesday 14 May 2008, Bartlomiej Zolnierkiewicz wrote: > > > On Friday 09 May 2008, TAKADA Yoshihito wrote: > > > > Hi. > > > > > > > > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> > > > > Subject: Re: kernel 2.6.25 with ide driver cs5520 does not boot. > > > > Date: Fri, 9 May 2008 11:27:53 +0200 > > > > > > > > > On Friday 09 May 2008, TAKADA Yoshihito wrote: > > > > > > Thanks for quick reply. > > > > > > > > > > > > I tried 2.6.26rc1. It hangs same as 2.6.25. > > > > > > kernel 2.6.26rc1 with cs5520 cannot boot. cs5520 scans ide0 and ide1. > > > > > > It seems 2nd port DMA base issue was solved. > > > > > > > > > > [...] > > > > > > > > > > Thanks. > > > > > > > > > > The following patch for 2.6.26-rc1 disables VDMA, please give it a try > > > > > (I haven't time to fully audit VDMA support yet but lets see if it is > > > > > the main source of the problems). > > > > > > > > I applied the patch. But kernel was hung. > > > > And I attempt to kill IDE_HFLAG_CS5520. It cannot boot, oo. > > > > > > > > kill IDE_HFLAG_VDMA : hang > > > > kill IDE_HFLAG_CS5520: hang > > > > kill both flags : boot > > > > > > Thanks for investigating this - I forgot that currently VDMA and CS5520 > > > host flags use the same bit (so it also needs to be fixed). > > > > > > I'm going to send the following patch to Linus (please verify it): > > > > > > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> > > > Subject: [PATCH] cs5520: disable VDMA > > > > [...] > > > > Please also try 2.6.26-rc2 without the above patch but with the following > > patch applied instead - according to comments in OpenFirmware & pata_cs5520 > > code 0x60 register contains bus-master enable bit, it could be that it was > > left disabled by BIOS and we need to explicitely enable it (if somebody has > > CX5510 or CX5520 datasheet please verify this + send me a copy if possible). > > > > --- > > drivers/ide/pci/cs5520.c | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > Index: b/drivers/ide/pci/cs5520.c > > =================================================================== > > --- a/drivers/ide/pci/cs5520.c > > +++ b/drivers/ide/pci/cs5520.c > > @@ -147,6 +147,7 @@ static int __devinit cs5520_init_one(str > > { > > const struct ide_port_info *d = &cyrix_chipsets[id->driver_data]; > > u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; > > + u8 pcicfg; > > > > ide_setup_pci_noise(dev, d); > > > > @@ -163,6 +164,13 @@ static int __devinit cs5520_init_one(str > > return -ENODEV; > > } > > > > + pci_read_config_byte(dev, 0x60, &pcicfg); > > + > > + if ((pcicfg & 0x40) == 0) { > > + printk(KERN_WARNING "cs5520: DMA mode disabled. Enabling.\n"); > > + pci_write_config_byte(dev, 0x60, pcicfg | 0x40); > > + } > > + > > /* > > * Now the chipset is configured we can let the core > > * do all the device setup for us ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: kernel 2.6.25 with ide driver cs5520 does not boot. 2008-05-14 20:44 ` Bartlomiej Zolnierkiewicz 2008-05-14 22:28 ` Bartlomiej Zolnierkiewicz @ 2008-05-18 4:37 ` TAKADA Yoshihito 2008-05-18 18:14 ` Bartlomiej Zolnierkiewicz 1 sibling, 1 reply; 10+ messages in thread From: TAKADA Yoshihito @ 2008-05-18 4:37 UTC (permalink / raw) To: bzolnier; +Cc: linux-kernel, linux-ide Hi. I disagree that this patch to remove IDE_HFLAG_VDMA. Because IDE_HFLAG_VDMA is refferd in drivers/ide/ide-dma.c. Well, currently, it's only cs5520 to sets thiss flag. From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Subject: Re: kernel 2.6.25 with ide driver cs5520 does not boot. Date: Wed, 14 May 2008 22:44:48 +0200 > On Friday 09 May 2008, TAKADA Yoshihito wrote: > > Hi. > > > > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> > > Subject: Re: kernel 2.6.25 with ide driver cs5520 does not boot. > > Date: Fri, 9 May 2008 11:27:53 +0200 > > > > > On Friday 09 May 2008, TAKADA Yoshihito wrote: > > > > Thanks for quick reply. > > > > > > > > I tried 2.6.26rc1. It hangs same as 2.6.25. > > > > kernel 2.6.26rc1 with cs5520 cannot boot. cs5520 scans ide0 and ide1. > > > > It seems 2nd port DMA base issue was solved. > > > > > > [...] > > > > > > Thanks. > > > > > > The following patch for 2.6.26-rc1 disables VDMA, please give it a try > > > (I haven't time to fully audit VDMA support yet but lets see if it is > > > the main source of the problems). > > > > I applied the patch. But kernel was hung. > > And I attempt to kill IDE_HFLAG_CS5520. It cannot boot, oo. > > > > kill IDE_HFLAG_VDMA : hang > > kill IDE_HFLAG_CS5520: hang > > kill both flags : boot > > Thanks for investigating this - I forgot that currently VDMA and CS5520 > host flags use the same bit (so it also needs to be fixed). > > I'm going to send the following patch to Linus (please verify it): > > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> > Subject: [PATCH] cs5520: disable VDMA > > Disable Virtual DMA support for now (it causes system hangs). > > Thanks to TAKADA Yoshihito for the help with debugging the problem. > > Reported-by: TAKADA Yoshihito <takada@mbf.nifty.com> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> > --- > drivers/ide/pci/cs5520.c | 2 +- > include/linux/ide.h | 8 ++++---- > 2 files changed, 5 insertions(+), 5 deletions(-) > > Index: b/drivers/ide/pci/cs5520.c > =================================================================== > --- a/drivers/ide/pci/cs5520.c > +++ b/drivers/ide/pci/cs5520.c > @@ -119,6 +119,7 @@ static const struct ide_dma_ops cs5520_d > .dma_timeout = ide_dma_timeout, > }; > > +/* FIXME: VDMA is disabled because it caused system hangs */ > #define DECLARE_CS_DEV(name_str) \ > { \ > .name = name_str, \ > @@ -126,7 +127,6 @@ static const struct ide_dma_ops cs5520_d > .dma_ops = &cs5520_dma_ops, \ > .host_flags = IDE_HFLAG_ISA_PORTS | \ > IDE_HFLAG_CS5520 | \ > - IDE_HFLAG_VDMA | \ > IDE_HFLAG_NO_ATAPI_DMA | \ > IDE_HFLAG_ABUSE_SET_DMA_MODE, \ > .pio_mask = ATA_PIO4, \ > Index: b/include/linux/ide.h > =================================================================== > --- a/include/linux/ide.h > +++ b/include/linux/ide.h > @@ -1058,8 +1058,8 @@ enum { > IDE_HFLAG_NO_SET_MODE = (1 << 9), > /* trust BIOS for programming chipset/device for DMA */ > IDE_HFLAG_TRUST_BIOS_FOR_DMA = (1 << 10), > - /* host uses VDMA (tied with IDE_HFLAG_CS5520 for now) */ > - IDE_HFLAG_VDMA = (1 << 11), > + /* host is CS5510/CS5520 */ > + IDE_HFLAG_CS5520 = (1 << 11), > /* ATAPI DMA is unsupported */ > IDE_HFLAG_NO_ATAPI_DMA = (1 << 12), > /* set if host is a "non-bootable" controller */ > @@ -1070,8 +1070,6 @@ enum { > IDE_HFLAG_NO_AUTODMA = (1 << 15), > /* host uses MMIO */ > IDE_HFLAG_MMIO = (1 << 16), > - /* host is CS5510/CS5520 */ > - IDE_HFLAG_CS5520 = IDE_HFLAG_VDMA, > /* no LBA48 */ > IDE_HFLAG_NO_LBA48 = (1 << 17), > /* no LBA48 DMA */ > @@ -1101,6 +1099,8 @@ enum { > IDE_HFLAG_NO_IO_32BIT = (1 << 30), > /* never unmask IRQs */ > IDE_HFLAG_NO_UNMASK_IRQS = (1 << 31), > + /* host uses VDMA (disabled for now) */ > + IDE_HFLAG_VDMA = 0, > }; > > #ifdef CONFIG_BLK_DEV_OFFBOARD > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: kernel 2.6.25 with ide driver cs5520 does not boot. 2008-05-18 4:37 ` TAKADA Yoshihito @ 2008-05-18 18:14 ` Bartlomiej Zolnierkiewicz 0 siblings, 0 replies; 10+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2008-05-18 18:14 UTC (permalink / raw) To: TAKADA Yoshihito; +Cc: linux-kernel, linux-ide Hi, On Sunday 18 May 2008, TAKADA Yoshihito wrote: > Hi. > > I disagree that this patch to remove IDE_HFLAG_VDMA. > Because IDE_HFLAG_VDMA is refferd in drivers/ide/ide-dma.c. > Well, currently, it's only cs5520 to sets thiss flag. Depending on the results of the second patch that I posted (the one forcing bus-mastering in cs5520) we may want to: - extend ->host_flags to be of u64 type and re-enable IDE_HFLAG_VDMA or - remove IDE_HFLAG_VDMA host flag completely In the meantime the patch below un-broke cs5520 driver in the upstream kernel nicely. > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> > Subject: Re: kernel 2.6.25 with ide driver cs5520 does not boot. > Date: Wed, 14 May 2008 22:44:48 +0200 > > > On Friday 09 May 2008, TAKADA Yoshihito wrote: > > > Hi. > > > > > > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> > > > Subject: Re: kernel 2.6.25 with ide driver cs5520 does not boot. > > > Date: Fri, 9 May 2008 11:27:53 +0200 > > > > > > > On Friday 09 May 2008, TAKADA Yoshihito wrote: > > > > > Thanks for quick reply. > > > > > > > > > > I tried 2.6.26rc1. It hangs same as 2.6.25. > > > > > kernel 2.6.26rc1 with cs5520 cannot boot. cs5520 scans ide0 and ide1. > > > > > It seems 2nd port DMA base issue was solved. > > > > > > > > [...] > > > > > > > > Thanks. > > > > > > > > The following patch for 2.6.26-rc1 disables VDMA, please give it a try > > > > (I haven't time to fully audit VDMA support yet but lets see if it is > > > > the main source of the problems). > > > > > > I applied the patch. But kernel was hung. > > > And I attempt to kill IDE_HFLAG_CS5520. It cannot boot, oo. > > > > > > kill IDE_HFLAG_VDMA : hang > > > kill IDE_HFLAG_CS5520: hang > > > kill both flags : boot > > > > Thanks for investigating this - I forgot that currently VDMA and CS5520 > > host flags use the same bit (so it also needs to be fixed). > > > > I'm going to send the following patch to Linus (please verify it): > > > > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> > > Subject: [PATCH] cs5520: disable VDMA > > > > Disable Virtual DMA support for now (it causes system hangs). > > > > Thanks to TAKADA Yoshihito for the help with debugging the problem. > > > > Reported-by: TAKADA Yoshihito <takada@mbf.nifty.com> > > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> > > --- > > drivers/ide/pci/cs5520.c | 2 +- > > include/linux/ide.h | 8 ++++---- > > 2 files changed, 5 insertions(+), 5 deletions(-) > > > > Index: b/drivers/ide/pci/cs5520.c > > =================================================================== > > --- a/drivers/ide/pci/cs5520.c > > +++ b/drivers/ide/pci/cs5520.c > > @@ -119,6 +119,7 @@ static const struct ide_dma_ops cs5520_d > > .dma_timeout = ide_dma_timeout, > > }; > > > > +/* FIXME: VDMA is disabled because it caused system hangs */ > > #define DECLARE_CS_DEV(name_str) \ > > { \ > > .name = name_str, \ > > @@ -126,7 +127,6 @@ static const struct ide_dma_ops cs5520_d > > .dma_ops = &cs5520_dma_ops, \ > > .host_flags = IDE_HFLAG_ISA_PORTS | \ > > IDE_HFLAG_CS5520 | \ > > - IDE_HFLAG_VDMA | \ > > IDE_HFLAG_NO_ATAPI_DMA | \ > > IDE_HFLAG_ABUSE_SET_DMA_MODE, \ > > .pio_mask = ATA_PIO4, \ > > Index: b/include/linux/ide.h > > =================================================================== > > --- a/include/linux/ide.h > > +++ b/include/linux/ide.h > > @@ -1058,8 +1058,8 @@ enum { > > IDE_HFLAG_NO_SET_MODE = (1 << 9), > > /* trust BIOS for programming chipset/device for DMA */ > > IDE_HFLAG_TRUST_BIOS_FOR_DMA = (1 << 10), > > - /* host uses VDMA (tied with IDE_HFLAG_CS5520 for now) */ > > - IDE_HFLAG_VDMA = (1 << 11), > > + /* host is CS5510/CS5520 */ > > + IDE_HFLAG_CS5520 = (1 << 11), > > /* ATAPI DMA is unsupported */ > > IDE_HFLAG_NO_ATAPI_DMA = (1 << 12), > > /* set if host is a "non-bootable" controller */ > > @@ -1070,8 +1070,6 @@ enum { > > IDE_HFLAG_NO_AUTODMA = (1 << 15), > > /* host uses MMIO */ > > IDE_HFLAG_MMIO = (1 << 16), > > - /* host is CS5510/CS5520 */ > > - IDE_HFLAG_CS5520 = IDE_HFLAG_VDMA, > > /* no LBA48 */ > > IDE_HFLAG_NO_LBA48 = (1 << 17), > > /* no LBA48 DMA */ > > @@ -1101,6 +1099,8 @@ enum { > > IDE_HFLAG_NO_IO_32BIT = (1 << 30), > > /* never unmask IRQs */ > > IDE_HFLAG_NO_UNMASK_IRQS = (1 << 31), > > + /* host uses VDMA (disabled for now) */ > > + IDE_HFLAG_VDMA = 0, > > }; > > > > #ifdef CONFIG_BLK_DEV_OFFBOARD ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-06-11 20:26 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20080508.165814.197343623.takada@mbf.nifty.com>
2008-05-08 13:07 ` kernel 2.6.25 with ide driver cs5520 does not boot Bartlomiej Zolnierkiewicz
2008-05-09 2:22 ` TAKADA Yoshihito
2008-05-09 9:27 ` Bartlomiej Zolnierkiewicz
2008-05-09 12:56 ` TAKADA Yoshihito
2008-05-14 20:44 ` Bartlomiej Zolnierkiewicz
2008-05-14 22:28 ` Bartlomiej Zolnierkiewicz
2008-05-30 5:01 ` TAKADA Yoshihito
2008-06-11 20:27 ` Bartlomiej Zolnierkiewicz
2008-05-18 4:37 ` TAKADA Yoshihito
2008-05-18 18:14 ` Bartlomiej Zolnierkiewicz
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).