aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic79xx_osm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/aic7xxx/aic79xx_osm.c')
-rw-r--r--drivers/scsi/aic7xxx/aic79xx_osm.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
index 286ab83116f9..a055a96e3ad3 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
@@ -2284,9 +2284,12 @@ static void ahd_linux_set_period(struct scsi_target *starget, int period)
2284 if (period < 8) 2284 if (period < 8)
2285 period = 8; 2285 period = 8;
2286 if (period < 10) { 2286 if (period < 10) {
2287 ppr_options |= MSG_EXT_PPR_DT_REQ; 2287 if (spi_max_width(starget)) {
2288 if (period == 8) 2288 ppr_options |= MSG_EXT_PPR_DT_REQ;
2289 ppr_options |= MSG_EXT_PPR_IU_REQ; 2289 if (period == 8)
2290 ppr_options |= MSG_EXT_PPR_IU_REQ;
2291 } else
2292 period = 10;
2290 } 2293 }
2291 2294
2292 dt = ppr_options & MSG_EXT_PPR_DT_REQ; 2295 dt = ppr_options & MSG_EXT_PPR_DT_REQ;
@@ -2365,7 +2368,7 @@ static void ahd_linux_set_dt(struct scsi_target *starget, int dt)
2365 printf("%s: %s DT\n", ahd_name(ahd), 2368 printf("%s: %s DT\n", ahd_name(ahd),
2366 dt ? "enabling" : "disabling"); 2369 dt ? "enabling" : "disabling");
2367#endif 2370#endif
2368 if (dt) { 2371 if (dt && spi_max_width(starget)) {
2369 ppr_options |= MSG_EXT_PPR_DT_REQ; 2372 ppr_options |= MSG_EXT_PPR_DT_REQ;
2370 if (!width) 2373 if (!width)
2371 ahd_linux_set_width(starget, 1); 2374 ahd_linux_set_width(starget, 1);
@@ -2447,7 +2450,7 @@ static void ahd_linux_set_iu(struct scsi_target *starget, int iu)
2447 iu ? "enabling" : "disabling"); 2450 iu ? "enabling" : "disabling");
2448#endif 2451#endif
2449 2452
2450 if (iu) { 2453 if (iu && spi_max_width(starget)) {
2451 ppr_options |= MSG_EXT_PPR_IU_REQ; 2454 ppr_options |= MSG_EXT_PPR_IU_REQ;
2452 ppr_options |= MSG_EXT_PPR_DT_REQ; /* IU requires DT */ 2455 ppr_options |= MSG_EXT_PPR_DT_REQ; /* IU requires DT */
2453 } 2456 }
@@ -2487,7 +2490,7 @@ static void ahd_linux_set_rd_strm(struct scsi_target *starget, int rdstrm)
2487 rdstrm ? "enabling" : "disabling"); 2490 rdstrm ? "enabling" : "disabling");
2488#endif 2491#endif
2489 2492
2490 if (rdstrm) 2493 if (rdstrm && spi_max_width(starget))
2491 ppr_options |= MSG_EXT_PPR_RD_STRM; 2494 ppr_options |= MSG_EXT_PPR_RD_STRM;
2492 2495
2493 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, 2496 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
@@ -2523,7 +2526,7 @@ static void ahd_linux_set_wr_flow(struct scsi_target *starget, int wrflow)
2523 wrflow ? "enabling" : "disabling"); 2526 wrflow ? "enabling" : "disabling");
2524#endif 2527#endif
2525 2528
2526 if (wrflow) 2529 if (wrflow && spi_max_width(starget))
2527 ppr_options |= MSG_EXT_PPR_WR_FLOW; 2530 ppr_options |= MSG_EXT_PPR_WR_FLOW;
2528 2531
2529 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, 2532 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
@@ -2567,7 +2570,7 @@ static void ahd_linux_set_rti(struct scsi_target *starget, int rti)
2567 rti ? "enabling" : "disabling"); 2570 rti ? "enabling" : "disabling");
2568#endif 2571#endif
2569 2572
2570 if (rti) 2573 if (rti && spi_max_width(starget))
2571 ppr_options |= MSG_EXT_PPR_RTI; 2574 ppr_options |= MSG_EXT_PPR_RTI;
2572 2575
2573 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, 2576 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
@@ -2603,7 +2606,7 @@ static void ahd_linux_set_pcomp_en(struct scsi_target *starget, int pcomp)
2603 pcomp ? "Enable" : "Disable"); 2606 pcomp ? "Enable" : "Disable");
2604#endif 2607#endif
2605 2608
2606 if (pcomp) { 2609 if (pcomp && spi_max_width(starget)) {
2607 uint8_t precomp; 2610 uint8_t precomp;
2608 2611
2609 if (ahd->unit < ARRAY_SIZE(aic79xx_iocell_info)) { 2612 if (ahd->unit < ARRAY_SIZE(aic79xx_iocell_info)) {
@@ -2647,7 +2650,7 @@ static void ahd_linux_set_hold_mcs(struct scsi_target *starget, int hold)
2647 unsigned int dt = ppr_options & MSG_EXT_PPR_DT_REQ; 2650 unsigned int dt = ppr_options & MSG_EXT_PPR_DT_REQ;
2648 unsigned long flags; 2651 unsigned long flags;
2649 2652
2650 if (hold) 2653 if (hold && spi_max_width(starget))
2651 ppr_options |= MSG_EXT_PPR_HOLD_MCS; 2654 ppr_options |= MSG_EXT_PPR_HOLD_MCS;
2652 2655
2653 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, 2656 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,