diff options
Diffstat (limited to 'drivers/scsi/mvsas/mv_94xx.c')
-rw-r--r-- | drivers/scsi/mvsas/mv_94xx.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/scsi/mvsas/mv_94xx.c b/drivers/scsi/mvsas/mv_94xx.c index e589f31cb2b4..ef3c9012df46 100644 --- a/drivers/scsi/mvsas/mv_94xx.c +++ b/drivers/scsi/mvsas/mv_94xx.c | |||
@@ -871,19 +871,27 @@ int mvs_94xx_spi_waitdataready(struct mvs_info *mvi, u32 timeout) | |||
871 | return -1; | 871 | return -1; |
872 | } | 872 | } |
873 | 873 | ||
874 | #ifndef DISABLE_HOTPLUG_DMA_FIX | 874 | void mvs_94xx_fix_dma(struct mvs_info *mvi, u32 phy_mask, |
875 | void mvs_94xx_fix_dma(dma_addr_t buf_dma, int buf_len, int from, void *prd) | 875 | int buf_len, int from, void *prd) |
876 | { | 876 | { |
877 | int i; | 877 | int i; |
878 | struct mvs_prd *buf_prd = prd; | 878 | struct mvs_prd *buf_prd = prd; |
879 | dma_addr_t buf_dma; | ||
879 | buf_prd += from; | 880 | buf_prd += from; |
881 | |||
882 | if ((mvi->pdev->revision == VANIR_A0_REV) || | ||
883 | (mvi->pdev->revision == VANIR_B0_REV)) | ||
884 | buf_dma = (phy_mask <= 0x08) ? | ||
885 | mvi->bulk_buffer_dma : mvi->bulk_buffer_dma1; | ||
886 | else | ||
887 | return; | ||
888 | |||
880 | for (i = 0; i < MAX_SG_ENTRY - from; i++) { | 889 | for (i = 0; i < MAX_SG_ENTRY - from; i++) { |
881 | buf_prd->addr = cpu_to_le64(buf_dma); | 890 | buf_prd->addr = cpu_to_le64(buf_dma); |
882 | buf_prd->im_len.len = cpu_to_le32(buf_len); | 891 | buf_prd->im_len.len = cpu_to_le32(buf_len); |
883 | ++buf_prd; | 892 | ++buf_prd; |
884 | } | 893 | } |
885 | } | 894 | } |
886 | #endif | ||
887 | 895 | ||
888 | /* | 896 | /* |
889 | * FIXME JEJB: temporary nop clear_srs_irq to make 94xx still work | 897 | * FIXME JEJB: temporary nop clear_srs_irq to make 94xx still work |
@@ -967,9 +975,7 @@ const struct mvs_dispatch mvs_94xx_dispatch = { | |||
967 | mvs_94xx_spi_buildcmd, | 975 | mvs_94xx_spi_buildcmd, |
968 | mvs_94xx_spi_issuecmd, | 976 | mvs_94xx_spi_issuecmd, |
969 | mvs_94xx_spi_waitdataready, | 977 | mvs_94xx_spi_waitdataready, |
970 | #ifndef DISABLE_HOTPLUG_DMA_FIX | ||
971 | mvs_94xx_fix_dma, | 978 | mvs_94xx_fix_dma, |
972 | #endif | ||
973 | mvs_94xx_tune_interrupt, | 979 | mvs_94xx_tune_interrupt, |
974 | mvs_94xx_non_spec_ncq_error, | 980 | mvs_94xx_non_spec_ncq_error, |
975 | }; | 981 | }; |