aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/net/qeth_main.c')
-rw-r--r--drivers/s390/net/qeth_main.c57
1 files changed, 6 insertions, 51 deletions
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index dba7f7f02e79..021cd5d08c61 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -1364,7 +1364,7 @@ qeth_wait_for_buffer(struct qeth_channel *channel)
1364static void 1364static void
1365qeth_clear_cmd_buffers(struct qeth_channel *channel) 1365qeth_clear_cmd_buffers(struct qeth_channel *channel)
1366{ 1366{
1367 int cnt = 0; 1367 int cnt;
1368 1368
1369 for (cnt=0; cnt < QETH_CMD_BUFFER_NO; cnt++) 1369 for (cnt=0; cnt < QETH_CMD_BUFFER_NO; cnt++)
1370 qeth_release_buffer(channel,&channel->iob[cnt]); 1370 qeth_release_buffer(channel,&channel->iob[cnt]);
@@ -2814,11 +2814,11 @@ qeth_handle_send_error(struct qeth_card *card,
2814 QETH_DBF_TEXT_(trace,1,"%s",CARD_BUS_ID(card)); 2814 QETH_DBF_TEXT_(trace,1,"%s",CARD_BUS_ID(card));
2815 return QETH_SEND_ERROR_LINK_FAILURE; 2815 return QETH_SEND_ERROR_LINK_FAILURE;
2816 case 3: 2816 case 3:
2817 default:
2817 QETH_DBF_TEXT(trace, 1, "SIGAcc3"); 2818 QETH_DBF_TEXT(trace, 1, "SIGAcc3");
2818 QETH_DBF_TEXT_(trace,1,"%s",CARD_BUS_ID(card)); 2819 QETH_DBF_TEXT_(trace,1,"%s",CARD_BUS_ID(card));
2819 return QETH_SEND_ERROR_KICK_IT; 2820 return QETH_SEND_ERROR_KICK_IT;
2820 } 2821 }
2821 return QETH_SEND_ERROR_LINK_FAILURE;
2822} 2822}
2823 2823
2824void 2824void
@@ -3865,6 +3865,7 @@ qeth_get_cast_type(struct qeth_card *card, struct sk_buff *skb)
3865 if ((hdr_mac == QETH_TR_MAC_NC) || 3865 if ((hdr_mac == QETH_TR_MAC_NC) ||
3866 (hdr_mac == QETH_TR_MAC_C)) 3866 (hdr_mac == QETH_TR_MAC_C))
3867 return RTN_MULTICAST; 3867 return RTN_MULTICAST;
3868 break;
3868 /* eth or so multicast? */ 3869 /* eth or so multicast? */
3869 default: 3870 default:
3870 if ((hdr_mac == QETH_ETH_MAC_V4) || 3871 if ((hdr_mac == QETH_ETH_MAC_V4) ||
@@ -4419,6 +4420,7 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb)
4419 int elements_needed = 0; 4420 int elements_needed = 0;
4420 enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO; 4421 enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO;
4421 struct qeth_eddp_context *ctx = NULL; 4422 struct qeth_eddp_context *ctx = NULL;
4423 int tx_bytes = skb->len;
4422 int rc; 4424 int rc;
4423 4425
4424 QETH_DBF_TEXT(trace, 6, "sendpkt"); 4426 QETH_DBF_TEXT(trace, 6, "sendpkt");
@@ -4499,7 +4501,7 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb)
4499 elements_needed, ctx); 4501 elements_needed, ctx);
4500 if (!rc){ 4502 if (!rc){
4501 card->stats.tx_packets++; 4503 card->stats.tx_packets++;
4502 card->stats.tx_bytes += skb->len; 4504 card->stats.tx_bytes += tx_bytes;
4503#ifdef CONFIG_QETH_PERF_STATS 4505#ifdef CONFIG_QETH_PERF_STATS
4504 if (skb_shinfo(skb)->tso_size && 4506 if (skb_shinfo(skb)->tso_size &&
4505 !(large_send == QETH_LARGE_SEND_NO)) { 4507 !(large_send == QETH_LARGE_SEND_NO)) {
@@ -4585,38 +4587,11 @@ qeth_mdio_read(struct net_device *dev, int phy_id, int regnum)
4585 case MII_NCONFIG: /* network interface config */ 4587 case MII_NCONFIG: /* network interface config */
4586 break; 4588 break;
4587 default: 4589 default:
4588 rc = 0;
4589 break; 4590 break;
4590 } 4591 }
4591 return rc; 4592 return rc;
4592} 4593}
4593 4594
4594static void
4595qeth_mdio_write(struct net_device *dev, int phy_id, int regnum, int value)
4596{
4597 switch(regnum){
4598 case MII_BMCR: /* Basic mode control register */
4599 case MII_BMSR: /* Basic mode status register */
4600 case MII_PHYSID1: /* PHYS ID 1 */
4601 case MII_PHYSID2: /* PHYS ID 2 */
4602 case MII_ADVERTISE: /* Advertisement control reg */
4603 case MII_LPA: /* Link partner ability reg */
4604 case MII_EXPANSION: /* Expansion register */
4605 case MII_DCOUNTER: /* disconnect counter */
4606 case MII_FCSCOUNTER: /* false carrier counter */
4607 case MII_NWAYTEST: /* N-way auto-neg test register */
4608 case MII_RERRCOUNTER: /* rx error counter */
4609 case MII_SREVISION: /* silicon revision */
4610 case MII_RESV1: /* reserved 1 */
4611 case MII_LBRERROR: /* loopback, rx, bypass error */
4612 case MII_PHYADDR: /* physical address */
4613 case MII_RESV2: /* reserved 2 */
4614 case MII_TPISTATUS: /* TPI status for 10mbps */
4615 case MII_NCONFIG: /* network interface config */
4616 default:
4617 break;
4618 }
4619}
4620 4595
4621static inline const char * 4596static inline const char *
4622qeth_arp_get_error_cause(int *rc) 4597qeth_arp_get_error_cause(int *rc)
@@ -5236,21 +5211,6 @@ qeth_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
5236 mii_data->val_out = qeth_mdio_read(dev,mii_data->phy_id, 5211 mii_data->val_out = qeth_mdio_read(dev,mii_data->phy_id,
5237 mii_data->reg_num); 5212 mii_data->reg_num);
5238 break; 5213 break;
5239 case SIOCSMIIREG:
5240 rc = -EOPNOTSUPP;
5241 break;
5242 /* TODO: remove return if qeth_mdio_write does something */
5243 if (!capable(CAP_NET_ADMIN)){
5244 rc = -EPERM;
5245 break;
5246 }
5247 mii_data = if_mii(rq);
5248 if (mii_data->phy_id != 0)
5249 rc = -EINVAL;
5250 else
5251 qeth_mdio_write(dev, mii_data->phy_id, mii_data->reg_num,
5252 mii_data->val_in);
5253 break;
5254 default: 5214 default:
5255 rc = -EOPNOTSUPP; 5215 rc = -EOPNOTSUPP;
5256 } 5216 }
@@ -6900,7 +6860,7 @@ qeth_send_setassparms(struct qeth_card *card, struct qeth_cmd_buffer *iob,
6900 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 6860 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
6901 if (len <= sizeof(__u32)) 6861 if (len <= sizeof(__u32))
6902 cmd->data.setassparms.data.flags_32bit = (__u32) data; 6862 cmd->data.setassparms.data.flags_32bit = (__u32) data;
6903 else if (len > sizeof(__u32)) 6863 else /* (len > sizeof(__u32)) */
6904 memcpy(&cmd->data.setassparms.data, (void *) data, len); 6864 memcpy(&cmd->data.setassparms.data, (void *) data, len);
6905 6865
6906 rc = qeth_send_ipa_cmd(card, iob, reply_cb, reply_param); 6866 rc = qeth_send_ipa_cmd(card, iob, reply_cb, reply_param);
@@ -7379,11 +7339,6 @@ qeth_setrouting_v6(struct qeth_card *card)
7379 qeth_correct_routing_type(card, &card->options.route6.type, 7339 qeth_correct_routing_type(card, &card->options.route6.type,
7380 QETH_PROT_IPV6); 7340 QETH_PROT_IPV6);
7381 7341
7382 if ((card->options.route6.type == NO_ROUTER) ||
7383 ((card->info.type == QETH_CARD_TYPE_OSAE) &&
7384 (card->options.route6.type == MULTICAST_ROUTER) &&
7385 !qeth_is_supported6(card,IPA_OSA_MC_ROUTER)))
7386 return 0;
7387 rc = qeth_send_setrouting(card, card->options.route6.type, 7342 rc = qeth_send_setrouting(card, card->options.route6.type,
7388 QETH_PROT_IPV6); 7343 QETH_PROT_IPV6);
7389 if (rc) { 7344 if (rc) {