diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/net/claw.c | 118 | ||||
-rw-r--r-- | drivers/s390/net/claw.h | 4 |
2 files changed, 61 insertions, 61 deletions
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c index a75ed3083a6a..8e4153d740f3 100644 --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c | |||
@@ -386,7 +386,7 @@ claw_tx(struct sk_buff *skb, struct net_device *dev) | |||
386 | struct chbk *p_ch; | 386 | struct chbk *p_ch; |
387 | 387 | ||
388 | CLAW_DBF_TEXT(4, trace, "claw_tx"); | 388 | CLAW_DBF_TEXT(4, trace, "claw_tx"); |
389 | p_ch=&privptr->channel[WRITE]; | 389 | p_ch = &privptr->channel[WRITE_CHANNEL]; |
390 | spin_lock_irqsave(get_ccwdev_lock(p_ch->cdev), saveflags); | 390 | spin_lock_irqsave(get_ccwdev_lock(p_ch->cdev), saveflags); |
391 | rc=claw_hw_tx( skb, dev, 1 ); | 391 | rc=claw_hw_tx( skb, dev, 1 ); |
392 | spin_unlock_irqrestore(get_ccwdev_lock(p_ch->cdev), saveflags); | 392 | spin_unlock_irqrestore(get_ccwdev_lock(p_ch->cdev), saveflags); |
@@ -407,7 +407,7 @@ static struct sk_buff * | |||
407 | claw_pack_skb(struct claw_privbk *privptr) | 407 | claw_pack_skb(struct claw_privbk *privptr) |
408 | { | 408 | { |
409 | struct sk_buff *new_skb,*held_skb; | 409 | struct sk_buff *new_skb,*held_skb; |
410 | struct chbk *p_ch = &privptr->channel[WRITE]; | 410 | struct chbk *p_ch = &privptr->channel[WRITE_CHANNEL]; |
411 | struct claw_env *p_env = privptr->p_env; | 411 | struct claw_env *p_env = privptr->p_env; |
412 | int pkt_cnt,pk_ind,so_far; | 412 | int pkt_cnt,pk_ind,so_far; |
413 | 413 | ||
@@ -515,15 +515,15 @@ claw_open(struct net_device *dev) | |||
515 | privptr->p_env->write_size=CLAW_FRAME_SIZE; | 515 | privptr->p_env->write_size=CLAW_FRAME_SIZE; |
516 | } | 516 | } |
517 | claw_set_busy(dev); | 517 | claw_set_busy(dev); |
518 | tasklet_init(&privptr->channel[READ].tasklet, claw_irq_tasklet, | 518 | tasklet_init(&privptr->channel[READ_CHANNEL].tasklet, claw_irq_tasklet, |
519 | (unsigned long) &privptr->channel[READ]); | 519 | (unsigned long) &privptr->channel[READ_CHANNEL]); |
520 | for ( i = 0; i < 2; i++) { | 520 | for ( i = 0; i < 2; i++) { |
521 | CLAW_DBF_TEXT_(2, trace, "opn_ch%d", i); | 521 | CLAW_DBF_TEXT_(2, trace, "opn_ch%d", i); |
522 | init_waitqueue_head(&privptr->channel[i].wait); | 522 | init_waitqueue_head(&privptr->channel[i].wait); |
523 | /* skb_queue_head_init(&p_ch->io_queue); */ | 523 | /* skb_queue_head_init(&p_ch->io_queue); */ |
524 | if (i == WRITE) | 524 | if (i == WRITE_CHANNEL) |
525 | skb_queue_head_init( | 525 | skb_queue_head_init( |
526 | &privptr->channel[WRITE].collect_queue); | 526 | &privptr->channel[WRITE_CHANNEL].collect_queue); |
527 | privptr->channel[i].flag_a = 0; | 527 | privptr->channel[i].flag_a = 0; |
528 | privptr->channel[i].IO_active = 0; | 528 | privptr->channel[i].IO_active = 0; |
529 | privptr->channel[i].flag &= ~CLAW_TIMER; | 529 | privptr->channel[i].flag &= ~CLAW_TIMER; |
@@ -551,12 +551,12 @@ claw_open(struct net_device *dev) | |||
551 | if((privptr->channel[i].flag & CLAW_TIMER) == 0x00) | 551 | if((privptr->channel[i].flag & CLAW_TIMER) == 0x00) |
552 | del_timer(&timer); | 552 | del_timer(&timer); |
553 | } | 553 | } |
554 | if ((((privptr->channel[READ].last_dstat | | 554 | if ((((privptr->channel[READ_CHANNEL].last_dstat | |
555 | privptr->channel[WRITE].last_dstat) & | 555 | privptr->channel[WRITE_CHANNEL].last_dstat) & |
556 | ~(DEV_STAT_CHN_END | DEV_STAT_DEV_END)) != 0x00) || | 556 | ~(DEV_STAT_CHN_END | DEV_STAT_DEV_END)) != 0x00) || |
557 | (((privptr->channel[READ].flag | | 557 | (((privptr->channel[READ_CHANNEL].flag | |
558 | privptr->channel[WRITE].flag) & CLAW_TIMER) != 0x00)) { | 558 | privptr->channel[WRITE_CHANNEL].flag) & CLAW_TIMER) != 0x00)) { |
559 | dev_info(&privptr->channel[READ].cdev->dev, | 559 | dev_info(&privptr->channel[READ_CHANNEL].cdev->dev, |
560 | "%s: remote side is not ready\n", dev->name); | 560 | "%s: remote side is not ready\n", dev->name); |
561 | CLAW_DBF_TEXT(2, trace, "notrdy"); | 561 | CLAW_DBF_TEXT(2, trace, "notrdy"); |
562 | 562 | ||
@@ -608,8 +608,8 @@ claw_open(struct net_device *dev) | |||
608 | } | 608 | } |
609 | } | 609 | } |
610 | privptr->buffs_alloc = 0; | 610 | privptr->buffs_alloc = 0; |
611 | privptr->channel[READ].flag= 0x00; | 611 | privptr->channel[READ_CHANNEL].flag = 0x00; |
612 | privptr->channel[WRITE].flag = 0x00; | 612 | privptr->channel[WRITE_CHANNEL].flag = 0x00; |
613 | privptr->p_buff_ccw=NULL; | 613 | privptr->p_buff_ccw=NULL; |
614 | privptr->p_buff_read=NULL; | 614 | privptr->p_buff_read=NULL; |
615 | privptr->p_buff_write=NULL; | 615 | privptr->p_buff_write=NULL; |
@@ -652,10 +652,10 @@ claw_irq_handler(struct ccw_device *cdev, | |||
652 | } | 652 | } |
653 | 653 | ||
654 | /* Try to extract channel from driver data. */ | 654 | /* Try to extract channel from driver data. */ |
655 | if (privptr->channel[READ].cdev == cdev) | 655 | if (privptr->channel[READ_CHANNEL].cdev == cdev) |
656 | p_ch = &privptr->channel[READ]; | 656 | p_ch = &privptr->channel[READ_CHANNEL]; |
657 | else if (privptr->channel[WRITE].cdev == cdev) | 657 | else if (privptr->channel[WRITE_CHANNEL].cdev == cdev) |
658 | p_ch = &privptr->channel[WRITE]; | 658 | p_ch = &privptr->channel[WRITE_CHANNEL]; |
659 | else { | 659 | else { |
660 | dev_warn(&cdev->dev, "The device is not a CLAW device\n"); | 660 | dev_warn(&cdev->dev, "The device is not a CLAW device\n"); |
661 | CLAW_DBF_TEXT(2, trace, "badchan"); | 661 | CLAW_DBF_TEXT(2, trace, "badchan"); |
@@ -813,7 +813,7 @@ claw_irq_handler(struct ccw_device *cdev, | |||
813 | claw_clearbit_busy(TB_TX, dev); | 813 | claw_clearbit_busy(TB_TX, dev); |
814 | claw_clear_busy(dev); | 814 | claw_clear_busy(dev); |
815 | } | 815 | } |
816 | p_ch_r = (struct chbk *)&privptr->channel[READ]; | 816 | p_ch_r = (struct chbk *)&privptr->channel[READ_CHANNEL]; |
817 | if (test_and_set_bit(CLAW_BH_ACTIVE, | 817 | if (test_and_set_bit(CLAW_BH_ACTIVE, |
818 | (void *)&p_ch_r->flag_a) == 0) | 818 | (void *)&p_ch_r->flag_a) == 0) |
819 | tasklet_schedule(&p_ch_r->tasklet); | 819 | tasklet_schedule(&p_ch_r->tasklet); |
@@ -878,13 +878,13 @@ claw_release(struct net_device *dev) | |||
878 | for ( i = 1; i >=0 ; i--) { | 878 | for ( i = 1; i >=0 ; i--) { |
879 | spin_lock_irqsave( | 879 | spin_lock_irqsave( |
880 | get_ccwdev_lock(privptr->channel[i].cdev), saveflags); | 880 | get_ccwdev_lock(privptr->channel[i].cdev), saveflags); |
881 | /* del_timer(&privptr->channel[READ].timer); */ | 881 | /* del_timer(&privptr->channel[READ_CHANNEL].timer); */ |
882 | privptr->channel[i].claw_state = CLAW_STOP; | 882 | privptr->channel[i].claw_state = CLAW_STOP; |
883 | privptr->channel[i].IO_active = 0; | 883 | privptr->channel[i].IO_active = 0; |
884 | parm = (unsigned long) &privptr->channel[i]; | 884 | parm = (unsigned long) &privptr->channel[i]; |
885 | if (i == WRITE) | 885 | if (i == WRITE_CHANNEL) |
886 | claw_purge_skb_queue( | 886 | claw_purge_skb_queue( |
887 | &privptr->channel[WRITE].collect_queue); | 887 | &privptr->channel[WRITE_CHANNEL].collect_queue); |
888 | rc = ccw_device_halt (privptr->channel[i].cdev, parm); | 888 | rc = ccw_device_halt (privptr->channel[i].cdev, parm); |
889 | if (privptr->system_validate_comp==0x00) /* never opened? */ | 889 | if (privptr->system_validate_comp==0x00) /* never opened? */ |
890 | init_waitqueue_head(&privptr->channel[i].wait); | 890 | init_waitqueue_head(&privptr->channel[i].wait); |
@@ -971,16 +971,16 @@ claw_release(struct net_device *dev) | |||
971 | privptr->mtc_skipping = 1; | 971 | privptr->mtc_skipping = 1; |
972 | privptr->mtc_offset=0; | 972 | privptr->mtc_offset=0; |
973 | 973 | ||
974 | if (((privptr->channel[READ].last_dstat | | 974 | if (((privptr->channel[READ_CHANNEL].last_dstat | |
975 | privptr->channel[WRITE].last_dstat) & | 975 | privptr->channel[WRITE_CHANNEL].last_dstat) & |
976 | ~(DEV_STAT_CHN_END | DEV_STAT_DEV_END)) != 0x00) { | 976 | ~(DEV_STAT_CHN_END | DEV_STAT_DEV_END)) != 0x00) { |
977 | dev_warn(&privptr->channel[READ].cdev->dev, | 977 | dev_warn(&privptr->channel[READ_CHANNEL].cdev->dev, |
978 | "Deactivating %s completed with incorrect" | 978 | "Deactivating %s completed with incorrect" |
979 | " subchannel status " | 979 | " subchannel status " |
980 | "(read %02x, write %02x)\n", | 980 | "(read %02x, write %02x)\n", |
981 | dev->name, | 981 | dev->name, |
982 | privptr->channel[READ].last_dstat, | 982 | privptr->channel[READ_CHANNEL].last_dstat, |
983 | privptr->channel[WRITE].last_dstat); | 983 | privptr->channel[WRITE_CHANNEL].last_dstat); |
984 | CLAW_DBF_TEXT(2, trace, "badclose"); | 984 | CLAW_DBF_TEXT(2, trace, "badclose"); |
985 | } | 985 | } |
986 | CLAW_DBF_TEXT(4, trace, "rlsexit"); | 986 | CLAW_DBF_TEXT(4, trace, "rlsexit"); |
@@ -1324,7 +1324,7 @@ claw_hw_tx(struct sk_buff *skb, struct net_device *dev, long linkid) | |||
1324 | 1324 | ||
1325 | CLAW_DBF_TEXT(4, trace, "hw_tx"); | 1325 | CLAW_DBF_TEXT(4, trace, "hw_tx"); |
1326 | privptr = (struct claw_privbk *)(dev->ml_priv); | 1326 | privptr = (struct claw_privbk *)(dev->ml_priv); |
1327 | p_ch=(struct chbk *)&privptr->channel[WRITE]; | 1327 | p_ch = (struct chbk *)&privptr->channel[WRITE_CHANNEL]; |
1328 | p_env =privptr->p_env; | 1328 | p_env =privptr->p_env; |
1329 | claw_free_wrt_buf(dev); /* Clean up free chain if posible */ | 1329 | claw_free_wrt_buf(dev); /* Clean up free chain if posible */ |
1330 | /* scan the write queue to free any completed write packets */ | 1330 | /* scan the write queue to free any completed write packets */ |
@@ -1357,7 +1357,7 @@ claw_hw_tx(struct sk_buff *skb, struct net_device *dev, long linkid) | |||
1357 | claw_strt_out_IO(dev ); | 1357 | claw_strt_out_IO(dev ); |
1358 | claw_free_wrt_buf( dev ); | 1358 | claw_free_wrt_buf( dev ); |
1359 | if (privptr->write_free_count==0) { | 1359 | if (privptr->write_free_count==0) { |
1360 | ch = &privptr->channel[WRITE]; | 1360 | ch = &privptr->channel[WRITE_CHANNEL]; |
1361 | atomic_inc(&skb->users); | 1361 | atomic_inc(&skb->users); |
1362 | skb_queue_tail(&ch->collect_queue, skb); | 1362 | skb_queue_tail(&ch->collect_queue, skb); |
1363 | goto Done; | 1363 | goto Done; |
@@ -1369,7 +1369,7 @@ claw_hw_tx(struct sk_buff *skb, struct net_device *dev, long linkid) | |||
1369 | } | 1369 | } |
1370 | /* tx lock */ | 1370 | /* tx lock */ |
1371 | if (claw_test_and_setbit_busy(TB_TX,dev)) { /* set to busy */ | 1371 | if (claw_test_and_setbit_busy(TB_TX,dev)) { /* set to busy */ |
1372 | ch = &privptr->channel[WRITE]; | 1372 | ch = &privptr->channel[WRITE_CHANNEL]; |
1373 | atomic_inc(&skb->users); | 1373 | atomic_inc(&skb->users); |
1374 | skb_queue_tail(&ch->collect_queue, skb); | 1374 | skb_queue_tail(&ch->collect_queue, skb); |
1375 | claw_strt_out_IO(dev ); | 1375 | claw_strt_out_IO(dev ); |
@@ -1385,7 +1385,7 @@ claw_hw_tx(struct sk_buff *skb, struct net_device *dev, long linkid) | |||
1385 | privptr->p_write_free_chain == NULL ) { | 1385 | privptr->p_write_free_chain == NULL ) { |
1386 | 1386 | ||
1387 | claw_setbit_busy(TB_NOBUFFER,dev); | 1387 | claw_setbit_busy(TB_NOBUFFER,dev); |
1388 | ch = &privptr->channel[WRITE]; | 1388 | ch = &privptr->channel[WRITE_CHANNEL]; |
1389 | atomic_inc(&skb->users); | 1389 | atomic_inc(&skb->users); |
1390 | skb_queue_tail(&ch->collect_queue, skb); | 1390 | skb_queue_tail(&ch->collect_queue, skb); |
1391 | CLAW_DBF_TEXT(2, trace, "clawbusy"); | 1391 | CLAW_DBF_TEXT(2, trace, "clawbusy"); |
@@ -1397,7 +1397,7 @@ claw_hw_tx(struct sk_buff *skb, struct net_device *dev, long linkid) | |||
1397 | while (len_of_data > 0) { | 1397 | while (len_of_data > 0) { |
1398 | p_this_ccw=privptr->p_write_free_chain; /* get a block */ | 1398 | p_this_ccw=privptr->p_write_free_chain; /* get a block */ |
1399 | if (p_this_ccw == NULL) { /* lost the race */ | 1399 | if (p_this_ccw == NULL) { /* lost the race */ |
1400 | ch = &privptr->channel[WRITE]; | 1400 | ch = &privptr->channel[WRITE_CHANNEL]; |
1401 | atomic_inc(&skb->users); | 1401 | atomic_inc(&skb->users); |
1402 | skb_queue_tail(&ch->collect_queue, skb); | 1402 | skb_queue_tail(&ch->collect_queue, skb); |
1403 | goto Done2; | 1403 | goto Done2; |
@@ -2067,7 +2067,7 @@ claw_process_control( struct net_device *dev, struct ccwbk * p_ccw) | |||
2067 | *catch up to each other */ | 2067 | *catch up to each other */ |
2068 | privptr = dev->ml_priv; | 2068 | privptr = dev->ml_priv; |
2069 | p_env=privptr->p_env; | 2069 | p_env=privptr->p_env; |
2070 | tdev = &privptr->channel[READ].cdev->dev; | 2070 | tdev = &privptr->channel[READ_CHANNEL].cdev->dev; |
2071 | memcpy( &temp_host_name, p_env->host_name, 8); | 2071 | memcpy( &temp_host_name, p_env->host_name, 8); |
2072 | memcpy( &temp_ws_name, p_env->adapter_name , 8); | 2072 | memcpy( &temp_ws_name, p_env->adapter_name , 8); |
2073 | dev_info(tdev, "%s: CLAW device %.8s: " | 2073 | dev_info(tdev, "%s: CLAW device %.8s: " |
@@ -2245,7 +2245,7 @@ claw_process_control( struct net_device *dev, struct ccwbk * p_ccw) | |||
2245 | dev->name, temp_ws_name, | 2245 | dev->name, temp_ws_name, |
2246 | p_ctlbk->linkid); | 2246 | p_ctlbk->linkid); |
2247 | privptr->active_link_ID = p_ctlbk->linkid; | 2247 | privptr->active_link_ID = p_ctlbk->linkid; |
2248 | p_ch = &privptr->channel[WRITE]; | 2248 | p_ch = &privptr->channel[WRITE_CHANNEL]; |
2249 | wake_up(&p_ch->wait); /* wake up claw_open ( WRITE) */ | 2249 | wake_up(&p_ch->wait); /* wake up claw_open ( WRITE) */ |
2250 | break; | 2250 | break; |
2251 | case CONNECTION_RESPONSE: | 2251 | case CONNECTION_RESPONSE: |
@@ -2296,7 +2296,7 @@ claw_process_control( struct net_device *dev, struct ccwbk * p_ccw) | |||
2296 | "%s: Confirmed Now packing\n", dev->name); | 2296 | "%s: Confirmed Now packing\n", dev->name); |
2297 | p_env->packing = DO_PACKED; | 2297 | p_env->packing = DO_PACKED; |
2298 | } | 2298 | } |
2299 | p_ch = &privptr->channel[WRITE]; | 2299 | p_ch = &privptr->channel[WRITE_CHANNEL]; |
2300 | wake_up(&p_ch->wait); | 2300 | wake_up(&p_ch->wait); |
2301 | } else { | 2301 | } else { |
2302 | dev_warn(tdev, "Activating %s failed because of" | 2302 | dev_warn(tdev, "Activating %s failed because of" |
@@ -2556,7 +2556,7 @@ unpack_read(struct net_device *dev ) | |||
2556 | p_packd=NULL; | 2556 | p_packd=NULL; |
2557 | privptr = dev->ml_priv; | 2557 | privptr = dev->ml_priv; |
2558 | 2558 | ||
2559 | p_dev = &privptr->channel[READ].cdev->dev; | 2559 | p_dev = &privptr->channel[READ_CHANNEL].cdev->dev; |
2560 | p_env = privptr->p_env; | 2560 | p_env = privptr->p_env; |
2561 | p_this_ccw=privptr->p_read_active_first; | 2561 | p_this_ccw=privptr->p_read_active_first; |
2562 | while (p_this_ccw!=NULL && p_this_ccw->header.flag!=CLAW_PENDING) { | 2562 | while (p_this_ccw!=NULL && p_this_ccw->header.flag!=CLAW_PENDING) { |
@@ -2728,7 +2728,7 @@ claw_strt_read (struct net_device *dev, int lock ) | |||
2728 | struct ccwbk*p_ccwbk; | 2728 | struct ccwbk*p_ccwbk; |
2729 | struct chbk *p_ch; | 2729 | struct chbk *p_ch; |
2730 | struct clawh *p_clawh; | 2730 | struct clawh *p_clawh; |
2731 | p_ch=&privptr->channel[READ]; | 2731 | p_ch = &privptr->channel[READ_CHANNEL]; |
2732 | 2732 | ||
2733 | CLAW_DBF_TEXT(4, trace, "StRdNter"); | 2733 | CLAW_DBF_TEXT(4, trace, "StRdNter"); |
2734 | p_clawh=(struct clawh *)privptr->p_claw_signal_blk; | 2734 | p_clawh=(struct clawh *)privptr->p_claw_signal_blk; |
@@ -2782,7 +2782,7 @@ claw_strt_out_IO( struct net_device *dev ) | |||
2782 | return; | 2782 | return; |
2783 | } | 2783 | } |
2784 | privptr = (struct claw_privbk *)dev->ml_priv; | 2784 | privptr = (struct claw_privbk *)dev->ml_priv; |
2785 | p_ch=&privptr->channel[WRITE]; | 2785 | p_ch = &privptr->channel[WRITE_CHANNEL]; |
2786 | 2786 | ||
2787 | CLAW_DBF_TEXT(4, trace, "strt_io"); | 2787 | CLAW_DBF_TEXT(4, trace, "strt_io"); |
2788 | p_first_ccw=privptr->p_write_active_first; | 2788 | p_first_ccw=privptr->p_write_active_first; |
@@ -2875,7 +2875,7 @@ claw_free_netdevice(struct net_device * dev, int free_dev) | |||
2875 | if (dev->flags & IFF_RUNNING) | 2875 | if (dev->flags & IFF_RUNNING) |
2876 | claw_release(dev); | 2876 | claw_release(dev); |
2877 | if (privptr) { | 2877 | if (privptr) { |
2878 | privptr->channel[READ].ndev = NULL; /* say it's free */ | 2878 | privptr->channel[READ_CHANNEL].ndev = NULL; /* say it's free */ |
2879 | } | 2879 | } |
2880 | dev->ml_priv = NULL; | 2880 | dev->ml_priv = NULL; |
2881 | #ifdef MODULE | 2881 | #ifdef MODULE |
@@ -2960,18 +2960,18 @@ claw_new_device(struct ccwgroup_device *cgdev) | |||
2960 | struct ccw_dev_id dev_id; | 2960 | struct ccw_dev_id dev_id; |
2961 | 2961 | ||
2962 | dev_info(&cgdev->dev, "add for %s\n", | 2962 | dev_info(&cgdev->dev, "add for %s\n", |
2963 | dev_name(&cgdev->cdev[READ]->dev)); | 2963 | dev_name(&cgdev->cdev[READ_CHANNEL]->dev)); |
2964 | CLAW_DBF_TEXT(2, setup, "new_dev"); | 2964 | CLAW_DBF_TEXT(2, setup, "new_dev"); |
2965 | privptr = dev_get_drvdata(&cgdev->dev); | 2965 | privptr = dev_get_drvdata(&cgdev->dev); |
2966 | dev_set_drvdata(&cgdev->cdev[READ]->dev, privptr); | 2966 | dev_set_drvdata(&cgdev->cdev[READ_CHANNEL]->dev, privptr); |
2967 | dev_set_drvdata(&cgdev->cdev[WRITE]->dev, privptr); | 2967 | dev_set_drvdata(&cgdev->cdev[WRITE_CHANNEL]->dev, privptr); |
2968 | if (!privptr) | 2968 | if (!privptr) |
2969 | return -ENODEV; | 2969 | return -ENODEV; |
2970 | p_env = privptr->p_env; | 2970 | p_env = privptr->p_env; |
2971 | ccw_device_get_id(cgdev->cdev[READ], &dev_id); | 2971 | ccw_device_get_id(cgdev->cdev[READ_CHANNEL], &dev_id); |
2972 | p_env->devno[READ] = dev_id.devno; | 2972 | p_env->devno[READ_CHANNEL] = dev_id.devno; |
2973 | ccw_device_get_id(cgdev->cdev[WRITE], &dev_id); | 2973 | ccw_device_get_id(cgdev->cdev[WRITE_CHANNEL], &dev_id); |
2974 | p_env->devno[WRITE] = dev_id.devno; | 2974 | p_env->devno[WRITE_CHANNEL] = dev_id.devno; |
2975 | ret = add_channel(cgdev->cdev[0],0,privptr); | 2975 | ret = add_channel(cgdev->cdev[0],0,privptr); |
2976 | if (ret == 0) | 2976 | if (ret == 0) |
2977 | ret = add_channel(cgdev->cdev[1],1,privptr); | 2977 | ret = add_channel(cgdev->cdev[1],1,privptr); |
@@ -2980,14 +2980,14 @@ claw_new_device(struct ccwgroup_device *cgdev) | |||
2980 | " failed with error code %d\n", ret); | 2980 | " failed with error code %d\n", ret); |
2981 | goto out; | 2981 | goto out; |
2982 | } | 2982 | } |
2983 | ret = ccw_device_set_online(cgdev->cdev[READ]); | 2983 | ret = ccw_device_set_online(cgdev->cdev[READ_CHANNEL]); |
2984 | if (ret != 0) { | 2984 | if (ret != 0) { |
2985 | dev_warn(&cgdev->dev, | 2985 | dev_warn(&cgdev->dev, |
2986 | "Setting the read subchannel online" | 2986 | "Setting the read subchannel online" |
2987 | " failed with error code %d\n", ret); | 2987 | " failed with error code %d\n", ret); |
2988 | goto out; | 2988 | goto out; |
2989 | } | 2989 | } |
2990 | ret = ccw_device_set_online(cgdev->cdev[WRITE]); | 2990 | ret = ccw_device_set_online(cgdev->cdev[WRITE_CHANNEL]); |
2991 | if (ret != 0) { | 2991 | if (ret != 0) { |
2992 | dev_warn(&cgdev->dev, | 2992 | dev_warn(&cgdev->dev, |
2993 | "Setting the write subchannel online " | 2993 | "Setting the write subchannel online " |
@@ -3002,8 +3002,8 @@ claw_new_device(struct ccwgroup_device *cgdev) | |||
3002 | } | 3002 | } |
3003 | dev->ml_priv = privptr; | 3003 | dev->ml_priv = privptr; |
3004 | dev_set_drvdata(&cgdev->dev, privptr); | 3004 | dev_set_drvdata(&cgdev->dev, privptr); |
3005 | dev_set_drvdata(&cgdev->cdev[READ]->dev, privptr); | 3005 | dev_set_drvdata(&cgdev->cdev[READ_CHANNEL]->dev, privptr); |
3006 | dev_set_drvdata(&cgdev->cdev[WRITE]->dev, privptr); | 3006 | dev_set_drvdata(&cgdev->cdev[WRITE_CHANNEL]->dev, privptr); |
3007 | /* sysfs magic */ | 3007 | /* sysfs magic */ |
3008 | SET_NETDEV_DEV(dev, &cgdev->dev); | 3008 | SET_NETDEV_DEV(dev, &cgdev->dev); |
3009 | if (register_netdev(dev) != 0) { | 3009 | if (register_netdev(dev) != 0) { |
@@ -3021,16 +3021,16 @@ claw_new_device(struct ccwgroup_device *cgdev) | |||
3021 | goto out; | 3021 | goto out; |
3022 | } | 3022 | } |
3023 | } | 3023 | } |
3024 | privptr->channel[READ].ndev = dev; | 3024 | privptr->channel[READ_CHANNEL].ndev = dev; |
3025 | privptr->channel[WRITE].ndev = dev; | 3025 | privptr->channel[WRITE_CHANNEL].ndev = dev; |
3026 | privptr->p_env->ndev = dev; | 3026 | privptr->p_env->ndev = dev; |
3027 | 3027 | ||
3028 | dev_info(&cgdev->dev, "%s:readsize=%d writesize=%d " | 3028 | dev_info(&cgdev->dev, "%s:readsize=%d writesize=%d " |
3029 | "readbuffer=%d writebuffer=%d read=0x%04x write=0x%04x\n", | 3029 | "readbuffer=%d writebuffer=%d read=0x%04x write=0x%04x\n", |
3030 | dev->name, p_env->read_size, | 3030 | dev->name, p_env->read_size, |
3031 | p_env->write_size, p_env->read_buffers, | 3031 | p_env->write_size, p_env->read_buffers, |
3032 | p_env->write_buffers, p_env->devno[READ], | 3032 | p_env->write_buffers, p_env->devno[READ_CHANNEL], |
3033 | p_env->devno[WRITE]); | 3033 | p_env->devno[WRITE_CHANNEL]); |
3034 | dev_info(&cgdev->dev, "%s:host_name:%.8s, adapter_name " | 3034 | dev_info(&cgdev->dev, "%s:host_name:%.8s, adapter_name " |
3035 | ":%.8s api_type: %.8s\n", | 3035 | ":%.8s api_type: %.8s\n", |
3036 | dev->name, p_env->host_name, | 3036 | dev->name, p_env->host_name, |
@@ -3072,10 +3072,10 @@ claw_shutdown_device(struct ccwgroup_device *cgdev) | |||
3072 | priv = dev_get_drvdata(&cgdev->dev); | 3072 | priv = dev_get_drvdata(&cgdev->dev); |
3073 | if (!priv) | 3073 | if (!priv) |
3074 | return -ENODEV; | 3074 | return -ENODEV; |
3075 | ndev = priv->channel[READ].ndev; | 3075 | ndev = priv->channel[READ_CHANNEL].ndev; |
3076 | if (ndev) { | 3076 | if (ndev) { |
3077 | /* Close the device */ | 3077 | /* Close the device */ |
3078 | dev_info(&cgdev->dev, "%s: shutting down \n", | 3078 | dev_info(&cgdev->dev, "%s: shutting down\n", |
3079 | ndev->name); | 3079 | ndev->name); |
3080 | if (ndev->flags & IFF_RUNNING) | 3080 | if (ndev->flags & IFF_RUNNING) |
3081 | ret = claw_release(ndev); | 3081 | ret = claw_release(ndev); |
@@ -3083,8 +3083,8 @@ claw_shutdown_device(struct ccwgroup_device *cgdev) | |||
3083 | unregister_netdev(ndev); | 3083 | unregister_netdev(ndev); |
3084 | ndev->ml_priv = NULL; /* cgdev data, not ndev's to free */ | 3084 | ndev->ml_priv = NULL; /* cgdev data, not ndev's to free */ |
3085 | claw_free_netdevice(ndev, 1); | 3085 | claw_free_netdevice(ndev, 1); |
3086 | priv->channel[READ].ndev = NULL; | 3086 | priv->channel[READ_CHANNEL].ndev = NULL; |
3087 | priv->channel[WRITE].ndev = NULL; | 3087 | priv->channel[WRITE_CHANNEL].ndev = NULL; |
3088 | priv->p_env->ndev = NULL; | 3088 | priv->p_env->ndev = NULL; |
3089 | } | 3089 | } |
3090 | ccw_device_set_offline(cgdev->cdev[1]); | 3090 | ccw_device_set_offline(cgdev->cdev[1]); |
@@ -3115,8 +3115,8 @@ claw_remove_device(struct ccwgroup_device *cgdev) | |||
3115 | priv->channel[1].irb=NULL; | 3115 | priv->channel[1].irb=NULL; |
3116 | kfree(priv); | 3116 | kfree(priv); |
3117 | dev_set_drvdata(&cgdev->dev, NULL); | 3117 | dev_set_drvdata(&cgdev->dev, NULL); |
3118 | dev_set_drvdata(&cgdev->cdev[READ]->dev, NULL); | 3118 | dev_set_drvdata(&cgdev->cdev[READ_CHANNEL]->dev, NULL); |
3119 | dev_set_drvdata(&cgdev->cdev[WRITE]->dev, NULL); | 3119 | dev_set_drvdata(&cgdev->cdev[WRITE_CHANNEL]->dev, NULL); |
3120 | put_device(&cgdev->dev); | 3120 | put_device(&cgdev->dev); |
3121 | 3121 | ||
3122 | return; | 3122 | return; |
diff --git a/drivers/s390/net/claw.h b/drivers/s390/net/claw.h index 46d59a13db12..1bc5904df19f 100644 --- a/drivers/s390/net/claw.h +++ b/drivers/s390/net/claw.h | |||
@@ -74,8 +74,8 @@ | |||
74 | #define MAX_ENVELOPE_SIZE 65536 | 74 | #define MAX_ENVELOPE_SIZE 65536 |
75 | #define CLAW_DEFAULT_MTU_SIZE 4096 | 75 | #define CLAW_DEFAULT_MTU_SIZE 4096 |
76 | #define DEF_PACK_BUFSIZE 32768 | 76 | #define DEF_PACK_BUFSIZE 32768 |
77 | #define READ 0 | 77 | #define READ_CHANNEL 0 |
78 | #define WRITE 1 | 78 | #define WRITE_CHANNEL 1 |
79 | 79 | ||
80 | #define TB_TX 0 /* sk buffer handling in process */ | 80 | #define TB_TX 0 /* sk buffer handling in process */ |
81 | #define TB_STOP 1 /* network device stop in process */ | 81 | #define TB_STOP 1 /* network device stop in process */ |