On Wed, 2007-05-16 at 17:09 -0500, Linas Vepstas wrote: > Invalidate a pointer as its pci_unmap'ed; this is a bit of > paranoia to make sure hardware doesn't continue trying to > DMA to it. > > Signed-off-by: Linas Vepstas <[EMAIL PROTECTED]> > > ---- > drivers/net/spider_net.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > Index: linux-2.6.22-rc1/drivers/net/spider_net.c > =================================================================== > --- linux-2.6.22-rc1.orig/drivers/net/spider_net.c 2007-05-15 > 13:31:11.000000000 -0500 > +++ linux-2.6.22-rc1/drivers/net/spider_net.c 2007-05-15 13:31:16.000000000 > -0500 > @@ -1081,7 +1082,9 @@ spider_net_decode_one_descr(struct spide > chain->tail = descr->next; > > /* unmap descriptor */ > - pci_unmap_single(card->pdev, hwdescr->buf_addr, > + hw_buf_addr = hwdescr->buf_addr; > + hwdescr->buf_addr = 0x0;
If you're going to be paranoid, shouldn't you do something here to make sure the value's hit the device? > + pci_unmap_single(card->pdev, hw_buf_addr, > SPIDER_NET_MAX_FRAME, PCI_DMA_FROMDEVICE); > cheers -- Michael Ellerman OzLabs, IBM Australia Development Lab wwweb: http://michael.ellerman.id.au phone: +61 2 6212 1183 (tie line 70 21183) We do not inherit the earth from our ancestors, we borrow it from our children. - S.M.A.R.T Person
signature.asc
Description: This is a digitally signed message part