aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorBrian King <brking@linux.vnet.ibm.com>2012-03-14 22:20:09 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-03-28 10:02:48 -0400
commita5fb407eed819e950e369060a822640582a1e538 (patch)
tree755ae0e1e76a56247f3e329d8a9b35e4fcbfe85d /drivers/scsi
parent7dd21308b17e2b657d167adc7e20b41b7c6bbe5c (diff)
[SCSI] ipr: Remove unnecessary memory barriers
The ipr driver added some memory barriers in order to ensure a PowerPC sync instruction was executed prior to sending a command to the adapter to ensure the command block was coherent with respect to the PCI bus's view of memory. However, some time ago, the powerpc architecture writel macros were changed to include the sync since most drivers don't properly handle this. So remove these memory barriers since they are not needed and result in executing twice as many sync instructions, which has a significant performance penalty. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/ipr.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 0fedca6e273b..590997961a93 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -850,8 +850,6 @@ static void ipr_do_req(struct ipr_cmnd *ipr_cmd,
850 850
851 ipr_trc_hook(ipr_cmd, IPR_TRACE_START, 0); 851 ipr_trc_hook(ipr_cmd, IPR_TRACE_START, 0);
852 852
853 mb();
854
855 ipr_send_command(ipr_cmd); 853 ipr_send_command(ipr_cmd);
856} 854}
857 855
@@ -985,8 +983,6 @@ static void ipr_send_hcam(struct ipr_ioa_cfg *ioa_cfg, u8 type,
985 983
986 ipr_trc_hook(ipr_cmd, IPR_TRACE_START, IPR_IOA_RES_ADDR); 984 ipr_trc_hook(ipr_cmd, IPR_TRACE_START, IPR_IOA_RES_ADDR);
987 985
988 mb();
989
990 ipr_send_command(ipr_cmd); 986 ipr_send_command(ipr_cmd);
991 } else { 987 } else {
992 list_add_tail(&hostrcb->queue, &ioa_cfg->hostrcb_free_q); 988 list_add_tail(&hostrcb->queue, &ioa_cfg->hostrcb_free_q);
@@ -5863,14 +5859,12 @@ static int ipr_queuecommand_lck(struct scsi_cmnd *scsi_cmd,
5863 rc = ipr_build_ioadl(ioa_cfg, ipr_cmd); 5859 rc = ipr_build_ioadl(ioa_cfg, ipr_cmd);
5864 } 5860 }
5865 5861
5866 if (likely(rc == 0)) { 5862 if (unlikely(rc != 0)) {
5867 mb(); 5863 list_move_tail(&ipr_cmd->queue, &ioa_cfg->free_q);
5868 ipr_send_command(ipr_cmd); 5864 return SCSI_MLQUEUE_HOST_BUSY;
5869 } else {
5870 list_move_tail(&ipr_cmd->queue, &ioa_cfg->free_q);
5871 return SCSI_MLQUEUE_HOST_BUSY;
5872 } 5865 }
5873 5866
5867 ipr_send_command(ipr_cmd);
5874 return 0; 5868 return 0;
5875} 5869}
5876 5870
@@ -6248,8 +6242,6 @@ static unsigned int ipr_qc_issue(struct ata_queued_cmd *qc)
6248 return AC_ERR_INVALID; 6242 return AC_ERR_INVALID;
6249 } 6243 }
6250 6244
6251 mb();
6252
6253 ipr_send_command(ipr_cmd); 6245 ipr_send_command(ipr_cmd);
6254 6246
6255 return 0; 6247 return 0;