@@ -308,6 +308,8 @@ static int ports_open;
static struct port *switch_port_tab[4];
struct net_device *napi_dev;
+static int CntIRQ;
+
static int cns3xxx_mdio_cmd(struct mii_bus *bus, int phy_id, int location,
int write, u16 cmd)
{
@@ -437,7 +439,10 @@ static void cns3xxx_adjust_link(struct n
static void eth_schedule_poll(struct sw *sw)
{
if (unlikely(!napi_schedule_prep(&sw->napi)))
+ {
+ //printk(KERN_ERR "sched err\n");
return;
+ }
disable_irq_nosync(sw->rx_irq);
__napi_schedule(&sw->napi);
@@ -447,6 +452,7 @@ irqreturn_t eth_rx_irq(int irq, void *pd
{
struct net_device *dev = pdev;
struct sw *sw = netdev_priv(dev);
+ CntIRQ++;
eth_schedule_poll(sw);
return (IRQ_HANDLED);
}
@@ -617,6 +623,7 @@ static void eth_complete_tx(struct sw *s
static int eth_poll(struct napi_struct *napi, int budget)
{
+ static int Loop = 0;
struct sw *sw = container_of(napi, struct sw, napi);
struct _rx_ring *rx_ring = &sw->rx_ring;
int received = 0;
@@ -712,6 +719,9 @@ static int eth_poll(struct napi_struct *
}
rx_ring->cur_index = i;
+
+ Loop++;
+
if (!received) {
napi_complete(napi);
enable_irq(sw->rx_irq);
@@ -719,7 +729,12 @@ static int eth_poll(struct napi_struct *
/* if rx descriptors are full schedule another poll */
if (rx_ring->desc[(i-1) & (RX_DESCS-1)].cown)
+ {
+ static int Sched = 0;
+
+ printk(KERN_ERR "Loop: %d irq: %d ReSched: %d\n", Loop,
CntIRQ, ++Sched);
eth_schedule_poll(sw);
+ }
}