new fdc(4) and new fdcontrol(8) behavior (5.3-BETA5)
Rostislav Krasny
rosti_bsd at yahoo.com
Tue Sep 21 05:23:55 PDT 2004
Hello. My hardware is based on a 430TX chipset. After switching to
5.3-BETA5 from 5.3-BETA4 I've discovered several behavior changes of
new fdc(4) and new fdcontrol(8) on my system.
1. I/O ports changed.
dmesg fragment from 5.3-BETA4 (verbose):
fdc0: <Enhanced floppy controller (i82077, NE72065 or clone)> at port
0x3f7,0x3f0-0x3f5 irq 6 drq 2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
dmesg fragment from 5.3-BETA5 (verbose):
fdc0: ic_type 90 part_id 80
fdc0: <Enhanced floppy controller> at port 0x3f0-0x3f5 irq 6 drq 2 on
isa0
fdc0: ic_type 90 part_id 80
fdc0: [MPSAFE]
fdc0: [FAST]
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
Quote of "Intel(R) 82371AB PCI-TO-ISA/IDE Xcelerator (PIIX4) Datasheet"
(page 219):
11.3.5.6. Device 5: Floppy Disk Drive
Device 5 monitors accesses to Floppy Drive Controller or GPI14.
Device 5 System Events:
- PCI accesses to IO addresses for the floppy drive, selectable below.
This can cause idle, burst, or global standby timer reloads, IO trap
SMI#, or forwarding of the cycle from PCI to ISA.
- DACK2# assertion if enabled (see below). This can cause only idle,
burst, and global standby timer reloads.
- Assertion of GPI14. The polarity of active signal (high or low) is
selectable. This can cause idle, burst, or global standby timer
reloads.
Device 5 Address Ranges:
Floppy Drive: 3F03F5h, 3F7h or [FDC_MON_EN]
370375h, 377h [FDC_DEC_SEL]
Device 5 Idle Timer:
Resolution: 1 second
Count: 5 bit [IDL_CNTB]
GPI Enable: [GPI_EN_DEV5]
GPI Polarity Select: [GPI_POL_DEV5]
DACK2# Enable: [RES_EN_DEV5]
Device 5 ISA Forwarding Enable: [EIO_EN_DEV5]
Device 5 Idle Timer Reload: [IDL_EN_DEV5]
Global Standby Timer Reload: [GRLD_EN_DEV5]
Burst Timer Reload: [BRLD_EN_DEV5]
Fast or Slow Burst Select: [BRLD_SEL_DEV5]
Idle Timer Expiration SMI#: [IDL_EN_DEV5] [IDL_STS_DEV5]
Trap SMI#: [TRP_EN_DEV5] [TRP_STS_DEV5]
You can download the whole document by following URL:
ftp://download.intel.com/design/intarch/datashts/29056201.pdf
Why the 3F7h port isn't used by new fdc(4) on my system? Is it a
hardware detection bug?
2. fdcontrol cannot access /dev/fd0 when there is no diskette inserted
When no diskette is inserted then running 'fdcontrol [anyflag]
/dev/fd0' produce following error message:
fdcontrol: open(/dev/fd0): Device not configured
When any formatted diskette is inserted it works without such an error.
For example:
# fdcontrol -F -v /dev/fd0
/dev/fd0: 1440 KB media type
Format: 18,512,0xff,0x1b,80,500,2,0x6c,1,0,+mfm,+auto
Sector size: 512
Sectors/track: 18
Heads/cylinder: 2
Cylinders/disk: 80
Transfer rate: 500 kbps
Sector gap: 27
Format gap: 108
Interleave: 1
Side offset: 0
Flags <MFM,AUTO>
I don't have any non-formatted diskette to check how it works in that
case. Any time 'fdcontrol [anyflag] /dev/fd0' is running the floppy
drive is activated, i.e. the LED of the drive is alight and its heads
are moving for some period of time.
Thereagainst in 5.3-BETA4 fdcontrol(8) works the same when the diskette
is inserted and when it isn't. For example:
# fdcontrol -F -v /dev/fd0
/dev/fd0: 1440 KB media type
Format: 18,512,0xff,0x1b,80,500,2,0x6c,1,0,+mfm
Sector size: 512
Sectors/track: 18
Heads/cylinder: 2
Cylinders/disk: 80
Transfer rate: 500 kbps
Sector gap: 27
Format gap: 108
Interleave: 1
Side offset: 0
Flags <MFM>
What is inspected behavior of fdcontrol(8) in 5.3-BETA5? Isn't its
current behavior buggy? Is it concerned with 3F7h port that is not used
on my system by the new fdc(4) driver?
3. Minors
New fdcontrol(8) have new '-a' flag and '-d dbg' flag was removed. But
both the manual page and the usage output of fdcontrol(8) wasn't
changed. Also fdcontrol(8) prints a new 'AUTO' device flag that is not
documented in the manual page too. Is it corresponded to FDOPT_AUTOSEL
flag from fdc(4) manual page? According to that manual page
FDOPT_AUTOSEL is read-only but I can disable 'AUTO' by running
'fdcontrol -s 18,512,0xff,0x1b,80,500,2,0x6c,1,0,+mfm,-auto /dev/fd0'.
BTW disabling 'AUTO' doesn't prevent the "Device not configured" error
described above.
_______________________________
Do you Yahoo!?
Express yourself with Y! Messenger! Free. Download now.
http://messenger.yahoo.com
More information about the freebsd-current
mailing list