Hi All,
1.According to USB 2.0 specification, section 5.8.3, Bulk transfer
transaction ends when Packet data length is ..
1. Zero
2. less than wMaxPacketSize
3. Exactly equals to wMaxPacketSize
My doubt is what if last packet data length is exactly equals to
wMaxPacketSize? How will u distinguesh that between start of next transfer?
After sending last packet of length wMaxPacketSize will it send one more
packet of Zero length?
2. Can i allocate memory using kmalloc in call back function?
i am getting following masseges on doing that..
******************** in command_callback **********************
Urb->status = 0x0
Urb->actual_length = 0xc
before allocating memory
Debug: sleeping function called from invalid context at mm/slab.c:2126
in_atomic():1, irqs_disabled():0
[<c015e16f>] kmem_cache_alloc+0x3c/0x49
[<e02de5c9>] command_callback_fun+0xc8/0x2f1 [pdi_ps3_drv_scanner]
[<c02dc975>] usb_hcd_giveback_urb+0x24/0x66
[<e01b66c4>] ehci_urb_done+0xc6/0x2de [ehci_hcd]
[<e01b6a99>] qh_completions+0x1bd/0x429 [ehci_hcd]
[<c02effc4>] input_event+0xc4/0x3f2
[<c02eff31>] input_event+0x31/0x3f2
[<e01b7968>] scan_async+0x8d/0x129 [ehci_hcd]
[<e01bb847>] ehci_work+0x2b/0x9f [ehci_hcd]
[<e01bba16>] ehci_irq+0x15b/0x34a [ehci_hcd]
[<c02dc9d9>] usb_hcd_irq+0x22/0x52
[<c01524fd>] handle_IRQ_event+0x2e/0x5a
[<c01525ec>] __do_IRQ+0xc3/0x387
[<c0105de5>] do_IRQ+0x4a/0x87
=======================
[<c0103c76>] common_interrupt+0x1a/0x20
[<c012a06c>] __do_softirq+0x2c/0x8a
[<c0105ef6>] do_softirq+0x3e/0x42
=======================
[<c0105dec>] do_IRQ+0x51/0x87
[<c0103c76>] common_interrupt+0x1a/0x20
[<c0123947>] release_console_sem+0xa4/0x278
[<c0219ca8>] vscnprintf+0x14/0x21
[<c0123565>] vprintk+0x264/0x524
[<c02dbe54>] hcd_submit_urb+0x261/0x39e
[<c02dbbf3>] hcd_submit_urb+0x0/0x39e
[<c02dd4c1>] usb_submit_urb+0x1d8/0x23f
[<c01232fd>] printk+0x1b/0x1f
[<e02de48d>] write_command+0x100/0x143 [pdi_ps3_drv_scanner]
[<e02df06a>] scanner_ioctl+0x169/0xa24 [pdi_ps3_drv_scanner]
[<e02def01>] scanner_ioctl+0x0/0xa24 [pdi_ps3_drv_scanner]
[<c01958d1>] do_ioctl+0x51/0x55
[<c01959c7>] vfs_ioctl+0x50/0x1aa
[<c0195b7e>] sys_ioctl+0x5d/0x6b
[<c0103ab9>] syscall_call+0x7/0xb
after allocating memory
Thanks for ur inputs in adavance.
Savita
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel