lkml.org 
[lkml]   [1996]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: ftape / floppy conflict
    Date
    In article <199609020655.IAA01911@hal.inrialpes.fr>,
    Alain Knaff <Alain.Knaff@imag.fr> writes:
    > I just checked, and noticed that a few usage counter incrementations
    >were not correctly undone in the floppy driver when resource
    >allocation failed.
    >
    >
    > The following patch should fix the problems:
    >
    >diff -ur 2.0.16/linux/drivers/block/floppy.c linux/drivers/block/floppy.c
    >--- 2.0.16/linux/drivers/block/floppy.c Mon Sep 2 08:38:15 1996
    >+++ linux/drivers/block/floppy.c Mon Sep 2 08:47:08 1996
    >@@ -4067,12 +4067,16 @@
    > if (fd_request_irq()) {
    > DPRINT("Unable to grab IRQ%d for the floppy driver\n",
    > FLOPPY_IRQ);
    >+ MOD_DEC_USE_COUNT;
    >+ usage_count--;
    > return -1;
    > }
    > if (fd_request_dma()) {
    > DPRINT("Unable to grab DMA%d for the floppy driver\n",
    > FLOPPY_DMA);
    > fd_free_irq();
    >+ MOD_DEC_USE_COUNT;
    >+ usage_count--;
    > return -1;
    > }
    > for (fdc = 0; fdc < N_FDC; fdc++)
    >@@ -4098,7 +4102,6 @@
    > return;
    > }
    > INT_ON;
    >- MOD_DEC_USE_COUNT;
    > fd_disable_dma();
    > fd_free_dma();
    > fd_disable_irq();
    >@@ -4131,6 +4134,7 @@
    > if (floppy_tq.sync)
    > printk("task queue still active\n");
    > #endif
    >+ MOD_DEC_USE_COUNT;
    > }
    >
    > Regards,
    >
    > Alain
    Well I just tried the new 2.0.17 patch from Linus which includes
    this patch (as far as I can tell).

    Now my system does'nt freeze but Oopses and resets itself.

    What I do is first start taper to make me a backup. And then try to
    mount a dos floppy on /dev/fd0.
    Then I just had time to read the message '/dev/fd0 is not a block device'
    After that all processes are killed one after the other (windows closing
    in X) and the system resets.

    Here follows the interesting part of my messages file
    Which is more than I got the last time.

    -----
    Sep 3 21:42:12 pa3ebv kernel: ftape-2.08 960314
    Sep 3 21:42:12 pa3ebv kernel: (c) 1993-1995 Bas Laarhoven (bas@vimec.nl)
    Sep 3 21:42:12 pa3ebv kernel: (c) 1995-1996 Kai Harrekilde-Petersen (khp@dolphinics.no)
    Sep 3 21:42:12 pa3ebv kernel: QIC-117 driver for QIC-40/80/3010/3020 tape drives
    Sep 3 21:42:12 pa3ebv kernel: Compiled for kernel version 2.0.17
    Sep 3 21:42:12 pa3ebv kernel: [000] fdc-io.c (fdc_config) - Using the standard fdc controller.
    Sep 3 21:42:12 pa3ebv kernel: [001] fdc-io.c (fdc_probe) - Type 82077AA FDC found.
    Sep 3 21:42:13 pa3ebv kernel: [002] ftape-ctl.c (ftape_activate_drive) - drive wakeup method: Colorado.
    Sep 3 21:42:15 pa3ebv kernel: [003] ftape-io.c (ftape_set_data_rate) - post QIC-117B drive @ 1 Mb/s.
    Sep 3 21:42:15 pa3ebv kernel: [004] ftape-io.c (ftape_set_data_rate) - 750 ft. QIC-80 tape.
    Sep 3 21:43:20 pa3ebv kernel: [005] ftape-read.c (read_header_segment) - header segments are 0 and 1.
    Sep 3 21:43:20 pa3ebv kernel: [006] ftape-read.c (read_header_segment) - calculated tape length is 406 ft.
    Sep 3 21:43:20 pa3ebv kernel: [007] ftape-bsm.c (extract_bad_sector_map) - 16 bad sectors.
    Sep 3 21:43:20 pa3ebv kernel: [008] ftape-read.c (read_header_segment) - This tape has no `Linux raw format' label,
    Sep 3 21:43:20 pa3ebv kernel: ***** Use `mt' to erase this tape if you want to use file marks !.
    Sep 3 21:43:42 pa3ebv kernel: inserting floppy driver for 2.0.17
    Sep 3 21:43:42 pa3ebv kernel: Floppy drive(s): fd0 is 1.44M
    Sep 3 21:43:42 pa3ebv kernel: [009] fdc-io.c (fdc_result) - fdc not ready.
    Sep 3 21:43:42 pa3ebv kernel: [010] fdc-isr.c (fdc_isr) - probably fatal error during FDC Result Phase.
    Sep 3 21:43:42 pa3ebv kernel: [011] fdc-isr.c (fdc_isr) - drive may hang until (power) reset :-(.
    Sep 3 21:43:42 pa3ebv kernel: floppy0: Unable to grab IRQ6 for the floppy driver
    Sep 3 21:43:42 pa3ebv kernel: [012] fdc-io.c (fdc_interrupt_wait) - *** BUG: unexpected schedule exit ***.
    Sep 3 21:43:42 pa3ebv kernel: [013] ftape-rw.c (wait_segment) - fdc_interrupt_wait failed.
    Sep 3 21:43:42 pa3ebv kernel: Oops: 0000
    Sep 3 21:43:42 pa3ebv kernel: CPU: 0
    Sep 3 21:43:42 pa3ebv kernel: EIP: 0010:[<00110e06>]
    Sep 3 21:43:42 pa3ebv kernel: EFLAGS: 00010017
    Sep 3 21:43:42 pa3ebv kernel: eax: ffffffff ebx: 00000286 ecx: 00998e64 edx: 0185f748
    Sep 3 21:43:42 pa3ebv kernel: esi: ffffffff edi: ffffffff ebp: 00998e44 esp: 00998e40
    Sep 3 21:43:42 pa3ebv kernel: ds: 0018 es: 0018 fs: 002b gs: 002b ss: 0018
    Sep 3 21:43:42 pa3ebv kernel: Process xterm (pid: 298, process nr: 32, stackpage=00998000)
    Sep 3 21:43:42 pa3ebv kernel: Stack: 00c48c0c 00998e78 001109b7 00998e64 00000005 00998f14 00000000 ffffffff
    Sep 3 21:43:42 pa3ebv kernel: 00c48414 00000000 00000000 ffffffff 00c48c0c 001106f0 00000005 0012efef
    Sep 3 21:43:42 pa3ebv kernel: 00000005 00000000 00000000 08023600 00000000 00000001 00bea000 00000002
    Sep 3 21:43:42 pa3ebv kernel: Call Trace: [<001109b7>] [<001106f0>] [<0012efef>] [<0012f273>] [<0013765e>] [<0010fb7f>] [<0010a672>]
    Sep 3 21:43:42 pa3ebv kernel: Code: 39 42 08 72 f9 89 11 8b 42 04 89 41 04 89 4a 04 8b 41 04 89
    Sep 3 21:43:42 pa3ebv kernel: Oops: 0000
    Sep 3 21:43:42 pa3ebv kernel: CPU: 0
    Sep 3 21:43:42 pa3ebv kernel: EIP: 0010:[<00110e06>]
    Sep 3 21:43:42 pa3ebv kernel: EFLAGS: 00010017
    Sep 3 21:43:42 pa3ebv kernel: eax: ffffffff ebx: 00000286 ecx: 006cae64 edx: 0185f748
    Sep 3 21:43:42 pa3ebv kernel: esi: ffffffff edi: ffffffff ebp: 006cae44 esp: 006cae40
    Sep 3 21:43:42 pa3ebv kernel: ds: 0018 es: 0018 fs: 002b gs: 002b ss: 0018
    Sep 3 21:43:42 pa3ebv kernel: Process xterm (pid: 264, process nr: 29, stackpage=006ca000)
    Sep 3 21:43:42 pa3ebv kernel: Stack: 001f8414 006cae78 001109b7 006cae64 00000005 006caf14 00000000 ffffffff
    Sep 3 21:43:42 pa3ebv kernel: 001f8c0c 00000000 00000000 ffffffff 001f8414 001106f0 00000005 0012efef
    Sep 3 21:43:42 pa3ebv kernel: 00000005 00000000 00000000 08023600 00000000 00000001 005db000 00000002
    Sep 3 21:43:42 pa3ebv kernel: Call Trace: [<001109b7>] [<001106f0>] [<0012efef>] [<0012f273>] [<0013765e>] [<0010fb7f>] [<0010a672>]
    Sep 3 21:43:42 pa3ebv kernel: Code: 39 42 08 72 f9 89 11 8b 42 04 89 41 04 89 4a 04 8b 41 04 89
    Sep 3 21:43:42 pa3ebv kernel: Oops: 0000
    Sep 3 21:43:42 pa3ebv kernel: CPU: 0
    Sep 3 21:43:42 pa3ebv kernel: EIP: 0010:[<00110e06>]
    Sep 3 21:43:42 pa3ebv kernel: EFLAGS: 00010017
    Sep 3 21:43:42 pa3ebv kernel: eax: ffffffff ebx: 00000286 ecx: 007a0e64 edx: 0185f748
    Sep 3 21:43:42 pa3ebv kernel: esi: ffffffff edi: ffffffff ebp: 007a0e44 esp: 007a0e40
    Sep 3 21:43:42 pa3ebv kernel: ds: 0018 es: 0018 fs: 002b gs: 002b ss: 0018
    Sep 3 21:43:42 pa3ebv kernel: Process afterstep (pid: 240, process nr: 19, stackpage=007a0000)
    Sep 3 21:43:42 pa3ebv kernel: Stack: 00446018 007a0e78 001109b7 007a0e64 00000004 007a0f14 00000000 ffffffff
    Sep 3 21:43:42 pa3ebv kernel: 00af3414 00000000 00000000 ffffffff 00446018 001106f0 00000004 0012efef
    Sep 3 21:43:42 pa3ebv kernel: 00000004 00000000 00000000 bffff960 00000000 00000001 00acc000 00000001
    Sep 3 21:43:42 pa3ebv kernel: Call Trace: [<001109b7>] [<001106f0>] [<0012efef>] [<0012f273>] [<0013d5f5>] [<0013759b>] [<0010fb7f>]
    Sep 3 21:43:42 pa3ebv kernel: [<0010a672>]
    Sep 3 21:43:42 pa3ebv kernel: Code: 39 42 08 72 f9 89 11 8b 42 04 89 41 04 89 4a 04 8b 41 04 89
    --------

    Sorry I can't decode the Trace but I hope it helps.

    Regards, Peter

    ---
    |===========================================================|
    | Peter J. de Vrijer e-mail: peter@pa3ebv.ow.nl |
    | werk: pj.de.vrijer@chw.nl |
    | And perhaps the horse will learn to sing |

    \
     
     \ /
      Last update: 2005-03-22 13:37    [W:3.469 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site