Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136277
b: refs/heads/master
c: 058bb82
h: refs/heads/master
i:
  136275: c547ebb
v: v3
  • Loading branch information
Tony Battersby authored and James Bottomley committed Mar 12, 2009
1 parent 27e7dbf commit 3a6de93
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c2fd206e08cd55e7ee0d865affc172eb5af01c16
refs/heads/master: 058bb82c5628c88af802c19e2b56ae43551552d5
29 changes: 26 additions & 3 deletions trunk/drivers/scsi/sym53c8xx_2/sym_hipd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2039,6 +2039,29 @@ static void sym_settrans(struct sym_hcb *np, int target, u_char opts, u_char ofs
}
}

static void sym_announce_transfer_rate(struct sym_tcb *tp)
{
struct scsi_target *starget = tp->starget;

if (tp->tprint.period != spi_period(starget) ||
tp->tprint.offset != spi_offset(starget) ||
tp->tprint.width != spi_width(starget) ||
tp->tprint.iu != spi_iu(starget) ||
tp->tprint.dt != spi_dt(starget) ||
tp->tprint.qas != spi_qas(starget) ||
!tp->tprint.check_nego) {
tp->tprint.period = spi_period(starget);
tp->tprint.offset = spi_offset(starget);
tp->tprint.width = spi_width(starget);
tp->tprint.iu = spi_iu(starget);
tp->tprint.dt = spi_dt(starget);
tp->tprint.qas = spi_qas(starget);
tp->tprint.check_nego = 1;

spi_display_xfer_agreement(starget);
}
}

/*
* We received a WDTR.
* Let everything be aware of the changes.
Expand All @@ -2064,7 +2087,7 @@ static void sym_setwide(struct sym_hcb *np, int target, u_char wide)
spi_qas(starget) = 0;

if (sym_verbose >= 3)
spi_display_xfer_agreement(starget);
sym_announce_transfer_rate(tp);
}

/*
Expand Down Expand Up @@ -2097,7 +2120,7 @@ sym_setsync(struct sym_hcb *np, int target,
tp->tgoal.check_nego = 0;
}

spi_display_xfer_agreement(starget);
sym_announce_transfer_rate(tp);
}

/*
Expand Down Expand Up @@ -2125,7 +2148,7 @@ sym_setpprot(struct sym_hcb *np, int target, u_char opts, u_char ofs,
spi_qas(starget) = tp->tgoal.qas = !!(opts & PPR_OPT_QAS);
tp->tgoal.check_nego = 0;

spi_display_xfer_agreement(starget);
sym_announce_transfer_rate(tp);
}

/*
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/scsi/sym53c8xx_2/sym_hipd.h
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,9 @@ struct sym_tcb {
/* Transfer goal */
struct sym_trans tgoal;

/* Last printed transfer speed */
struct sym_trans tprint;

/*
* Keep track of the CCB used for the negotiation in order
* to ensure that only 1 negotiation is queued at a time.
Expand Down

0 comments on commit 3a6de93

Please sign in to comment.