diff mbox

[v2,3/3] SATA: enable non-queueable flush flag

Message ID 20110504082115.488846050@sli10-conroe.sh.intel.com
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Shaohua Li May 4, 2011, 8:17 a.m. UTC
Enable non-queueable flush flag for SATA.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
---
 drivers/ata/libata-scsi.c |    2 ++
 1 file changed, 2 insertions(+)


--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Tejun Heo May 4, 2011, 8:53 a.m. UTC | #1
On Wed, May 04, 2011 at 04:17:28PM +0800, shaohua.li@intel.com wrote:
> Enable non-queueable flush flag for SATA.
> 
> Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> ---
>  drivers/ata/libata-scsi.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> Index: linux/drivers/ata/libata-scsi.c
> ===================================================================
> --- linux.orig/drivers/ata/libata-scsi.c	2011-05-04 14:20:41.000000000 +0800
> +++ linux/drivers/ata/libata-scsi.c	2011-05-04 14:28:28.000000000 +0800
> @@ -3424,7 +3424,9 @@ void ata_scsi_scan_host(struct ata_port
>  			sdev = __scsi_add_device(ap->scsi_host, channel, id, 0,
>  						 NULL);
>  			if (!IS_ERR(sdev)) {
> +				struct request_queue *q = sdev->request_queue;
>  				dev->sdev = sdev;
> +				blk_set_queue_flush_queueable(q, false);
>  				scsi_device_put(sdev);
>  			} else {
>  				dev->sdev = NULL;

Isn't ata_scsi_dev_config() better place for this?

Thakns.
Jeff Garzik May 4, 2011, 10:29 a.m. UTC | #2
On 05/04/2011 04:53 AM, Tejun Heo wrote:
> On Wed, May 04, 2011 at 04:17:28PM +0800, shaohua.li@intel.com wrote:
>> @@ -3424,7 +3424,9 @@ void ata_scsi_scan_host(struct ata_port
>>   			sdev = __scsi_add_device(ap->scsi_host, channel, id, 0,
>>   						 NULL);
>>   			if (!IS_ERR(sdev)) {
>> +				struct request_queue *q = sdev->request_queue;
>>   				dev->sdev = sdev;
>> +				blk_set_queue_flush_queueable(q, false);
>>   				scsi_device_put(sdev);
>>   			} else {
>>   				dev->sdev = NULL;

> Isn't ata_scsi_dev_config() better place for this?

Yes :)

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

Index: linux/drivers/ata/libata-scsi.c
===================================================================
--- linux.orig/drivers/ata/libata-scsi.c	2011-05-04 14:20:41.000000000 +0800
+++ linux/drivers/ata/libata-scsi.c	2011-05-04 14:28:28.000000000 +0800
@@ -3424,7 +3424,9 @@  void ata_scsi_scan_host(struct ata_port
 			sdev = __scsi_add_device(ap->scsi_host, channel, id, 0,
 						 NULL);
 			if (!IS_ERR(sdev)) {
+				struct request_queue *q = sdev->request_queue;
 				dev->sdev = sdev;
+				blk_set_queue_flush_queueable(q, false);
 				scsi_device_put(sdev);
 			} else {
 				dev->sdev = NULL;