Skip to content

Commit

Permalink
Merge 3.2-rc5 into staging-next
Browse files Browse the repository at this point in the history
This resolves the conflict in the
drivers/staging/iio/industrialio-core.c file due to two different
changes made to resolve the same problem.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Greg Kroah-Hartman committed Dec 10, 2011
2 parents dc47ce9 + 1d06825 commit 407f3fd
Show file tree
Hide file tree
Showing 422 changed files with 20,119 additions and 34,754 deletions.
9 changes: 9 additions & 0 deletions Documentation/devicetree/bindings/nvec/nvec_nvidia.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
NVIDIA compliant embedded controller

Required properties:
- compatible : should be "nvidia,nvec".
- reg : the iomem of the i2c slave controller
- interrupts : the interrupt line of the i2c slave controller
- clock-frequency : the frequency of the i2c bus
- gpios : the gpio used for ec request
- slave-addr: the i2c address of the slave controller
7 changes: 7 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -4152,6 +4152,13 @@ W: http://ltp.sourceforge.net/
T: git git://ltp.git.sourceforge.net/gitroot/ltp/ltp-dev
S: Maintained

LTTng (Linux Trace Toolkit Next Generation)
M: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
L: lttng-dev@lists.lttng.org (moderated for non-subscribers)
W: http://lttng.org
S: Maintained
F: drivers/staging/lttng/

M32R ARCHITECTURE
M: Hirokazu Takata <takata@linux-m32r.org>
L: linux-m32r@ml.linux-m32r.org (moderated for non-subscribers)
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -338,4 +338,6 @@ config VMXNET3
To compile this driver as a module, choose M here: the
module will be called vmxnet3.

source "drivers/net/hyperv/Kconfig"

endif # NETDEVICES
2 changes: 2 additions & 0 deletions drivers/net/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,5 @@ obj-$(CONFIG_USB_USBNET) += usb/
obj-$(CONFIG_USB_ZD1201) += usb/
obj-$(CONFIG_USB_IPHETH) += usb/
obj-$(CONFIG_USB_CDC_PHONET) += usb/

obj-$(CONFIG_HYPERV_NET) += hyperv/
5 changes: 5 additions & 0 deletions drivers/net/hyperv/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
config HYPERV_NET
tristate "Microsoft Hyper-V virtual network driver"
depends on HYPERV
help
Select this option to enable the Hyper-V virtual network driver.
3 changes: 3 additions & 0 deletions drivers/net/hyperv/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
obj-$(CONFIG_HYPERV_NET) += hv_netvsc.o

hv_netvsc-y := netvsc_drv.o netvsc.o rndis_filter.o
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,27 @@ struct netvsc_device_info {
int ring_size;
};

enum rndis_device_state {
RNDIS_DEV_UNINITIALIZED = 0,
RNDIS_DEV_INITIALIZING,
RNDIS_DEV_INITIALIZED,
RNDIS_DEV_DATAINITIALIZED,
};

struct rndis_device {
struct netvsc_device *net_dev;

enum rndis_device_state state;
bool link_state;
atomic_t new_req_id;

spinlock_t request_lock;
struct list_head req_list;

unsigned char hw_mac_adr[ETH_ALEN];
};


