patch-2.4.21 linux-2.4.21/drivers/atm/nicstar.c
Next file: linux-2.4.21/drivers/atm/suni.c
Previous file: linux-2.4.21/drivers/atm/iphase.h
Back to the patch index
Back to the overall index
- Lines: 92
- Date:
2003-06-13 07:51:32.000000000 -0700
- Orig file:
linux-2.4.20/drivers/atm/nicstar.c
- Orig date:
2001-09-13 15:21:32.000000000 -0700
diff -urN linux-2.4.20/drivers/atm/nicstar.c linux-2.4.21/drivers/atm/nicstar.c
@@ -359,11 +359,8 @@
card = cards[i];
-#ifdef CONFIG_ATM_NICSTAR_USE_IDT77105
- if (card->max_pcr == ATM_25_PCR) {
- idt77105_stop(card->atmdev);
- }
-#endif /* CONFIG_ATM_NICSTAR_USE_IDT77105 */
+ if (card->atmdev->phy && card->atmdev->phy->stop)
+ card->atmdev->phy->stop(card->atmdev);
/* Stop everything */
writel(0x00000000, card->membase + CFG);
@@ -549,11 +546,6 @@
card->atmdev = NULL;
card->pcidev = pcidev;
card->membase = pci_resource_start(pcidev, 1);
-#ifdef __powerpc__
- /* Compensate for different memory map between host CPU and PCI bus.
- Shouldn't we use a macro for this? */
- card->membase += KERNELBASE;
-#endif /* __powerpc__ */
card->membase = (unsigned long) ioremap(card->membase, NS_IOREMAP_SIZE);
if (card->membase == 0)
{
@@ -964,22 +956,13 @@
card->atmdev->phy = NULL;
#ifdef CONFIG_ATM_NICSTAR_USE_SUNI
- if (card->max_pcr == ATM_OC3_PCR) {
+ if (card->max_pcr == ATM_OC3_PCR)
suni_init(card->atmdev);
-
- MOD_INC_USE_COUNT;
- /* Can't remove the nicstar driver or the suni driver would oops */
- }
#endif /* CONFIG_ATM_NICSTAR_USE_SUNI */
#ifdef CONFIG_ATM_NICSTAR_USE_IDT77105
- if (card->max_pcr == ATM_25_PCR) {
+ if (card->max_pcr == ATM_25_PCR)
idt77105_init(card->atmdev);
- /* Note that for the IDT77105 PHY we don't need the awful
- * module count hack that the SUNI needs because we can
- * stop the '105 when the nicstar module is cleaned up.
- */
- }
#endif /* CONFIG_ATM_NICSTAR_USE_IDT77105 */
if (card->atmdev->phy && card->atmdev->phy->start)
@@ -1597,7 +1580,7 @@
fill_tst(card, n, vc);
}
- else /* not CBR */
+ else if (vcc->qos.txtp.traffic_class == ATM_UBR)
{
vc->cbr_scd = 0x00000000;
vc->scq = card->scq0;
@@ -2386,6 +2369,7 @@
{
push_rxbufs(card, BUF_SM, (u32) skb, (u32) virt_to_bus(skb->data),
0, 0);
+ atomic_inc(&vcc->stats->rx_drop);
}
else
{
@@ -2413,6 +2397,7 @@
{
push_rxbufs(card, BUF_SM, (u32) sb, (u32) virt_to_bus(sb->data),
0, 0);
+ atomic_inc(&vcc->stats->rx_drop);
}
else
{
@@ -2437,6 +2422,7 @@
{
push_rxbufs(card, BUF_LG, (u32) skb,
(u32) virt_to_bus(skb->data), 0, 0);
+ atomic_inc(&vcc->stats->rx_drop);
}
else
{
@@ -2521,6 +2507,7 @@
}
else
dev_kfree_skb_any(hb);
+ atomic_inc(&vcc->stats->rx_drop);
}
else
{
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)