View previous topic :: View next topic |
Author |
Message |
jesnow l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 26 Apr 2006 Posts: 895
|
Posted: Sat Jan 31, 2009 12:57 pm Post subject: Disable 80-wire check for CF card drive. |
|
|
I bought a CF card drive to use in my future HTPC client. It plugs directly into the IDE port, and has no cable. It's a 233x card, and so if 1x is 150K (I assume? the speed of an original CD-ROM for some reason), then we should get 35MB/s performance. And it's silent and has ~zero seek time.
BUT something goes wrong during boot:
Code: |
Jan 19 20:30:41 Lemond hda: CF CARD, ATA DISK drive
Jan 19 20:30:41 Lemond hda: host max PIO5 wanted PIO255(auto-tune) selected PIO2
Jan 19 20:30:41 Lemond hda: host side 80-wire cable detection failed, limiting max speed to UDMA33
Jan 19 20:30:41 Lemond hda: UDMA/33 mode selected
Jan 19 20:30:41 Lemond hda: max request size: 128KiB
Jan 19 20:30:41 Lemond hda: 7831152 sectors (4009 MB) w/1KiB Cache, CHS=7769/16/63
Jan 19 20:30:41 Lemond hda: hda1 hda2
Jan 19 20:30:41 Lemond EXT3-fs: hda2: orphan cleanup on readonly fs
Jan 19 20:30:41 Lemond EXT3-fs: hda2: 15 orphan inodes deleted
Jan 19 20:30:41 Lemond EXT3 FS on hda2, internal journal
Jan 19 20:30:41 Lemond Adding 528152k swap on /dev/hda1. Priority:-1 extents:1 across:528152k
Jan 19 20:30:41 Lemond hda: UDMA/33 mode selected
|
DAMN! This really slows me down.
Code: |
Lemond jesnow # hdparm -i /dev/hda
/dev/hda:
Model=CF CARD, FwRev=20080820, SerialNo=20081225 012349A4
Config={ HardSect NotMFM Fixed DTR>10Mbs }
RawCHS=7769/16/63, TrkSize=0, SectSize=576, ECCbytes=4
BuffType=DualPort, BuffSize=1kB, MaxMultSect=1, MultSect=off
CurCHS=7769/16/63, CurSects=7831152, LBA=yes, LBAsects=7831152
IORDY=no, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 *udma2 udma3 udma4 udma5 udma6
AdvancedPM=yes: disabled (255)
Drive conforms to: Unspecified: ATA/ATAPI-4
* signifies the current active mode
Lemond jesnow # hdparm -tT /dev/hda
/dev/hda:
Timing cached reads: 264 MB in 2.00 seconds = 131.99 MB/sec
Timing buffered disk reads: 70 MB in 3.04 seconds = 23.06 MB/sec
Lemond jesnow #
|
So I did a simple hack on /home/src/linux-2.6.28-gentoo-r1/drivers/ide/ide-iops.c to bypass that check:
Code: |
no_80w:
// Warn but don't do anything.
//if (drive->dev_flags & IDE_DFLAG_UDMA33_WARNED)
// return 0;
printk(KERN_WARNING "%s: %s side 80-wire cable detection failed, "
"NOT limiting max speed to UDMA33 -- JES hack!!\n",
drive->name,
hwif->cbl == ATA_CBL_PATA80 ? "drive" : "host");
//
// drive->dev_flags |= IDE_DFLAG_UDMA33_WARNED;
return 1; // This was return 0;
}
|
Now when I boot I get:
Code: |
Jan 29 09:08:34 Lemond hda: CF CARD, ATA DISK drive
Jan 29 09:08:34 Lemond hda: host max PIO5 wanted PIO255(auto-tune) selected PIO2
Jan 29 09:08:34 Lemond hda: host side 80-wire cable detection failed, NOT limiting max speed to UDMA33 -- JES hack!!
Jan 29 09:08:34 Lemond hda: UDMA/133 mode selected
Jan 29 09:08:34 Lemond hda: max request size: 128KiB
Jan 29 09:08:34 Lemond hda: 7831152 sectors (4009 MB) w/1KiB Cache, CHS=7769/16/63
Jan 29 09:08:34 Lemond hda: hda1 hda2
Jan 29 09:08:34 Lemond EXT3 FS on hda2, internal journal
Jan 29 09:08:34 Lemond Adding 528152k swap on /dev/hda1. Priority:-1 extents:1 across:528152k
Jan 29 09:08:34 Lemond hda: host side 80-wire cable detection failed, NOT limiting max speed to UDMA33 -- JES hack!!
Jan 29 09:08:34 Lemond hda: UDMA/133 mode selected
|
and
Code: |
Lemond jesnow # hdparm -i /dev/hda
/dev/hda:
Model=CF CARD, FwRev=20080820, SerialNo=20081225 012349A4
Config={ HardSect NotMFM Fixed DTR>10Mbs }
RawCHS=7769/16/63, TrkSize=0, SectSize=576, ECCbytes=4
BuffType=DualPort, BuffSize=1kB, MaxMultSect=1, MultSect=off
CurCHS=7769/16/63, CurSects=7831152, LBA=yes, LBAsects=7831152
IORDY=no, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6
AdvancedPM=yes: disabled (255)
Drive conforms to: Unspecified: ATA/ATAPI-4
* signifies the current active mode
Lemond jesnow # hdparm -tT /dev/hda
/dev/hda:
Timing cached reads: 268 MB in 2.00 seconds = 133.83 MB/sec
Timing buffered disk reads: 108 MB in 3.03 seconds = 35.64 MB/sec
Lemond jesnow #
|
That machine has been up and running stably ever since, no disk issues.
I love linux. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54823 Location: 56N 3W
|
Posted: Sat Jan 31, 2009 2:19 pm Post subject: |
|
|
jesnow,
Do not use a journalled filesystem on a FLASH drive. The extra writes to the journal make a difference to the media life and the spead of writes too.
Some laptops have the same issue. They use very short 40 wire cables and use the same work around _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jesnow l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 26 Apr 2006 Posts: 895
|
Posted: Sat Jan 31, 2009 2:46 pm Post subject: |
|
|
The cf card was not expensive, and I expect I'll buy a newer/faster one long before it wears out. If it *does* wear out, I'll certianly take steps, but for now, I'm just going to blithely see what happens. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|