Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187995
b: refs/heads/master
c: e5a9a35
h: refs/heads/master
i:
  187993: 5505ea2
  187991: 02a55e9
v: v3
  • Loading branch information
Helmut Schaa authored and John W. Linville committed Mar 10, 2010
1 parent 9a34037 commit 12781c5
Show file tree
Hide file tree
Showing 16 changed files with 78 additions and 170 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 964ad81cbd933e5fa310faeec1e923c14651284b
refs/heads/master: e5a9a35cb9c0d92d7c986cb3696fb794be100087
2 changes: 1 addition & 1 deletion trunk/drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ config SMC91X
select CRC32
select MII
depends on ARM || REDWOOD_5 || REDWOOD_6 || M32R || SUPERH || \
MIPS || BLACKFIN || MN10300 || COLDFIRE
MIPS || BLACKFIN || MN10300
help
This is a driver for SMC's 91x series of Ethernet chipsets,
including the SMC91C94 and the SMC91C111. Say Y if you want it
Expand Down
28 changes: 0 additions & 28 deletions trunk/drivers/net/smc91x.h
Original file line number Diff line number Diff line change
Expand Up @@ -344,34 +344,6 @@ static inline void LPD7_SMC_outsw (unsigned char* a, int r,

#define SMC_IRQ_FLAGS IRQF_TRIGGER_HIGH

#elif defined(CONFIG_COLDFIRE)

#define SMC_CAN_USE_8BIT 0
#define SMC_CAN_USE_16BIT 1
#define SMC_CAN_USE_32BIT 0
#define SMC_NOWAIT 1

static inline void mcf_insw(void *a, unsigned char *p, int l)
{
u16 *wp = (u16 *) p;
while (l-- > 0)
*wp++ = readw(a);
}

static inline void mcf_outsw(void *a, unsigned char *p, int l)
{
u16 *wp = (u16 *) p;
while (l-- > 0)
writew(*wp++, a);
}

#define SMC_inw(a, r) _swapw(readw((a) + (r)))
#define SMC_outw(v, a, r) writew(_swapw(v), (a) + (r))
#define SMC_insw(a, r, p, l) mcf_insw(a + r, p, l)
#define SMC_outsw(a, r, p, l) mcf_outsw(a + r, p, l)

#define SMC_IRQ_FLAGS (IRQF_DISABLED)

#else

/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -5279,7 +5279,7 @@ static void tg3_poll_controller(struct net_device *dev)
struct tg3 *tp = netdev_priv(dev);

for (i = 0; i < tp->irq_cnt; i++)
tg3_interrupt(tp->napi[i].irq_vec, &tp->napi[i]);
tg3_interrupt(tp->napi[i].irq_vec, dev);
}
#endif

Expand Down
30 changes: 2 additions & 28 deletions trunk/drivers/net/usb/asix.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ static const char driver_name [] = "asix";
#define AX_CMD_WRITE_IPG0 0x12
#define AX_CMD_WRITE_IPG1 0x13
#define AX_CMD_READ_NODE_ID 0x13
#define AX_CMD_WRITE_NODE_ID 0x14
#define AX_CMD_WRITE_IPG2 0x14
#define AX_CMD_WRITE_MULTI_FILTER 0x16
#define AX88172_CMD_READ_NODE_ID 0x17
Expand Down Expand Up @@ -166,7 +165,6 @@ static const char driver_name [] = "asix";
/* This structure cannot exceed sizeof(unsigned long [5]) AKA 20 bytes */
struct asix_data {
u8 multi_filter[AX_MCAST_FILTER_SIZE];
u8 mac_addr[ETH_ALEN];
u8 phymode;
u8 ledmode;
u8 eeprom_len;
Expand Down Expand Up @@ -734,30 +732,6 @@ static int asix_ioctl (struct net_device *net, struct ifreq *rq, int cmd)
return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL);
}

static int asix_set_mac_address(struct net_device *net, void *p)
{
struct usbnet *dev = netdev_priv(net);
struct asix_data *data = (struct asix_data *)&dev->data;
struct sockaddr *addr = p;

if (netif_running(net))
return -EBUSY;
if (!is_valid_ether_addr(addr->sa_data))
return -EADDRNOTAVAIL;

memcpy(net->dev_addr, addr->sa_data, ETH_ALEN);

/* We use the 20 byte dev->data
* for our 6 byte mac buffer
* to avoid allocating memory that
* is tricky to free later */
memcpy(data->mac_addr, addr->sa_data, ETH_ALEN);
asix_write_cmd_async(dev, AX_CMD_WRITE_NODE_ID, 0, 0, ETH_ALEN,
data->mac_addr);

return 0;
}

/* We need to override some ethtool_ops so we require our
own structure so we don't interfere with other usbnet
devices that may be connected at the same time. */
Expand Down Expand Up @@ -945,7 +919,7 @@ static const struct net_device_ops ax88772_netdev_ops = {
.ndo_start_xmit = usbnet_start_xmit,
.ndo_tx_timeout = usbnet_tx_timeout,
.ndo_change_mtu = usbnet_change_mtu,
.ndo_set_mac_address = asix_set_mac_address,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
.ndo_do_ioctl = asix_ioctl,
.ndo_set_multicast_list = asix_set_multicast,
Expand Down Expand Up @@ -1239,7 +1213,7 @@ static const struct net_device_ops ax88178_netdev_ops = {
.ndo_stop = usbnet_stop,
.ndo_start_xmit = usbnet_start_xmit,
.ndo_tx_timeout = usbnet_tx_timeout,
.ndo_set_mac_address = asix_set_mac_address,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_multicast_list = asix_set_multicast,
.ndo_do_ioctl = asix_ioctl,
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/wireless/rt2x00/rt2x00soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#ifndef RT2X00SOC_H
#define RT2X00SOC_H

#define KSEG1ADDR(__ptr) __ptr

/*
* SoC driver handlers.
*/
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/s390/net/qeth_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -763,8 +763,7 @@ static inline int qeth_get_micros(void)

static inline int qeth_get_ip_version(struct sk_buff *skb)
{
struct ethhdr *ehdr = (struct ethhdr *)skb->data;
switch (ehdr->h_proto) {
switch (skb->protocol) {
case ETH_P_IPV6:
return 6;
case ETH_P_IP:
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/s390/net/qeth_core_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,7 @@ static void qeth_send_control_data_cb(struct qeth_channel *channel,
dev_err(&card->gdev->dev,
"The qeth device is not configured "
"for the OSI layer required by z/VM\n");
else
qeth_schedule_recovery(card);
qeth_schedule_recovery(card);
goto out;
}

Expand Down Expand Up @@ -1114,6 +1113,8 @@ static int qeth_setup_card(struct qeth_card *card)
card->ipato.enabled = 0;
card->ipato.invert4 = 0;
card->ipato.invert6 = 0;
if (card->info.type == QETH_CARD_TYPE_IQD)
card->options.checksum_type = NO_CHECKSUMMING;
/* init QDIO stuff */
qeth_init_qdio_info(card);
return 0;
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/s390/net/qeth_core_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
* Frank Blaschka <frank.blaschka@de.ibm.com>
*/

#define KMSG_COMPONENT "qeth"
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt

#include <linux/list.h>
#include <linux/rwsem.h>
#include <asm/ebcdic.h>
Expand Down
16 changes: 10 additions & 6 deletions trunk/drivers/s390/net/qeth_l2_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1071,9 +1071,11 @@ static int qeth_l2_recover(void *ptr)
dev_info(&card->gdev->dev,
"Device successfully recovered!\n");
else {
rtnl_lock();
dev_close(card->dev);
rtnl_unlock();
if (card->dev) {
rtnl_lock();
dev_close(card->dev);
rtnl_unlock();
}
dev_warn(&card->gdev->dev, "The qeth device driver "
"failed to recover an error on the device\n");
}
Expand Down Expand Up @@ -1127,9 +1129,11 @@ static int qeth_l2_pm_resume(struct ccwgroup_device *gdev)
if (card->state == CARD_STATE_RECOVER) {
rc = __qeth_l2_set_online(card->gdev, 1);
if (rc) {
rtnl_lock();
dev_close(card->dev);
rtnl_unlock();
if (card->dev) {
rtnl_lock();
dev_close(card->dev);
rtnl_unlock();
}
}
} else
rc = __qeth_l2_set_online(card->gdev, 0);
Expand Down
82 changes: 42 additions & 40 deletions trunk/drivers/s390/net/qeth_l3_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1691,43 +1691,39 @@ qeth_diags_trace_cb(struct qeth_card *card, struct qeth_reply *reply,

cmd = (struct qeth_ipa_cmd *)data;
rc = cmd->hdr.return_code;
if (rc)
if (rc) {
QETH_DBF_TEXT_(TRACE, 2, "dxter%x", rc);
if (cmd->data.diagass.action == QETH_DIAGS_CMD_TRACE_ENABLE) {
switch (rc) {
case IPA_RC_HARDWARE_AUTH_ERROR:
dev_warn(&card->gdev->dev, "The device is not "
"authorized to run as a HiperSockets "
"network traffic analyzer\n");
break;
case IPA_RC_TRACE_ALREADY_ACTIVE:
dev_warn(&card->gdev->dev, "A HiperSockets "
"network traffic analyzer is already "
"active in the HiperSockets LAN\n");
break;
default:
break;
}
}
return 0;
}

switch (cmd->data.diagass.action) {
case QETH_DIAGS_CMD_TRACE_QUERY:
break;
case QETH_DIAGS_CMD_TRACE_DISABLE:
switch (rc) {
case 0:
case IPA_RC_INVALID_SUBCMD:
card->info.promisc_mode = SET_PROMISC_MODE_OFF;
dev_info(&card->gdev->dev, "The HiperSockets network "
"traffic analyzer is deactivated\n");
break;
default:
break;
}
card->info.promisc_mode = SET_PROMISC_MODE_OFF;
dev_info(&card->gdev->dev, "The HiperSockets network traffic "
"analyzer is deactivated\n");
break;
case QETH_DIAGS_CMD_TRACE_ENABLE:
switch (rc) {
case 0:
card->info.promisc_mode = SET_PROMISC_MODE_ON;
dev_info(&card->gdev->dev, "The HiperSockets network "
"traffic analyzer is activated\n");
break;
case IPA_RC_HARDWARE_AUTH_ERROR:
dev_warn(&card->gdev->dev, "The device is not "
"authorized to run as a HiperSockets network "
"traffic analyzer\n");
break;
case IPA_RC_TRACE_ALREADY_ACTIVE:
dev_warn(&card->gdev->dev, "A HiperSockets "
"network traffic analyzer is already "
"active in the HiperSockets LAN\n");
break;
default:
break;
}
card->info.promisc_mode = SET_PROMISC_MODE_ON;
dev_info(&card->gdev->dev, "The HiperSockets network traffic "
"analyzer is activated\n");
break;
default:
QETH_DBF_MESSAGE(2, "Unknown sniffer action (0x%04x) on %s\n",
Expand Down Expand Up @@ -2219,9 +2215,11 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode)
if (recovery_mode)
qeth_l3_stop(card->dev);
else {
rtnl_lock();
dev_close(card->dev);
rtnl_unlock();
if (card->dev) {
rtnl_lock();
dev_close(card->dev);
rtnl_unlock();
}
}
if (!card->use_hard_stop) {
rc = qeth_send_stoplan(card);
Expand Down Expand Up @@ -2902,8 +2900,10 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
int data_offset = -1;
int nr_frags;

if (((card->info.type == QETH_CARD_TYPE_IQD) && (!ipv)) ||
card->options.sniffer)
if ((card->info.type == QETH_CARD_TYPE_IQD) &&
(((skb->protocol != htons(ETH_P_IPV6)) &&
(skb->protocol != htons(ETH_P_IP))) ||
card->options.sniffer))
goto tx_drop;

if ((card->state != CARD_STATE_UP) || !card->lan_online) {
Expand Down Expand Up @@ -2949,14 +2949,14 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (data_offset < 0)
skb_pull(new_skb, ETH_HLEN);
} else {
if (ipv == 4) {
if (new_skb->protocol == htons(ETH_P_IP)) {
if (card->dev->type == ARPHRD_IEEE802_TR)
skb_pull(new_skb, TR_HLEN);
else
skb_pull(new_skb, ETH_HLEN);
}

if (ipv == 6 && card->vlangrp &&
if (new_skb->protocol == ETH_P_IPV6 && card->vlangrp &&
vlan_tx_tag_present(new_skb)) {
skb_push(new_skb, VLAN_HLEN);
skb_copy_to_linear_data(new_skb, new_skb->data + 4, 4);
Expand Down Expand Up @@ -3534,9 +3534,11 @@ static int qeth_l3_pm_resume(struct ccwgroup_device *gdev)
if (card->state == CARD_STATE_RECOVER) {
rc = __qeth_l3_set_online(card->gdev, 1);
if (rc) {
rtnl_lock();
dev_close(card->dev);
rtnl_unlock();
if (card->dev) {
rtnl_lock();
dev_close(card->dev);
rtnl_unlock();
}
}
} else
rc = __qeth_l3_set_online(card->gdev, 0);
Expand Down
1 change: 1 addition & 0 deletions trunk/include/net/ip6_tunnel.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
struct ip6_tnl {
struct ip6_tnl *next; /* next tunnel in list */
struct net_device *dev; /* virtual device associated with tunnel */
int recursion; /* depth of hard_start_xmit recursion */
struct ip6_tnl_parm parms; /* tunnel configuration parameters */
struct flowi fl; /* flowi template for xmit */
struct dst_entry *dst_cache; /* cached dst */
Expand Down
5 changes: 2 additions & 3 deletions trunk/net/core/dev_mcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,8 @@ int dev_mc_add(struct net_device *dev, void *addr, int alen, int glbl)

netif_addr_lock_bh(dev);
if (alen != dev->addr_len)
err = -EINVAL;
else
err = __dev_addr_add(&dev->mc_list, &dev->mc_count, addr, alen, glbl);
return -EINVAL;
err = __dev_addr_add(&dev->mc_list, &dev->mc_count, addr, alen, glbl);
if (!err)
__dev_set_rx_mode(dev);
netif_addr_unlock_bh(dev);
Expand Down
2 changes: 0 additions & 2 deletions trunk/net/core/neighbour.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,8 +771,6 @@ static __inline__ int neigh_max_probes(struct neighbour *n)
}

static void neigh_invalidate(struct neighbour *neigh)
__releases(neigh->lock)
__acquires(neigh->lock)
{
struct sk_buff *skb;

Expand Down
Loading

0 comments on commit 12781c5

Please sign in to comment.