5f830ea2cd
-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? |
||
---|---|---|
.. | ||
ic | ||
atkbd_isa.c | ||
atkbdc_isa.c | ||
atrtc.c | ||
fd.c | ||
fdc.h | ||
fdreg.h | ||
isa_common.c | ||
isa_common.h | ||
isa_if.m | ||
isahint.c | ||
isareg.h | ||
isavar.h | ||
joy.c | ||
pnp.c | ||
pnpparse.c | ||
pnpreg.h | ||
pnpvar.h | ||
ppc.c | ||
ppcreg.h | ||
psm.c | ||
rtc.h | ||
sio.c | ||
sioreg.h | ||
syscons_isa.c | ||
vga_isa.c |