This is an update for the Linux USB printer.c driver for USB-capable 2.2 and 2.4 kernel versions. It enables the HP OfficeJet Linux driver (http://hpoj.sourceforge.net) to work properly with as many USB models as possible (http://hpoj.sourceforge.net/suplist.shtml). To install without rebuilding your kernel or modules (suggested): 1. Edit the Makefile and change the definition of LINUX_DIR as needed to point to the Linux kernel source code on your system. 2. Run "make". 3. Log in as or su to root. 4. Run "ls -l" and make sure printer.o has user and group ownership as root. If not, run "chown root:root printer.o". 5. Run "make reload" to load the new version of printer.o. 6. Make a backup copy of the old version of printer.o under /lib/modules. IMPORTANT: Place the backup file in a directory *not* under the /lib/modules tree, such as in your home directory. Otherwise, the depmod command may cause the old version to be used with the "wrong" name. 7. Copy the new version of printer.o to the correct place under /lib/modules, so the new version will get re-loaded after subsequent reboots. 8. Run "depmod -a". To install before rebuilding your kernel and modules: 1. Make a backup copy of the old version of printer.c in /usr/src/linux<-kernel_version>/drivers/usb. 2. Copy the new version of printer.c into /usr/src/linux<-kernel_version>/drivers/usb. 3. Rebuild and re-install your kernel and/or kernel modules as appropriate, depending on whether "USB printer support" was configured to be modular (preferred) or monolithic. 4. Reboot and/or reload ("/sbin/rmmod printer ; /sbin/modprobe printer") the new "printer.o". NOTE: If you're using hpoj-0.8 (not hpoj-0.90 or later), then you must add the line "options printer proto_bias=3" to /etc/modules.conf (or /etc/conf.modules), and use the command "insmod printer proto_bias=3" instead of the plain "insmod" command. ====================================================================== This version of printer.c includes the following changes: - ioctls to enable the 0.90 version of ptal-mlcd (http://hpoj.sourceforge.net) to dynamically switch alternate settings and parallel-port-style channels. This allows ptal-mlcd to work over USB with HP PhotoSmart printers and some DeskJets (9xx, 12xx, cp1160, and some others), and it fixes the problem where ptal-mlcd was needed in order to be able to print to the LaserJet 1200 and 2200. See http://hpoj.sourceforge.net/doc/ioctl_requests.html for more information on these ioctls, not all of which are actually implemented yet. - A "proto_bias" parameter (thanks to Pete Zaitcev) that changes the default preferred interface from 7/1/2 to 7/1/3 or 7/1/1. NOTE: If you use this version of printer.c with the 0.8 (not 0.90 or later) version of ptal-mlcd, then you'll need to use this feature to set 7/1/3, as documented at "http://hpoj.sourceforge.net/todo.shtml". - Added MODULE_{INC,DEC}_USE_COUNT to prevent unloading printer.o while it's active, which causes OOPSes. (For the 2.2 backport only.) - Fixed buffer overflow in usblp_table when maximum number of connected printers was exceeded. - Various code cleanups, especially to consolidate duplicated code. - A backport to 2.2. Files in this directory: - README -- this file - Makefile -- the makefile I use so I don't have to rebuild the whole kernel - printer.c -- the hacked version of printer.c for 2.2 and 2.4 -- David Paschal (paschal@rcsis.com, david_paschal@hp.com)