USB gadget printer not working in windows Xp
Sandeep G.R
grsandeep85 at gmail.com
Mon Jun 14 12:26:41 UTC 2010
Hi Craig,
I am not able to patch the g_printer_0.2.0-210607.patch
to the kernel its giving some error as
/sdk/ltib/rpm/BUILD/linux-2.6.31$ patch -p1 < ../g_printer_0.2.0-210607.patch
The next patch would create the file Documentation/usb/gadget_printer.txt,
which already exists! Assume -R? [n] y
patching file Documentation/usb/gadget_printer.txt
Hunk #1 FAILED at 1.
File Documentation/usb/gadget_printer.txt is not empty after patch, as expected
1 out of 1 hunk FAILED -- saving rejects to file
Documentation/usb/gadget_printer.txt.rej
patching file drivers/usb/gadget/Kconfig
Hunk #1 succeeded at 508 with fuzz 2 (offset 68 lines).
patching file drivers/usb/gadget/Makefile
Hunk #1 FAILED at 20.
Hunk #2 FAILED at 32.
2 out of 2 hunks FAILED -- saving rejects to file
drivers/usb/gadget/Makefile.rej
The next patch would create the file drivers/usb/gadget/printer.c,
which already exists! Assume -R? [n] y
patching file drivers/usb/gadget/printer.c
Hunk #1 FAILED at 1.
File drivers/usb/gadget/printer.c is not empty after patch, as expected
1 out of 1 hunk FAILED -- saving rejects to file
drivers/usb/gadget/printer.c.rej
/sdk/ltib/rpm/BUILD/linux-2.6.31$
also i saw your patch that you have included the header
<linux/usb_gadget.h> for the functions usb_ep_alloc_buffer() and
usb_ep_free_buffer which i could not found in the linux-2.6 kernel
source tree and also in your patch
dev->pdev = device_create( usb_gadget_class, NULL, g_printer_devno,
+ "g_printer");
we need to pass one more argument as NULL.
I am able to load and run the driver g_printer.ko in linux host using
the application(docmentation/usb/gadger printer.txt) i am able to
print from printer, but when i connect the usb otg cable to windows
Xphost it will detect as linux g_printer and if i run the application
to send the print data from windows Xp host the driver will get
crashed and shows the log in the target board(please find the
attachment).
How do i overcome this?? i will be waiting for your positive response with new
patch. If i am wrong anywhere suggest me.
On Thu, Jun 10, 2010 at 8:25 PM, Craig Nadler <craig at nadler.us> wrote:
> Sandeep,
>
> Have you applied the latest patch for the printer gadget driver? You can
> find the patch at: http://nadler.us/src/g_printer_0.2.0-210607.patch . The
> patch may need some porting for your kernel version. If I ever get some
> free time I'll try to update the patch and submit it.
>
> Best Regards,
>
> Craig Nadler
>
>
>
>> Hi,
>>
>> I have ported linux-2.6.31 to ARM9(iMX25) board and i have loaded
>> the
>> usb gadget printer driver (g_printer.ko) when i connect the target board
>> to
>> linux host it will detect as usblp0 at the same time if i connect to the
>> winows Xp host it will detect but it will not work when i try to read data
>> from windows host. I saw some linux.inf file for gadget ehternet for
>> windows
>> Xp but not for gadget printer. How to resolve this issue.
>>
>> --
>> Thanks & Regards,
>> SANDEEP G R,
>>
>
>
--
Thanks & Regards,
SANDEEP G R,
--
Thanks & Regards,
SANDEEP G R,
-------------- next part --------------
root at freescale ~$ ./gprint -read_data
gprint.c: poll(fd, 1, 1000)
gprint.c: poll(fd, 1, 1000)
gprint.c: poll(fd, 1, 1000)
gprint.c: poll(fd, 1, 1000)
gprint.c: poll(fd, 1, 1000)
gprint.c: poll(fd, 1, 1000)
gprint.c: poll(fd, 1, 1000)
gprint.c: poll(fd, 1, 1000)
gprint.c: poll(fd, 1, 1000)
gprint.c: poll(fd, 1, 1000)
gprint.c: poll(fd, 1, 1000)
Unable to handle kernel NULL pointer dereference at virtual address 00000002
pgd = c315c000
[00000002] *pgd=83b5e031, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1] PREEMPT
Modules linked in: g_printer arcotg_udc fsl_otg_arc
CPU: 0 Not tainted (2.6.31-203-gee1fdae #1)
PC is at fsl_ep_queue+0x24/0x510 [arcotg_udc]
LR is at setup_rx_reqs+0x48/0xa0 [g_printer]
pc : [<bf00af5c>] lr : [<bf0140ac>] psr: a0000093
sp : c3187b70 ip : c381bc80 fp : c3186000
r10: 00000000 r9 : 00000000 r8 : c3b33540
r7 : c3b97880 r6 : bf017ec8 r5 : bf017eac r4 : c3067c00
r3 : c30e4000 r2 : 00000020 r1 : 00000000 r0 : c3b97880
Flags: NzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user
Control: 0005317f Table: 8315c000 DAC: 00000015
Process gprint (pid: 4546, stack limit = 0xc3186270)
Stack: (0xc3187b70 to 0xc3188000)
7b60: 3b172c61 00002c64 3b07ea29 c3067c18
7b80: bf017eac bf017ec8 c3187e50 c3b33540 00000000 00000000 c3186000 bf0140ac
7ba0: 60000013 bf017eac 00000000 bf014a94 c3187e58 00000000 c3b33540 c3187e50
7bc0: c3187f88 c00c49c0 c03056ee be903c0c 3b07ea29 00002c64 c38d1188 c3187e60
7be0: 000f4238 00000000 c3187f50 00000001 c38546b0 c00c5660 00000059 00000000
7c00: c3854680 00000000 00000000 00000002 c3b33540 00000059 00000000 c3187bf4
7c20: c00c5758 bf017ee0 bf017ee0 bf017ee0 c3b33540 00000059 00000000 c3187bf4
7c40: c00c5758 bf017ef8 bf017ef8 bf017ef8 c3187ddc ffffffff 0000001a 00000014
7c60: 0000000e 00000007 00000001 c3187e30 00000001 c3187ddc c040705c c3187c9c
7c80: c3187ddc c040705c c3187c9c c3187e4e 1cc01cc0 c018e28c c3187cd0 00000000
7ca0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
7cc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
7ce0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
7d00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
7d20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
7d40: 00000000 00000000 c0418f98 c0418f74 e2965180 00000a55 00000000 00000000
7d60: 00000000 00000000 c3854680 c3854680 c03f8b18 00000000 00000000 00000001
7d80: c3187dac c3187d90 c0042114 c0040058 00000000 00000001 c3854680 c03f8b18
7da0: c3187ddc c3187db0 c0040d70 c0042100 c3186000 80000093 c0418f74 c3187ef4
7dc0: c3aa3cd4 00000001 00000000 c3aa3ce0 c3187e0c c3187de0 c003b888 c0040c38
7de0: 00000001 60000013 c3186000 00000103 00000001 c0421690 00000005 00000014
7e00: c3187e2c c3187e10 c003f7bc c003b858 00000004 00000201 00000002 00000000
7e20: 0000000a c3187e30 c004aeac c003f78c 0000002d c004a6a0 c3186000 c03fbcac
7e40: c3186000 0000002d 00000000 002d0000 00000000 00000001 00000003 00000041
7e60: c004b304 c003b960 00000002 c0027070 c3187eac ffffffff fc400000 c0027a08
7e80: 00000000 00002201 60000013 c3a0f050 a0000013 00000000 c03973d6 c01a779c
7ea0: c3bc701b c01a7d38 00000000 c01a9a04 c3aa3c00 00000fff c3aa3f80 00000001
7ec0: c3186000 00002201 a0000013 c3aa3c00 c3bc701c 00000000 c3186000 60000013
7ee0: c3187f30 c3aa3c00 c3186000 4001e000 c38984c0 00000000 c3187f24 c3187f08
7f00: c003f7bc c003b858 00000004 c0049a4c 00002c62 c0196be0 0000001c c3187f30
7f20: c3aa3c00 c0190e50 c0193900 c3187f88 00002c63 3b07ea29 00002c64 3b07ea29
7f40: 00000000 c3187f88 00000001 c00c46b4 3b07ea29 00002c64 00000000 00000000
7f60: 00002c64 00000001 000003e8 00000001 be903c0c c3187f88 c3186000 40138000
7f80: be903c3c c00c4bd8 00002c64 3b07ea29 00000001 be903c0c 00008718 000000a8
7fa0: c0027f24 c0027da0 00000001 be903c0c be903c0c 00000001 000003e8 00000000
7fc0: 00000001 be903c0c 00008718 000000a8 00000000 00000000 40138000 be903c3c
7fe0: 00012120 be9037b8 00008a70 400d683c 60000010 be903c0c 00000000 00000000
[<bf00af5c>] (fsl_ep_queue+0x24/0x510 [arcotg_udc]) from [<bf0140ac>] (setup_rx_reqs+0x48/0xa0 [g_printer])
[<bf0140ac>] (setup_rx_reqs+0x48/0xa0 [g_printer]) from [<bf014a94>] (printer_poll+0x44/0x150 [g_printer])
[<bf014a94>] (printer_poll+0x44/0x150 [g_printer]) from [<c00c49c0>] (do_sys_poll+0x1f4/0x3ac)
[<c00c49c0>] (do_sys_poll+0x1f4/0x3ac) from [<c00c4bd8>] (sys_poll+0x60/0xc4)
[<c00c4bd8>] (sys_poll+0x60/0xc4) from [<c0027da0>] (ret_fast_syscall+0x0/0x2c)
Code: e5943000 e3530000 0a000130 e5901028 (e5d13002)
---[ end trace 0e7f4e8986c12b5c ]---
note: gprint[4546] exited with preempt_count 2
BUG: scheduling while atomic: gprint/4546/0x40000003
Modules linked in: g_printer arcotg_udc fsl_otg_arc
[<c002c528>] (unwind_backtrace+0x0/0xd4) from [<c02f2648>] (schedule+0x70/0x3f0)
Segmentation fault
root at freescale ~$
More information about the devel
mailing list