freebsd-skq/sys/isa
Joerg Wunsch 5f830ea2cd Make the Y-E Data PCMCIA floppy of the Toshiba Libretto work under
-current.  It doesn't work yet as stable as the 3.x/PAO version of the
driver does, however, i get occasional `FDC direction bit not set' and
other weird messages, but it basically works at least.

The old (defunct) #ifdef FDC_YE stuff has been eliminated completely
now, PCMCIA-FDC specific functions have been implemented differently
where needed.

Unfortunately, due to the fact that the traditional PeeCee FDC with
its funny non-contiguous register space (one register for WD1003
harddisk controllers is interleaved into the FDC register set), and
Peter's subsequent changes involving two different bus space handles
for normal FDCs, the changes required for the Y-E stuff are more
complex than i'd love them to be.  I've done my best to keep the logic
for normal FDCs intact.

Since the Y-E FDC seems to lose interrupts after a FDC reset
sometimes, i've also replaced the timeout logic in fd_turnoff() to
generate an artificial pseudo interrupt in case of a timeout while the
drive has still outstanding transfers waiting.  This avoids the total
starvation of the driver that could be observed with highly damaged
media under 3.x/PAO.  This part of the patch has been revied by bde
previously.

I've fixed a number of occasions where previous commits have been
missing the encapuslation of ISA DMA related functions inside
FDC_NODMA checks.

I've added one call to SET_BCDR() during preparation of the format
floppy operation.  Floppy formatting has been totally broken before in
3.x/PAO (garbage ID fields have been written to the medium, causing
`wrong cylinder' errors upon media reading).  This is just black
magic, i don't have the slightes idea _why_ this needs to be but just
copied over the hack that has been used by the PAO folks in the normal
read/write case anyway.

The entired device_busy() stuff seems to be pointless to me.  In any
case, i had to add device_unbusy() calls symmetrical to the
device_busy() calls, otherwise the PCMCIA floppy driver could never be
deactivated.  (As it used to be, it caused a `mark the device busier
and busier' situation.)  IMHO, all block device drivers should be
marked busy based on active buffers still waiting for the driver, so
the device_unbusy() calls should probably go to biodone().  Only one
other driver (whose name escapes me at the moment) uses device_busy()
calls at all, so i question the value of all this...

I think this entire `device busy' logic simply doesn't fit for PCMCIA
&al.  It cannot be the decision of some piece of kernel software to
declare a device `busy by now, you can't remove it', when the actual
physical power of removing it is the user pulling the card.  The
kernel simply has to cope with the removal, however busy the device
might have been by the time of the removal, period.  Perhaps a force
flag needs to be added?

Upon inserting the card a second time, i get:

WARNING: "fd" is usurping "fd"'s cdevsw[]
WARNING: "fd" is usurping "fd"'s bmaj

I suspect this is related to the XXX comment at the call to
cdevsw_add().  Does anybody know what the correct way is to cleanup
this?
2000-03-18 18:27:01 +00:00
..
ic $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
atkbd_isa.c Use config's conditional compilation rather than using #ifdefs that make 2000-01-29 15:08:56 +00:00
atkbdc_isa.c Do not add children (atkbd and psm) if they are disabled. 2000-02-25 11:40:31 +00:00
atrtc.c ISA device drivers use the ISA source interrupt number in locations where 2000-01-04 22:24:59 +00:00
fd.c Make the Y-E Data PCMCIA floppy of the Toshiba Libretto work under 2000-03-18 18:27:01 +00:00
fdc.h Make the Y-E Data PCMCIA floppy of the Toshiba Libretto work under 2000-03-18 18:27:01 +00:00
fdreg.h Merge most of FDC_YE into the mainline driver. 2000-01-06 07:13:54 +00:00
isa_common.c When allocating resources in the following cases: 2000-02-11 04:35:07 +00:00
isa_common.h Change isa_get/set_flags() to device_get/set_flags(). 1999-09-07 08:42:49 +00:00
isa_if.m * Add struct resource_list* argument to resource_list_alloc and 1999-10-12 21:35:51 +00:00
isahint.c Allow a DMA channel of 0. This gets the on-board mss audio device working 1999-11-22 14:30:41 +00:00
isareg.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
isavar.h Stop isadma from abusing the B_READ, B_RAW and B_WRITE flags. 2000-03-13 10:19:32 +00:00
joy.c Add ADS7182 as a known Joystick. 2000-01-18 08:38:35 +00:00
pnp.c * Add some verbose logging to the PnP parser and fix a couple of bugs. 1999-10-14 21:03:03 +00:00
pnpparse.c * Add some verbose logging to the PnP parser and fix a couple of bugs. 1999-10-14 21:03:03 +00:00
pnpreg.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 05:07:58 +00:00
pnpvar.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 05:07:58 +00:00
ppc.c Remove #include "ppc.h" and #if NPPC > 0 - this is always true as it is 2000-01-29 14:02:30 +00:00
ppcreg.h Port of ppbus standalone framework to the newbus system. 2000-01-14 00:18:06 +00:00
psm.c - Add Support for the following PS/2 mice: 2000-03-18 15:21:40 +00:00
rtc.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
sio.c Fix crashes on card eject for pccard modems. We check for NULL when 2000-03-11 20:22:09 +00:00
sioreg.h Restore the old sio* - bruce can fix it himself. 1999-09-08 10:59:03 +00:00
syscons_isa.c Use config's conditional compilation rather than using #ifdefs that make 2000-01-29 15:08:56 +00:00
vga_isa.c Use config's conditional compilation rather than using #ifdefs that make 2000-01-29 15:08:56 +00:00