aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinas Vepstas <linas@austin.ibm.com>2007-06-11 14:52:03 -0400
committerJeff Garzik <jeff@garzik.org>2007-07-08 22:16:41 -0400
commit9e0a6e2598ac08d14c3388567eae9a4ccea1244f (patch)
treed7971a8c8549566c88747c7f50a27ac16d943995 /drivers
parent9948357d49c84102151bc14233c2f489552c1f57 (diff)
spidernet: invalidate unused pointer.
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 <linas@austin.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/spider_net.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index 4d180072de4d..628efc01f273 100644
--- a/drivers/net/spider_net.c
+++ b/drivers/net/spider_net.c
@@ -1187,6 +1187,7 @@ spider_net_decode_one_descr(struct spider_net_card *card)
1187 struct spider_net_descr_chain *chain = &card->rx_chain; 1187 struct spider_net_descr_chain *chain = &card->rx_chain;
1188 struct spider_net_descr *descr = chain->tail; 1188 struct spider_net_descr *descr = chain->tail;
1189 struct spider_net_hw_descr *hwdescr = descr->hwdescr; 1189 struct spider_net_hw_descr *hwdescr = descr->hwdescr;
1190 u32 hw_buf_addr;
1190 int status; 1191 int status;
1191 1192
1192 status = spider_net_get_descr_status(hwdescr); 1193 status = spider_net_get_descr_status(hwdescr);
@@ -1200,7 +1201,9 @@ spider_net_decode_one_descr(struct spider_net_card *card)
1200 chain->tail = descr->next; 1201 chain->tail = descr->next;
1201 1202
1202 /* unmap descriptor */ 1203 /* unmap descriptor */
1203 pci_unmap_single(card->pdev, hwdescr->buf_addr, 1204 hw_buf_addr = hwdescr->buf_addr;
1205 hwdescr->buf_addr = 0xffffffff;
1206 pci_unmap_single(card->pdev, hw_buf_addr,
1204 SPIDER_NET_MAX_FRAME, PCI_DMA_FROMDEVICE); 1207 SPIDER_NET_MAX_FRAME, PCI_DMA_FROMDEVICE);
1205 1208
1206 if ( (status == SPIDER_NET_DESCR_RESPONSE_ERROR) || 1209 if ( (status == SPIDER_NET_DESCR_RESPONSE_ERROR) ||
@@ -1235,7 +1238,7 @@ spider_net_decode_one_descr(struct spider_net_card *card)
1235 if (hwdescr->dmac_cmd_status & 0xfcf4) { 1238 if (hwdescr->dmac_cmd_status & 0xfcf4) {
1236 dev_err(&card->netdev->dev, "bad status, cmd_status=x%08x\n", 1239 dev_err(&card->netdev->dev, "bad status, cmd_status=x%08x\n",
1237 hwdescr->dmac_cmd_status); 1240 hwdescr->dmac_cmd_status);
1238 pr_err("buf_addr=x%08x\n", hwdescr->buf_addr); 1241 pr_err("buf_addr=x%08x\n", hw_buf_addr);
1239 pr_err("buf_size=x%08x\n", hwdescr->buf_size); 1242 pr_err("buf_size=x%08x\n", hwdescr->buf_size);
1240 pr_err("next_descr_addr=x%08x\n", hwdescr->next_descr_addr); 1243 pr_err("next_descr_addr=x%08x\n", hwdescr->next_descr_addr);
1241 pr_err("result_size=x%08x\n", hwdescr->result_size); 1244 pr_err("result_size=x%08x\n", hwdescr->result_size);