Commit c520cb25 authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

[PATCH] USB Storage: Old patches (as129 and as141)

There's a couple of old patches floating around still that you might want
to apply.  I have reproduced them below.

as129 handles the situation where a command error causes us to do a device
reset, but the SCSI layer times out and aborts the command during the
reset delay.  It clears a flag that otherwise will prevent us from sending
the clear-halt messages following the reset.

as141 is the DMA buffer alignment patch.  You asked me to remind you about
it eventually.  There shouldn't be any harm at all in applying it without
waiting for the corresponding SCSI part of the patch to be applied.
Without that other part, this will essentially do nothing.

Alan Stern
parent 12477ec1
......@@ -65,6 +65,16 @@ static const char* host_info(struct Scsi_Host *host)
static int slave_configure (struct scsi_device *sdev)
{
/* Scatter-gather buffers (all but the last) must have a length
* divisible by the bulk maxpacket size. Otherwise a data packet
* would end up being short, causing a premature end to the data
* transfer. Since high-speed bulk pipes have a maxpacket size
* of 512, we'll use that as the scsi device queue's DMA alignment
* mask. Guaranteeing proper alignment of the first buffer will
* have the desired effect because, except at the beginning and
* the end, scatter-gather buffers follow page boundaries. */
blk_queue_dma_alignment(sdev->request_queue, (512 - 1));
/* this is to satisify the compiler, tho I don't think the
* return code is ever checked anywhere. */
return 0;
......
......@@ -1089,6 +1089,9 @@ static int usb_stor_reset_common(struct us_data *us,
return FAILED;
}
/* permit the clear-halt transfers to take place */
clear_bit(US_FLIDX_ABORTING, &us->flags);
US_DEBUGP("Soft reset: clearing bulk-in endpoint halt\n");
result = usb_stor_clear_halt(us, us->recv_bulk_pipe);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment