aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_hipd.c29
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_hipd.h3
2 files changed, 29 insertions, 3 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c
index fe6359d4e1ef..ccea7db59f49 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
@@ -2039,6 +2039,29 @@ static void sym_settrans(struct sym_hcb *np, int target, u_char opts, u_char ofs
2039 } 2039 }
2040} 2040}
2041 2041
2042static void sym_announce_transfer_rate(struct sym_tcb *tp)
2043{
2044 struct scsi_target *starget = tp->starget;
2045
2046 if (tp->tprint.period != spi_period(starget) ||
2047 tp->tprint.offset != spi_offset(starget) ||
2048 tp->tprint.width != spi_width(starget) ||
2049 tp->tprint.iu != spi_iu(starget) ||
2050 tp->tprint.dt != spi_dt(starget) ||
2051 tp->tprint.qas != spi_qas(starget) ||
2052 !tp->tprint.check_nego) {
2053 tp->tprint.period = spi_period(starget);
2054 tp->tprint.offset = spi_offset(starget);
2055 tp->tprint.width = spi_width(starget);
2056 tp->tprint.iu = spi_iu(starget);
2057 tp->tprint.dt = spi_dt(starget);
2058 tp->tprint.qas = spi_qas(starget);
2059 tp->tprint.check_nego = 1;
2060
2061 spi_display_xfer_agreement(starget);
2062 }
2063}
2064
2042/* 2065/*
2043 * We received a WDTR. 2066 * We received a WDTR.
2044 * Let everything be aware of the changes. 2067 * Let everything be aware of the changes.
@@ -2064,7 +2087,7 @@ static void sym_setwide(struct sym_hcb *np, int target, u_char wide)
2064 spi_qas(starget) = 0; 2087 spi_qas(starget) = 0;
2065 2088
2066 if (sym_verbose >= 3) 2089 if (sym_verbose >= 3)
2067 spi_display_xfer_agreement(starget); 2090 sym_announce_transfer_rate(tp);
2068} 2091}
2069 2092
2070/* 2093/*
@@ -2097,7 +2120,7 @@ sym_setsync(struct sym_hcb *np, int target,
2097 tp->tgoal.check_nego = 0; 2120 tp->tgoal.check_nego = 0;
2098 } 2121 }
2099 2122
2100 spi_display_xfer_agreement(starget); 2123 sym_announce_transfer_rate(tp);
2101} 2124}
2102 2125
2103/* 2126/*
@@ -2125,7 +2148,7 @@ sym_setpprot(struct sym_hcb *np, int target, u_char opts, u_char ofs,
2125 spi_qas(starget) = tp->tgoal.qas = !!(opts & PPR_OPT_QAS); 2148 spi_qas(starget) = tp->tgoal.qas = !!(opts & PPR_OPT_QAS);
2126 tp->tgoal.check_nego = 0; 2149 tp->tgoal.check_nego = 0;
2127 2150
2128 spi_display_xfer_agreement(starget); 2151 sym_announce_transfer_rate(tp);
2129} 2152}
2130 2153
2131/* 2154/*
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.h b/drivers/scsi/sym53c8xx_2/sym_hipd.h
index 233a3d0b2cef..61d28fcfffbf 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.h
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.h
@@ -420,6 +420,9 @@ struct sym_tcb {
420 /* Transfer goal */ 420 /* Transfer goal */
421 struct sym_trans tgoal; 421 struct sym_trans tgoal;
422 422
423 /* Last printed transfer speed */
424 struct sym_trans tprint;
425
423 /* 426 /*
424 * Keep track of the CCB used for the negotiation in order 427 * Keep track of the CCB used for the negotiation in order
425 * to ensure that only 1 negotiation is queued at a time. 428 * to ensure that only 1 negotiation is queued at a time.