/* Interface */
int netvsc_device_add(struct hv_device *device, void *additional_info);
int netvsc_device_remove(struct hv_device *device);
Expand All @@ -109,6 +130,9 @@ int rndis_filter_receive(struct hv_device *dev,
int rndis_filter_send(struct hv_device *dev,
struct hv_netvsc_packet *pkt);

int rndis_filter_set_packet_filter(struct rndis_device *dev, u32 new_filter);


#define NVSP_INVALID_PROTOCOL_VERSION ((u32)0xFFFFFFFF)

#define NVSP_PROTOCOL_VERSION_1 2
Expand Down
27 changes: 16 additions & 11 deletions drivers/staging/hv/netvsc.c → drivers/net/hyperv/netvsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,19 +230,16 @@ static int netvsc_init_recv_buf(struct hv_device *device)
net_device->recv_section_cnt = init_packet->msg.
v1_msg.send_recv_buf_complete.num_sections;

net_device->recv_section = kmalloc(net_device->recv_section_cnt
* sizeof(struct nvsp_1_receive_buffer_section), GFP_KERNEL);
net_device->recv_section = kmemdup(
init_packet->msg.v1_msg.send_recv_buf_complete.sections,
net_device->recv_section_cnt *
sizeof(struct nvsp_1_receive_buffer_section),
GFP_KERNEL);
if (net_device->recv_section == NULL) {
ret = -EINVAL;
goto cleanup;
}

memcpy(net_device->recv_section,
init_packet->msg.v1_msg.
send_recv_buf_complete.sections,
net_device->recv_section_cnt *
sizeof(struct nvsp_1_receive_buffer_section));

/*
* For 1st release, there should only be 1 section that represents the
* entire receive buffer
Expand Down Expand Up @@ -438,6 +435,9 @@ static void netvsc_send_completion(struct hv_device *device,
nvsc_packet->completion.send.send_completion_ctx);

atomic_dec(&net_device->num_outstanding_sends);

if (netif_queue_stopped(ndev))
netif_wake_queue(ndev);
} else {
netdev_err(ndev, "Unknown send completion packet type- "
"%d received!!\n", nvsp_packet->hdr.msg_type);
Expand Down Expand Up @@ -488,11 +488,16 @@ int netvsc_send(struct hv_device *device,

}

if (ret != 0)
if (ret == 0) {
atomic_inc(&net_device->num_outstanding_sends);
} else if (ret == -EAGAIN) {
netif_stop_queue(ndev);
if (atomic_read(&net_device->num_outstanding_sends) < 1)
netif_wake_queue(ndev);
} else {
netdev_err(ndev, "Unable to send packet %p ret %d\n",
packet, ret);
else
atomic_inc(&net_device->num_outstanding_sends);
}

return ret;
}
Expand Down
70 changes: 44 additions & 26 deletions drivers/staging/hv/netvsc_drv.c → drivers/net/hyperv/netvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,59 @@
struct net_device_context {
/* point back to our device context */
struct hv_device *device_ctx;
atomic_t avail;
struct delayed_work dwork;
};


#define PACKET_PAGES_LOWATER 8
/* Need this many pages to handle worst case fragmented packet */
#define PACKET_PAGES_HIWATER (MAX_SKB_FRAGS + 2)

static int ring_size = 128;
module_param(ring_size, int, S_IRUGO);
MODULE_PARM_DESC(ring_size, "Ring buffer size (# of pages)");

/* no-op so the netdev core doesn't return -EINVAL when modifying the the
* multicast address list in SIOCADDMULTI. hv is setup to get all multicast
* when it calls RndisFilterOnOpen() */
struct set_multicast_work {
struct work_struct work;
struct net_device *net;
};

static void do_set_multicast(struct work_struct *w)
{
struct set_multicast_work *swk =
container_of(w, struct set_multicast_work, work);
struct net_device *net = swk->net;

struct net_device_context *ndevctx = netdev_priv(net);
struct netvsc_device *nvdev;
struct rndis_device *rdev;

nvdev = hv_get_drvdata(ndevctx->device_ctx);
if (nvdev == NULL)
return;

rdev = nvdev->extension;
if (rdev == NULL)
return;

if (net->flags & IFF_PROMISC)
rndis_filter_set_packet_filter(rdev,
NDIS_PACKET_TYPE_PROMISCUOUS);
else
rndis_filter_set_packet_filter(rdev,
NDIS_PACKET_TYPE_BROADCAST |
NDIS_PACKET_TYPE_ALL_MULTICAST |
NDIS_PACKET_TYPE_DIRECTED);

kfree(w);
}

static void netvsc_set_multicast_list(struct net_device *net)
{
struct set_multicast_work *swk =
kmalloc(sizeof(struct set_multicast_work), GFP_ATOMIC);
if (swk == NULL)
return;

swk->net = net;
INIT_WORK(&swk->work, do_set_multicast);
schedule_work(&swk->work);
}

static int netvsc_open(struct net_device *net)
Expand Down Expand Up @@ -104,18 +139,8 @@ static void netvsc_xmit_completion(void *context)

kfree(packet);

if (skb) {
struct net_device *net = skb->dev;
struct net_device_context *net_device_ctx = netdev_priv(net);
unsigned int num_pages = skb_shinfo(skb)->nr_frags + 2;

if (skb)
dev_kfree_skb_any(skb);

atomic_add(num_pages, &net_device_ctx->avail);
if (atomic_read(&net_device_ctx->avail) >=
PACKET_PAGES_HIWATER)
netif_wake_queue(net);
}
}

static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
Expand All @@ -127,8 +152,6 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)

/* Add 1 for skb->data and additional one for RNDIS */
num_pages = skb_shinfo(skb)->nr_frags + 1 + 1;
if (num_pages > atomic_read(&net_device_ctx->avail))
return NETDEV_TX_BUSY;

