linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [-next PATCH 0/4] Minor fixes for alacrityvm/linux-next branch
@ 2009-11-23 19:54 Gregory Haskins
  2009-11-23 19:54 ` [-next PATCH 1/4] vbus: make library code properly declared as GPL Gregory Haskins
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Gregory Haskins @ 2009-11-23 19:54 UTC (permalink / raw)
  To: linux-next; +Cc: netdev, linux-kernel, alacrityvm-devel

The following are trivial fixes for the drivers in alacrityvm/linux-next

Patches 1-3 were necessary to enable the building of these drivers
as a KMP package for older distribution kernels. Patch 4/4 is just
a cleanup discovered during testing.

Kind Regards,
-Greg

---

Gregory Haskins (4):
      vbus: fix pcibridge busmaster support
      vbus: add autoprobe capability to guest
      venet: add missing ethtool include
      vbus: make library code properly declared as GPL


 drivers/net/vbus-enet.c     |    3 +++
 drivers/vbus/bus-proxy.c    |   33 ++++++++++++++++++++++++++++++++-
 drivers/vbus/pci-bridge.c   |    2 ++
 include/linux/vbus_driver.h |    2 ++
 lib/ioq.c                   |    4 ++++
 lib/shm_signal.c            |    4 ++++
 6 files changed, 47 insertions(+), 1 deletions(-)

-- 
Signature

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [-next PATCH 1/4] vbus: make library code properly declared as GPL
  2009-11-23 19:54 [-next PATCH 0/4] Minor fixes for alacrityvm/linux-next branch Gregory Haskins
@ 2009-11-23 19:54 ` Gregory Haskins
  2009-11-23 19:54 ` [-next PATCH 2/4] venet: add missing ethtool include Gregory Haskins
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Gregory Haskins @ 2009-11-23 19:54 UTC (permalink / raw)
  To: linux-next; +Cc: netdev, linux-kernel, alacrityvm-devel

This facilitates building the shm-signal and ioq libraries as kernel
modules.

Signed-off-by: Gregory Haskins <ghaskins@novell.com>
---

 lib/ioq.c        |    4 ++++
 lib/shm_signal.c |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/lib/ioq.c b/lib/ioq.c
index a6c8664..d5e57be 100644
--- a/lib/ioq.c
+++ b/lib/ioq.c
@@ -25,6 +25,10 @@
 #include <linux/bitops.h>
 #include <linux/module.h>
 
+MODULE_AUTHOR("Gregory Haskins");
+MODULE_LICENSE("GPL");
+MODULE_VERSION("1");
+
 #ifndef NULL
 #define NULL 0
 #endif
diff --git a/lib/shm_signal.c b/lib/shm_signal.c
index fbba74f..8d3e9b4 100644
--- a/lib/shm_signal.c
+++ b/lib/shm_signal.c
@@ -24,6 +24,10 @@
 #include <linux/interrupt.h>
 #include <linux/shm_signal.h>
 
+MODULE_AUTHOR("Gregory Haskins");
+MODULE_LICENSE("GPL");
+MODULE_VERSION("1");
+
 int shm_signal_enable(struct shm_signal *s, int flags)
 {
 	struct shm_signal_irq *irq = &s->desc->irq[s->locale];

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [-next PATCH 2/4] venet: add missing ethtool include
  2009-11-23 19:54 [-next PATCH 0/4] Minor fixes for alacrityvm/linux-next branch Gregory Haskins
  2009-11-23 19:54 ` [-next PATCH 1/4] vbus: make library code properly declared as GPL Gregory Haskins
