RE: [RFT v2] xHCI: cancel command queued in the command ring

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

 



> -----Original Message-----
> From: Elric Fu [mailto:elricfu1@xxxxxxxxx]
> Sent: Thursday, March 29, 2012 5:13 PM
> To: Sarah Sharp
> Cc: Xu, Andiry; Elric Fu; linux-usb@xxxxxxxxxxxxxxx
> Subject: [RFT v2] xHCI: cancel command queued in the command ring
> 
> Software have to abort command ring and cancel command
> when a command is failed or hang. Otherwise, the command
> ring will hang up and can't handle the others. An example
> of a command that may hang is the Address Device Command,
> because waiting for a SET_ADDRESS request to be acknowledged
> by a USB device is outside of the xHC's ability to control.
> 
> According to xHCI spec section 4.6.1.1 and section 4.6.1.2,
> after aborting a command on the command ring, xHC will
> generate a command completion event with its completion code
> set to Command Ring Stopped at least. If a command is
> currently executing at the time of aborting a command, xHC
> also generate a command completion event with its completion
> code set to Command Abort. When the command ring is stopped,
> software may remove, add, or rearrage Command Descriptors.
> 
> The RFT patch is used to cancel command when the above
> situation occur.
> 
> To cancel a command, software will initialize a command
> descriptor for the cancel command, and add it into a
> cancel_cmd_list of xhci. When the command ring is stopped,
> software will find the command trbs described by command
> descriptors in cancel_cmd_list and modify it to No Op
> command. If software can't find the matched trbs, we can
> think it had been finished.
> 
> Signed-off-by: Elric Fu <elricfu1@xxxxxxxxx>
> Acked-by: Andiry Xu <Andiry.Xu@xxxxxxx>

I've NOT acked this patch, just provided some comments for
the last version. Please remove this line.

Thanks,
Andiry


--
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