mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-15 15:06:42 +00:00
Avoid divide-by-zero for devices that the adapter has not negotiated a
transfer speed with.
This commit is contained in:
parent
ccd58ea72d
commit
b8ce799cc4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=75760
@ -363,7 +363,11 @@ mly_cam_action(struct cam_sim *sim, union ccb *ccb)
|
|||||||
cts->valid |= CCB_TRANS_TQ_VALID;
|
cts->valid |= CCB_TRANS_TQ_VALID;
|
||||||
|
|
||||||
/* convert speed (MHz) to usec */
|
/* convert speed (MHz) to usec */
|
||||||
cts->sync_period = 1000000 / sc->mly_btl[bus][target].mb_speed;
|
if (sc->mly_btl[bus][target].mb_speed == 0) {
|
||||||
|
cts->sync_period = 1000000 / 5;
|
||||||
|
} else {
|
||||||
|
cts->sync_period = 1000000 / sc->mly_btl[bus][target].mb_speed;
|
||||||
|
}
|
||||||
|
|
||||||
/* convert bus width to CAM internal encoding */
|
/* convert bus width to CAM internal encoding */
|
||||||
switch (sc->mly_btl[bus][target].mb_width) {
|
switch (sc->mly_btl[bus][target].mb_width) {
|
||||||
|
Loading…
Reference in New Issue
Block a user