/* Allocate a netvsc packet based on # of frags. */
packet = kzalloc(sizeof(struct hv_netvsc_packet) +
Expand Down Expand Up @@ -178,10 +201,6 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
if (ret == 0) {
net->stats.tx_bytes += skb->len;
net->stats.tx_packets++;

atomic_sub(num_pages, &net_device_ctx->avail);
if (atomic_read(&net_device_ctx->avail) < PACKET_PAGES_LOWATER)
netif_stop_queue(net);
} else {
/* we are shutting down or bus overloaded, just drop packet */
net->stats.tx_dropped++;
Expand Down Expand Up @@ -351,7 +370,6 @@ static int netvsc_probe(struct hv_device *dev,

net_device_ctx = netdev_priv(net);
net_device_ctx->device_ctx = dev;
atomic_set(&net_device_ctx->avail, ring_size);
hv_set_drvdata(dev, net);
INIT_DELAYED_WORK(&net_device_ctx->dwork, netvsc_send_garp);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,6 @@
#include "hyperv_net.h"


enum rndis_device_state {
RNDIS_DEV_UNINITIALIZED = 0,
RNDIS_DEV_INITIALIZING,
RNDIS_DEV_INITIALIZED,
RNDIS_DEV_DATAINITIALIZED,
};

struct rndis_device {
struct netvsc_device *net_dev;

enum rndis_device_state state;
bool link_state;
atomic_t new_req_id;

spinlock_t request_lock;
struct list_head req_list;

unsigned char hw_mac_adr[ETH_ALEN];
};

struct rndis_request {
struct list_head list_ent;
struct completion wait_event;
Expand Down Expand Up @@ -522,8 +502,7 @@ static int rndis_filter_query_device_link_status(struct rndis_device *dev)
return ret;
}

static int rndis_filter_set_packet_filter(struct rndis_device *dev,
u32 new_filter)
int rndis_filter_set_packet_filter(struct rndis_device *dev, u32 new_filter)
{
struct rndis_request *request;
struct rndis_set_request *set;
Expand Down
8 changes: 4 additions & 4 deletions drivers/staging/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ source "drivers/staging/octeon/Kconfig"

source "drivers/staging/serqt_usb2/Kconfig"

source "drivers/staging/spectra/Kconfig"

source "drivers/staging/quatech_usb2/Kconfig"

source "drivers/staging/vt6655/Kconfig"
Expand Down Expand Up @@ -116,8 +114,6 @@ source "drivers/staging/bcm/Kconfig"

source "drivers/staging/ft1000/Kconfig"

source "drivers/staging/intel_sst/Kconfig"

source "drivers/staging/speakup/Kconfig"

source "drivers/staging/cptm1217/Kconfig"
Expand All @@ -132,4 +128,8 @@ source "drivers/staging/nvec/Kconfig"

source "drivers/staging/media/Kconfig"

source "drivers/staging/omapdrm/Kconfig"

source "drivers/staging/android/Kconfig"

endif # STAGING
4 changes: 2 additions & 2 deletions drivers/staging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ obj-$(CONFIG_RTL8192E) += rtl8192e/
obj-$(CONFIG_R8712U) += rtl8712/
obj-$(CONFIG_RTS_PSTOR) += rts_pstor/
obj-$(CONFIG_RTS5139) += rts5139/
obj-$(CONFIG_SPECTRA) += spectra/
obj-$(CONFIG_TRANZPORT) += frontier/
obj-$(CONFIG_POHMELFS) += pohmelfs/
obj-$(CONFIG_IDE_PHISON) += phison/
Expand Down Expand Up @@ -50,10 +49,11 @@ obj-$(CONFIG_SBE_2T3E3) += sbe-2t3e3/
obj-$(CONFIG_USB_ENESTORAGE) += keucr/
obj-$(CONFIG_BCM_WIMAX) += bcm/
obj-$(CONFIG_FT1000) += ft1000/
obj-$(CONFIG_SND_INTEL_SST) += intel_sst/
obj-$(CONFIG_SPEAKUP) += speakup/
obj-$(CONFIG_TOUCHSCREEN_CLEARPAD_TM1217) += cptm1217/
obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4) += ste_rmi4/
obj-$(CONFIG_DRM_PSB) += gma500/
obj-$(CONFIG_INTEL_MEI) += mei/
obj-$(CONFIG_MFD_NVEC) += nvec/
obj-$(CONFIG_DRM_OMAP) += omapdrm/
obj-$(CONFIG_ANDROID) += android/
Loading

0 comments on commit 407f3fd

Please sign in to comment.