aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/irda/via-ircc.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/irda/via-ircc.c
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/irda/via-ircc.c')
-rw-r--r--drivers/net/irda/via-ircc.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c
index a5ca71cec028..b0a6cd815be1 100644
--- a/drivers/net/irda/via-ircc.c
+++ b/drivers/net/irda/via-ircc.c
@@ -45,11 +45,11 @@ F02 Oct/28/02: Add SB device ID for 3147 and 3177.
45#include <linux/netdevice.h> 45#include <linux/netdevice.h>
46#include <linux/ioport.h> 46#include <linux/ioport.h>
47#include <linux/delay.h> 47#include <linux/delay.h>
48#include <linux/slab.h>
49#include <linux/init.h> 48#include <linux/init.h>
50#include <linux/rtnetlink.h> 49#include <linux/rtnetlink.h>
51#include <linux/pci.h> 50#include <linux/pci.h>
52#include <linux/dma-mapping.h> 51#include <linux/dma-mapping.h>
52#include <linux/gfp.h>
53 53
54#include <asm/io.h> 54#include <asm/io.h>
55#include <asm/dma.h> 55#include <asm/dma.h>
@@ -121,7 +121,7 @@ static void iodelay(int udelay)
121 } 121 }
122} 122}
123 123
124static struct pci_device_id via_pci_tbl[] = { 124static DEFINE_PCI_DEVICE_TABLE(via_pci_tbl) = {
125 { PCI_VENDOR_ID_VIA, 0x8231, PCI_ANY_ID, PCI_ANY_ID,0,0,0 }, 125 { PCI_VENDOR_ID_VIA, 0x8231, PCI_ANY_ID, PCI_ANY_ID,0,0,0 },
126 { PCI_VENDOR_ID_VIA, 0x3109, PCI_ANY_ID, PCI_ANY_ID,0,0,1 }, 126 { PCI_VENDOR_ID_VIA, 0x3109, PCI_ANY_ID, PCI_ANY_ID,0,0,1 },
127 { PCI_VENDOR_ID_VIA, 0x3074, PCI_ANY_ID, PCI_ANY_ID,0,0,2 }, 127 { PCI_VENDOR_ID_VIA, 0x3074, PCI_ANY_ID, PCI_ANY_ID,0,0,2 },
@@ -1185,8 +1185,8 @@ F01_E */
1185 * if frame size,data ptr,or skb ptr are wrong ,the get next 1185 * if frame size,data ptr,or skb ptr are wrong ,the get next
1186 * entry. 1186 * entry.
1187 */ 1187 */
1188 if ((skb == NULL) || (skb->data == NULL) 1188 if ((skb == NULL) || (skb->data == NULL) ||
1189 || (self->rx_buff.data == NULL) || (len < 6)) { 1189 (self->rx_buff.data == NULL) || (len < 6)) {
1190 self->netdev->stats.rx_dropped++; 1190 self->netdev->stats.rx_dropped++;
1191 return TRUE; 1191 return TRUE;
1192 } 1192 }
@@ -1284,8 +1284,8 @@ static int RxTimerHandler(struct via_ircc_cb *self, int iobase)
1284 self->RetryCount++; 1284 self->RetryCount++;
1285 1285
1286 if ((self->RetryCount >= 1) || 1286 if ((self->RetryCount >= 1) ||
1287 ((st_fifo->pending_bytes + 2048) > self->rx_buff.truesize) 1287 ((st_fifo->pending_bytes + 2048) > self->rx_buff.truesize) ||
1288 || (st_fifo->len >= (MAX_RX_WINDOW))) { 1288 (st_fifo->len >= (MAX_RX_WINDOW))) {
1289 while (st_fifo->len > 0) { //upload frame 1289 while (st_fifo->len > 0) { //upload frame
1290 // Put this entry back in fifo 1290 // Put this entry back in fifo
1291 if (st_fifo->head > MAX_RX_WINDOW) 1291 if (st_fifo->head > MAX_RX_WINDOW)
@@ -1300,8 +1300,8 @@ static int RxTimerHandler(struct via_ircc_cb *self, int iobase)
1300 * if frame size, data ptr, or skb ptr are wrong, 1300 * if frame size, data ptr, or skb ptr are wrong,
1301 * then get next entry. 1301 * then get next entry.
1302 */ 1302 */
1303 if ((skb == NULL) || (skb->data == NULL) 1303 if ((skb == NULL) || (skb->data == NULL) ||
1304 || (self->rx_buff.data == NULL) || (len < 6)) { 1304 (self->rx_buff.data == NULL) || (len < 6)) {
1305 self->netdev->stats.rx_dropped++; 1305 self->netdev->stats.rx_dropped++;
1306 continue; 1306 continue;
1307 } 1307 }
@@ -1332,8 +1332,8 @@ static int RxTimerHandler(struct via_ircc_cb *self, int iobase)
1332 * if frame is receive complete at this routine ,then upload 1332 * if frame is receive complete at this routine ,then upload
1333 * frame. 1333 * frame.
1334 */ 1334 */
1335 if ((GetRXStatus(iobase) & 0x10) 1335 if ((GetRXStatus(iobase) & 0x10) &&
1336 && (RxCurCount(iobase, self) != self->RxLastCount)) { 1336 (RxCurCount(iobase, self) != self->RxLastCount)) {
1337 upload_rxdata(self, iobase); 1337 upload_rxdata(self, iobase);
1338 if (irda_device_txqueue_empty(self->netdev)) 1338 if (irda_device_txqueue_empty(self->netdev))
1339 via_ircc_dma_receive(self); 1339 via_ircc_dma_receive(self);