lkml.org 
[lkml]   [2003]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Testing IDE-TCQ and Taskfile - doesn't work nicely:)

On Mon, 23 Jun 2003, Jan-Benedict Glaw wrote:

> Hi!
>
> I've played a bit with my "mirror" machine
>
> - 200MHz Pentium-MMX
> - 64MB RAM
> - jbglaw@mirror:~$ cat /proc/ide/hd*/model
> WDC AC2850F # System drive
> IC35L040AVER07-0 # \
> IC35L120AVV207-0 # > Storage (with DM/LVM)
> Maxtor 4W100H6 # /
> - jbglaw@mirror:~$ lspci |grep IDE
> 00:07.1 IDE interface: Intel Corp. 82371AB/EB/MB PIIX4 IDE (rev 01)
> - Linux v2.5.73
> - <*> Intel PIIXn chipsets support
>
> Basically, if I enable Taskfile I/O, the box refuses to boot (basically,
> the first drive sounds really broken like "clack clack clack" and no
> data comes off the drive so there's no partition table, no root FS, but
> a panic:) Is anybody interested in nailing this bug down?

YES

> Disabling Taskfile lets me boot the box, but hdc doesn't like TCQ and
> gives errors:
>
> ide_tcq_intr_timeout: timeout waiting for service interrupt
> ide_tcq_intr_timeout: missing isr!
> hdc: invalidating tag queue (0 commands)
> hdc: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
> hdc: drive_cmd: error=0x04 { DriveStatusError }
> [above messages repeat...]

TCQ shouldn't be enabled on hdc, you have two drives on second ide
channel and current TCQ driver design allows only one drive per channel,
so proper fix is to not enable TCQ :-).

Can you try attached patch?

Regards,
--
Bartlomiej

> IDE's boot log:
>
> Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
> ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
> PIIX4: IDE controller at PCI slot 00:07.1
> PIIX4: chipset revision 1
> PIIX4: not 100% native mode: will probe irqs later
> ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:pio, hdb:pio
> ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:pio, hdd:pio
> hda: WDC AC2850F, ATA DISK drive
> hdb: IC35L040AVER07-0, ATA DISK drive
> hda: tcq forbidden by blacklist
> hdb: only one drive on a channel supported for tcq
> ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
> hdc: IC35L120AVV207-0, ATA DISK drive
> hdd: Maxtor 4W100H6, ATA DISK drive
> hdc: tagged command queueing enabled, command queue depth 32
> hdd: only one drive on a channel supported for tcq
> ide1 at 0x170-0x177,0x376 on irq 15
> hda: max request size: 128KiB
> hda: task_no_data_intr: status=0x51 { DriveReady SeekComplete Error }
> hda: task_no_data_intr: error=0x04 { DriveStatusError }
> hda: 1667232 sectors (854 MB) w/64KiB Cache, CHS=1654/16/63, DMA
> hda: hda1 hda2 hda3
> hdb: max request size: 128KiB
> hdb: host protected area => 1
> hdb: 80418240 sectors (41174 MB) w/1916KiB Cache, CHS=79780/16/63, UDMA(33)
> hdb: hdb1 hdb2 hdb3 hdb4
> hdc: max request size: 1024KiB
> hdc: host protected area => 1
> hdc: 241254720 sectors (123522 MB) w/1821KiB Cache, CHS=15017/255/63, UDMA(33)
> hdc: hdc1 < hdc5 hdc6 hdc7 hdc8 hdc9 hdc10 hdc11 hdc12 hdc13 hdc14 hdc15 hdc16 hdc17 >
> hdd: max request size: 128KiB
> hdd: host protected area => 1
> hdd: 195711264 sectors (100204 MB) w/2048KiB Cache, CHS=194158/16/63, UDMA(33)
> hdd: hdd1 < hdd5 hdd6 hdd7 hdd8 hdd9 hdd10 hdd11 hdd12 hdd13 hdd14 >
>
> IDE settings:
> mirror:~# lspci -xxx -v -d 8086:7111
> 00:07.1 IDE interface: Intel Corp. 82371AB/EB/MB PIIX4 IDE (rev 01) (prog-if 80 [Master])
> Flags: bus master, medium devsel, latency 64
> I/O ports at f000 [size=16]
> 00: 86 80 11 71 05 00 80 02 01 80 01 01 00 40 00 00
> 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 20: 01 f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 40: 77 e1 77 e3 bb 00 00 00 0e 00 20 22 00 00 00 00
> 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> f0: 00 00 00 00 00 00 00 00 28 0f 00 00 00 00 00 00
>
> MfG, JBG
>
> --
> Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481
> "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg
> fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak!
> ret = do_actions((curr | FREE_SPEECH) & ~(IRAQ_WAR_2 | DRM | TCPA));

