From c60a81236c8130ddd17c4bc764fa01ffa7c75963 Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Fri, 21 Nov 2008 11:46:17 -0500 Subject: [PATCH] --- yaml --- r: 127243 b: refs/heads/master c: 96983d2d861bf94b7f70bc47ac3c5b289f519a2d h: refs/heads/master i: 127241: b5ec804d7be0fcc4ab113449b3efc44ddfd50bb3 127239: 7e1ca2f98f22345f07c7ee8280995d1541f67aac v: v3 --- [refs] | 2 +- trunk/drivers/usb/storage/scsiglue.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index bd0b7811b5c2..b6e726756654 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3dae5345311271fe598a61bd01f563fc835b4217 +refs/heads/master: 96983d2d861bf94b7f70bc47ac3c5b289f519a2d diff --git a/trunk/drivers/usb/storage/scsiglue.c b/trunk/drivers/usb/storage/scsiglue.c index 1b35e011a34f..e9d6c196a7ab 100644 --- a/trunk/drivers/usb/storage/scsiglue.c +++ b/trunk/drivers/usb/storage/scsiglue.c @@ -129,6 +129,14 @@ static int slave_configure(struct scsi_device *sdev) max_sectors); } + /* Some USB host controllers can't do DMA; they have to use PIO. + * They indicate this by setting their dma_mask to NULL. For + * such controllers we need to make sure the block layer sets + * up bounce buffers in addressable memory. + */ + if (!us->pusb_dev->bus->controller->dma_mask) + blk_queue_bounce_limit(sdev->request_queue, BLK_BOUNCE_HIGH); + /* We can't put these settings in slave_alloc() because that gets * called before the device type is known. Consequently these * settings can't be overridden via the scsi devinfo mechanism. */