Bug 1356 - parport_pc not releasing all ioports
parport_pc not releasing all ioports
Status: CLOSED CODE_FIX
Product: Drivers
Classification: Unclassified
Component: Parallel
i386 Linux
: P2 normal
Assigned To: Zwane Mwaikambo
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-10-14 08:52 UTC by John Mock
Modified: 2003-11-12 22:35 UTC (History)
0 users

See Also:
Kernel Version: 2.6.0-test7-bk3
Tree: Mainline
Regression: ---


Attachments
'dmesg' output (9.55 KB, text/plain)
2003-10-14 08:54 UTC, John Mock
Details
.config for linux-2.6.0-test7-bk3 (29.96 KB, text/plain)
2003-10-14 08:56 UTC, John Mock
Details
/tmp/ioports2 (893 bytes, text/plain)
2003-10-14 08:59 UTC, John Mock
Details
Possible patch to parport_pc.c (471 bytes, patch)
2003-10-14 10:27 UTC, John Mock
Details | Diff

Description John Mock 2003-10-14 08:52:21 UTC
Distribution: kernel.org
Hardware Environment: Sony VAIO R505RE (see 'dmesg' attachment for details)
    00:00.0 Host bridge: Intel Corp. 82830 830 Chipset Host Bridge (rev 04)
    00:02.0 VGA compatible controller: Intel Corp. 82830 CGC [Chipset Graphics
Controller] (rev 04)
    00:02.1 Display controller: Intel Corp. 82830 CGC [Chipset Graphics Controller]
    00:1d.0 USB Controller: Intel Corp. 82801CA/CAM USB (Hub #1) (rev 02)
    00:1d.1 USB Controller: Intel Corp. 82801CA/CAM USB (Hub #2) (rev 02)
    00:1d.2 USB Controller: Intel Corp. 82801CA/CAM USB (Hub #3) (rev 02)
    00:1e.0 PCI bridge: Intel Corp. 82801BAM/CAM PCI Bridge (rev 42)
    00:1f.0 ISA bridge: Intel Corp. 82801CAM ISA Bridge (LPC) (rev 02)
    00:1f.1 IDE interface: Intel Corp. 82801CAM IDE U100 (rev 02)
    00:1f.3 SMBus: Intel Corp. 82801CA/CAM SMBus (rev 02)
    00:1f.5 Multimedia audio controller: Intel Corp. 82801CA/CAM AC'97 Audio
(rev 02)
    00:1f.6 Modem: Intel Corp. 82801CA/CAM AC'97 Modem (rev 02)
    02:02.0 FireWire (IEEE 1394): Texas Instruments TSB43AB22/A IEEE-1394a-2000
Controller (PHY/Link)
    02:05.0 CardBus bridge: Ricoh Co Ltd RL5c475 (rev 80)
    02:08.0 Ethernet controller: Intel Corp. 82801CAM (ICH3) PRO/100 VE (LOM)
Ethernet Controller (rev 42)
Software Environment: (see dnesg attachment)

Problem Description:
   If 'parport_pc' is compile as a module, it fails to properly return certain
ioport resources after being removed.

Steps to reproduce:
    Debian GNU/Linux testing/unstable tvr-vaio tty1

    tvr-vaio login: root
    Password:
    Last login: Tue Oct 14 08:26:30 2003 on tty1
    Linux tvr-vaio 2.6.0-test7-bk3 #23 Sun Oct 12 15:42:38 PDT 2003 i686 GNU/Linux
    You have new mail.
    tvr-vaio:~# cat /proc/ioports > /tmp/ioports1
    tvr-vaio:~# modprobe parport_pc
    parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE]
    parport0: irq 7 detected
    tvr-vaio:~# cat /proc/ioports > /tmp/ioports2
    tvr-vaio:~# rmmod parport_pc
    tvr-vaio:~# cat /proc/ioports > /tmp/ioports3
    tvr-vaio:~# diff /tmp/ioports{1,2}
    12a13,14
    > 0378-037a : parport0
    > 037b-037f : parport0
    tvr-vaio:~# diff /tmp/ioports{2,3}
    13,14c13
    < 0378-037a : parport0
    < 037b-037f : parport0
    ---
    > 037b-037f : kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk&#65533;q&#65533;,Z$S&#65533;&#65533;&#65533;&#65533;$K6&#65533;{
    tvr-vaio:~# cat > /tmp/console.log

Attachments containing .config, dmesg, etc. to follow.  Please write if you would
like additional information.
Comment 1 John Mock 2003-10-14 08:54:36 UTC
Created attachment 1056 [details]
'dmesg' output
Comment 2 John Mock 2003-10-14 08:56:09 UTC
Created attachment 1057 [details]
.config for linux-2.6.0-test7-bk3
Comment 3 John Mock 2003-10-14 08:59:02 UTC
Created attachment 1058 [details]
/tmp/ioports2
Comment 4 John Mock 2003-10-14 10:27:34 UTC
Created attachment 1059 [details]
Possible patch to parport_pc.c

It may not be that the release code is at fault; it looks like maybe
parport_pc_probe_port() has tentatively claimed it, then forgotten to
release it after not needing it after all.
Comment 5 Zwane Mwaikambo 2003-11-12 22:35:08 UTC
Thanks for the bug report and the patch, it's currently in test9-mm2.

Note You need to log in before you can comment on or make changes to this bug.