megaraid_sas: Add an i/o barrier
authorTomas Henzl <thenzl@redhat.com>
Mon, 1 Feb 2016 14:12:04 +0000 (15:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2016 06:27:43 +0000 (08:27 +0200)
[ Upstream commit b99dbe56d511eb07de33bfa1b99ac5a6ff76ae08 ]

A barrier should be added to ensure proper ordering of memory mapped
writes.

Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Reviewed-by: Kashyap Desai <kashyap.desai@broadcom.com>
Acked-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/megaraid/megaraid_sas_base.c
drivers/scsi/megaraid/megaraid_sas_fusion.c

index 6dbaa3c38d1efd411a097f315ecf93fab9ed9eb1..3f8d357b1bac9f93c2128254b11a677638c105e9 100644 (file)
@@ -735,6 +735,7 @@ megasas_fire_cmd_skinny(struct megasas_instance *instance,
               &(regs)->inbound_high_queue_port);
        writel((lower_32_bits(frame_phys_addr) | (frame_count<<1))|1,
               &(regs)->inbound_low_queue_port);
+       mmiowb();
        spin_unlock_irqrestore(&instance->hba_lock, flags);
 }
 
index 4f391e747be2bc632e11d85f39aed74605a1f709..021b994fdae8d08e95df2dac143125131aca32ff 100644 (file)
@@ -201,6 +201,7 @@ megasas_fire_cmd_fusion(struct megasas_instance *instance,
                &instance->reg_set->inbound_low_queue_port);
        writel(le32_to_cpu(req_desc->u.high),
                &instance->reg_set->inbound_high_queue_port);
+       mmiowb();
        spin_unlock_irqrestore(&instance->hba_lock, flags);
 #endif
 }