]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.39 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 30 May 2011 00:27:34 +0000 (08:27 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 30 May 2011 00:27:34 +0000 (08:27 +0800)
queue-2.6.39/sata-enable-non-queueable-flush-flag.patch [new file with mode: 0644]
queue-2.6.39/series

diff --git a/queue-2.6.39/sata-enable-non-queueable-flush-flag.patch b/queue-2.6.39/sata-enable-non-queueable-flush-flag.patch
new file mode 100644 (file)
index 0000000..5876fe6
--- /dev/null
@@ -0,0 +1,70 @@
+From 900e599eb0c16390ff671652a44e0ea90532220e Mon Sep 17 00:00:00 2001
+From: "shaohua.li@intel.com" <shaohua.li@intel.com>
+Date: Fri, 6 May 2011 11:35:31 -0600
+Subject: SATA: enable non-queueable flush flag
+
+From: "shaohua.li@intel.com" <shaohua.li@intel.com>
+
+commit 900e599eb0c16390ff671652a44e0ea90532220e upstream.
+
+Enable non-queueable flush flag for SATA.
+
+Stable: 2.6.39 only
+
+Signed-off-by: Shaohua Li <shaohua.li@intel.com>
+Acked-by: Tejun Heo <tj@kernel.org>
+Acked-by: Jeff Garzik <jgarzik@redhat.com>
+Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/ata/libata-scsi.c |   13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+--- a/drivers/ata/libata-scsi.c
++++ b/drivers/ata/libata-scsi.c
+@@ -1089,21 +1089,21 @@ static int atapi_drain_needed(struct req
+ static int ata_scsi_dev_config(struct scsi_device *sdev,
+                              struct ata_device *dev)
+ {
++      struct request_queue *q = sdev->request_queue;
++
+       if (!ata_id_has_unload(dev->id))
+               dev->flags |= ATA_DFLAG_NO_UNLOAD;
+       /* configure max sectors */
+-      blk_queue_max_hw_sectors(sdev->request_queue, dev->max_sectors);
++      blk_queue_max_hw_sectors(q, dev->max_sectors);
+       if (dev->class == ATA_DEV_ATAPI) {
+-              struct request_queue *q = sdev->request_queue;
+               void *buf;
+               sdev->sector_size = ATA_SECT_SIZE;
+               /* set DMA padding */
+-              blk_queue_update_dma_pad(sdev->request_queue,
+-                                       ATA_DMA_PAD_SZ - 1);
++              blk_queue_update_dma_pad(q, ATA_DMA_PAD_SZ - 1);
+               /* configure draining */
+               buf = kmalloc(ATAPI_MAX_DRAIN, q->bounce_gfp | GFP_KERNEL);
+@@ -1131,8 +1131,7 @@ static int ata_scsi_dev_config(struct sc
+                       "sector_size=%u > PAGE_SIZE, PIO may malfunction\n",
+                       sdev->sector_size);
+-      blk_queue_update_dma_alignment(sdev->request_queue,
+-                                     sdev->sector_size - 1);
++      blk_queue_update_dma_alignment(q, sdev->sector_size - 1);
+       if (dev->flags & ATA_DFLAG_AN)
+               set_bit(SDEV_EVT_MEDIA_CHANGE, sdev->supported_events);
+@@ -1145,6 +1144,8 @@ static int ata_scsi_dev_config(struct sc
+               scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, depth);
+       }
++      blk_queue_flush_queueable(q, false);
++
+       dev->sdev = sdev;
+       return 0;
+ }
index 47ccaa28abf9e1d554656df91365acc000d4bb68..876ae1d924a5734112e29c616b940f8d1e2b9054 100644 (file)
@@ -30,3 +30,4 @@ block-always-allocate-genhd-ev-if-check_events-is.patch
 mtd-mtdconcat-fix-nand-oob-write.patch
 mtd-return-badblockbits-back.patch
 mtd-omap-fix-subpage-ecc-issue-with-prefetch.patch
+sata-enable-non-queueable-flush-flag.patch