Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.





Ondrej Zary wrote:
On Tuesday 08 January 2008 18:24:02 David P. Reed wrote:
Windows these days does delays with timing loops or the scheduler. It
doesn't use a "port". Also, Windows XP only supports machines that tend
not to have timing problems that use delays. Instead, if a device takes
a while to respond, it has a "busy bit" in some port or memory slot that
can be tested.

Windows XP can run on a machine with ISA slot(s) and has built-in drivers for some plug&play ISA cards - e.g. the famous 3Com EtherLink III. I think that there's a driver for NE2000-compatible cards too and it probably works.
There is no need to use io writes to supposedly/theoretically "unused ports" to make drivers work on any bus.
ISA included! You can, for example, wait for an ISA bus serial adapter to put out its next character by looping reading the port that has the output buffer full flag in a tight loop, with no delay code at all. And if you need to time things, just call a timing loop subroutine that you calibrate at boot time.
I wrote DOS drivers for NE2000's on the ISA bus when they were brand new designs from Novell without such kludges as writes to I/O port 80. I don't remember writing a driver for the 3com devices - probably didn't, because 3Com's cards were expensive at the time.

In any case, Linux *did* adopt this port 80 strategy - I'm sure all concerned thought it was frightfully clever at the time. Linus expressed his skepticism in the comments in io.h. The problem is to safely move away from it toward a proper strategy that doesn't depend on "bus aborts" which would trigger machine checks if they were properly enabled.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Seagate Barracuda 160 GB IDE becomes corrupted. RMA?
    ... Operating System Microsoft Windows 2000 Professional ... System Memory 512 MB ... Communication Port Communications Port ... Driver Download http://www.viaarena.com/?PageID=2 ...
    (comp.sys.ibm.pc.hardware.storage)
  • soft lockup disease (2.6.14-rc1, x86_64)
    ... IA-32 Microcode Update Driver: v1 ... IO window: 1000-1fff] L ... ACPI: PM-Timer IO Port: 0x408 ACPI: Local APIC address 0xfee00000 ...
    (Linux-Kernel)
  • [PATCH]PCI Express Port Bus Driver
    ... A PCI Express Port is a logical PCI-PCI Bridge structure. ... physical device to be handled by only a single driver. ... service drivers will compete for a single PCI-PCI Bridge device. ...
    (Linux-Kernel)
  • Need pci=assign-busses for Acer Aspire 9410
    ... Using APIC driver default ... ACPI: Local APIC address 0xfee00000 ... SELinux: Initializing. ... cs: IO port probe 0x6000-0x6fff: clean. ...
    (Linux-Kernel)
  • 2.6.19-rc2 - Cable detection problem in pata_amd
    ... the pata_amd driver mis-detects the cable connected to the ... 2nd port on my system as 40 wire and sets UDMA/33 for this drive. ... I've tried switching the cables around to see if it truly was a cable ... Linux Plug and Play Support v0.97 Adam Belay ...
    (Linux-Kernel)