Re: ISP1760 driver crashes

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alan Stern
Date: Thursday, November 20, 2008 - 8:28 am

On Thu, 20 Nov 2008, FUJITA Tomonori wrote:


Thomas, here's a patch to do what Tomonori suggests.  Try replacing the 
old patch with this one.

Alan Stern


Index: usb-2.6/drivers/usb/storage/scsiglue.c
===================================================================
--- usb-2.6.orig/drivers/usb/storage/scsiglue.c
+++ usb-2.6/drivers/usb/storage/scsiglue.c
@@ -129,6 +129,14 @@ static int slave_configure(struct scsi_d
 					      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. */

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: ISP1760 driver crashes, Alan Stern, (Wed Nov 19, 7:59 am)
Re: ISP1760 driver crashes, Jens Axboe, (Wed Nov 19, 8:00 am)
Re: ISP1760 driver crashes, Alan Stern, (Wed Nov 19, 8:36 am)
Re: ISP1760 driver crashes, Jens Axboe, (Wed Nov 19, 8:39 am)
RE: ISP1760 driver crashes, Hommel, Thomas (GE E ..., (Wed Nov 19, 8:59 am)
Re: ISP1760 driver crashes, Alan Stern, (Wed Nov 19, 9:33 am)
Re: ISP1760 driver crashes, Jens Axboe, (Wed Nov 19, 10:21 am)
Re: ISP1760 driver crashes, FUJITA Tomonori, (Wed Nov 19, 10:40 pm)
Re: ISP1760 driver crashes, Jens Axboe, (Thu Nov 20, 12:33 am)
Re: ISP1760 driver crashes, Alan Stern, (Thu Nov 20, 8:28 am)
Re: ISP1760 driver crashes, Jens Axboe, (Thu Nov 20, 10:50 am)
RE: ISP1760 driver crashes, Hommel, Thomas (GE E ..., (Fri Nov 21, 3:58 am)