push_rxbufs(card, BUF_LG, (u32) lb, (u32) virt_to_bus(lb->data), 0, 0); 
push_rxbufs(card, lb); 
static irqreturn_t ns_irq_handler(int irq, void *dev_id, struct pt_regs *regs){   u32 stat_r;   ns_dev *card;   struct atm_dev *dev;   unsigned long flags;   card = (ns_dev *) dev_id;   dev = card->atmdev;   card->intcnt++;   PRINTK("nicstar%d: NICStAR generated an interrupt\n", card->index);   ns_grab_int_lock(card, flags);      stat_r = readl(card->membase + STAT);   /* Transmit Status Indicator has been written to T. S. Queue */   if (stat_r & NS_STAT_TSIF)   {      TXPRINTK("nicstar%d: TSI interrupt\n", card->index);      process_tsq(card);      writel(NS_STAT_TSIF, card->membase + STAT);   }      /* Incomplete CS-PDU has been transmitted */   if (stat_r & NS_STAT_TXICP)   {      writel(NS_STAT_TXICP, card->membase + STAT);      TXPRINTK("nicstar%d: Incomplete CS-PDU transmitted.\n",               card->index);   }      /* Transmit Status Queue 7/8 full */   if (stat_r & NS_STAT_TSQF)   {      writel(NS_STAT_TSQF, card->membase + STAT);      PRINTK("nicstar%d: TSQ full.\n", card->index);      process_tsq(card);   }      /* Timer overflow */   if (stat_r & NS_STAT_TMROF)   {      writel(NS_STAT_TMROF, card->membase + STAT);      PRINTK("nicstar%d: Timer overflow.\n", card->index);   }      /* PHY device interrupt signal active */   if (stat_r & NS_STAT_PHYI)   {      writel(NS_STAT_PHYI, card->membase + STAT);      PRINTK("nicstar%d: PHY interrupt.\n", card->index);      if (dev->phy && dev->phy->interrupt) {         dev->phy->interrupt(dev);      }   }   /* Small Buffer Queue is full */   if (stat_r & NS_STAT_SFBQF)   {      writel(NS_STAT_SFBQF, card->membase + STAT);      printk("nicstar%d: Small free buffer queue is full.\n", card->index);   }      /* Large Buffer Queue is full */   if (stat_r & NS_STAT_LFBQF)   {      writel(NS_STAT_LFBQF, card->membase + STAT);      printk("nicstar%d: Large free buffer queue is full.\n", card->index);   }   /* Receive Status Queue is full */   if (stat_r & NS_STAT_RSQF)   {      writel(NS_STAT_RSQF, card->membase + STAT);      printk("nicstar%d: RSQ full.\n", card->index);      process_rsq(card);   }   /* Complete CS-PDU received */   if (stat_r & NS_STAT_EOPDU)   {      RXPRINTK("nicstar%d: End of CS-PDU received.\n", card->index);      process_rsq(card);      writel(NS_STAT_EOPDU, card->membase + STAT);   }   /* Raw cell received */   if (stat_r & NS_STAT_RAWCF)   {      writel(NS_STAT_RAWCF, card->membase + STAT);#ifndef RCQ_SUPPORT      printk("nicstar%d: Raw cell received and no support yet...\n",             card->index);#endif /* RCQ_SUPPORT */      /* NOTE: the following procedure may keep a raw cell pending until the               next interrupt. As this preliminary support is only meant to               avoid buffer leakage, this is not an issue. */      while (readl(card->membase + RAWCT) != card->rawch)      {         ns_rcqe *rawcell;         rawcell = (ns_rcqe *) bus_to_virt(card->rawch);         if (ns_rcqe_islast(rawcell))         {            struct sk_buff *oldbuf;            oldbuf = card->rcbuf;            card->rcbuf = (struct sk_buff *) ns_rcqe_nextbufhandle(rawcell);            card->rawch = (u32) virt_to_bus(card->rcbuf->data);            recycle_rx_buf(card, oldbuf);         }         else            card->rawch += NS_RCQE_SIZE;      }   }   /* Small buffer queue is empty */   if (stat_r & NS_STAT_SFBQE)   {      int i;      struct sk_buff *sb;      writel(NS_STAT_SFBQE, card->membase + STAT);      printk("nicstar%d: Small free buffer queue empty.\n",             card->index);      for (i = 0; i < card->sbnr.min; i++)      {         sb = dev_alloc_skb(NS_SMSKBSIZE);         if (sb == NULL)         {            writel(readl(card->membase + CFG) & ~NS_CFG_EFBIE, card->membase + CFG);            card->efbie = 0;            break;         }         skb_queue_tail(&card->sbpool.queue, sb);         skb_reserve(sb, NS_AAL0_HEADER);         push_rxbufs(card, BUF_SM, (u32) sb, (u32) virt_to_bus(sb->data), 0, 0);      }      card->sbfqc = i;      process_rsq(card);   }   /* Large buffer queue empty */   if (stat_r & NS_STAT_LFBQE)   {      int i;      struct sk_buff *lb;      writel(NS_STAT_LFBQE, card->membase + STAT);      printk("nicstar%d: Large free buffer queue empty.\n",             card->index);      for (i = 0; i < card->lbnr.min; i++)      {         lb = dev_alloc_skb(NS_LGSKBSIZE);         if (lb == NULL)         {            writel(readl(card->membase + CFG) & ~NS_CFG_EFBIE, card->membase + CFG);            card->efbie = 0;            break;         }         skb_queue_tail(&card->lbpool.queue, lb);         skb_reserve(lb, NS_SMBUFSIZE);         push_rxbufs(card, BUF_LG, (u32) lb, (u32) virt_to_bus(lb->data), 0, 0);      }      card->lbfqc = i;      process_rsq(card);   }   /* Receive Status Queue is 7/8 full */   if (stat_r & NS_STAT_RSQAF)   {      writel(NS_STAT_RSQAF, card->membase + STAT);      RXPRINTK("nicstar%d: RSQ almost full.\n", card->index);      process_rsq(card);   }      spin_unlock_irqrestore(&card->int_lock, flags);   PRINTK("nicstar%d: end of interrupt service\n", card->index);   return IRQ_HANDLED;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/8728b834b226ffcf2c94a58530090e292af2a7bf/nicstar.c/buggy/drivers/atm/nicstar.c