• Home
  • Raw
  • Download

Lines Matching refs:self

244 toshoboe_dumpregs (struct toshoboe_cb *self)  in toshoboe_dumpregs()  argument
256 self->int_tx, self->int_rx, self->int_txunder, self->int_rxover, in toshoboe_dumpregs()
257 self->int_sip); in toshoboe_dumpregs()
274 if (self->ring) in toshoboe_dumpregs()
277 ringbase = virt_to_bus (self->ring); in toshoboe_dumpregs()
281 printk (" (%d,%02x)",self->ring->rx[i].len,self->ring->rx[i].control); in toshoboe_dumpregs()
285 printk (" (%d,%02x)",self->ring->tx[i].len,self->ring->tx[i].control); in toshoboe_dumpregs()
293 toshoboe_disablebm (struct toshoboe_cb *self) in toshoboe_disablebm() argument
298 pci_read_config_byte (self->pdev, PCI_COMMAND, &command); in toshoboe_disablebm()
300 pci_write_config_byte (self->pdev, PCI_COMMAND, command); in toshoboe_disablebm()
306 toshoboe_stopchip (struct toshoboe_cb *self) in toshoboe_stopchip() argument
333 toshoboe_disablebm (self); in toshoboe_stopchip()
338 toshoboe_start_DMA (struct toshoboe_cb *self, int opts) in toshoboe_start_DMA() argument
348 toshoboe_setbaud (struct toshoboe_cb *self) in toshoboe_setbaud() argument
353 IRDA_DEBUG (2, "%s(%d/%d)\n", __func__, self->speed, self->io.speed); in toshoboe_setbaud()
355 switch (self->speed) in toshoboe_setbaud()
372 self->speed); in toshoboe_setbaud()
376 switch (self->speed) in toshoboe_setbaud()
416 switch (self->speed) in toshoboe_setbaud()
426 if (self->async) in toshoboe_setbaud()
477 self->new_speed = 0; in toshoboe_setbaud()
478 self->io.speed = self->speed; in toshoboe_setbaud()
483 toshoboe_enablebm (struct toshoboe_cb *self) in toshoboe_enablebm() argument
486 pci_set_master (self->pdev); in toshoboe_enablebm()
491 toshoboe_initring (struct toshoboe_cb *self) in toshoboe_initring() argument
499 self->ring->tx[i].len = 0; in toshoboe_initring()
500 self->ring->tx[i].control = 0x00; in toshoboe_initring()
501 self->ring->tx[i].address = virt_to_bus (self->tx_bufs[i]); in toshoboe_initring()
506 self->ring->rx[i].len = RX_LEN; in toshoboe_initring()
507 self->ring->rx[i].len = 0; in toshoboe_initring()
508 self->ring->rx[i].address = virt_to_bus (self->rx_bufs[i]); in toshoboe_initring()
509 self->ring->rx[i].control = OBOE_CTL_RX_HW_OWNS; in toshoboe_initring()
514 toshoboe_resetptrs (struct toshoboe_cb *self) in toshoboe_resetptrs() argument
521 self->rxs = inb_p (OBOE_RXSLOT) & OBOE_SLOT_MASK; in toshoboe_resetptrs()
522 self->txs = inb_p (OBOE_TXSLOT) & OBOE_SLOT_MASK; in toshoboe_resetptrs()
527 toshoboe_initptrs (struct toshoboe_cb *self) in toshoboe_initptrs() argument
534 toshoboe_resetptrs (self); in toshoboe_initptrs()
540 self->txpending = 0; in toshoboe_initptrs()
549 toshoboe_startchip (struct toshoboe_cb *self) in toshoboe_startchip() argument
555 toshoboe_initring (self); in toshoboe_startchip()
556 toshoboe_enablebm (self); in toshoboe_startchip()
584 physaddr = virt_to_bus (self->ring); in toshoboe_startchip()
601 self->speed = 9600; in toshoboe_startchip()
602 toshoboe_setbaud (self); in toshoboe_startchip()
603 toshoboe_initptrs (self); in toshoboe_startchip()
607 toshoboe_isntstuck (struct toshoboe_cb *self) in toshoboe_isntstuck() argument
612 toshoboe_checkstuck (struct toshoboe_cb *self) in toshoboe_checkstuck() argument
618 spin_lock_irqsave(&self->spinlock, flags); in toshoboe_checkstuck()
623 toshoboe_stopchip (self); in toshoboe_checkstuck()
624 toshoboe_startchip (self); in toshoboe_checkstuck()
625 spin_unlock_irqrestore(&self->spinlock, flags); in toshoboe_checkstuck()
631 toshoboe_makemttpacket (struct toshoboe_cb *self, void *buf, int mtt) in toshoboe_makemttpacket() argument
635 xbofs = ((int) (mtt/100)) * (int) (self->speed); in toshoboe_makemttpacket()
641 , xbofs,mtt,self->speed); in toshoboe_makemttpacket()
661 toshoboe_dumptx (struct toshoboe_cb *self) in toshoboe_dumptx() argument
666 PROBE_DEBUG(" (%d,%02x)",self->ring->tx[i].len,self->ring->tx[i].control); in toshoboe_dumptx()
667 PROBE_DEBUG(" [%d]\n",self->speed); in toshoboe_dumptx()
671 toshoboe_dumprx (struct toshoboe_cb *self, int score) in toshoboe_dumprx() argument
676 PROBE_DEBUG(" (%d,%02x)",self->ring->rx[i].len,self->ring->rx[i].control); in toshoboe_dumprx()
704 struct toshoboe_cb *self = dev_id; in toshoboe_probeinterrupt() local
720 self->int_tx++; in toshoboe_probeinterrupt()
724 if (self->ring->tx[txp].control & OBOE_CTL_TX_HW_OWNS) in toshoboe_probeinterrupt()
726 self->int_tx+=100; in toshoboe_probeinterrupt()
728 toshoboe_start_DMA(self, OBOE_CONFIG0H_ENTX | OBOE_CONFIG0H_LOOP); in toshoboe_probeinterrupt()
733 self->int_rx++; in toshoboe_probeinterrupt()
736 self->int_txunder++; in toshoboe_probeinterrupt()
739 self->int_rxover++; in toshoboe_probeinterrupt()
742 self->int_sip++; in toshoboe_probeinterrupt()
785 toshoboe_probefail (struct toshoboe_cb *self, char *msg) in toshoboe_probefail() argument
787 printk (KERN_ERR DRIVER_NAME "probe(%d) failed %s\n",self-> speed, msg); in toshoboe_probefail()
788 toshoboe_dumpregs (self); in toshoboe_probefail()
789 toshoboe_stopchip (self); in toshoboe_probefail()
790 free_irq (self->io.irq, (void *) self); in toshoboe_probefail()
795 toshoboe_numvalidrcvs (struct toshoboe_cb *self) in toshoboe_numvalidrcvs() argument
799 if ((self->ring->rx[i].control & 0xe0) == 0) in toshoboe_numvalidrcvs()
806 toshoboe_numrcvs (struct toshoboe_cb *self) in toshoboe_numrcvs() argument
810 if (!(self->ring->rx[i].control & OBOE_CTL_RX_HW_OWNS)) in toshoboe_numrcvs()
817 toshoboe_probe (struct toshoboe_cb *self) in toshoboe_probe() argument
829 if (request_irq (self->io.irq, toshoboe_probeinterrupt, in toshoboe_probe()
830 self->io.irqflags, "toshoboe", (void *) self)) in toshoboe_probe()
833 self->io.irq); in toshoboe_probe()
842 toshoboe_stopchip (self); in toshoboe_probe()
845 spin_lock_irqsave(&self->spinlock, flags); in toshoboe_probe()
847 toshoboe_startchip (self); in toshoboe_probe()
848 self->int_rx = self->int_tx = 0; in toshoboe_probe()
849 self->speed = bauds[j]; in toshoboe_probe()
850 toshoboe_setbaud (self); in toshoboe_probe()
851 toshoboe_initptrs (self); in toshoboe_probe()
852 spin_unlock_irqrestore(&self->spinlock, flags); in toshoboe_probe()
854 self->ring->tx[self->txs].control = in toshoboe_probe()
859 self->ring->tx[self->txs].len = in toshoboe_probe()
860 toshoboe_maketestpacket (self->tx_bufs[self->txs], 0, fir); in toshoboe_probe()
861 self->txs++; in toshoboe_probe()
862 self->txs %= TX_SLOTS; in toshoboe_probe()
864 self->ring->tx[self->txs].control = in toshoboe_probe()
867 self->ring->tx[self->txs].len = in toshoboe_probe()
868 toshoboe_maketestpacket (self->tx_bufs[self->txs], 0, fir); in toshoboe_probe()
869 self->txs++; in toshoboe_probe()
870 self->txs %= TX_SLOTS; in toshoboe_probe()
872 self->ring->tx[self->txs].control = in toshoboe_probe()
875 self->ring->tx[self->txs].len = in toshoboe_probe()
876 toshoboe_maketestpacket (self->tx_bufs[self->txs], 0, fir); in toshoboe_probe()
877 self->txs++; in toshoboe_probe()
878 self->txs %= TX_SLOTS; in toshoboe_probe()
880 self->ring->tx[self->txs].control = in toshoboe_probe()
884 self->ring->tx[self->txs].len = in toshoboe_probe()
885 toshoboe_maketestpacket (self->tx_bufs[self->txs], 0, fir); in toshoboe_probe()
886 self->txs++; in toshoboe_probe()
887 self->txs %= TX_SLOTS; in toshoboe_probe()
889 toshoboe_dumptx (self); in toshoboe_probe()
891 toshoboe_start_DMA(self, OBOE_CONFIG0H_ENTX | OBOE_CONFIG0H_LOOP); in toshoboe_probe()
895 while (toshoboe_numvalidrcvs (self) != n) in toshoboe_probe()
898 return toshoboe_probefail (self, "filter test"); in toshoboe_probe()
899 udelay ((9600*(TT_LEN+16))/self->speed); in toshoboe_probe()
904 while ((toshoboe_numrcvs(self) != self->int_rx) || (self->int_tx != n)) in toshoboe_probe()
907 return toshoboe_probefail (self, "interrupt test"); in toshoboe_probe()
908 udelay ((9600*(TT_LEN+16))/self->speed); in toshoboe_probe()
911 toshoboe_dumprx (self,i); in toshoboe_probe()
917 toshoboe_stopchip (self); in toshoboe_probe()
918 self->int_rx = self->int_tx = 0; in toshoboe_probe()
920 spin_lock_irqsave(&self->spinlock, flags); in toshoboe_probe()
921 toshoboe_startchip (self); in toshoboe_probe()
922 spin_unlock_irqrestore(&self->spinlock, flags); in toshoboe_probe()
924 self->async = 1; in toshoboe_probe()
925 self->speed = 115200; in toshoboe_probe()
926 toshoboe_setbaud (self); in toshoboe_probe()
927 self->ring->tx[self->txs].control = in toshoboe_probe()
929 self->ring->tx[self->txs].len = 4; in toshoboe_probe()
931 ((unsigned char *) self->tx_bufs[self->txs])[0] = 'f'; in toshoboe_probe()
932 ((unsigned char *) self->tx_bufs[self->txs])[1] = 'i'; in toshoboe_probe()
933 ((unsigned char *) self->tx_bufs[self->txs])[2] = 's'; in toshoboe_probe()
934 ((unsigned char *) self->tx_bufs[self->txs])[3] = 'h'; in toshoboe_probe()
935 toshoboe_dumptx (self); in toshoboe_probe()
936 toshoboe_start_DMA(self, OBOE_CONFIG0H_ENTX | OBOE_CONFIG0H_LOOP); in toshoboe_probe()
939 while (toshoboe_numvalidrcvs (self) != 4) in toshoboe_probe()
942 return toshoboe_probefail (self, "Async test"); in toshoboe_probe()
947 while ((toshoboe_numrcvs (self) != self->int_rx) || (self->int_tx != 1)) in toshoboe_probe()
950 return toshoboe_probefail (self, "Async interrupt test"); in toshoboe_probe()
954 toshoboe_dumprx (self,i); in toshoboe_probe()
956 self->async = 0; in toshoboe_probe()
957 self->speed = 9600; in toshoboe_probe()
958 toshoboe_setbaud (self); in toshoboe_probe()
959 toshoboe_stopchip (self); in toshoboe_probe()
961 free_irq (self->io.irq, (void *) self); in toshoboe_probe()
976 struct toshoboe_cb *self; in toshoboe_hard_xmit() local
982 self = netdev_priv(dev); in toshoboe_hard_xmit()
984 IRDA_ASSERT (self != NULL, return 0; ); in toshoboe_hard_xmit()
987 ,skb->len,self->txpending,INB (OBOE_ENABLEH)); in toshoboe_hard_xmit()
996 if (self->new_speed) in toshoboe_hard_xmit()
1000 if (self->stopped) in toshoboe_hard_xmit()
1003 toshoboe_checkstuck (self); in toshoboe_hard_xmit()
1010 if ((speed != self->io.speed) && (speed != -1)) in toshoboe_hard_xmit()
1012 spin_lock_irqsave(&self->spinlock, flags); in toshoboe_hard_xmit()
1014 if (self->txpending || skb->len) in toshoboe_hard_xmit()
1016 self->new_speed = speed; in toshoboe_hard_xmit()
1022 spin_unlock_irqrestore(&self->spinlock, flags); in toshoboe_hard_xmit()
1030 spin_unlock_irqrestore(&self->spinlock, flags); in toshoboe_hard_xmit()
1035 self->speed = speed; in toshoboe_hard_xmit()
1036 toshoboe_setbaud (self); in toshoboe_hard_xmit()
1037 spin_unlock_irqrestore(&self->spinlock, flags); in toshoboe_hard_xmit()
1047 spin_lock_irqsave(&self->spinlock, flags); in toshoboe_hard_xmit()
1049 if (self->txpending) in toshoboe_hard_xmit()
1051 spin_unlock_irqrestore(&self->spinlock, flags); in toshoboe_hard_xmit()
1059 mtt = toshoboe_makemttpacket (self, self->tx_bufs[self->txs], mtt); in toshoboe_hard_xmit()
1061 ,skb->len,mtt,self->txpending); in toshoboe_hard_xmit()
1064 self->ring->tx[self->txs].len = mtt & 0xfff; in toshoboe_hard_xmit()
1077 self->ring->tx[self->txs].control = ctl; in toshoboe_hard_xmit()
1081 toshoboe_start_DMA(self, OBOE_CONFIG0H_ENTX | OBOE_CONFIG0H_LOOP); in toshoboe_hard_xmit()
1083 self->txpending++; in toshoboe_hard_xmit()
1085 self->txs++; in toshoboe_hard_xmit()
1086 self->txs %= TX_SLOTS; in toshoboe_hard_xmit()
1093 spin_unlock_irqrestore(&self->spinlock, flags); in toshoboe_hard_xmit()
1100 spin_lock_irqsave(&self->spinlock, flags); in toshoboe_hard_xmit()
1102 if (self->ring->tx[self->txs].control & OBOE_CTL_TX_HW_OWNS) in toshoboe_hard_xmit()
1105 ,skb->len, self->ring->tx[self->txs].control, self->txpending); in toshoboe_hard_xmit()
1106 toshoboe_start_DMA(self, OBOE_CONFIG0H_ENTX); in toshoboe_hard_xmit()
1107 spin_unlock_irqrestore(&self->spinlock, flags); in toshoboe_hard_xmit()
1113 len = async_wrap_skb (skb, self->tx_bufs[self->txs], TX_BUF_SZ); in toshoboe_hard_xmit()
1118 skb_copy_from_linear_data(skb, self->tx_bufs[self->txs], len); in toshoboe_hard_xmit()
1120 self->ring->tx[self->txs].len = len & 0x0fff; in toshoboe_hard_xmit()
1131 self->ring->tx[self->txs].control = ctl; in toshoboe_hard_xmit()
1135 if (!self->txpending) in toshoboe_hard_xmit()
1136 toshoboe_start_DMA(self, OBOE_CONFIG0H_ENTX); in toshoboe_hard_xmit()
1138 self->txpending++; in toshoboe_hard_xmit()
1140 self->txs++; in toshoboe_hard_xmit()
1141 self->txs %= TX_SLOTS; in toshoboe_hard_xmit()
1143 spin_unlock_irqrestore(&self->spinlock, flags); in toshoboe_hard_xmit()
1153 struct toshoboe_cb *self = dev_id; in toshoboe_interrupt() local
1166 toshoboe_isntstuck (self); in toshoboe_interrupt()
1174 txp = self->txpending; in toshoboe_interrupt()
1175 self->txpending = 0; in toshoboe_interrupt()
1179 if (self->ring->tx[i].control & OBOE_CTL_TX_HW_OWNS) in toshoboe_interrupt()
1180 self->txpending++; in toshoboe_interrupt()
1183 ,irqstat,txp,self->txpending); in toshoboe_interrupt()
1188 if (self->ring->tx[txp].control & OBOE_CTL_TX_HW_OWNS) in toshoboe_interrupt()
1192 while (self->ring->tx[txpc].control & OBOE_CTL_TX_HW_OWNS) in toshoboe_interrupt()
1197 self->netdev->stats.tx_packets++; in toshoboe_interrupt()
1198 if (self->ring->tx[txpc].control & OBOE_CTL_TX_HW_OWNS) in toshoboe_interrupt()
1199 self->ring->tx[txp].control &= ~OBOE_CTL_TX_RTCENTX; in toshoboe_interrupt()
1201 self->netdev->stats.tx_packets--; in toshoboe_interrupt()
1203 self->netdev->stats.tx_packets++; in toshoboe_interrupt()
1205 toshoboe_start_DMA(self, OBOE_CONFIG0H_ENTX); in toshoboe_interrupt()
1208 if ((!self->txpending) && (self->new_speed)) in toshoboe_interrupt()
1210 self->speed = self->new_speed; in toshoboe_interrupt()
1212 __func__, self->speed); in toshoboe_interrupt()
1213 toshoboe_setbaud (self); in toshoboe_interrupt()
1217 if (!self->new_speed) in toshoboe_interrupt()
1218 netif_wake_queue(self->netdev); in toshoboe_interrupt()
1223 while (!(self->ring->rx[self->rxs].control & OBOE_CTL_RX_HW_OWNS)) in toshoboe_interrupt()
1225 int len = self->ring->rx[self->rxs].len; in toshoboe_interrupt()
1228 ,len,self->ring->rx[self->rxs].control); in toshoboe_interrupt()
1231 dumpbufs(self->rx_bufs[self->rxs],len,'<'); in toshoboe_interrupt()
1234 if (self->ring->rx[self->rxs].control == 0) in toshoboe_interrupt()
1242 if (!toshoboe_checkfcs (self->rx_bufs[self->rxs], len)) in toshoboe_interrupt()
1281 skb_copy_to_linear_data(skb, self->rx_bufs[self->rxs], in toshoboe_interrupt()
1283 self->netdev->stats.rx_packets++; in toshoboe_interrupt()
1284 skb->dev = self->netdev; in toshoboe_interrupt()
1305 ,len,self->ring->rx[self->rxs].control); in toshoboe_interrupt()
1308 self->ring->rx[self->rxs].len = 0x0; in toshoboe_interrupt()
1309 self->ring->rx[self->rxs].control = OBOE_CTL_RX_HW_OWNS; in toshoboe_interrupt()
1311 self->rxs++; in toshoboe_interrupt()
1312 self->rxs %= RX_SLOTS; in toshoboe_interrupt()
1331 self->int_sip++; in toshoboe_interrupt()
1333 ,self->int_sip,irqstat,self->txpending); in toshoboe_interrupt()
1342 struct toshoboe_cb *self; in toshoboe_net_open() local
1348 self = netdev_priv(dev); in toshoboe_net_open()
1350 if (self->async) in toshoboe_net_open()
1353 if (self->stopped) in toshoboe_net_open()
1356 rc = request_irq (self->io.irq, toshoboe_interrupt, in toshoboe_net_open()
1357 IRQF_SHARED | IRQF_DISABLED, dev->name, self); in toshoboe_net_open()
1361 spin_lock_irqsave(&self->spinlock, flags); in toshoboe_net_open()
1362 toshoboe_startchip (self); in toshoboe_net_open()
1363 spin_unlock_irqrestore(&self->spinlock, flags); in toshoboe_net_open()
1372 self->irlap = irlap_open (dev, &self->qos, driver_name); in toshoboe_net_open()
1374 self->irdad = 1; in toshoboe_net_open()
1382 struct toshoboe_cb *self; in toshoboe_net_close() local
1387 self = netdev_priv(dev); in toshoboe_net_close()
1393 if (self->irlap) in toshoboe_net_close()
1394 irlap_close (self->irlap); in toshoboe_net_close()
1395 self->irlap = NULL; in toshoboe_net_close()
1397 self->irdad = 0; in toshoboe_net_close()
1399 free_irq (self->io.irq, (void *) self); in toshoboe_net_close()
1401 if (!self->stopped) in toshoboe_net_close()
1403 toshoboe_stopchip (self); in toshoboe_net_close()
1419 struct toshoboe_cb *self; in toshoboe_net_ioctl() local
1425 self = netdev_priv(dev); in toshoboe_net_ioctl()
1427 IRDA_ASSERT (self != NULL, return -1; ); in toshoboe_net_ioctl()
1432 spin_lock_irqsave(&self->spinlock, flags); in toshoboe_net_ioctl()
1451 self->new_speed = irq->ifr_baudrate; in toshoboe_net_ioctl()
1460 irda_device_set_media_busy (self->netdev, TRUE); in toshoboe_net_ioctl()
1472 spin_unlock_irqrestore(&self->spinlock, flags); in toshoboe_net_ioctl()
1493 struct toshoboe_cb *self = (struct toshoboe_cb*)pci_get_drvdata(pci_dev); in toshoboe_close() local
1497 IRDA_ASSERT (self != NULL, return; ); in toshoboe_close()
1499 if (!self->stopped) in toshoboe_close()
1501 toshoboe_stopchip (self); in toshoboe_close()
1504 release_region (self->io.fir_base, self->io.fir_ext); in toshoboe_close()
1508 kfree (self->tx_bufs[i]); in toshoboe_close()
1509 self->tx_bufs[i] = NULL; in toshoboe_close()
1514 kfree (self->rx_bufs[i]); in toshoboe_close()
1515 self->rx_bufs[i] = NULL; in toshoboe_close()
1518 unregister_netdev(self->netdev); in toshoboe_close()
1520 kfree (self->ringbuf); in toshoboe_close()
1521 self->ringbuf = NULL; in toshoboe_close()
1522 self->ring = NULL; in toshoboe_close()
1524 free_netdev(self->netdev); in toshoboe_close()
1530 struct toshoboe_cb *self; in toshoboe_open() local
1549 self = netdev_priv(dev); in toshoboe_open()
1550 self->netdev = dev; in toshoboe_open()
1551 self->pdev = pci_dev; in toshoboe_open()
1552 self->base = pci_resource_start(pci_dev,0); in toshoboe_open()
1554 self->io.fir_base = self->base; in toshoboe_open()
1555 self->io.fir_ext = OBOE_IO_EXTENT; in toshoboe_open()
1556 self->io.irq = pci_dev->irq; in toshoboe_open()
1557 self->io.irqflags = IRQF_SHARED | IRQF_DISABLED; in toshoboe_open()
1559 self->speed = self->io.speed = 9600; in toshoboe_open()
1560 self->async = 0; in toshoboe_open()
1563 if (NULL==request_region (self->io.fir_base, self->io.fir_ext, driver_name)) in toshoboe_open()
1566 ,self->io.fir_base); in toshoboe_open()
1571 spin_lock_init(&self->spinlock); in toshoboe_open()
1573 irda_init_max_qos_capabilies (&self->qos); in toshoboe_open()
1574 self->qos.baud_rate.bits = 0; in toshoboe_open()
1577 self->qos.baud_rate.bits |= IR_2400; in toshoboe_open()
1580 self->qos.baud_rate.bits |= IR_9600; in toshoboe_open()
1582 self->qos.baud_rate.bits |= IR_19200; in toshoboe_open()
1584 self->qos.baud_rate.bits |= IR_115200; in toshoboe_open()
1588 self->qos.baud_rate.bits |= IR_1152000; in toshoboe_open()
1593 self->qos.baud_rate.bits |= (IR_4000000 << 8); in toshoboe_open()
1597 self->qos.min_turn_time.bits = 0xff; in toshoboe_open()
1599 irda_qos_bits_to_value (&self->qos); in toshoboe_open()
1602 self->ringbuf = kmalloc(OBOE_RING_LEN << 1, GFP_KERNEL); in toshoboe_open()
1603 if (!self->ringbuf) in toshoboe_open()
1618 addr = (__u32) self->ringbuf; in toshoboe_open()
1621 self->ring = (struct OboeRing *) addr; in toshoboe_open()
1624 memset (self->ring, 0, OBOE_RING_LEN); in toshoboe_open()
1625 self->io.mem_base = (__u32) self->ring; in toshoboe_open()
1630 self->tx_bufs[i] = kmalloc (TX_BUF_SZ, GFP_KERNEL); in toshoboe_open()
1631 if (!self->tx_bufs[i]) in toshoboe_open()
1637 self->rx_bufs[i] = kmalloc (RX_BUF_SZ, GFP_KERNEL); in toshoboe_open()
1638 if (!self->rx_bufs[i]) in toshoboe_open()
1652 if (!toshoboe_probe (self)) in toshoboe_open()
1674 pci_set_drvdata(pci_dev,self); in toshoboe_open()
1682 kfree (self->tx_bufs[i]); in toshoboe_open()
1684 kfree (self->rx_bufs[i]); in toshoboe_open()
1685 kfree(self->ringbuf); in toshoboe_open()
1688 release_region (self->io.fir_base, self->io.fir_ext); in toshoboe_open()
1699 struct toshoboe_cb *self = (struct toshoboe_cb*)pci_get_drvdata(pci_dev); in toshoboe_gotosleep() local
1705 if (!self || self->stopped) in toshoboe_gotosleep()
1708 if ((!self->irdad) && (!self->async)) in toshoboe_gotosleep()
1712 while ((i--) && (self->txpending)) in toshoboe_gotosleep()
1715 spin_lock_irqsave(&self->spinlock, flags); in toshoboe_gotosleep()
1717 toshoboe_stopchip (self); in toshoboe_gotosleep()
1718 self->stopped = 1; in toshoboe_gotosleep()
1719 self->txpending = 0; in toshoboe_gotosleep()
1721 spin_unlock_irqrestore(&self->spinlock, flags); in toshoboe_gotosleep()
1728 struct toshoboe_cb *self = (struct toshoboe_cb*)pci_get_drvdata(pci_dev); in toshoboe_wakeup() local
1733 if (!self || !self->stopped) in toshoboe_wakeup()
1736 if ((!self->irdad) && (!self->async)) in toshoboe_wakeup()
1739 spin_lock_irqsave(&self->spinlock, flags); in toshoboe_wakeup()
1741 toshoboe_startchip (self); in toshoboe_wakeup()
1742 self->stopped = 0; in toshoboe_wakeup()
1744 netif_wake_queue(self->netdev); in toshoboe_wakeup()
1745 spin_unlock_irqrestore(&self->spinlock, flags); in toshoboe_wakeup()