2001-03-14 23:51:38

by Pozsar Balazs

[permalink] [raw]
Subject: IDE poweroff -> hangup


Hi all,

I was courious, and I tried what happens if I power down my harddisk (ie
manually pull the power plug out), and then power it on again after a few
secs (put the plug back).

I do not know if the system should survive happily such an 'accident', but
it hadn't:
A few secs after the next access to the disc, I got the following on the
console:
hdg: timeout waiting for DMA
ide_dmaproc: chipset supported ide_dma_timeout func only: 14
and the machine froze the hard way (no respond to sysrq).

Tell me if this shouldn't be honoured by the kernel, but if there's a bug
around, here's some info:

Linux version 2.4.2 ([email protected]) (gcc version 2.95.3 19991030 (prerelease)) #1 SMP Wed Mar 7 22:58:36 CET 2001
BIOS-provided physical RAM map:
BIOS-e820: 000000000009fc00 @ 0000000000000000 (usable)
BIOS-e820: 0000000000000400 @ 000000000009fc00 (reserved)
BIOS-e820: 0000000000010000 @ 00000000000f0000 (reserved)
BIOS-e820: 0000000000001000 @ 00000000fec00000 (reserved)
BIOS-e820: 0000000000001000 @ 00000000fee00000 (reserved)
BIOS-e820: 0000000000010000 @ 00000000ffff0000 (reserved)
BIOS-e820: 0000000017ef0000 @ 0000000000100000 (usable)
BIOS-e820: 000000000000d000 @ 0000000017ff3000 (ACPI data)
BIOS-e820: 0000000000003000 @ 0000000017ff0000 (ACPI NVS)
Scan SMP from c0000000 for 1024 bytes.
Scan SMP from c009fc00 for 1024 bytes.
Scan SMP from c00f0000 for 65536 bytes.
found SMP MP-table at 000f5770
hm, page 000f5000 reserved twice.
hm, page 000f6000 reserved twice.
hm, page 000f1000 reserved twice.
hm, page 000f2000 reserved twice.
On node 0 totalpages: 98288
zone(0): 4096 pages.
zone(1): 94192 pages.
zone(2): 0 pages.
Intel MultiProcessor Specification v1.1
Virtual Wire compatibility mode.
OEM ID: OEM00000 Product ID: PROD00000000 APIC at: 0xFEE00000
Processor #0 Pentium(tm) Pro APIC version 17
Floating point unit present.
Machine Exception supported.
64 bit compare & exchange supported.
Internal APIC present.
SEP present.
MTRR present.
PGE present.
MCA present.
CMOV present.
Bootup CPU
Bus #0 is PCI
Bus #1 is PCI
Bus #2 is ISA
I/O APIC #2 Version 17 at 0xFEC00000.
Int: type 3, pol 0, trig 0, bus 2, IRQ 00, APIC ID 2, APIC INT 00
Int: type 0, pol 0, trig 0, bus 2, IRQ 01, APIC ID 2, APIC INT 01
Int: type 0, pol 0, trig 0, bus 2, IRQ 00, APIC ID 2, APIC INT 02
Int: type 0, pol 0, trig 0, bus 2, IRQ 03, APIC ID 2, APIC INT 03
Int: type 0, pol 0, trig 0, bus 2, IRQ 04, APIC ID 2, APIC INT 04
Int: type 0, pol 0, trig 0, bus 2, IRQ 06, APIC ID 2, APIC INT 06
Int: type 0, pol 0, trig 0, bus 2, IRQ 07, APIC ID 2, APIC INT 07
Int: type 0, pol 1, trig 1, bus 2, IRQ 08, APIC ID 2, APIC INT 08
Int: type 0, pol 0, trig 0, bus 2, IRQ 0c, APIC ID 2, APIC INT 0c
Int: type 0, pol 0, trig 0, bus 2, IRQ 0d, APIC ID 2, APIC INT 0d
Int: type 0, pol 0, trig 0, bus 2, IRQ 0e, APIC ID 2, APIC INT 0e
Int: type 0, pol 0, trig 0, bus 2, IRQ 0f, APIC ID 2, APIC INT 0f
Int: type 0, pol 3, trig 3, bus 2, IRQ 09, APIC ID 2, APIC INT 09
Int: type 0, pol 3, trig 3, bus 2, IRQ 05, APIC ID 2, APIC INT 05
Int: type 0, pol 3, trig 3, bus 2, IRQ 0b, APIC ID 2, APIC INT 0b
Int: type 0, pol 3, trig 3, bus 2, IRQ 0a, APIC ID 2, APIC INT 0a
Lint: type 3, pol 0, trig 0, bus 2, IRQ 00, APIC ID ff, APIC LINT 00
Lint: type 1, pol 0, trig 0, bus 2, IRQ 00, APIC ID ff, APIC LINT 01
Processors: 1
mapped APIC to ffffe000 (fee00000)
mapped IOAPIC to ffffd000 (fec00000)
Kernel command line: root=/dev/hdg4 apm=power-off noapic mem=393152K
Initializing CPU#0
Detected 434.815 MHz processor.
Console: colour VGA+ 80x25
Calibrating delay loop... 865.07 BogoMIPS
Memory: 384580k/393152k available (856k kernel code, 8184k reserved, 294k data, 184k init, 0k highmem)
Dentry-cache hash table entries: 65536 (order: 7, 524288 bytes)
Buffer-cache hash table entries: 32768 (order: 5, 131072 bytes)
Page-cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
CPU: Before vendor init, caps: 0183fbff 00000000 00000000, vendor = 0
CPU: L1 I cache: 16K, L1 D cache: 16K
CPU: L2 cache: 128K
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU: After vendor init, caps: 0183fbff 00000000 00000000 00000000
CPU: After generic, caps: 0183fbff 00000000 00000000 00000000
CPU: Common caps: 0183fbff 00000000 00000000 00000000
Enabling fast FPU save and restore... done.
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
mtrr: v1.37 (20001109) Richard Gooch ([email protected])
mtrr: detected mtrr type: Intel
CPU: Before vendor init, caps: 0183fbff 00000000 00000000, vendor = 0
CPU: L1 I cache: 16K, L1 D cache: 16K
CPU: L2 cache: 128K
Intel machine check reporting enabled on CPU#0.
CPU: After vendor init, caps: 0183fbff 00000000 00000000 00000000
CPU: After generic, caps: 0183fbff 00000000 00000000 00000000
CPU: Common caps: 0183fbff 00000000 00000000 00000000
CPU0: Intel Celeron (Mendocino) stepping 05
per-CPU timeslice cutoff: 365.86 usecs.
Getting VERSION: 40011
Getting VERSION: 40011
Getting ID: 0
Getting ID: f000000
Getting LVT0: 700
Getting LVT1: 400
enabled ExtINT on CPU#0
ESR value before enabling vector: 00000004
ESR value after enabling vector: 00000000
CPU present map: 1
Before bogomips.
Error: only one processor found.
Boot done.
calibrating APIC timer ...
..... CPU clock speed is 434.8114 MHz.
..... host bus clock speed is 66.8940 MHz.
cpu: 0, clocks: 668940, slice: 334470
CPU0<T0:668928,T1:334448,D:10,S:334470,C:668940>
Setting commenced=1, go go go
PCI: PCI BIOS revision 2.10 entry at 0xfb3a0, last bus=1
PCI: Using configuration type 1
PCI: Probing PCI hardware
Unknown bridge resource 0: assuming transparent
PCI: Using IRQ router VIA [1106/0686] at 00:07.0
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
apm: BIOS version 1.2 Flags 0x07 (Driver version 1.14)
Starting kswapd v1.8
pty: 256 Unix98 ptys configured
block: queued sectors max/low 255296kB/124224kB, 768 slots per queue
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller on PCI bus 00 dev 39
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0xc000-0xc007, BIOS settings: hda:pio, hdb:pio
ide1: BM-DMA at 0xc008-0xc00f, BIOS settings: hdc:pio, hdd:pio
HPT370: IDE controller on PCI bus 00 dev 70
PCI: Found IRQ 11 for device 00:0e.0
PCI: The same IRQ used for device 00:0d.0
HPT370: chipset revision 3
HPT370: not 100% native mode: will probe irqs later
ide2: BM-DMA at 0xec00-0xec07, BIOS settings: hde:pio, hdf:pio
ide3: BM-DMA at 0xec08-0xec0f, BIOS settings: hdg:DMA, hdh:pio
hdf: YAMAHA CRW2100E, ATAPI CD/DVD-ROM drive
hdg: QUANTUM FIREBALLlct20 20, ATA DISK drive
ide2 at 0xdc00-0xdc07,0xe002 on irq 11
ide3 at 0xe400-0xe407,0xe802 on irq 11
hdg: 39876480 sectors (20417 MB) w/418KiB Cache, CHS=39560/16/63, UDMA(100)
Partition check:
/dev/ide/host2/bus1/target0/lun0: p1 p2 p3 p4
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 4096 buckets, 32Kbytes
TCP: Hash tables configured (established 32768 bind 32768)
devfs: v0.102 (20000622) Richard Gooch ([email protected])
devfs: boot_options: 0x0
VFS: Mounted root (ext2 filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 184k freed
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
SCSI subsystem driver Revision: 1.00
hdf: ATAPI 40X CD-ROM CD-R/RW drive, 8192kB Cache
Uniform CD-ROM driver Revision: 3.12
...

regards,
Balazs Pozsar.


2001-03-15 00:17:45

by Andre Hedrick

[permalink] [raw]
Subject: Re: IDE poweroff -> hangup


Balazs....

OH the fun....what do you think you are doing?
Since you have not issued a power down command nor deregisterd the device,
because I have not publish hotswap-ata yet....thus you can not do this in
a pretty way.....<ata> grumbles for Bryce.....
You are lucky that you have to burned the mainboard.
The open-collector pull on the channel will destroy the buffers on the
device. By pulling the power you can not hold the state of the latches
derived from the power-ground lines.

There is no kernel bug!

Does it not occur to you that by dropping the power on the device you
cause it to revert to the default values from POST?
You have successfully unsynced the HOST and the DEVICE as the timings for
the transfer rates. So it should HANG and DIE!

Just be glad that the kernel will crash and not eat your data.

Regards,

Andre Hedrick
Linux ATA Development


On Thu, 15 Mar 2001, Pozsar Balazs wrote:

>
> Hi all,
>
> I was courious, and I tried what happens if I power down my harddisk (ie
> manually pull the power plug out), and then power it on again after a few
> secs (put the plug back).
>
> I do not know if the system should survive happily such an 'accident', but
> it hadn't:
> A few secs after the next access to the disc, I got the following on the
> console:
> hdg: timeout waiting for DMA
> ide_dmaproc: chipset supported ide_dma_timeout func only: 14
> and the machine froze the hard way (no respond to sysrq).
>
> Tell me if this shouldn't be honoured by the kernel, but if there's a bug
> around, here's some info:
>
> Linux version 2.4.2 ([email protected]) (gcc version 2.95.3 19991030 (prerelease)) #1 SMP Wed Mar 7 22:58:36 CET 2001
> BIOS-provided physical RAM map:
> BIOS-e820: 000000000009fc00 @ 0000000000000000 (usable)
> BIOS-e820: 0000000000000400 @ 000000000009fc00 (reserved)
> BIOS-e820: 0000000000010000 @ 00000000000f0000 (reserved)
> BIOS-e820: 0000000000001000 @ 00000000fec00000 (reserved)
> BIOS-e820: 0000000000001000 @ 00000000fee00000 (reserved)
> BIOS-e820: 0000000000010000 @ 00000000ffff0000 (reserved)
> BIOS-e820: 0000000017ef0000 @ 0000000000100000 (usable)
> BIOS-e820: 000000000000d000 @ 0000000017ff3000 (ACPI data)
> BIOS-e820: 0000000000003000 @ 0000000017ff0000 (ACPI NVS)
> Scan SMP from c0000000 for 1024 bytes.
> Scan SMP from c009fc00 for 1024 bytes.
> Scan SMP from c00f0000 for 65536 bytes.
> found SMP MP-table at 000f5770
> hm, page 000f5000 reserved twice.
> hm, page 000f6000 reserved twice.
> hm, page 000f1000 reserved twice.
> hm, page 000f2000 reserved twice.
> On node 0 totalpages: 98288
> zone(0): 4096 pages.
> zone(1): 94192 pages.
> zone(2): 0 pages.
> Intel MultiProcessor Specification v1.1
> Virtual Wire compatibility mode.
> OEM ID: OEM00000 Product ID: PROD00000000 APIC at: 0xFEE00000
> Processor #0 Pentium(tm) Pro APIC version 17
> Floating point unit present.
> Machine Exception supported.
> 64 bit compare & exchange supported.
> Internal APIC present.
> SEP present.
> MTRR present.
> PGE present.
> MCA present.
> CMOV present.
> Bootup CPU
> Bus #0 is PCI
> Bus #1 is PCI
> Bus #2 is ISA
> I/O APIC #2 Version 17 at 0xFEC00000.
> Int: type 3, pol 0, trig 0, bus 2, IRQ 00, APIC ID 2, APIC INT 00
> Int: type 0, pol 0, trig 0, bus 2, IRQ 01, APIC ID 2, APIC INT 01
> Int: type 0, pol 0, trig 0, bus 2, IRQ 00, APIC ID 2, APIC INT 02
> Int: type 0, pol 0, trig 0, bus 2, IRQ 03, APIC ID 2, APIC INT 03
> Int: type 0, pol 0, trig 0, bus 2, IRQ 04, APIC ID 2, APIC INT 04
> Int: type 0, pol 0, trig 0, bus 2, IRQ 06, APIC ID 2, APIC INT 06
> Int: type 0, pol 0, trig 0, bus 2, IRQ 07, APIC ID 2, APIC INT 07
> Int: type 0, pol 1, trig 1, bus 2, IRQ 08, APIC ID 2, APIC INT 08
> Int: type 0, pol 0, trig 0, bus 2, IRQ 0c, APIC ID 2, APIC INT 0c
> Int: type 0, pol 0, trig 0, bus 2, IRQ 0d, APIC ID 2, APIC INT 0d
> Int: type 0, pol 0, trig 0, bus 2, IRQ 0e, APIC ID 2, APIC INT 0e
> Int: type 0, pol 0, trig 0, bus 2, IRQ 0f, APIC ID 2, APIC INT 0f
> Int: type 0, pol 3, trig 3, bus 2, IRQ 09, APIC ID 2, APIC INT 09
> Int: type 0, pol 3, trig 3, bus 2, IRQ 05, APIC ID 2, APIC INT 05
> Int: type 0, pol 3, trig 3, bus 2, IRQ 0b, APIC ID 2, APIC INT 0b
> Int: type 0, pol 3, trig 3, bus 2, IRQ 0a, APIC ID 2, APIC INT 0a
> Lint: type 3, pol 0, trig 0, bus 2, IRQ 00, APIC ID ff, APIC LINT 00
> Lint: type 1, pol 0, trig 0, bus 2, IRQ 00, APIC ID ff, APIC LINT 01
> Processors: 1
> mapped APIC to ffffe000 (fee00000)
> mapped IOAPIC to ffffd000 (fec00000)
> Kernel command line: root=/dev/hdg4 apm=power-off noapic mem=393152K
> Initializing CPU#0
> Detected 434.815 MHz processor.
> Console: colour VGA+ 80x25
> Calibrating delay loop... 865.07 BogoMIPS
> Memory: 384580k/393152k available (856k kernel code, 8184k reserved, 294k data, 184k init, 0k highmem)
> Dentry-cache hash table entries: 65536 (order: 7, 524288 bytes)
> Buffer-cache hash table entries: 32768 (order: 5, 131072 bytes)
> Page-cache hash table entries: 131072 (order: 7, 524288 bytes)
> Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
> CPU: Before vendor init, caps: 0183fbff 00000000 00000000, vendor = 0
> CPU: L1 I cache: 16K, L1 D cache: 16K
> CPU: L2 cache: 128K
> Intel machine check architecture supported.
> Intel machine check reporting enabled on CPU#0.
> CPU: After vendor init, caps: 0183fbff 00000000 00000000 00000000
> CPU: After generic, caps: 0183fbff 00000000 00000000 00000000
> CPU: Common caps: 0183fbff 00000000 00000000 00000000
> Enabling fast FPU save and restore... done.
> Checking 'hlt' instruction... OK.
> POSIX conformance testing by UNIFIX
> mtrr: v1.37 (20001109) Richard Gooch ([email protected])
> mtrr: detected mtrr type: Intel
> CPU: Before vendor init, caps: 0183fbff 00000000 00000000, vendor = 0
> CPU: L1 I cache: 16K, L1 D cache: 16K
> CPU: L2 cache: 128K
> Intel machine check reporting enabled on CPU#0.
> CPU: After vendor init, caps: 0183fbff 00000000 00000000 00000000
> CPU: After generic, caps: 0183fbff 00000000 00000000 00000000
> CPU: Common caps: 0183fbff 00000000 00000000 00000000
> CPU0: Intel Celeron (Mendocino) stepping 05
> per-CPU timeslice cutoff: 365.86 usecs.
> Getting VERSION: 40011
> Getting VERSION: 40011
> Getting ID: 0
> Getting ID: f000000
> Getting LVT0: 700
> Getting LVT1: 400
> enabled ExtINT on CPU#0
> ESR value before enabling vector: 00000004
> ESR value after enabling vector: 00000000
> CPU present map: 1
> Before bogomips.
> Error: only one processor found.
> Boot done.
> calibrating APIC timer ...
> ..... CPU clock speed is 434.8114 MHz.
> ..... host bus clock speed is 66.8940 MHz.
> cpu: 0, clocks: 668940, slice: 334470
> CPU0<T0:668928,T1:334448,D:10,S:334470,C:668940>
> Setting commenced=1, go go go
> PCI: PCI BIOS revision 2.10 entry at 0xfb3a0, last bus=1
> PCI: Using configuration type 1
> PCI: Probing PCI hardware
> Unknown bridge resource 0: assuming transparent
> PCI: Using IRQ router VIA [1106/0686] at 00:07.0
> Linux NET4.0 for Linux 2.4
> Based upon Swansea University Computer Society NET3.039
> apm: BIOS version 1.2 Flags 0x07 (Driver version 1.14)
> Starting kswapd v1.8
> pty: 256 Unix98 ptys configured
> block: queued sectors max/low 255296kB/124224kB, 768 slots per queue
> Uniform Multi-Platform E-IDE driver Revision: 6.31
> ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
> VP_IDE: IDE controller on PCI bus 00 dev 39
> VP_IDE: chipset revision 6
> VP_IDE: not 100% native mode: will probe irqs later
> ide0: BM-DMA at 0xc000-0xc007, BIOS settings: hda:pio, hdb:pio
> ide1: BM-DMA at 0xc008-0xc00f, BIOS settings: hdc:pio, hdd:pio
> HPT370: IDE controller on PCI bus 00 dev 70
> PCI: Found IRQ 11 for device 00:0e.0
> PCI: The same IRQ used for device 00:0d.0
> HPT370: chipset revision 3
> HPT370: not 100% native mode: will probe irqs later
> ide2: BM-DMA at 0xec00-0xec07, BIOS settings: hde:pio, hdf:pio
> ide3: BM-DMA at 0xec08-0xec0f, BIOS settings: hdg:DMA, hdh:pio
> hdf: YAMAHA CRW2100E, ATAPI CD/DVD-ROM drive
> hdg: QUANTUM FIREBALLlct20 20, ATA DISK drive
> ide2 at 0xdc00-0xdc07,0xe002 on irq 11
> ide3 at 0xe400-0xe407,0xe802 on irq 11
> hdg: 39876480 sectors (20417 MB) w/418KiB Cache, CHS=39560/16/63, UDMA(100)
> Partition check:
> /dev/ide/host2/bus1/target0/lun0: p1 p2 p3 p4
> NET4: Linux TCP/IP 1.0 for NET4.0
> IP Protocols: ICMP, UDP, TCP, IGMP
> IP: routing cache hash table of 4096 buckets, 32Kbytes
> TCP: Hash tables configured (established 32768 bind 32768)
> devfs: v0.102 (20000622) Richard Gooch ([email protected])
> devfs: boot_options: 0x0
> VFS: Mounted root (ext2 filesystem) readonly.
> Mounted devfs on /dev
> Freeing unused kernel memory: 184k freed
> NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
> SCSI subsystem driver Revision: 1.00
> hdf: ATAPI 40X CD-ROM CD-R/RW drive, 8192kB Cache
> Uniform CD-ROM driver Revision: 3.12
> ...
>
> regards,
> Balazs Pozsar.
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

2001-03-15 02:30:37

by CODEZ

[permalink] [raw]
Subject: Re: IDE poweroff -> hangup

Ello folkz,
Ummm the same problem I am facing whenevr I try to mount my cdrom. I am
using kernel 2.4.2 ac-18 and yep ofcourse I am not removing my cdrom power
supply......
I tried hdparm -T and got
ide_dmaproc: chipset supported ide_dma_timeout func only: 14
I have ASUS 440BX/F mb with intel PIIX4 chipset......
any suggestion

Regardz
daCodez

>
> Balazs....
>
> OH the fun....what do you think you are doing?
> Since you have not issued a power down command nor deregisterd the device,
> because I have not publish hotswap-ata yet....thus you can not do this in
> a pretty way.....<ata> grumbles for Bryce.....
> You are lucky that you have to burned the mainboard.
> The open-collector pull on the channel will destroy the buffers on the
> device. By pulling the power you can not hold the state of the latches
> derived from the power-ground lines.
>
> There is no kernel bug!
>
> Does it not occur to you that by dropping the power on the device you
> cause it to revert to the default values from POST?
> You have successfully unsynced the HOST and the DEVICE as the timings for
> the transfer rates. So it should HANG and DIE!
>
> Just be glad that the kernel will crash and not eat your data.
>
> Regards,
>
> Andre Hedrick
> Linux ATA Development
>
>
> On Thu, 15 Mar 2001, Pozsar Balazs wrote:
>
> >
> > Hi all,
> >
> > I was courious, and I tried what happens if I power down my harddisk (ie
> > manually pull the power plug out), and then power it on again after a
few
> > secs (put the plug back).
> >
> > I do not know if the system should survive happily such an 'accident',
but
> > it hadn't:
> > A few secs after the next access to the disc, I got the following on the
> > console:
> > hdg: timeout waiting for DMA
> > ide_dmaproc: chipset supported ide_dma_timeout func only: 14
> > and the machine froze the hard way (no respond to sysrq).
> >
> > Tell me if this shouldn't be honoured by the kernel, but if there's a
bug
> > around, here's some info:
> >
> > Linux version 2.4.2 ([email protected]) (gcc version 2.95.3 19991030
(prerelease)) #1 SMP Wed Mar 7 22:58:36 CET 2001
> > BIOS-provided physical RAM map:
> > BIOS-e820: 000000000009fc00 @ 0000000000000000 (usable)
> > BIOS-e820: 0000000000000400 @ 000000000009fc00 (reserved)
> > BIOS-e820: 0000000000010000 @ 00000000000f0000 (reserved)
> > BIOS-e820: 0000000000001000 @ 00000000fec00000 (reserved)
> > BIOS-e820: 0000000000001000 @ 00000000fee00000 (reserved)
> > BIOS-e820: 0000000000010000 @ 00000000ffff0000 (reserved)
> > BIOS-e820: 0000000017ef0000 @ 0000000000100000 (usable)
> > BIOS-e820: 000000000000d000 @ 0000000017ff3000 (ACPI data)
> > BIOS-e820: 0000000000003000 @ 0000000017ff0000 (ACPI NVS)
> > Scan SMP from c0000000 for 1024 bytes.
> > Scan SMP from c009fc00 for 1024 bytes.
> > Scan SMP from c00f0000 for 65536 bytes.
> > found SMP MP-table at 000f5770
> > hm, page 000f5000 reserved twice.
> > hm, page 000f6000 reserved twice.
> > hm, page 000f1000 reserved twice.
> > hm, page 000f2000 reserved twice.
> > On node 0 totalpages: 98288
> > zone(0): 4096 pages.
> > zone(1): 94192 pages.
> > zone(2): 0 pages.
> > Intel MultiProcessor Specification v1.1
> > Virtual Wire compatibility mode.
> > OEM ID: OEM00000 Product ID: PROD00000000 APIC at: 0xFEE00000
> > Processor #0 Pentium(tm) Pro APIC version 17
> > Floating point unit present.
> > Machine Exception supported.
> > 64 bit compare & exchange supported.
> > Internal APIC present.
> > SEP present.
> > MTRR present.
> > PGE present.
> > MCA present.
> > CMOV present.
> > Bootup CPU
> > Bus #0 is PCI
> > Bus #1 is PCI
> > Bus #2 is ISA
> > I/O APIC #2 Version 17 at 0xFEC00000.
> > Int: type 3, pol 0, trig 0, bus 2, IRQ 00, APIC ID 2, APIC INT 00
> > Int: type 0, pol 0, trig 0, bus 2, IRQ 01, APIC ID 2, APIC INT 01
> > Int: type 0, pol 0, trig 0, bus 2, IRQ 00, APIC ID 2, APIC INT 02
> > Int: type 0, pol 0, trig 0, bus 2, IRQ 03, APIC ID 2, APIC INT 03
> > Int: type 0, pol 0, trig 0, bus 2, IRQ 04, APIC ID 2, APIC INT 04
> > Int: type 0, pol 0, trig 0, bus 2, IRQ 06, APIC ID 2, APIC INT 06
> > Int: type 0, pol 0, trig 0, bus 2, IRQ 07, APIC ID 2, APIC INT 07
> > Int: type 0, pol 1, trig 1, bus 2, IRQ 08, APIC ID 2, APIC INT 08
> > Int: type 0, pol 0, trig 0, bus 2, IRQ 0c, APIC ID 2, APIC INT 0c
> > Int: type 0, pol 0, trig 0, bus 2, IRQ 0d, APIC ID 2, APIC INT 0d
> > Int: type 0, pol 0, trig 0, bus 2, IRQ 0e, APIC ID 2, APIC INT 0e
> > Int: type 0, pol 0, trig 0, bus 2, IRQ 0f, APIC ID 2, APIC INT 0f
> > Int: type 0, pol 3, trig 3, bus 2, IRQ 09, APIC ID 2, APIC INT 09
> > Int: type 0, pol 3, trig 3, bus 2, IRQ 05, APIC ID 2, APIC INT 05
> > Int: type 0, pol 3, trig 3, bus 2, IRQ 0b, APIC ID 2, APIC INT 0b
> > Int: type 0, pol 3, trig 3, bus 2, IRQ 0a, APIC ID 2, APIC INT 0a
> > Lint: type 3, pol 0, trig 0, bus 2, IRQ 00, APIC ID ff, APIC LINT 00
> > Lint: type 1, pol 0, trig 0, bus 2, IRQ 00, APIC ID ff, APIC LINT 01
> > Processors: 1
> > mapped APIC to ffffe000 (fee00000)
> > mapped IOAPIC to ffffd000 (fec00000)
> > Kernel command line: root=/dev/hdg4 apm=power-off noapic mem=393152K
> > Initializing CPU#0
> > Detected 434.815 MHz processor.
> > Console: colour VGA+ 80x25
> > Calibrating delay loop... 865.07 BogoMIPS
> > Memory: 384580k/393152k available (856k kernel code, 8184k reserved,
294k data, 184k init, 0k highmem)
> > Dentry-cache hash table entries: 65536 (order: 7, 524288 bytes)
> > Buffer-cache hash table entries: 32768 (order: 5, 131072 bytes)
> > Page-cache hash table entries: 131072 (order: 7, 524288 bytes)
> > Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
> > CPU: Before vendor init, caps: 0183fbff 00000000 00000000, vendor = 0
> > CPU: L1 I cache: 16K, L1 D cache: 16K
> > CPU: L2 cache: 128K
> > Intel machine check architecture supported.
> > Intel machine check reporting enabled on CPU#0.
> > CPU: After vendor init, caps: 0183fbff 00000000 00000000 00000000
> > CPU: After generic, caps: 0183fbff 00000000 00000000 00000000
> > CPU: Common caps: 0183fbff 00000000 00000000 00000000
> > Enabling fast FPU save and restore... done.
> > Checking 'hlt' instruction... OK.
> > POSIX conformance testing by UNIFIX
> > mtrr: v1.37 (20001109) Richard Gooch ([email protected])
> > mtrr: detected mtrr type: Intel
> > CPU: Before vendor init, caps: 0183fbff 00000000 00000000, vendor = 0
> > CPU: L1 I cache: 16K, L1 D cache: 16K
> > CPU: L2 cache: 128K
> > Intel machine check reporting enabled on CPU#0.
> > CPU: After vendor init, caps: 0183fbff 00000000 00000000 00000000
> > CPU: After generic, caps: 0183fbff 00000000 00000000 00000000
> > CPU: Common caps: 0183fbff 00000000 00000000 00000000
> > CPU0: Intel Celeron (Mendocino) stepping 05
> > per-CPU timeslice cutoff: 365.86 usecs.
> > Getting VERSION: 40011
> > Getting VERSION: 40011
> > Getting ID: 0
> > Getting ID: f000000
> > Getting LVT0: 700
> > Getting LVT1: 400
> > enabled ExtINT on CPU#0
> > ESR value before enabling vector: 00000004
> > ESR value after enabling vector: 00000000
> > CPU present map: 1
> > Before bogomips.
> > Error: only one processor found.
> > Boot done.
> > calibrating APIC timer ...
> > ..... CPU clock speed is 434.8114 MHz.
> > ..... host bus clock speed is 66.8940 MHz.
> > cpu: 0, clocks: 668940, slice: 334470
> > CPU0<T0:668928,T1:334448,D:10,S:334470,C:668940>
> > Setting commenced=1, go go go
> > PCI: PCI BIOS revision 2.10 entry at 0xfb3a0, last bus=1
> > PCI: Using configuration type 1
> > PCI: Probing PCI hardware
> > Unknown bridge resource 0: assuming transparent
> > PCI: Using IRQ router VIA [1106/0686] at 00:07.0
> > Linux NET4.0 for Linux 2.4
> > Based upon Swansea University Computer Society NET3.039
> > apm: BIOS version 1.2 Flags 0x07 (Driver version 1.14)
> > Starting kswapd v1.8
> > pty: 256 Unix98 ptys configured
> > block: queued sectors max/low 255296kB/124224kB, 768 slots per queue
> > Uniform Multi-Platform E-IDE driver Revision: 6.31
> > ide: Assuming 33MHz system bus speed for PIO modes; override with
idebus=xx
> > VP_IDE: IDE controller on PCI bus 00 dev 39
> > VP_IDE: chipset revision 6
> > VP_IDE: not 100% native mode: will probe irqs later
> > ide0: BM-DMA at 0xc000-0xc007, BIOS settings: hda:pio, hdb:pio
> > ide1: BM-DMA at 0xc008-0xc00f, BIOS settings: hdc:pio, hdd:pio
> > HPT370: IDE controller on PCI bus 00 dev 70
> > PCI: Found IRQ 11 for device 00:0e.0
> > PCI: The same IRQ used for device 00:0d.0
> > HPT370: chipset revision 3
> > HPT370: not 100% native mode: will probe irqs later
> > ide2: BM-DMA at 0xec00-0xec07, BIOS settings: hde:pio, hdf:pio
> > ide3: BM-DMA at 0xec08-0xec0f, BIOS settings: hdg:DMA, hdh:pio
> > hdf: YAMAHA CRW2100E, ATAPI CD/DVD-ROM drive
> > hdg: QUANTUM FIREBALLlct20 20, ATA DISK drive
> > ide2 at 0xdc00-0xdc07,0xe002 on irq 11
> > ide3 at 0xe400-0xe407,0xe802 on irq 11
> > hdg: 39876480 sectors (20417 MB) w/418KiB Cache, CHS=39560/16/63,
UDMA(100)
> > Partition check:
> > /dev/ide/host2/bus1/target0/lun0: p1 p2 p3 p4
> > NET4: Linux TCP/IP 1.0 for NET4.0
> > IP Protocols: ICMP, UDP, TCP, IGMP
> > IP: routing cache hash table of 4096 buckets, 32Kbytes
> > TCP: Hash tables configured (established 32768 bind 32768)
> > devfs: v0.102 (20000622) Richard Gooch ([email protected])
> > devfs: boot_options: 0x0
> > VFS: Mounted root (ext2 filesystem) readonly.
> > Mounted devfs on /dev
> > Freeing unused kernel memory: 184k freed
> > NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
> > SCSI subsystem driver Revision: 1.00
> > hdf: ATAPI 40X CD-ROM CD-R/RW drive, 8192kB Cache
> > Uniform CD-ROM driver Revision: 3.12
> > ...
> >
> > regards,
> > Balazs Pozsar.
> >
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel"
in
> > the body of a message to [email protected]
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
> >
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>


2001-03-15 04:29:00

by Andre Hedrick

[permalink] [raw]
Subject: Re: IDE poweroff -> hangup

On Thu, 15 Mar 2001, CODEZ wrote:

> Ello folkz,
> Ummm the same problem I am facing whenevr I try to mount my cdrom. I am
> using kernel 2.4.2 ac-18 and yep ofcourse I am not removing my cdrom power
> supply......
> I tried hdparm -T and got
> ide_dmaproc: chipset supported ide_dma_timeout func only: 14
> I have ASUS 440BX/F mb with intel PIIX4 chipset......
> any suggestion

All of the 440*X Chipsets using a PIIX4/PIIX4AB/PIIX4EB are broken beyond
repair. Several weeks ago, the old hat and I discussed the issue and
after sending him the same docs I have from Intel, we both laugh because
the errata clear states "NO FIX"

Now after going back to Intel with a puzzled look, I found out
why/where/how the breakage exists but the fix is not pretty nor does it
retain DMA transfer rates.

The hack job is fugly, it ruptures the ISR's the TIMERS and the PCI-DMA
space locally, but it is not a fatal barf, but a noisy messy one.

I will pop a nasty patch to get you through the almost death, but it is
nasty and not the preferred unknow solution.

Andre Hedrick
Linux ATA Development


2001-03-15 08:08:10

by Chip Salzenberg

[permalink] [raw]
Subject: Re: IDE poweroff -> hangup

Andre Hedrick writes:
>On Thu, 15 Mar 2001, CODEZ wrote:
>> ide_dmaproc: chipset supported ide_dma_timeout func only: 14
>> I have ASUS 440BX/F mb with intel PIIX4 chipset......
>
>All of the 440*X Chipsets using a PIIX4/PIIX4AB/PIIX4EB are broken beyond
>repair.

Well, that may be so; but I get the same error -- *precisely* the same
error! -- on an SiS motherboard that quite clearly lacks a PIIX4:

# lspci
00:00.0 Host bridge: Silicon Integrated Systems [SiS] 530 Host (rev 02)
00:00.1 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE] (rev d0)
00:01.0 ISA bridge: Silicon Integrated Systems [SiS] 85C503/5513 (rev b1)
00:01.1 Class ff00: Silicon Integrated Systems [SiS] ACPI
00:01.2 USB Controller: Silicon Integrated Systems [SiS] 7001 (rev 11)
00:02.0 PCI bridge: Silicon Integrated Systems [SiS] 5591/5592 AGP
00:0b.0 Ethernet controller: 3Com Corporation 3c900 10BaseT [Boomerang]
01:00.0 VGA compatible controller: Silicon Integrated Systems [SiS] 6306 3D-AGP (rev a2)

