On my Linux machine (Debian Wheezy), I tried to access the parallel port by request_region()
but it failed because the system had already loaded the kernel module parport
...
So, I rmmod
the modules lp
, ppdev
, parport_pc
and parport
. Then, I could successfully insert my module.
However, from the base address inb()
returned 0xff
, no matter what value was written.
Before rmmod
those module from kernel, I could wrote and read this register. Then I blacklisted those module from being loaded at system start up, and I could read and write these registers and my module also worked. It seems that the clearup
function of parport_pc
did something that made the hardware unusable. (At least the status of the port is not the same as it was before the module loaded).
My question is why, and what should I do to recover the port instead of reload parport_pc
?
Some driver mods have blocked your access to parallel port. Edit the /etc/modprobe.d/blacklist.conf file and add the following lines, then reboot your linux.
And if cups is installed, you should modify /etc/modules-load.d/cups-filters.conf:
Here is some details: https://stackoverflow.com/a/27423675/4350106