Skip to content

Commit

Permalink
Add small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
huaicheng committed May 5, 2018
1 parent 64bbbf0 commit 4cf5f37
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hw/block/femu/femu-oc.c
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ uint16_t femu_oc_rw(NvmeCtrl *n, NvmeNamespace *ns, NvmeCmd *cmd,
int nb_secs_to_read = 0;
now = qemu_clock_get_ns(QEMU_CLOCK_REALTIME);
for (i = 0; i <= secs_idx; i++) {
ppa = psl[si];
ppa = psl[si];
nb_secs_to_read = secs_layout[i];
//printf("Coperd,secs_layout[%d]=%d,si=%d\n", i, nb_secs_to_read, si);
si += nb_secs_to_read;
Expand Down Expand Up @@ -749,7 +749,7 @@ uint16_t femu_oc_rw(NvmeCtrl *n, NvmeNamespace *ns, NvmeCmd *cmd,
}
start_data_transfer_ts = chip_next_avail_time[lunid];
/* Coperd: TODO: replace 4 with a calculated value (c->num_sec) */
assert(nb_secs_to_read <= 4 && nb_secs_to_read >= 1);
assert(nb_secs_to_read <= 8 && nb_secs_to_read >= 1);
int chnl_transfer_time = chnl_page_tr_t * nb_secs_to_read / 4;

if (start_data_transfer_ts < chnl_next_avail_time[ch]) {
Expand Down Expand Up @@ -1393,7 +1393,7 @@ int femu_oc_bbtbl_init(NvmeCtrl *n, NvmeNamespace *ns)

return ret;
}

int femu_oc_init(NvmeCtrl *n)
{
FEMU_OC_Ctrl *ln;
Expand Down

0 comments on commit 4cf5f37

Please sign in to comment.