megaraid_sas: Add an i/o barrier
authorTomas Henzl <thenzl@redhat.com>
Mon, 1 Feb 2016 14:12:04 +0000 (15:12 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 24 Feb 2016 02:27:02 +0000 (21:27 -0500)
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>
drivers/scsi/megaraid/megaraid_sas_base.c
drivers/scsi/megaraid/megaraid_sas_fusion.c

index e0b4ca1c57e19ab393d48c690365caf18165a53b..5c08568ccfbf3fe177fde645801dafaaae9c05ef 100644 (file)
@@ -749,6 +749,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 d9d0029fb1b0e09a101057ff9ac04498f0fb99e1..98a848bdfdc2d8947cb762d22f5bdb88e14026a8 100644 (file)
@@ -204,6 +204,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
 }