# lspci -v -s0:0
00:00.0 Host bridge: Silicon Integrated Systems [SiS] 530 Host (rev 02)
Flags: bus master, medium devsel, latency 32
Memory at e0000000 (32-bit, non-prefetchable)
Capabilities: [c0] AGP version 2.0

00:00.1 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE] (rev d0) (prog-if 8a [Master SecP PriP])
Subsystem: Silicon Integrated Systems [SiS] SiS5513 EIDE Controller (A,B step)
Flags: bus master, fast devsel, latency 128, IRQ 14
I/O ports at e400
I/O ports at e000
I/O ports at d800
I/O ports at d400
I/O ports at d000

So... Any ideas?

> I will pop a nasty patch to get you through the almost death, but it
> is nasty and not the preferred unknow solution.

I await your fugly patch with bated breath and baited fishook.
--
Chip Salzenberg a.k.a. <[email protected]>

2001-03-15 13:35:15

by Richard B. Johnson

[permalink] [raw]
Subject: Re: IDE poweroff -> hangup

On Thu, 15 Mar 2001, Pozsar Balazs wrote:

>
> Hi all,
>
> I was courious, and I tried what happens if I power down my harddisk (ie
> manually pull the power plug out), and then power it on again after a few
> secs (put the plug back).
>
> I do not know if the system should survive happily such an 'accident', but
> it hadn't:
> A few secs after the next access to the disc, I got the following on the
> console:
> hdg: timeout waiting for DMA
> ide_dmaproc: chipset supported ide_dma_timeout func only: 14
> and the machine froze the hard way (no respond to sysrq).
>
> Tell me if this shouldn't be honoured by the kernel, but if there's a bug
> around, here's some info:

