RE: [PATCH 26/37] xhci: use the trb_to_noop() helper for command trbs

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

 



From: Mathias Nyman
> Sent: 20 January 2017 14:47
> Remove duplicate code by using trb_to_noop() when
> handling Aborted commads
                       ^n

...
>  		xhci_dbg(xhci, "Turn aborted command %p to no-op\n",
>  			 i_cmd->command_trb);
> -		/* get cycle state from the original cmd trb */
> -		cycle_state = le32_to_cpu(
> -			i_cmd->command_trb->generic.field[3]) &	TRB_CYCLE;
> -		/* modify the command trb to no-op command */
> -		i_cmd->command_trb->generic.field[0] = 0;
> -		i_cmd->command_trb->generic.field[1] = 0;
> -		i_cmd->command_trb->generic.field[2] = 0;
> -		i_cmd->command_trb->generic.field[3] = cpu_to_le32(
> -			TRB_TYPE(TRB_CMD_NOOP) | cycle_state);
> +
> +		trb_to_noop(i_cmd->command_trb, TRB_CMD_NOOP);

I was thinking you could move the trace inside trb_to_noop() by
adding a parameter "aborted command".

	David

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