Newsgroup: it.comp.os.linux.sys
Titolo: Weird things with support of PDC 20269

I set up a Linux Box (Debian distro) and patched my kernel 2.4.18 with
the 2.4.19-pre8 for the PDC 20269 support (I have a Promise Ultra ATA
133/TX2).
Ok, all works but there is something weird.
I attached to the Promise controller one 80 GB Maxtor D740X-6L.
Then the HD previusly was mounted in a Windows system and was
partitioned in ntfs filesystem and regulary formatted.
Then I want to show you the weird thing:
dmesg:
-------------
Kernel command line: auto BOOT_IMAGE=LinuxRaid ro root=900
Found and enabled local APIC!
Initializing CPU#0
Detected 1614.392 MHz processor.
Console: colour VGA+ 80x25
Calibrating delay loop... 3224.37 BogoMIPS
Memory: 256360k/262128k available (1316k kernel code, 5376k reserved,
410k data,
 268k init, 0k highmem)
Dentry cache hash table entries: 32768 (order: 6, 262144 bytes)
Inode cache hash table entries: 16384 (order: 5, 131072 bytes)
Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
Buffer-cache hash table entries: 16384 (order: 4, 65536 bytes)
Page-cache hash table entries: 65536 (order: 6, 262144 bytes)
CPU: Before vendor init, caps: 3febfbff 00000000 00000000, vendor = 0
CPU: L1 I cache: 12K, L1 D cache: 8K
CPU: L2 cache: 256K
CPU: Hyper-Threading is disabled
CPU: After vendor init, caps: 3febfbff 00000000 00000000 00000000
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU:     After generic, caps: 3febfbff 00000000 00000000 00000000
CPU:             Common caps: 3febfbff 00000000 00000000 00000000
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
mtrr: v1.40 (20010327) Richard Gooch (
rgo...@atnf.csiro.au
)
mtrr: detected mtrr type: Intel
CPU: Before vendor init, caps: 3febfbff 00000000 00000000, vendor = 0
CPU: L1 I cache: 12K, L1 D cache: 8K
CPU: L2 cache: 256K
CPU: Hyper-Threading is disabled
CPU: After vendor init, caps: 3febfbff 00000000 00000000 00000000
Intel machine check reporting enabled on CPU#0.
CPU:     After generic, caps: 3febfbff 00000000 00000000 00000000
CPU:             Common caps: 3febfbff 00000000 00000000 00000000
CPU0: Intel(R) Pentium(R) 4 CPU 1.60GHz stepping 02
per-CPU timeslice cutoff: 731.34 usecs.
SMP motherboard not detected.
enabled ExtINT on CPU#0
ESR value before enabling vector: 00000000
ESR value after enabling vector: 00000000
Using local APIC timer interrupts.
calibrating APIC timer ...
..... CPU clock speed is 1614.4348 MHz.
..... host bus clock speed is 100.9019 MHz.
cpu: 0, clocks: 1009019, slice: 504509
CPU0<T0:1009008,T1:504496,D:3,S:504509,C:1009019>
Waiting on wait_init_idle (map = 0x0)
All processors have done init_idle
PCI: PCI BIOS revision 2.10 entry at 0xf1580, last bus=1
PCI: Using configuration type 1
PCI: Probing PCI hardware
Unknown bridge resource 0: assuming transparent
PCI: Using IRQ router SIS [1039/0008] at 00:02.0
isapnp: Scanning for PnP cards...
isapnp: No Plug & Play device found
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Installing knfsd (copyright (C) 1996 
ok...@monad.swb.de
).
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ
SERIAL_PCI IS
APNP enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A
ttyS01 at 0x02f8 (irq = 3) is a 16550A
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with
idebus=xx
SIS5513: IDE controller on PCI bus 00 dev 15
SIS5513: detected chipset, but driver not compiled in!
SIS5513: chipset revision 208
SIS5513: 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:DMA
PDC20269: IDE controller on PCI bus 00 dev 58
PCI: Found IRQ 9 for device 00:0b.0
PDC20269: chipset revision 2
PDC20269: not 100% native mode: will probe irqs later
    ide2: BM-DMA at 0x8800-0x8807, BIOS settings: hde:pio, hdf:pio
    ide3: BM-DMA at 0x8808-0x880f, BIOS settings: hdg:pio, hdh:pio
hda: Maxtor 4D040H2, ATA DISK drive
hdc: Maxtor 4D040H2, ATA DISK drive
hdd: LG CD-ROM CRD-8522B, ATAPI CD/DVD-ROM drive
hdf: MAXTOR 6L080J4, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
ide2 at 0xa000-0xa007,0x9802 on irq 9
hda: 80043264 sectors (40982 MB) w/2048KiB Cache, CHS=4982/255/63
hdc: 80043264 sectors (40982 MB) w/2048KiB Cache, CHS=79408/16/63
hdf: 156355584 sectors (80054 MB) w/1819KiB Cache, CHS=155114/16/63,
UDMA(33)
hdd: ATAPI 52X CD-ROM drive, 128kB Cache
Uniform CD-ROM driver Revision: 3.12
Partition check:
 hda: hda1 hda2
 hdc: hdc1 hdc2
 hdf:
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
Linux agpgart interface v0.99 (c) Jeff Hartmann
agpgart: Maximum main memory to use for agp memory: 203M
agpgart: Detected SiS 645 chipset
agpgart: AGP aperture is 64M @ 0xf4000000
Linux Kernel Card Services 3.1.22
  options:  [pci] [cardbus] [pm]