With IDE, the entire state of the drive is in the drive. There is
no 'controller' on the board like SCSI, just an interface port.
So, when you kill the power to the drive, you kill any information,
including pending operations, that the drive has stored. The only
way to recover is to go through an entire initialization sequence
just like the BIOS did upon power up. If the IDE code didn't do
this the drive will not be accessible.

The IDE code doesn't have any way of knowing that you destroyed its
current state. Error recovery code could be more robust and perform
the entire startup sequence if it had a way of "knowing" when to
do this.

This is entirely different than what occurs when the IDE drive
is powered off by the IDE/APM software (for laptops). In this case,
the IDE code "knows" that the motor is being turned off. It also
knows how to wait for any pending writes to complete. It also knows
how to restart the motor and to not attempt reads/writes until the
state of the drive has stabilized and the heads have been recalibrated.

Turning off the power to a device that can do any kind of DMA operation
is just like changing RAM with the power on. It's an interesting
experiment in chaos theory.


Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.


2001-03-17 00:48:30

by CODEZ

[permalink] [raw]
Subject: Re: IDE poweroff -> hangup

Andrew wrote.........
> All of the 440*X Chipsets using a PIIX4/PIIX4AB/PIIX4EB are broken beyond
> repair. Several weeks ago, the old hat and I discussed the issue and
> after sending him the same docs I have from Intel, we both laugh because
> the errata clear states "NO FIX"


