lkml.org 
[lkml]   [2001]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.4.12-ac3 floppy module requires 0x3f0-0x3f1 ioports
On 2 Nov 2001, Thomas Hood wrote:
> Alan Cox wrote:
> > Maciej Zenczykowski wrote:
> >> Is there any reason why the floppy module requires
> >> the ioport range 0x3f0-0x3f1 in order to load? On
> >> my computer /proc/ioports reports this range as used
> >> by PnPBIOS PNP0c02, thus the floppy module cannot
> >> reserve the range 0x3f0-0x3f5 and refuses to load.
> >
> > This is a bug in the PnPBIOS experimental code -
> > turn off PnPBIOS and/or update for the moment
>
> A fix for this problem went in to 2.4.13-ac2. Please
> try that kernel (or a later -ac kernel) and report back.

Well just tried kernel 2.4.13-ac6 and there is absolutely no difference.

After applying the attached patch all works OK...

Maciej Zenczykowski

nb. modprobe rivafb leaves the kernel's idea of whats on screen out of
sync with the truth. i.e. modprobe rivafb on tty2 and you end up with
tty1 on the screen, but keypresses going to tty2...
--- drivers/block/floppy.c.before-maze Sun Oct 21 19:09:21 2001
+++ drivers/block/floppy.c Tue Oct 30 21:46:46 2001
@@ -4228,7 +4228,7 @@
FDCS->rawcmd = 2;
if (user_reset_fdc(-1,FD_RESET_ALWAYS,0)){
/* free ioports reserved by floppy_grab_irq_and_dma() */
- release_region(FDCS->address, 6);
+ release_region(FDCS->address+2, 4);
release_region(FDCS->address+7, 1);
FDCS->address = -1;
FDCS->version = FDC_NONE;
@@ -4238,7 +4238,7 @@
FDCS->version = get_fdc_version();
if (FDCS->version == FDC_NONE){
/* free ioports reserved by floppy_grab_irq_and_dma() */
- release_region(FDCS->address, 6);
+ release_region(FDCS->address+2, 4);
release_region(FDCS->address+7, 1);
FDCS->address = -1;
continue;
@@ -4317,8 +4317,8 @@

for (fdc=0; fdc< N_FDC; fdc++){
if (FDCS->address != -1){
- if (!request_region(FDCS->address, 6, "floppy")) {
- DPRINT("Floppy io-port 0x%04lx in use\n", FDCS->address);
+ if (!request_region(FDCS->address + 2, 4, "floppy")) {
+ DPRINT("Floppy io-port 0x%04lx in use\n", FDCS->address + 2);
goto cleanup1;
}
if (!request_region(FDCS->address + 7, 1, "floppy DIR")) {
@@ -4349,12 +4349,12 @@
irqdma_allocated = 1;
return 0;
cleanup2:
- release_region(FDCS->address, 6);
+ release_region(FDCS->address + 2, 4);
cleanup1:
fd_free_irq();
fd_free_dma();
while(--fdc >= 0) {
- release_region(FDCS->address, 6);
+ release_region(FDCS->address + 2, 4);
release_region(FDCS->address + 7, 1);
}
MOD_DEC_USE_COUNT;
@@ -4421,7 +4421,7 @@
old_fdc = fdc;
for (fdc = 0; fdc < N_FDC; fdc++)
if (FDCS->address != -1) {
- release_region(FDCS->address, 6);
+ release_region(FDCS->address+2, 4);
release_region(FDCS->address+7, 1);
}
fdc = old_fdc;
\
 
 \ /
  Last update: 2005-03-22 13:12    [W:0.184 / U:0.004 seconds]
©2003-2014 Jasper Spaans. Advertise on this site