Re: Linux USB file storage gadget with new UDC

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

 



On Wed, 22 May 2013, victor yeo wrote:

> I am able to solve the SCSI command timeout problem by adding a code
> to check the hardware register busy bit continuously, in
> kagen2_ep_queue():
> 
> do {
>   read_hardware_register_busy_bit
> } while (hardware_is_busy)

This is silly.  Drivers shouldn't poll in this way.  That's what 
interrupts are for.

> however, it causes the linux prompt to be non-responsive because the
> checking hardware register code is run continuously. If i add a
> schedule() to the do-while loop, the kagen2_ep_queue() will not be
> continued. How to go about fixing this dilemma?

I can't say much more without seeing the code.  However, you should not
need to wait for the hardware to do something -- instead the interrupt
handler routine should be called when the hardware is finished.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux