Automatic merge of /spare/repo/netdev-2.6 branch amd8111

authored by and committed by Jeff Garzik f6f3a488 a58eae64

+14 -10
+14 -10
drivers/net/amd8111e.c
··· 738 short vtag; 739 #endif 740 int rx_pkt_limit = dev->quota; 741 742 do{ 743 /* process receive packets until we use the quota*/ ··· 842 /* Receive descriptor is empty now */ 843 dev->quota -= num_rx_pkt; 844 *budget -= num_rx_pkt; 845 netif_rx_complete(dev); 846 - /* enable receive interrupt */ 847 writel(VAL0|RINTEN0, mmio + INTEN0); 848 writel(VAL2 | RDMD0, mmio + CMD0); 849 return 0; 850 rx_not_empty: 851 /* Do not call a netif_rx_complete */ 852 dev->quota -= num_rx_pkt; 853 *budget -= num_rx_pkt; 854 return 1; 855 - 856 - 857 } 858 859 #else ··· 1263 struct net_device * dev = (struct net_device *) dev_id; 1264 struct amd8111e_priv *lp = netdev_priv(dev); 1265 void __iomem *mmio = lp->mmio; 1266 - unsigned int intr0; 1267 unsigned int handled = 1; 1268 1269 - if(dev == NULL) 1270 return IRQ_NONE; 1271 1272 - if (regs) spin_lock (&lp->lock); 1273 /* disabling interrupt */ 1274 writel(INTREN, mmio + CMD0); 1275 1276 /* Read interrupt status */ 1277 intr0 = readl(mmio + INT0); 1278 1279 /* Process all the INT event until INTR bit is clear. */ 1280 ··· 1297 /* Schedule a polling routine */ 1298 __netif_rx_schedule(dev); 1299 } 1300 - else { 1301 printk("************Driver bug! \ 1302 interrupt while in poll\n"); 1303 - /* Fix by disabling interrupts */ 1304 - writel(RINT0, mmio + INT0); 1305 } 1306 } 1307 #else ··· 1325 err_no_interrupt: 1326 writel( VAL0 | INTREN,mmio + CMD0); 1327 1328 - if (regs) spin_unlock(&lp->lock); 1329 1330 return IRQ_RETVAL(handled); 1331 }
··· 738 short vtag; 739 #endif 740 int rx_pkt_limit = dev->quota; 741 + unsigned long flags; 742 743 do{ 744 /* process receive packets until we use the quota*/ ··· 841 /* Receive descriptor is empty now */ 842 dev->quota -= num_rx_pkt; 843 *budget -= num_rx_pkt; 844 + 845 + spin_lock_irqsave(&lp->lock, flags); 846 netif_rx_complete(dev); 847 writel(VAL0|RINTEN0, mmio + INTEN0); 848 writel(VAL2 | RDMD0, mmio + CMD0); 849 + spin_unlock_irqrestore(&lp->lock, flags); 850 return 0; 851 + 852 rx_not_empty: 853 /* Do not call a netif_rx_complete */ 854 dev->quota -= num_rx_pkt; 855 *budget -= num_rx_pkt; 856 return 1; 857 } 858 859 #else ··· 1261 struct net_device * dev = (struct net_device *) dev_id; 1262 struct amd8111e_priv *lp = netdev_priv(dev); 1263 void __iomem *mmio = lp->mmio; 1264 + unsigned int intr0, intren0; 1265 unsigned int handled = 1; 1266 1267 + if(unlikely(dev == NULL)) 1268 return IRQ_NONE; 1269 1270 + spin_lock(&lp->lock); 1271 + 1272 /* disabling interrupt */ 1273 writel(INTREN, mmio + CMD0); 1274 1275 /* Read interrupt status */ 1276 intr0 = readl(mmio + INT0); 1277 + intren0 = readl(mmio + INTEN0); 1278 1279 /* Process all the INT event until INTR bit is clear. */ 1280 ··· 1293 /* Schedule a polling routine */ 1294 __netif_rx_schedule(dev); 1295 } 1296 + else if (intren0 & RINTEN0) { 1297 printk("************Driver bug! \ 1298 interrupt while in poll\n"); 1299 + /* Fix by disable receive interrupts */ 1300 + writel(RINTEN0, mmio + INTEN0); 1301 } 1302 } 1303 #else ··· 1321 err_no_interrupt: 1322 writel( VAL0 | INTREN,mmio + CMD0); 1323 1324 + spin_unlock(&lp->lock); 1325 1326 return IRQ_RETVAL(handled); 1327 }