Re: [PATCH 10/21] Staging: hv: Cleanup root device handling
On Thu, Mar 10, 2011 at 02:08:06PM -0800, K. Y. Srinivasan wrote: Now we can complete the cleanup of the root device management. Use the preferred APIs for creating and managing the root device. As part of this cleanup get rid of the root device object from vmbus_driver_context. I don't understand, what is the root device? The hyper-v bus controller? Signed-off-by: K. Y. Srinivasan k...@microsoft.com Signed-off-by: Haiyang Zhang haiya...@microsoft.com Signed-off-by: Mike Sterling mike.sterl...@microsoft.com Signed-off-by: Abhishek Kane v-abk...@microsoft.com Signed-off-by: Hank Janssen hjans...@microsoft.com --- drivers/staging/hv/vmbus_drv.c | 126 ++-- 1 files changed, 18 insertions(+), 108 deletions(-) diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index b473f46..8b9394a 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -19,6 +19,7 @@ * Hank Janssen hjans...@microsoft.com */ #include linux/init.h +#include linux/err.h #include linux/module.h #include linux/device.h #include linux/irq.h @@ -40,6 +41,8 @@ #define VMBUS_IRQ0x5 #define VMBUS_IRQ_VECTOR IRQ5_VECTOR +static struct device *root_dev; /* Root device */ This shouldn't be a raw struct device, should it? It should be of a type that shows exactly what it is. Is it a hyper_v device that talks on the bus? Or is it a platform device that controls all of the devices on the bus, and as such should be the root device of the bus tree? confused, greg k-h ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization
RE: [PATCH 10/21] Staging: hv: Cleanup root device handling
-Original Message- From: Greg KH [mailto:g...@kroah.com] Sent: Monday, March 14, 2011 3:34 PM To: KY Srinivasan Cc: gre...@suse.de; linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; virtualizat...@lists.osdl.org; Haiyang Zhang; Mike Sterling; Abhishek Kane (Mindtree Consulting PVT LTD) Subject: Re: [PATCH 10/21] Staging: hv: Cleanup root device handling On Thu, Mar 10, 2011 at 02:08:06PM -0800, K. Y. Srinivasan wrote: Now we can complete the cleanup of the root device management. Use the preferred APIs for creating and managing the root device. As part of this cleanup get rid of the root device object from vmbus_driver_context. I don't understand, what is the root device? This would be the device under /sys/devices that all other hyperv devices would be grouped under. This notion of the root device existed in the existing code; however its creation and management was unnecessarily complicated. Regards, K. Y The hyper-v bus controller? Signed-off-by: K. Y. Srinivasan k...@microsoft.com Signed-off-by: Haiyang Zhang haiya...@microsoft.com Signed-off-by: Mike Sterling mike.sterl...@microsoft.com Signed-off-by: Abhishek Kane v-abk...@microsoft.com Signed-off-by: Hank Janssen hjans...@microsoft.com --- drivers/staging/hv/vmbus_drv.c | 126 ++-- 1 files changed, 18 insertions(+), 108 deletions(-) diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index b473f46..8b9394a 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -19,6 +19,7 @@ * Hank Janssen hjans...@microsoft.com */ #include linux/init.h +#include linux/err.h #include linux/module.h #include linux/device.h #include linux/irq.h @@ -40,6 +41,8 @@ #define VMBUS_IRQ 0x5 #define VMBUS_IRQ_VECTOR IRQ5_VECTOR +static struct device *root_dev; /* Root device */ This shouldn't be a raw struct device, should it? It should be of a type that shows exactly what it is. Is it a hyper_v device that talks on the bus? Or is it a platform device that controls all of the devices on the bus, and as such should be the root device of the bus tree? confused, greg k-h ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization
Re: [PATCH 10/21] Staging: hv: Cleanup root device handling
On Mon, Mar 14, 2011 at 07:54:29PM +, KY Srinivasan wrote: -Original Message- From: Greg KH [mailto:g...@kroah.com] Sent: Monday, March 14, 2011 3:34 PM To: KY Srinivasan Cc: gre...@suse.de; linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; virtualizat...@lists.osdl.org; Haiyang Zhang; Mike Sterling; Abhishek Kane (Mindtree Consulting PVT LTD) Subject: Re: [PATCH 10/21] Staging: hv: Cleanup root device handling On Thu, Mar 10, 2011 at 02:08:06PM -0800, K. Y. Srinivasan wrote: Now we can complete the cleanup of the root device management. Use the preferred APIs for creating and managing the root device. As part of this cleanup get rid of the root device object from vmbus_driver_context. I don't understand, what is the root device? This would be the device under /sys/devices that all other hyperv devices would be grouped under. This notion of the root device existed in the existing code; however its creation and management was unnecessarily complicated. But that is what your new pci device should be, not a separate one. Why not use that instead? Actually, how are things looking then? You have a pci device, with no children, yet the root device has the children devices? That doesn't really make sense now does it? thanks, greg k-h ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization
RE: [PATCH 10/21] Staging: hv: Cleanup root device handling
-Original Message- From: Greg KH [mailto:gre...@suse.de] Sent: Monday, March 14, 2011 3:59 PM To: KY Srinivasan Cc: Greg KH; linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; virtualizat...@lists.osdl.org; Haiyang Zhang; Mike Sterling; Abhishek Kane (Mindtree Consulting PVT LTD) Subject: Re: [PATCH 10/21] Staging: hv: Cleanup root device handling On Mon, Mar 14, 2011 at 07:54:29PM +, KY Srinivasan wrote: -Original Message- From: Greg KH [mailto:g...@kroah.com] Sent: Monday, March 14, 2011 3:34 PM To: KY Srinivasan Cc: gre...@suse.de; linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; virtualizat...@lists.osdl.org; Haiyang Zhang; Mike Sterling; Abhishek Kane (Mindtree Consulting PVT LTD) Subject: Re: [PATCH 10/21] Staging: hv: Cleanup root device handling On Thu, Mar 10, 2011 at 02:08:06PM -0800, K. Y. Srinivasan wrote: Now we can complete the cleanup of the root device management. Use the preferred APIs for creating and managing the root device. As part of this cleanup get rid of the root device object from vmbus_driver_context. I don't understand, what is the root device? This would be the device under /sys/devices that all other hyperv devices would be grouped under. This notion of the root device existed in the existing code; however its creation and management was unnecessarily complicated. But that is what your new pci device should be, not a separate one. Why not use that instead? Actually, how are things looking then? You have a pci device, with no children, yet the root device has the children devices? That doesn't really make sense now does it? Good point. I will cleanup the patches and send you the updated ones shortly. Regards, K. Y ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization