question on skel_read func of usb_skeleton.c‏

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,
I'm reading latest usb_skeleton.c sample and compared with that with ldd3 book.
Looks like the skel_read changed a lot against previous version. Why we now not use usb_bulk_msg, just due to we want to get chance to cancel the urb if any unexpected exit?

Also in current skel_read function, I am a bit confused by the "retry" logic, why do we need this? Especially, when the var - available would equal to zero and makes the judegment if (!available)  true?

Another small quesiton is about :
                 /*
                 * if we are asked for more than we have,
                 * we start IO but don't wait
                 */
                if (available < count)
                        skel_do_read_io(dev, count - chunk); // <- why don't we judge the return value for this calling?

Appreciated if anyone can make me clear, thanks in adv. 		 	   		  ��.n��������+%������w��{.n�����{���)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux