Adjust scsi_calc_syncparam() to the exception table changing from 10ths to

100ths of ns.  This should correct a problem with camcontrol "ignoring"
requests to negotiate to slower speeds.
This commit is contained in:
gibbs 2002-08-26 17:13:35 +00:00
parent 10daa52caa
commit fb0f9448fc

View File

@ -2305,12 +2305,14 @@ scsi_calc_syncparam(u_int period)
if (period == 0)
return (~0); /* Async */
/* Adjust for exception table being in 100ths. */
period *= 10;
num_syncrates = sizeof(scsi_syncrates) / sizeof(scsi_syncrates[0]);
/* See if the period is in the "exception" table */
for (i = 0; i < num_syncrates; i++) {
if (period <= scsi_syncrates[i].period) {
/* Period in kHz */
/* Period in 100ths of ns */
return (scsi_syncrates[i].period_factor);
}
}
@ -2319,7 +2321,7 @@ scsi_calc_syncparam(u_int period)
* Wasn't in the table, so use the standard
* 1/4 period in ns conversion.
*/
return (period/40);
return (period/400);
}
void