# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/09/13 13:33:21+09:00 tj@xxxxxxxxxxxxxxxx # via-velocity another init bug fixed. # # drivers/net/via-velocity.c # 2004/09/13 13:33:10+09:00 tj@xxxxxxxxxxxxxxxx +4 -2 # Buffer offset calculation was incorrect in velocity_init_td_ring(). # This didn't cause any trouble because we only use the first td ring. # diff -Nru a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c --- a/drivers/net/via-velocity.c 2004-09-13 13:51:26 +09:00 +++ b/drivers/net/via-velocity.c 2004-09-13 13:51:26 +09:00 @@ -1156,8 +1156,10 @@ for (i = 0; i < vptr->options.numtx; i++, curr += sizeof(struct tx_desc)) { td = &(vptr->td_rings[j][i]); td_info = &(vptr->td_infos[j][i]); - td_info->buf = vptr->tx_bufs + (i + j) * PKT_BUF_SZ; - td_info->buf_dma = vptr->tx_bufs_dma + (i + j) * PKT_BUF_SZ; + td_info->buf = vptr->tx_bufs + + (j * vptr->options.numtx + i) * PKT_BUF_SZ; + td_info->buf_dma = vptr->tx_bufs_dma + + (j * vptr->options.numtx + i) * PKT_BUF_SZ; } vptr->td_tail[j] = vptr->td_curr[j] = vptr->td_used[j] = 0; }