aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/aic7xxx/aic79xx_osm.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
index 5e13046d845..e7a32f8e1a5 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
@@ -2636,8 +2636,22 @@ static void ahd_linux_set_pcomp_en(struct scsi_target *starget, int pcomp)
2636 pcomp ? "Enable" : "Disable"); 2636 pcomp ? "Enable" : "Disable");
2637#endif 2637#endif
2638 2638
2639 if (pcomp) 2639 if (pcomp) {
2640 uint8_t precomp;
2641
2642 if (ahd->unit < ARRAY_SIZE(aic79xx_iocell_info)) {
2643 struct ahd_linux_iocell_opts *iocell_opts;
2644
2645 iocell_opts = &aic79xx_iocell_info[ahd->unit];
2646 precomp = iocell_opts->precomp;
2647 } else {
2648 precomp = AIC79XX_DEFAULT_PRECOMP;
2649 }
2640 ppr_options |= MSG_EXT_PPR_PCOMP_EN; 2650 ppr_options |= MSG_EXT_PPR_PCOMP_EN;
2651 AHD_SET_PRECOMP(ahd, precomp);
2652 } else {
2653 AHD_SET_PRECOMP(ahd, 0);
2654 }
2641 2655
2642 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, 2656 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2643 starget->channel + 'A', ROLE_INITIATOR); 2657 starget->channel + 'A', ROLE_INITIATOR);