@ 2009-11-23 19:54 ` Gregory Haskins
  2009-11-23 19:54 ` [-next PATCH 3/4] vbus: add autoprobe capability to guest Gregory Haskins
  2009-11-23 19:54 ` [-next PATCH 4/4] vbus: fix pcibridge busmaster support Gregory Haskins
  3 siblings, 0 replies; 5+ messages in thread
From: Gregory Haskins @ 2009-11-23 19:54 UTC (permalink / raw)
  To: linux-next; +Cc: netdev, linux-kernel, alacrityvm-devel

It's sloppy to use the facility without officially including its header
file.

Signed-off-by: Gregory Haskins <ghaskins@novell.com>
---

 drivers/net/vbus-enet.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/vbus-enet.c b/drivers/net/vbus-enet.c
index 29b388f..25c6bea 100644
--- a/drivers/net/vbus-enet.c
+++ b/drivers/net/vbus-enet.c
@@ -22,6 +22,7 @@
 #include <linux/in.h>
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
+#include <linux/ethtool.h>
 #include <linux/ip.h>
 #include <linux/tcp.h>
 #include <linux/skbuff.h>

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [-next PATCH 3/4] vbus: add autoprobe capability to guest
  2009-11-23 19:54 [-next PATCH 0/4] Minor fixes for alacrityvm/linux-next branch Gregory Haskins
  2009-11-23 19:54 ` [-next PATCH 1/4] vbus: make library code properly declared as GPL Gregory Haskins
  2009-11-23 19:54 ` [-next PATCH 2/4] venet: add missing ethtool include Gregory Haskins
@ 2009-11-23 19:54 ` Gregory Haskins
  2009-11-23 19:54 ` [-next PATCH 4/4] vbus: fix pcibridge busmaster support Gregory Haskins
  3 siblings, 0 replies; 5+ messages in thread
From: Gregory Haskins @ 2009-11-23 19:54 UTC (permalink / raw)
  To: linux-next; +Cc: netdev, linux-kernel, alacrityvm-devel

This enables the guest to automatically load the appropriate driver
when vbus devices are detected.

Signed-off-by: Gregory Haskins <ghaskins@novell.com>
---

 drivers/net/vbus-enet.c     |    2 ++
 drivers/vbus/bus-proxy.c    |   33 ++++++++++++++++++++++++++++++++-
 include/linux/vbus_driver.h |    2 ++
 3 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/drivers/net/vbus-enet.c b/drivers/net/vbus-enet.c
index 25c6bea..4e9ecac 100644
--- a/drivers/net/vbus-enet.c
+++ b/drivers/net/vbus-enet.c
@@ -1556,3 +1556,5 @@ vbus_enet_cleanup(void)
 
 module_init(vbus_enet_init_module);
 module_exit(vbus_enet_cleanup);
+
+VBUS_DRIVER_AUTOPROBE(VENET_TYPE);
diff --git a/drivers/vbus/bus-proxy.c b/drivers/vbus/bus-proxy.c
index 5d34942..106e2fe 100644
--- a/drivers/vbus/bus-proxy.c
+++ b/drivers/vbus/bus-proxy.c
@@ -48,6 +48,16 @@ static int vbus_dev_proxy_match(struct device *_dev, struct device_driver *_drv)
 	return !strcmp(dev->type, drv->type);
 }
 
+static int vbus_dev_proxy_uevent(struct device *_dev, struct kobj_uevent_env *env)
+{
+	struct vbus_device_proxy *dev = to_dev(_dev);
+
+	if (add_uevent_var(env, "MODALIAS=vbus-proxy:%s", dev->type))
+		return -ENOMEM;
+
+	return 0;
+}
+
 /*
  * This function is invoked after the bus infrastructure has already made a
  * match.  The device will contain a reference to the paired driver which
@@ -68,6 +78,7 @@ static int vbus_dev_proxy_probe(struct device *_dev)
 static struct bus_type vbus_proxy = {
 	.name   = VBUS_PROXY_NAME,
 	.match  = vbus_dev_proxy_match,
+	.uevent = vbus_dev_proxy_uevent,
 };
 
 static struct device vbus_proxy_rootdev = {
@@ -99,18 +110,38 @@ static void device_release(struct device *dev)
 	_dev->ops->release(_dev);
 }
 
+static ssize_t _show_modalias(struct device *dev,
+			      struct device_attribute *attr, char *buf)
+{
+	return sprintf(buf, "vbus-proxy:%s\n", to_dev(dev)->type);
+}
+DEVICE_ATTR(modalias, S_IRUSR | S_IRGRP | S_IROTH, _show_modalias, NULL);
+
 int vbus_device_proxy_register(struct vbus_device_proxy *new)
 {
+	int ret;
+
 	new->dev.parent  = &vbus_proxy_rootdev;
 	new->dev.bus     = &vbus_proxy;
 	new->dev.release = &device_release;
 
-	return device_register(&new->dev);
+	ret = device_register(&new->dev);
+	if (ret < 0)
+		return ret;
+
+	ret = device_create_file(&new->dev, &dev_attr_modalias);
+	if (ret < 0) {
+		device_unregister(&new->dev);
+		return ret;
+	}
+
+	return 0;
 }
 EXPORT_SYMBOL_GPL(vbus_device_proxy_register);
 
 void vbus_device_proxy_unregister(struct vbus_device_proxy *dev)
 {
+	device_remove_file(&dev->dev, &dev_attr_modalias);
 	device_unregister(&dev->dev);
 }
 EXPORT_SYMBOL_GPL(vbus_device_proxy_unregister);
diff --git a/include/linux/vbus_driver.h b/include/linux/vbus_driver.h
index 2b1dac4..8a7acb1 100644
--- a/include/linux/vbus_driver.h
+++ b/include/linux/vbus_driver.h
@@ -78,4 +78,6 @@ void vbus_driver_unregister(struct vbus_driver *drv);
 int vbus_driver_ioq_alloc(struct vbus_device_proxy *dev, const char *name,
 			  int id, int prio, size_t ringsize, struct ioq **ioq);
 
+#define VBUS_DRIVER_AUTOPROBE(name) MODULE_ALIAS("vbus-proxy:" name)
+
 #endif /* _LINUX_VBUS_DRIVER_H */

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [-next PATCH 4/4] vbus: fix pcibridge busmaster support
  2009-11-23 19:54 [-next PATCH 0/4] Minor fixes for alacrityvm/linux-next branch Gregory Haskins
                   ` (2 preceding siblings ...)
  2009-11-23 19:54 ` [-next PATCH 3/4] vbus: add autoprobe capability to guest Gregory Haskins
@ 2009-11-23 19:54 ` Gregory Haskins
  3 siblings, 0 replies; 5+ messages in thread
