Linux kernel module patch for Prolific PL-2303X USB-serial adapter
The following patch modifies the driver for the Prolific PL-2303
USB-serial adapter to add support for the highly similar but
incompatible PL-2303X adapter. The PL-2303X has the same vendor ID and
product ID as the older PL-2303, which means that it will be
incorrectly detected as a PL-2303 by the driver currently in the Linux
kernel. Attempting to use a PL-2303X as a PL-2303 simply results in an
inability to transfer data through the serial port. In other words,
nothing happens. This patch autodetects whether a PL-2303 or a PL-2303X
is used and changes the initialisation sequence accordingly.
The PL-2303X can be distinguished from a PL-2303 by checking bMaxPacketSize0
for the device
using lsusb -v -d 067b:2303 (as root). If bMaxPacketSize0
is 64, you probably have a PL-2303X and need this patch.
This patch has been written for and tested on the current SuSE 9.1
kernel
(2.6.5-7.111.19-default) on i686. It is also reported to work on kernel
version 2.4.28.
To apply the patch, execute patch -u drivers/usb/serial/pl2303.c
pl2303x.patch in your Linux source root directory.
Download the patch (3 KB)
See instructions below to compile and install.
Download precompiled kernel module for SuSE 9.1
kernel
2.6.5-7.111.19-default (21 KB)
Copy to /lib/modules/`uname
-r`/kernel/drivers/usb/serial/ to install. This precompiled
module will probably not work on any other kernel than the version it
was compiled for.
Download precompiled kernel module for
SuSE 9.1
kernel
2.6.4-52-default (22 KB) (supplied by Raghu Sunderam)
Copy to /lib/modules/`uname
-r`/kernel/drivers/usb/serial/pl2303.ko to install. This
precompiled
module will probably not work on any other kernel than the version it
was compiled for.
This patch has only been tested on a few machines; use it at your own
risk. I take no responsibility for any damage caused by this patch, and
so on.
The main kernel tree includes PL-2303X support starting from 2.6.8 (I
can confirm that PL-2303X works on 2.6.11rc2 without my patch), making
this patch unnecessary.
Detailed patch installation instructions (SuSE 9.1)
The following instructions assume that you are using the default kernel
provided by SuSE. Users of other SuSE kernel packages should substitute
their kernel package name instead of kernel-default.
- Ensure that the kernel package and the kernel source package for
the currently running kernel are installed. Install (e.g. using YaST)
and reboot as needed. The commands
uname -r, rpm
-q kernel-source and rpm -q kernel-default should
all return the same version number.
- Ensure that packages
make, patch and gcc
are installed.
- Install the patch (all the following are performed as
root):
cd /usr/src/linux
patch -u drivers/usb/serial/pl2303.c (directory
containing patch file)/pl2303x.patch
- Recompile the modules.
make cloneconfig
make modules_prepare (kernel version 2.6.5-7.75
and later only)
cd drivers/usb/serial/
make -C /usr/src/linux M=$(pwd)
- Install the recompiled PL-2303X module.
- If the old PL-2303 module is still loaded, unload it:
rmmod
pl2303
cp pl2303.ko /lib/modules/`uname
-r`/kernel/drivers/usb/serial/
- The kernel module should be automatically loaded by
hotplug
when a PL-2303X is connected.
Red Hat drivers
These drivers (17 KB) (apparently from
Prolific) were provided by Alex K.
They seem to be for Red Hat 7.3, 8 and 9. I have not tested these
drivers; I am merely mirroring them as I can't find them elsewhere on
the Net. Use them at your own risk.
Jan Lönnberg Web Site
Page last updated by Jan
Lönnberg 2005-01-23.