[PARPORT] uss720 usb->parport lowlevel driver


Thomas Sailer (sailer@ife.ee.ethz.ch)
Tue, 10 Aug 1999 15:07:01 +0200


Here are some bits that seem to have been lost in the merge.
Tim, any objections? Could you forward that to Linus if no
(I'm out of town for the rest of the week). The parport.h
bit is actually fairly important...

Then I'm getting oopsen in the generic parport code (2.3.13).
The program that oopses uses ppdev, and I get the oopses
mainly when I press ctrl-c.

I'm attaching two of them, once with parport_pc as lowlevel driver,
once with uss720.

Then I'm seeing another funny again, namely that this program
hangs when using ECP emulation, but only if _NOT_ straced.
If straced, everything is fine... strange.

Brad: Does your USS720 cable have a brand name? Mine doesn't :(

Tom

Unable to handle kernel NULL pointer dereference at virtual address 00000104
c0117548
*pde = 00000000
Oops: 0002
CPU: 0
EIP: 0010:[<c0117548>]
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010286
eax: c77ce3a0 ebx: c7cb91c0 ecx: c7cb923c edx: 00000100
esi: c73d3320 edi: c6f10780 ebp: bffffcdc esp: c6f25f34
ds: 0018 es: 0018 ss: 0018
Process eppfpga (pid: 711, stackpage=c6f25000)
Stack: c7cb91c0 c7cb9180 c80126b8 c73d3320 c7cb9180 00000001 c801ebeb c73d3320
       c7cb9200 c7114d40 c6f26c8c c0125fcb c6f26c8c c7114d40 c7114d40 c6f10780
       00000000 c0126005 c7114d40 c7114d40 c7114d40 c0124e9d c7114d40 c6f24000
Call Trace: [<c80126b8>] [<c801ebeb>] [<c0125fcb>] [<c0126005>] [<c0124e9d>] [<c0124f07>] [<c0124f24>]
       [<c0107910>]
Code: 89 42 04 68 20 f5 1e c0 8b 03 50 e8 f4 00 00 00 53 e8 36 9a

>>EIP; c0117548 <unregister_sysctl_table+14/30> <=====
Trace; c80126b8 <[parport]parport_unregister_device+c/a8>
Trace; c801ebeb <[parport]dec_parport_count+9063/c4c8>
Trace; c0125fcb <__fput+1f/48>
Trace; c0126005 <_fput+11/40>
Trace; c0124e9d <filp_close+5d/68>
Trace; c0124f07 <do_close+5f/70>
Trace; c0124f24 <sys_close+c/10>
Trace; c0107910 <system_call+34/38>
Code; c0117548 <unregister_sysctl_table+14/30>
00000000 <_EIP>:
Code; c0117548 <unregister_sysctl_table+14/30> <=====
   0: 89 42 04 movl %eax,0x4(%edx) <=====
Code; c011754b <unregister_sysctl_table+17/30>
   3: 68 20 f5 1e c0 pushl $0xc01ef520
Code; c0117550 <unregister_sysctl_table+1c/30>
   8: 8b 03 movl (%ebx),%eax
Code; c0117552 <unregister_sysctl_table+1e/30>
   a: 50 pushl %eax
Code; c0117553 <unregister_sysctl_table+1f/30>
   b: e8 f4 00 00 00 call 104 <_EIP+0x104> c011764c <unregister_proc_table+0/78>
Code; c0117558 <unregister_sysctl_table+24/30>
  10: 53 pushl %ebx
Code; c0117559 <unregister_sysctl_table+25/30>
  11: e8 36 9a 00 00 call 9a4c <_EIP+0x9a4c> c0120f94 <kfree+0/1bc>

Unable to handle kernel NULL pointer dereference at virtual address 00000104
c0117548
*pde = 00000000
Oops: 0002
CPU: 0
EIP: 0010:[<c0117548>]
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010286
eax: c7127240 ebx: c7127340 ecx: c71273fc edx: 00000100
esi: c7379160 edi: c6eef5a0 ebp: bffffcec esp: c7e49f34
ds: 0018 es: 0018 ss: 0018
Process eppfpga (pid: 648, stackpage=c7e49000)
Stack: c7127340 c7127300 c805c6b8 c7379160 c7127300 00000000 c806ebeb c7379160
       c71273c0 c710fda0 c6f257f4 c0125fcb c6f257f4 c710fda0 c710fda0 c6eef5a0
       00000000 c0126005 c710fda0 c710fda0 c710fda0 c0124e9d c710fda0 c7e48000
Call Trace: [<c805c6b8>] [<c806ebeb>] [<c0125fcb>] [<c0126005>] [<c0124e9d>] [<c0124f07>] [<c0124f24>]
       [<c0107910>]
Code: 89 42 04 68 20 f5 1e c0 8b 03 50 e8 f4 00 00 00 53 e8 36 9a

>>EIP; c0117548 <unregister_sysctl_table+14/30> <=====
Trace; c805c6b8 <[parport]parport_unregister_device+c/a8>
Trace; c806ebeb <ohci_device_operations+4bcb/????>
Trace; c0125fcb <__fput+1f/48>
Trace; c0126005 <_fput+11/40>
Trace; c0124e9d <filp_close+5d/68>
Trace; c0124f07 <do_close+5f/70>
Trace; c0124f24 <sys_close+c/10>
Trace; c0107910 <system_call+34/38>
Code; c0117548 <unregister_sysctl_table+14/30>
00000000 <_EIP>:
Code; c0117548 <unregister_sysctl_table+14/30> <=====
   0: 89 42 04 movl %eax,0x4(%edx) <=====
Code; c011754b <unregister_sysctl_table+17/30>
   3: 68 20 f5 1e c0 pushl $0xc01ef520
Code; c0117550 <unregister_sysctl_table+1c/30>
   8: 8b 03 movl (%ebx),%eax
Code; c0117552 <unregister_sysctl_table+1e/30>
   a: 50 pushl %eax
Code; c0117553 <unregister_sysctl_table+1f/30>
   b: e8 f4 00 00 00 call 104 <_EIP+0x104> c011764c <unregister_proc_table+0/78>
Code; c0117558 <unregister_sysctl_table+24/30>
  10: 53 pushl %ebx
Code; c0117559 <unregister_sysctl_table+25/30>
  11: e8 36 9a 00 00 call 9a4c <_EIP+0x9a4c> c0120f94 <kfree+0/1bc>

--- include/linux/parport.h 1999/08/10 10:50:11 1.1
+++ include/linux/parport.h 1999/08/10 12:01:07
@@ -491,7 +491,8 @@
 extern void inc_parport_count(void);
 
 /* If PC hardware is the only type supported, we can optimise a bit. */
-#if (defined(CONFIG_PARPORT_PC) || defined(CONFIG_PARPORT_PC_MODULE)) && !(defined(CONFIG_PARPORT_AX) || defined(CONFIG_PARPORT_AX_MODULE)) && !(defined(CONFIG_PARPORT_ARC) || defined(CONFIG_PARPORT_ARC_MODULE)) && !(defined(CONFIG_PARPORT_AMIGA) || defined(CONFIG_PARPORT_AMIGA_MODULE)) && !(defined(CONFIG_PARPORT_MFC3) || defined(CONFIG_PARPORT_MFC3_MODULE)) && !(defined(CONFIG_PARPORT_ATARI) || defined(CONFIG_PARPORT_ATARI_MODULE)) && !defined(CONFIG_PARPORT_OTHER) && !(defined(CONFIG_USB_USS720) || defined(CONFIG_USB_USS720_MODULE))
+#if (defined(CONFIG_PARPORT_PC) || defined(CONFIG_PARPORT_PC_MODULE)) && !(defined(CONFIG_PARPORT_AX) || defined(CONFIG_PARPORT_AX_MODULE)) && !(defined(CONFIG_PARPORT_ARC) || defined(CONFIG_PARPORT_ARC_MODULE)) && !(defined(CONFIG_PARPORT_AMIGA) || defined(CONFIG_PARPORT_AMIGA_MODULE)) && !(defined(CONFIG_PARPORT_MFC3) || defined(CONFIG_PARPORT_MFC3_MODULE)) && !(defined(CONFIG_PARPORT_ATARI) || defined(CONFIG_PARPORT_ATARI_MODULE)) && !defined(CONFIG_PARPORT_OTHER) && !(defined(CONFIG_USB_USS720) || defined(CONFIG_USB_USS720_MODULE)) && !defined(CONFIG_PARPORT_OTHER) && !(defined(CONFIG_USB_USS720) || defined(CONFIG_USB_USS720_MODULE))
+
 #undef PARPORT_NEED_GENERIC_OPS
 #include <linux/parport_pc.h>
 #define parport_write_data(p,x) parport_pc_write_data(p,x)
--- drivers/usb/uss720.c 1999/08/10 11:24:39 0.2
+++ drivers/usb/uss720.c 1999/08/10 11:56:19
@@ -29,6 +29,7 @@
  * usb_request_irq crashes somewhere within ohci.c
  * for no apparent reason (that is for me, anyway)
  * ECP currently untested
+ * 0.3 10.08.99 fixing merge errors
  *
  */
 
@@ -187,10 +188,6 @@
  * Access functions.
  */
 
-static void parport_uss720_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
-}
-
 static int uss720_irq(int usbstatus, void *buffer, int len, void *dev_id)
 {
         struct parport *pp = (struct parport *)dev_id;
@@ -653,16 +650,13 @@
 
 /* --------------------------------------------------------------------- */
 
-#define __exit
-#define module_exit(x) void cleanup_module(void) { x(); }
-#define module_init(x) int init_module(void) { return x(); }
-
-/* --------------------------------------------------------------------- */
+MODULE_AUTHOR("Thomas M. Sailer, sailer@ife.ee.ethz.ch");
+MODULE_DESCRIPTION("USB Parport Cable driver for Cables using the Lucent Technologies USS720 Chip");
 
 static int __init uss720_init(void)
 {
         usb_register(&uss720_driver);
- printk(KERN_INFO "uss720: USB<->IEEE1284 cable driver v0.2 registered.\n"
+ printk(KERN_INFO "uss720: USB<->IEEE1284 cable driver v0.3 registered.\n"
                KERN_INFO "uss720: (C) 1999 by Thomas Sailer, <sailer@ife.ee.ethz.ch>\n");
         return 0;
 }
--- Documentation/Configure.help 1999/08/10 13:00:08 1.1
+++ Documentation/Configure.help 1999/08/10 13:06:33
@@ -11968,10 +11968,29 @@
   mknod /dev/ttyACM2 c 166 2
   mknod /dev/ttyACM3 c 166 3
 
+USB Printer Device Class support (Preliminary)
+CONFIG_USB_PRINTER
+ This is a generic driver for USB printers.
+
 USS720 parport driver
 CONFIG_USB_USS720
- This driver is for USB parallel port adapters that use the USS-720
- chip.
+ This driver is for USB parallel port adapters that use the
+ Lucent Technologies USS-720 chip.
+
+ The chip has two modes: automatic mode and manual mode.
+ In automatic mode, it looks like a standard USB printer. Only
+ Printers may be connected to the USS-720 in this mode.
+ The generic USB printer driver (CONFIG_USB_PRINTER, above)
+ may be used in that mode.
+
+ Manual mode is not limited to printers, any parallel port
+ device should work. This driver utilizes manual mode.
+ Note however that some operations are three orders of a magnitude
+ slower than on a PCI/ISA Parallel Port, so timing critical
+ applications might not work.
+
+ Say Y or M if you own an USS-720 USB->Parport cable and
+ intend to connect anything other than a printer to it.
 
 USB /proc filesystem entry support (Preliminary)
 CONFIG_USB_PROC

-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --



This archive was generated by hypermail 2.0b3 on Tue 10 Aug 1999 - 09:14:23 EDT