[ide] TCQ initialization fixes

- do not enable TCQ in ide_init_drive(), its too early
- enable TCQ in __ide_dma_on() only if CONFIG_BLK_DEV_IDE_TCQ_DEFAULT=y

drivers/ide/ide-dma.c | 8 ++++----
drivers/ide/ide-probe.c | 5 -----
include/linux/ide.h | 1 -
3 files changed, 4 insertions(+), 10 deletions(-)
diff -puN drivers/ide/ide-probe.c~ide-tcq-init-fixes drivers/ide/ide-probe.c
--- linux-2.5.73/drivers/ide/ide-probe.c~ide-tcq-init-fixes Mon Jun 23 23:10:11 2003
+++ linux-2.5.73-root/drivers/ide/ide-probe.c Mon Jun 23 23:10:11 2003
@@ -983,7 +983,6 @@ static void ide_init_queue(ide_drive_t *

blk_init_queue(q, do_ide_request, &ide_lock);
q->queuedata = HWGROUP(drive);
- drive->queue_setup = 1;
blk_queue_segment_boundary(q, 0xffff);

if (!hwif->rqsize)
@@ -1005,10 +1004,6 @@ static void ide_init_queue(ide_drive_t *
static void ide_init_drive(ide_drive_t *drive)
{
ide_toggle_bounce(drive, 1);
-
-#ifdef CONFIG_BLK_DEV_IDE_TCQ_DEFAULT
- HWIF(drive)->ide_dma_queued_on(drive);
-#endif
}

/*
diff -puN drivers/ide/ide-dma.c~ide-tcq-init-fixes drivers/ide/ide-dma.c
--- linux-2.5.73/drivers/ide/ide-dma.c~ide-tcq-init-fixes Mon Jun 23 23:10:11 2003
+++ linux-2.5.73-root/drivers/ide/ide-dma.c Mon Jun 23 23:10:11 2003
@@ -523,8 +523,7 @@ int __ide_dma_off_quietly (ide_drive_t *
if (HWIF(drive)->ide_dma_host_off(drive))
return 1;

- if (drive->queue_setup)
- HWIF(drive)->ide_dma_queued_off(drive);
+ HWIF(drive)->ide_dma_queued_off(drive);

return 0;
}
@@ -585,8 +584,9 @@ int __ide_dma_on (ide_drive_t *drive)
if (HWIF(drive)->ide_dma_host_on(drive))
return 1;

- if (drive->queue_setup)
- HWIF(drive)->ide_dma_queued_on(drive);
+#ifdef BLK_DEV_IDE_TCQ_DEFAULT
+ HWIF(drive)->ide_dma_queued_on(drive);
+#endif

return 0;
}
diff -puN include/linux/ide.h~ide-tcq-init-fixes include/linux/ide.h
--- linux-2.5.73/include/linux/ide.h~ide-tcq-init-fixes Mon Jun 23 23:10:11 2003
+++ linux-2.5.73-root/include/linux/ide.h Mon Jun 23 23:10:11 2003
@@ -726,7 +726,6 @@ typedef struct ide_drive_s {
unsigned ata_flash : 1; /* 1=present, 0=default */
unsigned blocked : 1; /* 1=powermanagment told us not to do anything, so sleep nicely */
unsigned vdma : 1; /* 1=doing PIO over DMA 0=doing normal DMA */
- unsigned queue_setup : 1;
unsigned addressing; /* : 3;
* 0=28-bit
* 1=48-bit
_
\
 
 \ /
  Last update: 2005-03-22 13:36    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site