changed dma segment field "ds_read_len" to "ds_xfer_len" since it is valid for
either read or write transfers.
This commit is contained in:
parent
191ab2b8e4
commit
18221f52fc
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mb8795.c,v 1.14 1999/08/03 09:16:01 dbj Exp $ */
|
||||
/* $NetBSD: mb8795.c,v 1.15 1999/08/05 01:51:00 dbj Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1998 Darrin B. Jewell
|
||||
* All rights reserved.
|
||||
|
@ -338,8 +338,8 @@ mb8795_rint(sc)
|
|||
/* Find receive length and chop off CRC */
|
||||
/* @@@ assumes packet is all in first segment
|
||||
*/
|
||||
m->m_pkthdr.len = map->dm_segs[0].ds_read_len-4;
|
||||
m->m_len = map->dm_segs[0].ds_read_len-4;
|
||||
m->m_pkthdr.len = map->dm_segs[0].ds_xfer_len-4;
|
||||
m->m_len = map->dm_segs[0].ds_xfer_len-4;
|
||||
m->m_pkthdr.rcvif = ifp;
|
||||
|
||||
bus_dmamap_unload(sc->sc_rx_dmat, map);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: nextdma.c,v 1.16 1999/08/03 09:16:01 dbj Exp $ */
|
||||
/* $NetBSD: nextdma.c,v 1.17 1999/08/05 01:51:00 dbj Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1998 Darrin B. Jewell
|
||||
* All rights reserved.
|
||||
|
@ -193,7 +193,7 @@ next_dma_rotate(nd)
|
|||
|
||||
#ifdef DIAGNOSTIC
|
||||
if (nd->_nd_map &&
|
||||
nd->_nd_map->dm_segs[nd->_nd_idx].ds_read_len == 0x1234beef) {
|
||||
nd->_nd_map->dm_segs[nd->_nd_idx].ds_xfer_len == 0x1234beef) {
|
||||
next_dma_print(nd);
|
||||
panic("DMA didn't set read length of segment");
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ next_dma_rotate(nd)
|
|||
|
||||
#ifdef DIAGNOSTIC
|
||||
if (nd->_nd_map) {
|
||||
nd->_nd_map->dm_segs[nd->_nd_idx].ds_read_len = 0x1234beef;
|
||||
nd->_nd_map->dm_segs[nd->_nd_idx].ds_xfer_len = 0x1234beef;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -409,8 +409,8 @@ next_dma_print(nd)
|
|||
nd->_nd_idx,nd->_nd_map->dm_segs[nd->_nd_idx].ds_addr);
|
||||
printf("NDMAP: nd->_nd_map->dm_segs[%d].ds_len = %d\n",
|
||||
nd->_nd_idx,nd->_nd_map->dm_segs[nd->_nd_idx].ds_len);
|
||||
printf("NDMAP: nd->_nd_map->dm_segs[%d].ds_read_len = %d\n",
|
||||
nd->_nd_idx,nd->_nd_map->dm_segs[nd->_nd_idx].ds_read_len);
|
||||
printf("NDMAP: nd->_nd_map->dm_segs[%d].ds_xfer_len = %d\n",
|
||||
nd->_nd_idx,nd->_nd_map->dm_segs[nd->_nd_idx].ds_xfer_len);
|
||||
} else {
|
||||
printf("NDMAP: nd->_nd_map = NULL\n");
|
||||
}
|
||||
|
@ -423,8 +423,8 @@ next_dma_print(nd)
|
|||
nd->_nd_idx_cont,nd->_nd_map_cont->dm_segs[nd->_nd_idx_cont].ds_addr);
|
||||
printf("NDMAP: nd->_nd_map_cont->dm_segs[%d].ds_len = %d\n",
|
||||
nd->_nd_idx_cont,nd->_nd_map_cont->dm_segs[nd->_nd_idx_cont].ds_len);
|
||||
printf("NDMAP: nd->_nd_map_cont->dm_segs[%d].ds_read_len = %d\n",
|
||||
nd->_nd_idx_cont,nd->_nd_map_cont->dm_segs[nd->_nd_idx_cont].ds_read_len);
|
||||
printf("NDMAP: nd->_nd_map_cont->dm_segs[%d].ds_xfer_len = %d\n",
|
||||
nd->_nd_idx_cont,nd->_nd_map_cont->dm_segs[nd->_nd_idx_cont].ds_xfer_len);
|
||||
} else {
|
||||
printf("NDMAP: nd->_nd_map_cont = NULL\n");
|
||||
}
|
||||
|
@ -631,9 +631,9 @@ nextdma_intr(arg)
|
|||
/* @@@ we pretend the entire buffer transferred ok.
|
||||
* we might consider throwing away this transfer instead
|
||||
*/
|
||||
nd->_nd_map->dm_segs[nd->_nd_idx].ds_read_len = expected_limit-expected_next;
|
||||
nd->_nd_map->dm_segs[nd->_nd_idx].ds_xfer_len = expected_limit-expected_next;
|
||||
} else {
|
||||
nd->_nd_map->dm_segs[nd->_nd_idx].ds_read_len = limit-next;
|
||||
nd->_nd_map->dm_segs[nd->_nd_idx].ds_xfer_len = limit-next;
|
||||
expected_limit = expected_next + (limit-next);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bus_dma.h,v 1.2 1999/08/03 09:16:00 dbj Exp $ */
|
||||
/* $NetBSD: bus_dma.h,v 1.3 1999/08/05 01:50:59 dbj Exp $ */
|
||||
|
||||
/*
|
||||
* This file was extracted from from alpha/include/bus.h
|
||||
|
@ -117,7 +117,7 @@ struct next68k_bus_dma_segment {
|
|||
bus_size_t ds_len; /* length of transfer */
|
||||
|
||||
/* Machine dependant fields: */
|
||||
bus_size_t ds_read_len; /* length of successful transfer */
|
||||
bus_size_t ds_xfer_len; /* length of successful transfer */
|
||||
};
|
||||
typedef struct next68k_bus_dma_segment bus_dma_segment_t;
|
||||
|
||||
|
|
Loading…
Reference in New Issue