Intel PCIC probe: not found.
usb.c: registered new driver hub
uhci.c: USB Universal Host Controller Interface driver v1.1
md: linear personality registered as nr 1
md: raid0 personality registered as nr 2
md: raid1 personality registered as nr 3
md: raid5 personality registered as nr 4
raid5: measuring checksumming speed
   8regs     :  1854.800 MB/sec
   32regs    :  1475.600 MB/sec
   pIII_sse  :  2121.200 MB/sec
   pII_mmx   :  1870.400 MB/sec
   p5_mmx    :  1874.000 MB/sec
raid5: using function: pIII_sse (2121.200 MB/sec)
md: multipath personality registered as nr 7
md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: Autodetecting RAID arrays.
 [events: 00000039]
 [events: 00000039]
md: autorun ...
md: considering hdc1 ...
md:  adding hdc1 ...
md:  adding hda1 ...
md: created md0
md: bind<hda1,1>
md: bind<hdc1,2>
md: running: <hdc1><hda1>
md: hdc1's event counter: 00000039
md: hda1's event counter: 00000039
md: RAID level 1 does not need chunksize! Continuing anyway.
md0: max total readahead window set to 124k
md0: 1 data-disks, max readahead per data-disk: 124k
raid1: device hdc1 operational as mirror 1
raid1: device hda1 operational as mirror 0
raid1: raid set md0 active with 2 out of 2 mirrors
md: updating md0 RAID superblock on device
md: hdc1 [events: 0000003a]<6>(write) hdc1's sb offset: 39424256
md: hda1 [events: 0000003a]<6>(write) hda1's sb offset: 39431424
md: ... autorun DONE.
LVM version 1.0.3(19/02/2002)
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 2048 buckets, 16Kbytes
TCP: Hash tables configured (established 16384 bind 16384)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
ds: no socket drivers loaded!
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 268k freed
PCI: Found IRQ 5 for device 00:0a.0
3c59x: Donald Becker and others. 
www.scyld.com/network/vortex.html
00:0a.0: 3Com PCI 3c905C Tornado at 0xa400. Vers LK1.1.17
phy=0, phyx=24, mii_status=0x782d
 [events: 00000023]
 [events: 00000023]
md: autorun ...
md: considering hdc2 ...
md:  adding hdc2 ...
md:  adding hda2 ...
md: created md1
md: bind<hda2,1>
md: bind<hdc2,2>
md: running: <hdc2><hda2>
md: hdc2's event counter: 00000023
md: hda2's event counter: 00000023
md: RAID level 1 does not need chunksize! Continuing anyway.
md1: max total readahead window set to 124k
md1: 1 data-disks, max readahead per data-disk: 124k
raid1: device hdc2 operational as mirror 1
raid1: device hda2 operational as mirror 0
raid1: raid set md1 active with 2 out of 2 mirrors
md: updating md1 RAID superblock on device
md: hdc2 [events: 00000024]<6>(write) hdc2's sb offset: 597120
md: hda2 [events: 00000024]<6>(write) hda2's sb offset: 586304
md: ... autorun DONE.
Adding Swap: 586296k swap-space (priority -1)
 hdf: hdf1
 hdf: hdf1
-----------------
then I made fdisk and the result is this (partition table written
without any errors and for testing pourpose I made a little partition):
-----------------
Disk /dev/hdf: 16 heads, 63 sectors, 155114 cylinders
Units = cylinders of 1008 * 512 bytes
   Device Boot    Start       End    Blocks   Id  System
/dev/hdf1             1      1500    755968+  83  Linux
Command (m for help):
-----------------
then I inizialize the partition in ext2
-----------------
vdt:/# mke2fs /dev/hdf1
mke2fs 1.27 (8-Mar-2002)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
94656 inodes, 188992 blocks
9449 blocks (5.00%) reserved for the super user
First data block=0
6 block groups
32768 blocks per group, 32768 fragments per group
15776 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
-------------------
On last I mount the HD
--------------------
vdt:/# mount /dev/hdf1 /mnt
--------------------
and see what happened in the mounted filesystem list:
--------------------
vdt:/# mount
/dev/md0 on / type ext2 (rw,errors=remount-ro)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hdf1 on /mnt type ntfs (rw)
--------------------
The volume is mounted with ntfs filesystem!!!!!
If I try to R/W to hdf1 the kernel show this messages:
--------------------
NTFS: ntfs_getdir_unsorted(): Read failed. Returning error code -5.
attempt to access beyond end of device
21:41: rw=0, want=1024304, limit=755968
NTFS: Read/write error.
NTFS: Warning! NTFS volume version is Win2k+: Mounting read-only
--------------------
I don't know if the problem (bug!) is located in the NTFS support in the
kernel 2.4.19-pre8 or other stuff. I'm asking your opinion ;))
In first now I try to disable the NTFS support (not needed and added
without request in the .configure file) and watch what happens.
 
Sorry for the crosspost :))
-- 
Byz
          Milo Sandydowns
          ICQ: 63077580
          "impara a quotare, per Allah..." (Nemesis Divina)

Milo,
please do not cross post.
did you try
mount -F ext2 /dev/hdf1 /a
create directory /a for a mount point as with automounter /mnt directory
has special meaning. There is no warranty that you not runnig it.
Andrey