Re: [PATCH] xhci: Stop last TRB being a LINK TRB

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

 



On Fri, Jan 17, 2014 at 01:27:01PM +0000, David Laight wrote:
> At least some hardware (eg ASMedia PCIe cards) don't like processing a LINK
> TRB and then finding that the 'cycle' bit on the next TRB is 'unset'.

As I mentioned, this patch is much too big to be backported to the
stable trees.  You need to break it up into the very minimal amount of
code necessary to fix the ASMedia bug, and then clean up patches on top
of that.  The clean up patches can be queued for just the current kernel
version.

So, please try to turn this into a series of patches.  I would suggest:

1. A minimal patch to ensure a link TRB isn't given over to hardware
until after the TD it points to is.  Your original patch seemed like the
right size and complexity for that small fix.

2. A patch that removes the unused cleanup code at the end of
xhci_queue_isoc_tx().  If it is unused as you claim, it does not need to
be part of the minimal bug fix patch, since the code will never be run.

3. A patch to remove the 'flip_cycle' parameter to td_to_noop(), since
the only code that used it was in xhci_queue_isoc_tx().

4. Make any simplifications of the cycle handover code.  Do not include
simplifications in the minimal patch.  Please break the simplifications
up into easily-readable chunks.

5. Trace short reads only when they're unexpected.

I know you've been trying to push some of these cleanups in previous
patches, but it's not generally a good idea to push both cleanups and
bug fixes into stable.  I've been bitten on that in the past, with a
simple bug fix and arithmetic shortcut combined in one patch causing
four different stable kernels to fail, and a big mess to fix all of
them.

Please break up these changes into separate commits.  It's too hard to
review and catch bugs with this large of a change.

> -	if (trb_comp_code == COMP_SHORT_TX)
> +	if (*status == -EREMOTEIO)

This is an unrelated change not described in your patch description.
Please remove it from the bug fix patch, and create a separate patch
describing why you think it's necessary.

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