Имя пользователя:
Пароль:
 

Название темы: FreeBSD6.1 и Canon LBP 1120 (usb)
Показать сообщение отдельно

Аватара для ruslandh

info man howto


Сообщения: 6960
Благодарности: 385

Профиль | Сайт | Отправить PM | Цитировать


Цитата:
I want to print on my printer Canon LBP-1120 in FreeBSD.
I try to use these driver: http://www.boichat.ch/nicolas/capt/ I change only
/dev/usb/lp0 to /dev/ulpt0 in sources. But I have noticed, that the program
hangs at function read() when try to read from this device. The Same occurs if
execute this: cat /dev/ulpt0 It is impossible to kill this process.
I think, that it is a bug in the ulpt driver. It seems, that the variable <flags>
is incorrectly initialized in the function ulptopen()
The following occurs: In /usr/src/sys/dev/usb/ulpt.c function lptopen() started
read callout and function ulpt_tick() try to use busy sc->sc_in_xfer
With this patch this driver works. It is possible to print small documents.
Нелитературный, вольный перевод :
Цитата:
Я могу печатать на моём принтере в FreeBSD
Возьмите драйвер отсюда http:http://www.boichat.ch/nicolas/capt/
Я изменил только в исходниках /dev/usb/lp0 на /dev/ulpt0
Некоторые проблемы с командой cat /dev/ulpt0, т.к. этот процесс неубиваем
Я думаю, что значение <flags> некорректно в файле /usr/src/sys/dev/usb/ulpt.c
функции lptopen() и в функции ulpt_tick() надо использовать sc->sc_in_xfer
С этими изменениями драйвер рабочий. Он позволяет печатать маленькие документы
Патч
Код: Выделить весь код
--- ulpt.c.orig Sun Jan 30 04:00:10 2005
+++ ulpt.c      Sat Nov  5 06:12:57 2005
@@ -600,7 +600,7 @@
                }

                /* If it's not opened for read the set up a reader. */
-               if (!(flags & FREAD)) {
+               if (!(flag & FREAD)) {
                        DPRINTF(("ulpt_open: start read callout\n"));
                        usb_callout_init(sc->sc_read_callout);
                        usb_callout(sc->sc_read_callout, hz/5, ulpt_tick, sc);

-------
Поспешай не торопясь


Отправлено: 23:21, 12-03-2007 | #28

Название темы: FreeBSD6.1 и Canon LBP 1120 (usb)