The best way to make PLIP and LP live together is to use kernel modules: you can load plip.o and unload it when you need to print or vice versa. If you do really need to use both PLIP and LP, try the following patches.
If for some reason you wish PLIP and LP supported directly by the kernel, you can try these patches.
You must modify the following pieces of code, but backup the files before:
******** modifications to linux/drivers/char/lp.c *********************** struct lp_struct lp_table[] = { { 0x3bc, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, }, /* { 0x378, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, }, { 0x278, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, }, */ }; #define LP_NO 1 ******** modifications to linux/drivers/net/Space.c ******************** #if defined(PLIP) || defined(CONFIG_PLIP) extern int plip_init(struct device *); static struct device plip2_dev = { "plip2", 0, 0, 0, 0, 0x278, 2, 0, 0, 0, NEXT_DEV, plip_init, }; static struct device plip1_dev = { "plip1", 0, 0, 0, 0, 0x378, 7, 0, 0, 0, &plip2_dev, plip_init, }; /* static struct device plip0_dev = { "plip0", 0, 0, 0, 0, 0x3BC, 5, 0, 0, 0, &plip1_dev, plip_init, }; */ # undef NEXT_DEV # define NEXT_DEV (&plip1_dev) #endif /* PLIP */
Of course there is the standard disclaimer: I received these patches and I put them "as I got them". This means that you try them at your own risk. Anyway, your biggest trouble should be only restore the original files and recompile.
If you have at least 2 parallel ports you can try these patches, that should allow you to use PLIP on a port and LP on the other.
struct lp_struct lp_table[] = { { 0x3bc, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, }, { 0x378, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, }, /* { 0x278, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, }, */ }; 3 -> 2
PLIP (parallel port) support (CONFIG_PLIP) [n] y
Parallel Printer support [y] y
lp1 at 0x0378, using polling driver
.....
NET3 PLIP version 2.0 [email protected]
plip2: Parallel port at 0x278, using assigned IRQ 5.
Again the standard disclaimer, like section 8.1.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |