diff options
Diffstat (limited to 'drivers/s390/net/qeth_main.c')
-rw-r--r-- | drivers/s390/net/qeth_main.c | 49 |
1 files changed, 4 insertions, 45 deletions
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 634c3958f426..69329ea61e2b 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) static void qeth_clear_cmd_buffers(struct qeth_channel *channel) { - int cnt = 0; + int cnt; for (cnt=0; cnt < QETH_CMD_BUFFER_NO; cnt++) qeth_release_buffer(channel,&channel->iob[cnt]); @@ -2814,11 +2814,11 @@ qeth_handle_send_error(struct qeth_card *card, QETH_DBF_TEXT_(trace,1,"%s",CARD_BUS_ID(card)); return QETH_SEND_ERROR_LINK_FAILURE; case 3: + default: QETH_DBF_TEXT(trace, 1, "SIGAcc3"); QETH_DBF_TEXT_(trace,1,"%s",CARD_BUS_ID(card)); return QETH_SEND_ERROR_KICK_IT; } - return QETH_SEND_ERROR_LINK_FAILURE; } void @@ -3865,6 +3865,7 @@ qeth_get_cast_type(struct qeth_card *card, struct sk_buff *skb) if ((hdr_mac == QETH_TR_MAC_NC) || (hdr_mac == QETH_TR_MAC_C)) return RTN_MULTICAST; + break; /* eth or so multicast? */ default: if ((hdr_mac == QETH_ETH_MAC_V4) || @@ -4586,38 +4587,11 @@ qeth_mdio_read(struct net_device *dev, int phy_id, int regnum) case MII_NCONFIG: /* network interface config */ break; default: - rc = 0; break; } return rc; } -static void -qeth_mdio_write(struct net_device *dev, int phy_id, int regnum, int value) -{ - switch(regnum){ - case MII_BMCR: /* Basic mode control register */ - case MII_BMSR: /* Basic mode status register */ - case MII_PHYSID1: /* PHYS ID 1 */ - case MII_PHYSID2: /* PHYS ID 2 */ - case MII_ADVERTISE: /* Advertisement control reg */ - case MII_LPA: /* Link partner ability reg */ - case MII_EXPANSION: /* Expansion register */ - case MII_DCOUNTER: /* disconnect counter */ - case MII_FCSCOUNTER: /* false carrier counter */ - case MII_NWAYTEST: /* N-way auto-neg test register */ - case MII_RERRCOUNTER: /* rx error counter */ - case MII_SREVISION: /* silicon revision */ - case MII_RESV1: /* reserved 1 */ - case MII_LBRERROR: /* loopback, rx, bypass error */ - case MII_PHYADDR: /* physical address */ - case MII_RESV2: /* reserved 2 */ - case MII_TPISTATUS: /* TPI status for 10mbps */ - case MII_NCONFIG: /* network interface config */ - default: - break; - } -} static inline const char * qeth_arp_get_error_cause(int *rc) @@ -5237,21 +5211,6 @@ qeth_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) mii_data->val_out = qeth_mdio_read(dev,mii_data->phy_id, mii_data->reg_num); break; - case SIOCSMIIREG: - rc = -EOPNOTSUPP; - break; - /* TODO: remove return if qeth_mdio_write does something */ - if (!capable(CAP_NET_ADMIN)){ - rc = -EPERM; - break; - } - mii_data = if_mii(rq); - if (mii_data->phy_id != 0) - rc = -EINVAL; - else - qeth_mdio_write(dev, mii_data->phy_id, mii_data->reg_num, - mii_data->val_in); - break; default: rc = -EOPNOTSUPP; } @@ -6901,7 +6860,7 @@ qeth_send_setassparms(struct qeth_card *card, struct qeth_cmd_buffer *iob, cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); if (len <= sizeof(__u32)) cmd->data.setassparms.data.flags_32bit = (__u32) data; - else if (len > sizeof(__u32)) + else /* (len > sizeof(__u32)) */ memcpy(&cmd->data.setassparms.data, (void *) data, len); rc = qeth_send_ipa_cmd(card, iob, reply_cb, reply_param); |