Skip to content

Commit 102b2cd

Browse files
committed
fix zero time_to_send
Signed-off-by: YangKeao <[email protected]>
1 parent edd56a2 commit 102b2cd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

driver/ioem.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,8 @@ static struct request* ioem_dequeue(struct ioem_data *data)
373373
ioem_priv(rq)->time_to_send = irl_ret.time_to_send;
374374
time_to_send = irl_ret.time_to_send;
375375
}
376+
} else {
377+
time_to_send = ioem_priv(rq)->time_to_send;
376378
}
377379

378380
rq = NULL;
@@ -416,7 +418,11 @@ static struct request* ioem_dequeue(struct ioem_data *data)
416418
ioem_priv(rq)->time_to_send = irl_ret.time_to_send;
417419
list_add_tail(&rq->queuelist, &data->wait_queue);
418420
ioem_priv(rq)->in_list = true;
419-
time_to_send = min(time_to_send, irl_ret.time_to_send);
421+
if (time_to_send == 0) {
422+
time_to_send = irl_ret.time_to_send;
423+
} else {
424+
time_to_send = min(time_to_send, irl_ret.time_to_send);
425+
}
420426

421427
rq = NULL;
422428
}

0 commit comments

Comments
 (0)