aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/farsync.c
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/wan/farsync.c
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/wan/farsync.c')
-rw-r--r--drivers/net/wan/farsync.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
index beda387f2fc7..e087b9a6daaa 100644
--- a/drivers/net/wan/farsync.c
+++ b/drivers/net/wan/farsync.c
@@ -20,6 +20,7 @@
20#include <linux/version.h> 20#include <linux/version.h>
21#include <linux/pci.h> 21#include <linux/pci.h>
22#include <linux/sched.h> 22#include <linux/sched.h>
23#include <linux/slab.h>
23#include <linux/ioport.h> 24#include <linux/ioport.h>
24#include <linux/init.h> 25#include <linux/init.h>
25#include <linux/if.h> 26#include <linux/if.h>
@@ -528,7 +529,7 @@ static int fst_debug_mask = { FST_DEBUG };
528/* 529/*
529 * PCI ID lookup table 530 * PCI ID lookup table
530 */ 531 */
531static struct pci_device_id fst_pci_dev_id[] __devinitdata = { 532static DEFINE_PCI_DEVICE_TABLE(fst_pci_dev_id) = {
532 {PCI_VENDOR_ID_FARSITE, PCI_DEVICE_ID_FARSITE_T2P, PCI_ANY_ID, 533 {PCI_VENDOR_ID_FARSITE, PCI_DEVICE_ID_FARSITE_T2P, PCI_ANY_ID,
533 PCI_ANY_ID, 0, 0, FST_TYPE_T2P}, 534 PCI_ANY_ID, 0, 0, FST_TYPE_T2P},
534 535
@@ -1346,8 +1347,8 @@ do_bottom_half_tx(struct fst_card_info *card)
1346 1347
1347 dev = port_to_dev(port); 1348 dev = port_to_dev(port);
1348 while (!(FST_RDB(card, txDescrRing[pi][port->txpos].bits) & 1349 while (!(FST_RDB(card, txDescrRing[pi][port->txpos].bits) &
1349 DMA_OWN) 1350 DMA_OWN) &&
1350 && !(card->dmatx_in_progress)) { 1351 !(card->dmatx_in_progress)) {
1351 /* 1352 /*
1352 * There doesn't seem to be a txdone event per-se 1353 * There doesn't seem to be a txdone event per-se
1353 * We seem to have to deduce it, by checking the DMA_OWN 1354 * We seem to have to deduce it, by checking the DMA_OWN
@@ -1379,8 +1380,8 @@ do_bottom_half_tx(struct fst_card_info *card)
1379 */ 1380 */
1380 FST_WRW(card, txDescrRing[pi][port->txpos].bcnt, 1381 FST_WRW(card, txDescrRing[pi][port->txpos].bcnt,
1381 cnv_bcnt(skb->len)); 1382 cnv_bcnt(skb->len));
1382 if ((skb->len < FST_MIN_DMA_LEN) 1383 if ((skb->len < FST_MIN_DMA_LEN) ||
1383 || (card->family == FST_FAMILY_TXP)) { 1384 (card->family == FST_FAMILY_TXP)) {
1384 /* Enqueue the packet with normal io */ 1385 /* Enqueue the packet with normal io */
1385 memcpy_toio(card->mem + 1386 memcpy_toio(card->mem +
1386 BUF_OFFSET(txBuffer[pi] 1387 BUF_OFFSET(txBuffer[pi]
@@ -2030,8 +2031,8 @@ fst_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
2030 /* Sanity check the parameters. We don't support partial writes 2031 /* Sanity check the parameters. We don't support partial writes
2031 * when going over the top 2032 * when going over the top
2032 */ 2033 */
2033 if (wrthdr.size > FST_MEMSIZE || wrthdr.offset > FST_MEMSIZE 2034 if (wrthdr.size > FST_MEMSIZE || wrthdr.offset > FST_MEMSIZE ||
2034 || wrthdr.size + wrthdr.offset > FST_MEMSIZE) { 2035 wrthdr.size + wrthdr.offset > FST_MEMSIZE) {
2035 return -ENXIO; 2036 return -ENXIO;
2036 } 2037 }
2037 2038