From: Gregory Haskins @ 2009-11-23 19:54 UTC (permalink / raw)
  To: linux-next; +Cc: netdev, linux-kernel, alacrityvm-devel

We should technically enable the busmaster bit, even though its not
actually used on the host side

Signed-off-by: Gregory Haskins <ghaskins@novell.com>
---

 drivers/vbus/pci-bridge.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/vbus/pci-bridge.c b/drivers/vbus/pci-bridge.c
index ddc3f39..962ef58 100644
--- a/drivers/vbus/pci-bridge.c
+++ b/drivers/vbus/pci-bridge.c
@@ -932,6 +932,8 @@ vbus_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (ret < 0)
 		return ret;
 
+	pci_set_master(pdev);
+
 	ret = pci_request_regions(pdev, VBUS_PCI_NAME);
 	if (ret < 0) {
 		printk(KERN_ERR "VBUS_PCI: Could not init BARs: %d\n", ret);

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-11-23 19:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-23 19:54 [-next PATCH 0/4] Minor fixes for alacrityvm/linux-next branch Gregory Haskins
2009-11-23 19:54 ` [-next PATCH 1/4] vbus: make library code properly declared as GPL Gregory Haskins
2009-11-23 19:54 ` [-next PATCH 2/4] venet: add missing ethtool include Gregory Haskins
2009-11-23 19:54 ` [-next PATCH 3/4] vbus: add autoprobe capability to guest Gregory Haskins
2009-11-23 19:54 ` [-next PATCH 4/4] vbus: fix pcibridge busmaster support Gregory Haskins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).