diff options
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/net/claw.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c index cc5697deb1d3..e10ac9ab2d44 100644 --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c | |||
@@ -133,14 +133,14 @@ claw_register_debug_facility(void) | |||
133 | static inline void | 133 | static inline void |
134 | claw_set_busy(struct net_device *dev) | 134 | claw_set_busy(struct net_device *dev) |
135 | { | 135 | { |
136 | ((struct claw_privbk *) dev->priv)->tbusy=1; | 136 | ((struct claw_privbk *)dev->ml_priv)->tbusy = 1; |
137 | eieio(); | 137 | eieio(); |
138 | } | 138 | } |
139 | 139 | ||
140 | static inline void | 140 | static inline void |
141 | claw_clear_busy(struct net_device *dev) | 141 | claw_clear_busy(struct net_device *dev) |
142 | { | 142 | { |
143 | clear_bit(0, &(((struct claw_privbk *) dev->priv)->tbusy)); | 143 | clear_bit(0, &(((struct claw_privbk *) dev->ml_priv)->tbusy)); |
144 | netif_wake_queue(dev); | 144 | netif_wake_queue(dev); |
145 | eieio(); | 145 | eieio(); |
146 | } | 146 | } |
@@ -149,20 +149,20 @@ static inline int | |||
149 | claw_check_busy(struct net_device *dev) | 149 | claw_check_busy(struct net_device *dev) |
150 | { | 150 | { |
151 | eieio(); | 151 | eieio(); |
152 | return ((struct claw_privbk *) dev->priv)->tbusy; | 152 | return ((struct claw_privbk *) dev->ml_priv)->tbusy; |
153 | } | 153 | } |
154 | 154 | ||
155 | static inline void | 155 | static inline void |
156 | claw_setbit_busy(int nr,struct net_device *dev) | 156 | claw_setbit_busy(int nr,struct net_device *dev) |
157 | { | 157 | { |
158 | netif_stop_queue(dev); | 158 | netif_stop_queue(dev); |
159 | set_bit(nr, (void *)&(((struct claw_privbk *)dev->priv)->tbusy)); | 159 | set_bit(nr, (void *)&(((struct claw_privbk *)dev->ml_priv)->tbusy)); |
160 | } | 160 | } |
161 | 161 | ||
162 | static inline void | 162 | static inline void |
163 | claw_clearbit_busy(int nr,struct net_device *dev) | 163 | claw_clearbit_busy(int nr,struct net_device *dev) |
164 | { | 164 | { |
165 | clear_bit(nr,(void *)&(((struct claw_privbk *)dev->priv)->tbusy)); | 165 | clear_bit(nr, (void *)&(((struct claw_privbk *)dev->ml_priv)->tbusy)); |
166 | netif_wake_queue(dev); | 166 | netif_wake_queue(dev); |
167 | } | 167 | } |
168 | 168 | ||
@@ -171,7 +171,7 @@ claw_test_and_setbit_busy(int nr,struct net_device *dev) | |||
171 | { | 171 | { |
172 | netif_stop_queue(dev); | 172 | netif_stop_queue(dev); |
173 | return test_and_set_bit(nr, | 173 | return test_and_set_bit(nr, |
174 | (void *)&(((struct claw_privbk *) dev->priv)->tbusy)); | 174 | (void *)&(((struct claw_privbk *) dev->ml_priv)->tbusy)); |
175 | } | 175 | } |
176 | 176 | ||
177 | 177 | ||
@@ -319,7 +319,7 @@ static int | |||
319 | claw_tx(struct sk_buff *skb, struct net_device *dev) | 319 | claw_tx(struct sk_buff *skb, struct net_device *dev) |
320 | { | 320 | { |
321 | int rc; | 321 | int rc; |
322 | struct claw_privbk *privptr=dev->priv; | 322 | struct claw_privbk *privptr = dev->ml_priv; |
323 | unsigned long saveflags; | 323 | unsigned long saveflags; |
324 | struct chbk *p_ch; | 324 | struct chbk *p_ch; |
325 | 325 | ||
@@ -404,7 +404,7 @@ claw_pack_skb(struct claw_privbk *privptr) | |||
404 | static int | 404 | static int |
405 | claw_change_mtu(struct net_device *dev, int new_mtu) | 405 | claw_change_mtu(struct net_device *dev, int new_mtu) |
406 | { | 406 | { |
407 | struct claw_privbk *privptr=dev->priv; | 407 | struct claw_privbk *privptr = dev->ml_priv; |
408 | int buff_size; | 408 | int buff_size; |
409 | CLAW_DBF_TEXT(4, trace, "setmtu"); | 409 | CLAW_DBF_TEXT(4, trace, "setmtu"); |
410 | buff_size = privptr->p_env->write_size; | 410 | buff_size = privptr->p_env->write_size; |
@@ -434,7 +434,7 @@ claw_open(struct net_device *dev) | |||
434 | struct ccwbk *p_buf; | 434 | struct ccwbk *p_buf; |
435 | 435 | ||
436 | CLAW_DBF_TEXT(4, trace, "open"); | 436 | CLAW_DBF_TEXT(4, trace, "open"); |
437 | privptr = (struct claw_privbk *)dev->priv; | 437 | privptr = (struct claw_privbk *)dev->ml_priv; |
438 | /* allocate and initialize CCW blocks */ | 438 | /* allocate and initialize CCW blocks */ |
439 | if (privptr->buffs_alloc == 0) { | 439 | if (privptr->buffs_alloc == 0) { |
440 | rc=init_ccw_bk(dev); | 440 | rc=init_ccw_bk(dev); |
@@ -780,7 +780,7 @@ claw_irq_tasklet ( unsigned long data ) | |||
780 | p_ch = (struct chbk *) data; | 780 | p_ch = (struct chbk *) data; |
781 | dev = (struct net_device *)p_ch->ndev; | 781 | dev = (struct net_device *)p_ch->ndev; |
782 | CLAW_DBF_TEXT(4, trace, "IRQtask"); | 782 | CLAW_DBF_TEXT(4, trace, "IRQtask"); |
783 | privptr = (struct claw_privbk *) dev->priv; | 783 | privptr = (struct claw_privbk *)dev->ml_priv; |
784 | unpack_read(dev); | 784 | unpack_read(dev); |
785 | clear_bit(CLAW_BH_ACTIVE, (void *)&p_ch->flag_a); | 785 | clear_bit(CLAW_BH_ACTIVE, (void *)&p_ch->flag_a); |
786 | CLAW_DBF_TEXT(4, trace, "TskletXt"); | 786 | CLAW_DBF_TEXT(4, trace, "TskletXt"); |
@@ -805,7 +805,7 @@ claw_release(struct net_device *dev) | |||
805 | 805 | ||
806 | if (!dev) | 806 | if (!dev) |
807 | return 0; | 807 | return 0; |
808 | privptr = (struct claw_privbk *) dev->priv; | 808 | privptr = (struct claw_privbk *)dev->ml_priv; |
809 | if (!privptr) | 809 | if (!privptr) |
810 | return 0; | 810 | return 0; |
811 | CLAW_DBF_TEXT(4, trace, "release"); | 811 | CLAW_DBF_TEXT(4, trace, "release"); |
@@ -960,7 +960,7 @@ claw_write_next ( struct chbk * p_ch ) | |||
960 | if (p_ch->claw_state == CLAW_STOP) | 960 | if (p_ch->claw_state == CLAW_STOP) |
961 | return; | 961 | return; |
962 | dev = (struct net_device *) p_ch->ndev; | 962 | dev = (struct net_device *) p_ch->ndev; |
963 | privptr = (struct claw_privbk *) dev->priv; | 963 | privptr = (struct claw_privbk *) dev->ml_priv; |
964 | claw_free_wrt_buf( dev ); | 964 | claw_free_wrt_buf( dev ); |
965 | if ((privptr->write_free_count > 0) && | 965 | if ((privptr->write_free_count > 0) && |
966 | !skb_queue_empty(&p_ch->collect_queue)) { | 966 | !skb_queue_empty(&p_ch->collect_queue)) { |
@@ -1042,7 +1042,7 @@ add_claw_reads(struct net_device *dev, struct ccwbk* p_first, | |||
1042 | struct ccw1 temp_ccw; | 1042 | struct ccw1 temp_ccw; |
1043 | struct endccw * p_end; | 1043 | struct endccw * p_end; |
1044 | CLAW_DBF_TEXT(4, trace, "addreads"); | 1044 | CLAW_DBF_TEXT(4, trace, "addreads"); |
1045 | privptr = dev->priv; | 1045 | privptr = dev->ml_priv; |
1046 | p_end = privptr->p_end_ccw; | 1046 | p_end = privptr->p_end_ccw; |
1047 | 1047 | ||
1048 | /* first CCW and last CCW contains a new set of read channel programs | 1048 | /* first CCW and last CCW contains a new set of read channel programs |
@@ -1212,7 +1212,7 @@ find_link(struct net_device *dev, char *host_name, char *ws_name ) | |||
1212 | int rc=0; | 1212 | int rc=0; |
1213 | 1213 | ||
1214 | CLAW_DBF_TEXT(2, setup, "findlink"); | 1214 | CLAW_DBF_TEXT(2, setup, "findlink"); |
1215 | privptr=dev->priv; | 1215 | privptr = dev->ml_priv; |
1216 | p_env=privptr->p_env; | 1216 | p_env=privptr->p_env; |
1217 | switch (p_env->packing) | 1217 | switch (p_env->packing) |
1218 | { | 1218 | { |
@@ -1264,7 +1264,7 @@ claw_hw_tx(struct sk_buff *skb, struct net_device *dev, long linkid) | |||
1264 | struct chbk *ch; | 1264 | struct chbk *ch; |
1265 | 1265 | ||
1266 | CLAW_DBF_TEXT(4, trace, "hw_tx"); | 1266 | CLAW_DBF_TEXT(4, trace, "hw_tx"); |
1267 | privptr = (struct claw_privbk *) (dev->priv); | 1267 | privptr = (struct claw_privbk *)(dev->ml_priv); |
1268 | p_ch=(struct chbk *)&privptr->channel[WRITE]; | 1268 | p_ch=(struct chbk *)&privptr->channel[WRITE]; |
1269 | p_env =privptr->p_env; | 1269 | p_env =privptr->p_env; |
1270 | claw_free_wrt_buf(dev); /* Clean up free chain if posible */ | 1270 | claw_free_wrt_buf(dev); /* Clean up free chain if posible */ |
@@ -1483,8 +1483,8 @@ init_ccw_bk(struct net_device *dev) | |||
1483 | struct ccwbk*p_last_CCWB; | 1483 | struct ccwbk*p_last_CCWB; |
1484 | struct ccwbk*p_first_CCWB; | 1484 | struct ccwbk*p_first_CCWB; |
1485 | struct endccw *p_endccw=NULL; | 1485 | struct endccw *p_endccw=NULL; |
1486 | addr_t real_address; | 1486 | addr_t real_address; |
1487 | struct claw_privbk *privptr=dev->priv; | 1487 | struct claw_privbk *privptr = dev->ml_priv; |
1488 | struct clawh *pClawH=NULL; | 1488 | struct clawh *pClawH=NULL; |
1489 | addr_t real_TIC_address; | 1489 | addr_t real_TIC_address; |
1490 | int i,j; | 1490 | int i,j; |
@@ -1997,7 +1997,7 @@ claw_process_control( struct net_device *dev, struct ccwbk * p_ccw) | |||
1997 | CLAW_DBF_TEXT(2, setup, "clw_cntl"); | 1997 | CLAW_DBF_TEXT(2, setup, "clw_cntl"); |
1998 | udelay(1000); /* Wait a ms for the control packets to | 1998 | udelay(1000); /* Wait a ms for the control packets to |
1999 | *catch up to each other */ | 1999 | *catch up to each other */ |
2000 | privptr=dev->priv; | 2000 | privptr = dev->ml_priv; |
2001 | p_env=privptr->p_env; | 2001 | p_env=privptr->p_env; |
2002 | tdev = &privptr->channel[READ].cdev->dev; | 2002 | tdev = &privptr->channel[READ].cdev->dev; |
2003 | memcpy( &temp_host_name, p_env->host_name, 8); | 2003 | memcpy( &temp_host_name, p_env->host_name, 8); |
@@ -2275,7 +2275,7 @@ claw_send_control(struct net_device *dev, __u8 type, __u8 link, | |||
2275 | struct sk_buff *skb; | 2275 | struct sk_buff *skb; |
2276 | 2276 | ||
2277 | CLAW_DBF_TEXT(2, setup, "sndcntl"); | 2277 | CLAW_DBF_TEXT(2, setup, "sndcntl"); |
2278 | privptr=dev->priv; | 2278 | privptr = dev->ml_priv; |
2279 | p_ctl=(struct clawctl *)&privptr->ctl_bk; | 2279 | p_ctl=(struct clawctl *)&privptr->ctl_bk; |
2280 | 2280 | ||
2281 | p_ctl->command=type; | 2281 | p_ctl->command=type; |
@@ -2345,7 +2345,7 @@ static int | |||
2345 | claw_snd_conn_req(struct net_device *dev, __u8 link) | 2345 | claw_snd_conn_req(struct net_device *dev, __u8 link) |
2346 | { | 2346 | { |
2347 | int rc; | 2347 | int rc; |
2348 | struct claw_privbk *privptr=dev->priv; | 2348 | struct claw_privbk *privptr = dev->ml_priv; |
2349 | struct clawctl *p_ctl; | 2349 | struct clawctl *p_ctl; |
2350 | 2350 | ||
2351 | CLAW_DBF_TEXT(2, setup, "snd_conn"); | 2351 | CLAW_DBF_TEXT(2, setup, "snd_conn"); |
@@ -2405,7 +2405,7 @@ claw_snd_sys_validate_rsp(struct net_device *dev, | |||
2405 | int rc; | 2405 | int rc; |
2406 | 2406 | ||
2407 | CLAW_DBF_TEXT(2, setup, "chkresp"); | 2407 | CLAW_DBF_TEXT(2, setup, "chkresp"); |
2408 | privptr = dev->priv; | 2408 | privptr = dev->ml_priv; |
2409 | p_env=privptr->p_env; | 2409 | p_env=privptr->p_env; |
2410 | rc=claw_send_control(dev, SYSTEM_VALIDATE_RESPONSE, | 2410 | rc=claw_send_control(dev, SYSTEM_VALIDATE_RESPONSE, |
2411 | p_ctl->linkid, | 2411 | p_ctl->linkid, |
@@ -2443,7 +2443,7 @@ net_device_stats *claw_stats(struct net_device *dev) | |||
2443 | struct claw_privbk *privptr; | 2443 | struct claw_privbk *privptr; |
2444 | 2444 | ||
2445 | CLAW_DBF_TEXT(4, trace, "stats"); | 2445 | CLAW_DBF_TEXT(4, trace, "stats"); |
2446 | privptr = dev->priv; | 2446 | privptr = dev->ml_priv; |
2447 | return &privptr->stats; | 2447 | return &privptr->stats; |
2448 | } /* end of claw_stats */ | 2448 | } /* end of claw_stats */ |
2449 | 2449 | ||
@@ -2479,7 +2479,7 @@ unpack_read(struct net_device *dev ) | |||
2479 | p_last_ccw=NULL; | 2479 | p_last_ccw=NULL; |
2480 | p_packh=NULL; | 2480 | p_packh=NULL; |
2481 | p_packd=NULL; | 2481 | p_packd=NULL; |
2482 | privptr=dev->priv; | 2482 | privptr = dev->ml_priv; |
2483 | 2483 | ||
2484 | p_dev = &privptr->channel[READ].cdev->dev; | 2484 | p_dev = &privptr->channel[READ].cdev->dev; |
2485 | p_env = privptr->p_env; | 2485 | p_env = privptr->p_env; |
@@ -2648,7 +2648,7 @@ claw_strt_read (struct net_device *dev, int lock ) | |||
2648 | int rc = 0; | 2648 | int rc = 0; |
2649 | __u32 parm; | 2649 | __u32 parm; |
2650 | unsigned long saveflags = 0; | 2650 | unsigned long saveflags = 0; |
2651 | struct claw_privbk *privptr=dev->priv; | 2651 | struct claw_privbk *privptr = dev->ml_priv; |
2652 | struct ccwbk*p_ccwbk; | 2652 | struct ccwbk*p_ccwbk; |
2653 | struct chbk *p_ch; | 2653 | struct chbk *p_ch; |
2654 | struct clawh *p_clawh; | 2654 | struct clawh *p_clawh; |
@@ -2705,7 +2705,7 @@ claw_strt_out_IO( struct net_device *dev ) | |||
2705 | if (!dev) { | 2705 | if (!dev) { |
2706 | return; | 2706 | return; |
2707 | } | 2707 | } |
2708 | privptr=(struct claw_privbk *)dev->priv; | 2708 | privptr = (struct claw_privbk *)dev->ml_priv; |
2709 | p_ch=&privptr->channel[WRITE]; | 2709 | p_ch=&privptr->channel[WRITE]; |
2710 | 2710 | ||
2711 | CLAW_DBF_TEXT(4, trace, "strt_io"); | 2711 | CLAW_DBF_TEXT(4, trace, "strt_io"); |
@@ -2738,7 +2738,7 @@ static void | |||
2738 | claw_free_wrt_buf( struct net_device *dev ) | 2738 | claw_free_wrt_buf( struct net_device *dev ) |
2739 | { | 2739 | { |
2740 | 2740 | ||
2741 | struct claw_privbk *privptr=(struct claw_privbk *)dev->priv; | 2741 | struct claw_privbk *privptr = (struct claw_privbk *)dev->ml_priv; |
2742 | struct ccwbk*p_first_ccw; | 2742 | struct ccwbk*p_first_ccw; |
2743 | struct ccwbk*p_last_ccw; | 2743 | struct ccwbk*p_last_ccw; |
2744 | struct ccwbk*p_this_ccw; | 2744 | struct ccwbk*p_this_ccw; |
@@ -2795,13 +2795,13 @@ claw_free_netdevice(struct net_device * dev, int free_dev) | |||
2795 | if (!dev) | 2795 | if (!dev) |
2796 | return; | 2796 | return; |
2797 | CLAW_DBF_TEXT_(2, setup, "%s", dev->name); | 2797 | CLAW_DBF_TEXT_(2, setup, "%s", dev->name); |
2798 | privptr = dev->priv; | 2798 | privptr = dev->ml_priv; |
2799 | if (dev->flags & IFF_RUNNING) | 2799 | if (dev->flags & IFF_RUNNING) |
2800 | claw_release(dev); | 2800 | claw_release(dev); |
2801 | if (privptr) { | 2801 | if (privptr) { |
2802 | privptr->channel[READ].ndev = NULL; /* say it's free */ | 2802 | privptr->channel[READ].ndev = NULL; /* say it's free */ |
2803 | } | 2803 | } |
2804 | dev->priv=NULL; | 2804 | dev->ml_priv = NULL; |
2805 | #ifdef MODULE | 2805 | #ifdef MODULE |
2806 | if (free_dev) { | 2806 | if (free_dev) { |
2807 | free_netdev(dev); | 2807 | free_netdev(dev); |
@@ -2918,7 +2918,7 @@ claw_new_device(struct ccwgroup_device *cgdev) | |||
2918 | printk(KERN_WARNING "%s:alloc_netdev failed\n",__func__); | 2918 | printk(KERN_WARNING "%s:alloc_netdev failed\n",__func__); |
2919 | goto out; | 2919 | goto out; |
2920 | } | 2920 | } |
2921 | dev->priv = privptr; | 2921 | dev->ml_priv = privptr; |
2922 | cgdev->dev.driver_data = privptr; | 2922 | cgdev->dev.driver_data = privptr; |
2923 | cgdev->cdev[READ]->dev.driver_data = privptr; | 2923 | cgdev->cdev[READ]->dev.driver_data = privptr; |
2924 | cgdev->cdev[WRITE]->dev.driver_data = privptr; | 2924 | cgdev->cdev[WRITE]->dev.driver_data = privptr; |
@@ -2999,7 +2999,7 @@ claw_shutdown_device(struct ccwgroup_device *cgdev) | |||
2999 | ret = claw_release(ndev); | 2999 | ret = claw_release(ndev); |
3000 | ndev->flags &=~IFF_RUNNING; | 3000 | ndev->flags &=~IFF_RUNNING; |
3001 | unregister_netdev(ndev); | 3001 | unregister_netdev(ndev); |
3002 | ndev->priv = NULL; /* cgdev data, not ndev's to free */ | 3002 | ndev->ml_priv = NULL; /* cgdev data, not ndev's to free */ |
3003 | claw_free_netdevice(ndev, 1); | 3003 | claw_free_netdevice(ndev, 1); |
3004 | priv->channel[READ].ndev = NULL; | 3004 | priv->channel[READ].ndev = NULL; |
3005 | priv->channel[WRITE].ndev = NULL; | 3005 | priv->channel[WRITE].ndev = NULL; |