On Mon, 12 Jul 2010, Bob Copeland wrote: > Commit 0ede76fcec5415ef82a423a95120286895822e2d, "USB: remove uses of > URB_NO_SETUP_DMA_MAP" introduced a regression by inadvertantly removing > initialization of the transfer flags. This caused initialization > failures in the ums-karma driver. Fix the regression by zeroing it. > > While at it, as Alan Stern points out, the initializers for > actual_length and status are handled by the core and error_count > only matters for isochronous urbs, so they don't need to be set here. > Remove them. > > Signed-off-by: Bob Copeland <me@xxxxxxxxxxxxxxx> > --- > > Hey all, > > I didn't know who might take the patch so I CCed a few guesses. > It would be nice to get this in 2.6.35 or at least .35.x since it > is a regression in current mainline. > > There's also a one-liner bug fix only version at: > http://bobcopeland.com/kernel/wl/20100712/0001-usb-initialize-transfer-flags-in-usb-storage.patch > > drivers/usb/storage/transport.c | 4 +--- > 1 files changed, 1 insertions(+), 3 deletions(-) > > diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c > index 4471642..64ec073 100644 > --- a/drivers/usb/storage/transport.c > +++ b/drivers/usb/storage/transport.c > @@ -139,9 +139,7 @@ static int usb_stor_msg_common(struct us_data *us, int timeout) > > /* fill the common fields in the URB */ > us->current_urb->context = &urb_done; > - us->current_urb->actual_length = 0; > - us->current_urb->error_count = 0; > - us->current_urb->status = 0; > + us->current_urb->transfer_flags = 0; > > /* we assume that if transfer_buffer isn't us->iobuf then it > * hasn't been mapped for DMA. Yes, this is clunky, but it's Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> -- 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