Well andrew,
I yet have to find something like absolute perfect in the technology domain,
me agree with you that the following chipsets are broken but then there
is'nt any for which any of us can claim that it'z not broken or will not in
sometimez in future, anyway here is some information that i think guruz
dealing with ATA development must know about it to bring sanity of those who
are not guruz.
At the time of (e-ide) driver initialisation
(LOG)
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PIIX4: IDE controller on PCI bus 00 dev 21
PIIX4: chipset revision 1
PIIX4: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0xd800-0xd807, BIOS settings: hda:DMA, hdb:pio
ide1: BM-DMA at 0xd808-0xd80f, BIOS settings: hdc:DMA, hdd:pio
hda: ST317221A, ATA DISK drive
hdc: CRD-8480M, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: 33683328 sectors (17246 MB) w/512KiB Cache, CHS=2096/255/63, UDMA(33)
*hmmmmm why this*
hdc: set_drive_speed_status: status=0x51 { DriveReady SeekComplete Error }
hdc: set_drive_speed_status: error=0xb4
hdc: ATAPI 48X CD-ROM drive, 128kB Cache, DMA
Uniform CD-ROM driver Revision: 3.12

After pokin through the /proc/ide/*/hdx/settings i found....

name value min max mode
---- ----- --- --- ----
breada_readahead 4 0 127 rw
current_speed 66 0 69 rw
*check this*
dsc_overlap 0 0 1 rw
file_readahead 0 0 2097151 rw
ide_scsi 0 0 1 rw
init_speed 66 0 69 rw
*check this*
io_32bit 0 0 3 rw
keepsettings 0 0 1 rw
max_kb_per_request 64 1 127 rw
nice1 1 0 1 rw
number 2 0 3 rw
pio_mode write-only 0 255 w
slow 0 0 1 rw
unmaskirq 0 0 1 rw
using_dma 1 0 1 rw

AFAIK inetl's 82371AB chipset never supported UDMA 66 mode then why driver
initialised it like this...
Right now i placed a line somewhere in my rc.sysinit script
hdpatm -d1 -X34 /dev/hdX to reslove the dead lock i was facing whenever
tried to mount the specified drive.

Any suggestion........

Regardz
daCodez


****************************************************************************
******************
Simplicity is the only comlexity I know about.






2001-03-17 01:44:50

by Andre Hedrick

[permalink] [raw]
Subject: Re: IDE poweroff -> hangup

On Sat, 17 Mar 2001, CODEZ wrote:

> Andrew wrote.........

Oh and and it is "Andre" with an accent grav....

> > All of the 440*X Chipsets using a PIIX4/PIIX4AB/PIIX4EB are broken beyond
> > repair. Several weeks ago, the old hat and I discussed the issue and
> > after sending him the same docs I have from Intel, we both laugh because
> > the errata clear states "NO FIX"
>
>
> Well andrew,
> I yet have to find something like absolute perfect in the technology domain,
> me agree with you that the following chipsets are broken but then there
> is'nt any for which any of us can claim that it'z not broken or will not in
> sometimez in future, anyway here is some information that i think guruz
> dealing with ATA development must know about it to bring sanity of those who
> are not guruz.

I try but I see one of us missed the boat....

> At the time of (e-ide) driver initialisation
> (LOG)
> Uniform Multi-Platform E-IDE driver Revision: 6.31
> ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
> PIIX4: IDE controller on PCI bus 00 dev 21
> PIIX4: chipset revision 1
> PIIX4: not 100% native mode: will probe irqs later
> ide0: BM-DMA at 0xd800-0xd807, BIOS settings: hda:DMA, hdb:pio
> ide1: BM-DMA at 0xd808-0xd80f, BIOS settings: hdc:DMA, hdd:pio
> hda: ST317221A, ATA DISK drive
> hdc: CRD-8480M, ATAPI CD/DVD-ROM drive
> ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
> ide1 at 0x170-0x177,0x376 on irq 15
> hda: 33683328 sectors (17246 MB) w/512KiB Cache, CHS=2096/255/63, UDMA(33)
> *hmmmmm why this*
> hdc: set_drive_speed_status: status=0x51 { DriveReady SeekComplete Error }
> hdc: set_drive_speed_status: error=0xb4
> hdc: ATAPI 48X CD-ROM drive, 128kB Cache, DMA
> Uniform CD-ROM driver Revision: 3.12
>
> After pokin through the /proc/ide/*/hdx/settings i found....
>
> name value min max mode
> ---- ----- --- --- ----
> breada_readahead 4 0 127 rw
> current_speed 66 0 69 rw

