aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tokenring/ibmtr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/tokenring/ibmtr.c')
-rw-r--r--drivers/net/tokenring/ibmtr.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c
index 1e8958ee2d0a..51409698fe25 100644
--- a/drivers/net/tokenring/ibmtr.c
+++ b/drivers/net/tokenring/ibmtr.c
@@ -327,7 +327,7 @@ static void ibmtr_cleanup_card(struct net_device *dev)
327 release_region(dev->base_addr, IBMTR_IO_EXTENT); 327 release_region(dev->base_addr, IBMTR_IO_EXTENT);
328 328
329 { 329 {
330 struct tok_info *ti = (struct tok_info *) dev->priv; 330 struct tok_info *ti = netdev_priv(dev);
331 iounmap(ti->mmio); 331 iounmap(ti->mmio);
332 iounmap(ti->sram_virt); 332 iounmap(ti->sram_virt);
333 } 333 }
@@ -384,7 +384,7 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr)
384 384
385 unsigned char segment, intr=0, irq=0, i, j, cardpresent=NOTOK, temp=0; 385 unsigned char segment, intr=0, irq=0, i, j, cardpresent=NOTOK, temp=0;
386 void __iomem * t_mmio = NULL; 386 void __iomem * t_mmio = NULL;
387 struct tok_info *ti = dev->priv; 387 struct tok_info *ti = netdev_priv(dev);
388 void __iomem *cd_chanid; 388 void __iomem *cd_chanid;
389 unsigned char *tchanid, ctemp; 389 unsigned char *tchanid, ctemp;
390#ifndef PCMCIA 390#ifndef PCMCIA
@@ -823,7 +823,7 @@ static unsigned char __devinit get_sram_size(struct tok_info *adapt_info)
823 823
824static int __devinit trdev_init(struct net_device *dev) 824static int __devinit trdev_init(struct net_device *dev)
825{ 825{
826 struct tok_info *ti = (struct tok_info *) dev->priv; 826 struct tok_info *ti = netdev_priv(dev);
827 827
828 SET_PAGE(ti->srb_page); 828 SET_PAGE(ti->srb_page);
829 ti->open_failure = NO ; 829 ti->open_failure = NO ;
@@ -846,7 +846,7 @@ static int tok_init_card(struct net_device *dev)
846 unsigned long i; 846 unsigned long i;
847 847
848 PIOaddr = dev->base_addr; 848 PIOaddr = dev->base_addr;
849 ti = (struct tok_info *) dev->priv; 849 ti = netdev_priv(dev);
850 /* Special processing for first interrupt after reset */ 850 /* Special processing for first interrupt after reset */
851 ti->do_tok_int = FIRST_INT; 851 ti->do_tok_int = FIRST_INT;
852 /* Reset adapter */ 852 /* Reset adapter */
@@ -868,7 +868,7 @@ static int tok_init_card(struct net_device *dev)
868/*****************************************************************************/ 868/*****************************************************************************/
869static int tok_open(struct net_device *dev) 869static int tok_open(struct net_device *dev)
870{ 870{
871 struct tok_info *ti = (struct tok_info *) dev->priv; 871 struct tok_info *ti = netdev_priv(dev);
872 int i; 872 int i;
873 873
874 /*the case we were left in a failure state during a previous open */ 874 /*the case we were left in a failure state during a previous open */
@@ -927,7 +927,7 @@ static void tok_open_adapter(unsigned long dev_addr)
927 struct tok_info *ti; 927 struct tok_info *ti;
928 int i; 928 int i;
929 929
930 ti = (struct tok_info *) dev->priv; 930 ti = netdev_priv(dev);
931 SET_PAGE(ti->init_srb_page); 931 SET_PAGE(ti->init_srb_page);
932 writeb(~SRB_RESP_INT, ti->mmio + ACA_OFFSET + ACA_RESET + ISRP_ODD); 932 writeb(~SRB_RESP_INT, ti->mmio + ACA_OFFSET + ACA_RESET + ISRP_ODD);
933 for (i = 0; i < sizeof(struct dir_open_adapter); i++) 933 for (i = 0; i < sizeof(struct dir_open_adapter); i++)
@@ -962,7 +962,7 @@ static void tok_open_adapter(unsigned long dev_addr)
962static void open_sap(unsigned char type, struct net_device *dev) 962static void open_sap(unsigned char type, struct net_device *dev)
963{ 963{
964 int i; 964 int i;
965 struct tok_info *ti = (struct tok_info *) dev->priv; 965 struct tok_info *ti = netdev_priv(dev);
966 966
967 SET_PAGE(ti->srb_page); 967 SET_PAGE(ti->srb_page);
968 for (i = 0; i < sizeof(struct dlc_open_sap); i++) 968 for (i = 0; i < sizeof(struct dlc_open_sap); i++)
@@ -986,7 +986,7 @@ static void open_sap(unsigned char type, struct net_device *dev)
986 986
987static void tok_set_multicast_list(struct net_device *dev) 987static void tok_set_multicast_list(struct net_device *dev)
988{ 988{
989 struct tok_info *ti = (struct tok_info *) dev->priv; 989 struct tok_info *ti = netdev_priv(dev);
990 struct dev_mc_list *mclist; 990 struct dev_mc_list *mclist;
991 unsigned char address[4]; 991 unsigned char address[4];
992 992
@@ -1029,7 +1029,7 @@ static int tok_send_packet(struct sk_buff *skb, struct net_device *dev)
1029{ 1029{
1030 struct tok_info *ti; 1030 struct tok_info *ti;
1031 unsigned long flags; 1031 unsigned long flags;
1032 ti = (struct tok_info *) dev->priv; 1032 ti = netdev_priv(dev);
1033 1033
1034 netif_stop_queue(dev); 1034 netif_stop_queue(dev);
1035 1035
@@ -1051,7 +1051,7 @@ static int tok_send_packet(struct sk_buff *skb, struct net_device *dev)
1051 1051
1052static int tok_close(struct net_device *dev) 1052static int tok_close(struct net_device *dev)
1053{ 1053{
1054 struct tok_info *ti = (struct tok_info *) dev->priv; 1054 struct tok_info *ti = netdev_priv(dev);
1055 1055
1056 /* Important for PCMCIA hot unplug, otherwise, we'll pull the card, */ 1056 /* Important for PCMCIA hot unplug, otherwise, we'll pull the card, */
1057 /* unloading the module from memory, and then if a timer pops, ouch */ 1057 /* unloading the module from memory, and then if a timer pops, ouch */
@@ -1094,7 +1094,7 @@ static void __iomem *map_address(struct tok_info *ti, unsigned index, __u8 *page
1094 1094
1095static void dir_open_adapter (struct net_device *dev) 1095static void dir_open_adapter (struct net_device *dev)
1096{ 1096{
1097 struct tok_info *ti = (struct tok_info *) dev->priv; 1097 struct tok_info *ti = netdev_priv(dev);
1098 unsigned char ret_code; 1098 unsigned char ret_code;
1099 __u16 err; 1099 __u16 err;
1100 1100
@@ -1179,7 +1179,7 @@ static irqreturn_t tok_interrupt(int irq, void *dev_id)
1179#if TR_VERBOSE 1179#if TR_VERBOSE
1180 DPRINTK("Int from tok_driver, dev : %p irq%d\n", dev,irq); 1180 DPRINTK("Int from tok_driver, dev : %p irq%d\n", dev,irq);
1181#endif 1181#endif
1182 ti = (struct tok_info *) dev->priv; 1182 ti = netdev_priv(dev);
1183 if (ti->sram_phys & 1) 1183 if (ti->sram_phys & 1)
1184 return IRQ_NONE; /* PCMCIA card extraction flag */ 1184 return IRQ_NONE; /* PCMCIA card extraction flag */
1185 spin_lock(&(ti->lock)); 1185 spin_lock(&(ti->lock));
@@ -1498,7 +1498,7 @@ static void initial_tok_int(struct net_device *dev)
1498 struct tok_info *ti; 1498 struct tok_info *ti;
1499 unsigned char init_status; /*BMS 12/2000*/ 1499 unsigned char init_status; /*BMS 12/2000*/
1500 1500
1501 ti = (struct tok_info *) dev->priv; 1501 ti = netdev_priv(dev);
1502 1502
1503 ti->do_tok_int = NOT_FIRST; 1503 ti->do_tok_int = NOT_FIRST;
1504 1504
@@ -1560,7 +1560,7 @@ static void initial_tok_int(struct net_device *dev)
1560 1560
1561static void tr_tx(struct net_device *dev) 1561static void tr_tx(struct net_device *dev)
1562{ 1562{
1563 struct tok_info *ti = (struct tok_info *) dev->priv; 1563 struct tok_info *ti = netdev_priv(dev);
1564 struct trh_hdr *trhdr = (struct trh_hdr *) ti->current_skb->data; 1564 struct trh_hdr *trhdr = (struct trh_hdr *) ti->current_skb->data;
1565 unsigned int hdr_len; 1565 unsigned int hdr_len;
1566 __u32 dhb=0,dhb_base; 1566 __u32 dhb=0,dhb_base;
@@ -1674,7 +1674,7 @@ static void tr_tx(struct net_device *dev)
1674 1674
1675static void tr_rx(struct net_device *dev) 1675static void tr_rx(struct net_device *dev)
1676{ 1676{
1677 struct tok_info *ti = (struct tok_info *) dev->priv; 1677 struct tok_info *ti = netdev_priv(dev);
1678 __u32 rbuffer; 1678 __u32 rbuffer;
1679 void __iomem *rbuf, *rbufdata, *llc; 1679 void __iomem *rbuf, *rbufdata, *llc;
1680 __u8 rbuffer_page = 0; 1680 __u8 rbuffer_page = 0;
@@ -1846,7 +1846,7 @@ static void ibmtr_reset_timer(struct timer_list *tmr, struct net_device *dev)
1846void tok_rerun(unsigned long dev_addr){ 1846void tok_rerun(unsigned long dev_addr){
1847 1847
1848 struct net_device *dev = (struct net_device *)dev_addr; 1848 struct net_device *dev = (struct net_device *)dev_addr;
1849 struct tok_info *ti = (struct tok_info *) dev->priv; 1849 struct tok_info *ti = netdev_priv(dev);
1850 1850
1851 if ( ti->open_action == RESTART){ 1851 if ( ti->open_action == RESTART){
1852 ti->do_tok_int = FIRST_INT; 1852 ti->do_tok_int = FIRST_INT;
@@ -1868,7 +1868,7 @@ static void ibmtr_readlog(struct net_device *dev)
1868{ 1868{
1869 struct tok_info *ti; 1869 struct tok_info *ti;
1870 1870
1871 ti = (struct tok_info *) dev->priv; 1871 ti = netdev_priv(dev);
1872 1872
1873 ti->readlog_pending = 0; 1873 ti->readlog_pending = 0;
1874 SET_PAGE(ti->srb_page); 1874 SET_PAGE(ti->srb_page);
@@ -1891,7 +1891,7 @@ static struct net_device_stats *tok_get_stats(struct net_device *dev)
1891{ 1891{
1892 1892
1893 struct tok_info *toki; 1893 struct tok_info *toki;
1894 toki = (struct tok_info *) dev->priv; 1894 toki = netdev_priv(dev);
1895 return (struct net_device_stats *) &toki->tr_stats; 1895 return (struct net_device_stats *) &toki->tr_stats;
1896} 1896}
1897 1897
@@ -1899,7 +1899,7 @@ static struct net_device_stats *tok_get_stats(struct net_device *dev)
1899 1899
1900static int ibmtr_change_mtu(struct net_device *dev, int mtu) 1900static int ibmtr_change_mtu(struct net_device *dev, int mtu)
1901{ 1901{
1902 struct tok_info *ti = (struct tok_info *) dev->priv; 1902 struct tok_info *ti = netdev_priv(dev);
1903 1903
1904 if (ti->ring_speed == 16 && mtu > ti->maxmtu16) 1904 if (ti->ring_speed == 16 && mtu > ti->maxmtu16)
1905 return -EINVAL; 1905 return -EINVAL;