Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93336
b: refs/heads/master
c: 148d9fe
h: refs/heads/master
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Apr 25, 2008
1 parent b729ace commit 16d1029
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cc901bbb2e2a4e4f96da3d70dae332882c10054b
refs/heads/master: 148d9fe4c91a6356dae1b05b76b8133586c26be4
14 changes: 8 additions & 6 deletions trunk/drivers/usb/storage/scsiglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ static const char* host_info(struct Scsi_Host *host)
static int slave_alloc (struct scsi_device *sdev)
{
struct us_data *us = host_to_us(sdev->host);
struct usb_host_endpoint *bulk_in_ep;

/*
* Set the INQUIRY transfer length to 36. We don't use any of
Expand All @@ -84,12 +85,13 @@ static int slave_alloc (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_update_dma_alignment(sdev->request_queue, (512 - 1));
* transfer. We'll use the maxpacket value of the bulk-IN pipe
* to set the SCSI device queue's DMA alignment mask.
*/
bulk_in_ep = us->pusb_dev->ep_in[usb_pipeendpoint(us->recv_bulk_pipe)];
blk_queue_update_dma_alignment(sdev->request_queue,
le16_to_cpu(bulk_in_ep->desc.wMaxPacketSize) - 1);
/* wMaxPacketSize must be a power of 2 */

/*
* The UFI spec treates the Peripheral Qualifier bits in an
Expand Down

0 comments on commit 16d1029

Please sign in to comment.