Just maybe if you did some math!

66 == 0x42 that is Ultra 33

64 == 0x40 that is Ultra 16
65 == 0x41 that is Ultra 25
66 == 0x42 that is Ultra 33
67 == 0x43 that is Ultra 44
68 == 0x44 that is Ultra 66
69 == 0x45 that is Ultra 100

> *check this*
> dsc_overlap 0 0 1 rw
> file_readahead 0 0 2097151 rw
> ide_scsi 0 0 1 rw
> init_speed 66 0 69 rw

Did it not occur to you that a max speed of Ultra 69 is stupid??

> *check this*
> io_32bit 0 0 3 rw
> keepsettings 0 0 1 rw
> max_kb_per_request 64 1 127 rw
> nice1 1 0 1 rw
> number 2 0 3 rw
> pio_mode write-only 0 255 w
> slow 0 0 1 rw
> unmaskirq 0 0 1 rw
> using_dma 1 0 1 rw
>
> AFAIK inetl's 82371AB chipset never supported UDMA 66 mode then why driver
> initialised it like this...
> Right now i placed a line somewhere in my rc.sysinit script
> hdpatm -d1 -X34 /dev/hdX to reslove the dead lock i was facing whenever

Oh....

34 == 0x22 MultiWord DMA mode 2
33 == 0x21 MultiWord DMA mode 1
32 == 0x20 MultiWord DMA mode 0

18 == 0x12 SingleWord DMA mode 2
17 == 0x11 SingleWord DMA mode 1
16 == 0x10 SingleWord DMA mode 0

Just maybe you can see that the timings for HEX represented values are ==

8421:8421
RUMS:yyyy

R == Reserved
U == Ultra
M == MultiWord
S == SingleWord

> tried to mount the specified drive.
>
> Any suggestion........

Read before blowing heat, I wear asbestos!

> Regardz
> daCodez
>
>
> ****************************************************************************
> ******************
> Simplicity is the only comlexity I know about.
>
>
>
>
>
>

Andre Hedrick
Linux ATA Development