aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mvsas/mv_94xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/mvsas/mv_94xx.c')
-rw-r--r--drivers/scsi/mvsas/mv_94xx.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/drivers/scsi/mvsas/mv_94xx.c b/drivers/scsi/mvsas/mv_94xx.c
index 3f2ad934c91..e589f31cb2b 100644
--- a/drivers/scsi/mvsas/mv_94xx.c
+++ b/drivers/scsi/mvsas/mv_94xx.c
@@ -475,7 +475,7 @@ static int __devinit mvs_94xx_init(struct mvs_info *mvi)
475 tmp = 0; 475 tmp = 0;
476 mw32(MVS_INT_COAL, tmp); 476 mw32(MVS_INT_COAL, tmp);
477 477
478 tmp = 0x100; 478 tmp = 0x10000 | interrupt_coalescing;
479 mw32(MVS_INT_COAL_TMOUT, tmp); 479 mw32(MVS_INT_COAL_TMOUT, tmp);
480 480
481 /* ladies and gentlemen, start your engines */ 481 /* ladies and gentlemen, start your engines */
@@ -894,6 +894,29 @@ static void mvs_94xx_clear_srs_irq(struct mvs_info *mvi, u8 reg_set,
894{ 894{
895} 895}
896 896
897static void mvs_94xx_tune_interrupt(struct mvs_info *mvi, u32 time)
898{
899 void __iomem *regs = mvi->regs;
900 u32 tmp = 0;
901 /* interrupt coalescing may cause missing HW interrput in some case,
902 * and the max count is 0x1ff, while our max slot is 0x200,
903 * it will make count 0.
904 */
905 if (time == 0) {
906 mw32(MVS_INT_COAL, 0);
907 mw32(MVS_INT_COAL_TMOUT, 0x10000);
908 } else {
909 if (MVS_CHIP_SLOT_SZ > 0x1ff)
910 mw32(MVS_INT_COAL, 0x1ff|COAL_EN);
911 else
912 mw32(MVS_INT_COAL, MVS_CHIP_SLOT_SZ|COAL_EN);
913
914 tmp = 0x10000 | time;
915 mw32(MVS_INT_COAL_TMOUT, tmp);
916 }
917
918}
919
897const struct mvs_dispatch mvs_94xx_dispatch = { 920const struct mvs_dispatch mvs_94xx_dispatch = {
898 "mv94xx", 921 "mv94xx",
899 mvs_94xx_init, 922 mvs_94xx_init,
@@ -947,6 +970,7 @@ const struct mvs_dispatch mvs_94xx_dispatch = {
947#ifndef DISABLE_HOTPLUG_DMA_FIX 970#ifndef DISABLE_HOTPLUG_DMA_FIX
948 mvs_94xx_fix_dma, 971 mvs_94xx_fix_dma,
949#endif 972#endif
973 mvs_94xx_tune_interrupt,
950 mvs_94xx_non_spec_ncq_error, 974 mvs_94xx_non_spec_ncq_error,
951}; 975};
952 976