Re: [PATCH] virtio: decrement dev_index when device is unregistered

2011-04-04 Thread Stefan Hajnoczi
On Tue, Apr 5, 2011 at 5:49 AM, Takuma Umeya wrote: > When virtio device is removed, dev_index does not get decremented. > The next device hotplug event results in consuming the next pci to > the one that is suppose to be available. > > Signed-off-by: Takuma Umeya > > diff --git a/drivers/virtio/

[PATCH] virtio_blk: decrement index when blockdevice is removed

2011-04-04 Thread Takuma Umeya
When virtio block device is removed, index does not get decremented. When another virtio disk is attached it uses the next device letter to the one that is suppose to be available. Signed-off-by: Takuma Umeya diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 6ecf89c..

[PATCH] virtio: decrement dev_index when device is unregistered

2011-04-04 Thread Takuma Umeya
When virtio device is removed, dev_index does not get decremented. The next device hotplug event results in consuming the next pci to the one that is suppose to be available. Signed-off-by: Takuma Umeya diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index efb35aa..67fe71d 1006

[PATCH 10/22] Staging: hv: Simplify blkvsc_init_rw

2011-04-04 Thread K. Y. Srinivasan
Simplyfify blkvsc_init_rw() by using a single scsi command independent of the start sector Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 58 +-- 1 files changed, 13 insertions

[PATCH 08/22] Staging hv: Get rid of the state media_not_present

2011-04-04 Thread K. Y. Srinivasan
The block driver in Hyper-V does not handle removable media, get rid of the media_not_present state. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c |9 + 1 files changed, 1 insertions(+), 8 deletions(-)

[PATCH 21/22] Staging: hv: Introduce a function to map channel properties onto block device info

2011-04-04 Thread K. Y. Srinivasan
In preparation for removing the IDE details from the block driver, implement a function that maps channel properties to block device information. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen --- drivers/staging/hv/storvsc.c | 68 ++

[PATCH 20/22] Staging: hv: Fix a jump label (Remove) in blkvsc_drv.c

2011-04-04 Thread K. Y. Srinivasan
One of the jump labels was named Remove; change it to remove. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/hv/blkvsc_drv

[PATCH 22/22] Staging: hv: Get rid of IDE details from blkvsc_drv.c

2011-04-04 Thread K. Y. Srinivasan
Now get rid of IDE details from blkvsc_drv.c. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 56 --- drivers/staging/hv/storvsc.c| 18 ++-- 2 files changed, 26 in

[PATCH 09/22] Staging: hv: Get rid of the function blkvsc_revalidate_disk()

2011-04-04 Thread K. Y. Srinivasan
The block driver in Hyper-V does not support removable media, get rid of the blkvsc_revalidate_disk(). Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 17 - 1 files changed, 0 insertions(+), 17 de

[PATCH 07/22] Staging: hv: Get rid of the function blkvsc_do_flush()

2011-04-04 Thread K. Y. Srinivasan
Get rid of the function blkvsc_do_flush() and instead use the common function to force a device flush. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 52 ++ 1 files changed, 14

[PATCH 05/22] Staging: hv: Get rid of blkvsc_do_read_capacity()

2011-04-04 Thread K. Y. Srinivasan
Now that we have a common function for some of the operations on the device, use that and get rid of the function blkvsc_do_read_capacity(). Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 117 +

[PATCH 11/22] Staging: hv: Get rid of some DPRINT_INFO() statements

2011-04-04 Thread K. Y. Srinivasan
Get rid of some of the DPRINT_INFO() statements. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/sta

[PATCH 12/22] Staging: hv: Get rid of some DPRINT_DBG() calls

2011-04-04 Thread K. Y. Srinivasan
Get rid of some of the DPRINT_DBG() statements. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 84 --- 1 files changed, 0 insertions(+), 84 deletions(-) diff --git a/drivers/s

[PATCH 16/22] Staging: hv: Get rid of some DPRINT_ERR() calls

2011-04-04 Thread K. Y. Srinivasan
Get rid of some DPRINT_ERR() calls. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c |9 +++-- 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv

[PATCH 14/22] Staging: hv: Cleanup storvsc_remove()

2011-04-04 Thread K. Y. Srinivasan
storvsc_remove() cannot fail, clean it up accordingly. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen --- drivers/staging/hv/storvsc_drv.c | 14 ++ 1 files changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/staging/hv/storvsc

[PATCH 18/22] Staging: hv: Cleanup blkvsc_open()

2011-04-04 Thread K. Y. Srinivasan
Given that we don't support removable media, cleanup blkvsc_open() Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 10 +- 1 files changed, 1 insertions(+), 9 deletions(-) diff --git a/drivers/staging/hv/

[PATCH 06/22] Staging: hv: Get rid of blkvsc_do_read_capacity16()

2011-04-04 Thread K. Y. Srinivasan
Get rid of blkvsc_do_read_capacity16() and instead use the common function for retrieving capacity. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 81 +-- 1 files changed, 2 in

[PATCH 04/22] Staging: hv: Introduce a common function for issuing commands to the device

2011-04-04 Thread K. Y. Srinivasan
There are multiple functions to either get info about the device (INQUIRY, CAPACITY etc) or to FLUSH the device cache. The majority of the code for these functions is identical. Introduce a common function for doing all these operations. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zha

[PATCH 13/22] Staging: hv: Cleanup blkvsc_remove()

2011-04-04 Thread K. Y. Srinivasan
blkvsc_remove() cannot fail. Clean it up accordingly. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 15 +++ 1 files changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/staging/hv/blkvsc_d

[PATCH 17/22] Staging: hv: Get rid of an unnecessary check in blkvsc_probe()

2011-04-04 Thread K. Y. Srinivasan
It is never the case that the dev_add function pointer will not be set (we set it in this code!). Get rid of this meaningless check. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c |5 - 1 files changed, 0 ins

[PATCH 19/22] Staging: hv: Fix a jump label (Cleanup) in blkvsc_drv

2011-04-04 Thread K. Y. Srinivasan
One of the goto labels was named Cleanup; change it to cleanup. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/hv/bl

[PATCH 15/22] Staging: hv: Get rid of the code to manage removable media

2011-04-04 Thread K. Y. Srinivasan
The Hyper-V block driver does not handle removable media. Get rid of the code to manage removable media. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c |9 + 1 files changed, 1 insertions(+), 8 deletions(

[PATCH 01/22] Staging: hv: Get rid of blkvsc_media_changed()

2011-04-04 Thread K. Y. Srinivasan
We don't support removable media in Hyper-V block driver. Get rid of blkvsc_media_changed() as it is efectively "dead code". Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c |7 --- 1 files changed, 0 insertion

[PATCH 03/22] Staging: hv: Simplify the code for blkvsc_getgeo()

2011-04-04 Thread K. Y. Srinivasan
We are making up the geometry anyway, keep it simple. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 84 +- 1 files changed, 11 insertions(+), 73 deletions(-) diff --git a/dri

[PATCH 02/22] Staging: hv: Enable blkvsc_ioctl()

2011-04-04 Thread K. Y. Srinivasan
We can support HDIO_GET_IDENTITY ioctl, enable blkvsc_ioctl(). Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 11 +++ 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/staging/hv/blk

[PATCH 00/22] Staging: hv: Cleanup storage drivers - Phase IV

2011-04-04 Thread K. Y. Srinivasan
More cleanup. In this patch-set we deal with the following issues: 1) While a Linux guest on Hyper-V can be assigned removable media devices (DVD, floppy etc), these devices are not handled by the Hyper-V block driver. So, we cleanup all the dead code deal

Re: [PATCH RESEND] net: convert xen-netfront to hw_features

2011-04-04 Thread David Miller
From: Ian Campbell Date: Mon, 4 Apr 2011 13:29:19 +0100 >>From 0b56469abe56efae415b4603ef508ce9aec0e4c1 Mon Sep 17 00:00:00 2001 > From: Ian Campbell > Date: Mon, 4 Apr 2011 10:58:50 +0100 > Subject: [PATCH] xen: netfront: assume all hw features are available until > backend connection setup >

Re: [PATCH] virtio: Decrement avail idx on buffer detach

2011-04-04 Thread Amit Shah
On (Mon) 04 Apr 2011 [16:04:40], Rusty Russell wrote: > On Mon, 28 Mar 2011 19:57:06 +0530, Amit Shah wrote: > > On (Thu) 17 Mar 2011 [17:56:59], Amit Shah wrote: > > > On (Thu) 17 Mar 2011 [15:26:28], Rusty Russell wrote: > > > > On Wed, 16 Mar 2011 19:12:10 +0530, Amit Shah > > > > wrote: > >

Re: [PATCH RESEND] net: convert xen-netfront to hw_features

2011-04-04 Thread Ian Campbell
On Sat, 2011-04-02 at 04:54 +0100, David Miller wrote: > From: Michał Mirosław > Date: Thu, 31 Mar 2011 13:01:35 +0200 (CEST) > > > Not tested in any way. The original code for offload setting seems broken > > as it resets the features on every netback reconnect. > > > > This will set GSO_ROBUST

[PATCH] xen: drop anti-dependency on X86_VISWS (Was: Re: [PATCH] xen: netfront: fix declaration order)

2011-04-04 Thread Ian Campbell
On Mon, 2011-04-04 at 01:24 +0100, David Miller wrote: > From: Eric Dumazet > Date: Sun, 03 Apr 2011 13:07:19 +0200 > > > [PATCH] xen: netfront: fix declaration order > > > > Must declare xennet_fix_features() and xennet_set_features() before > > using them. > > > > Signed-off-by: Eric Dumazet

Re: Signed bit field; int have_hotplug_status_watch:1

2011-04-04 Thread Ian Campbell
On Sun, 2011-04-03 at 22:32 +0100, Dr. David Alan Gilbert wrote: > Hi Ian, >I've been going through some sparse scans of the kernel and > it threw up: > > CHECK drivers/net/xen-netback/xenbus.c > drivers/net/xen-netback/xenbus.c:29:40: error: dubious one-bit signed bitfield > > in

Re: [PATCH] virtio: Decrement avail idx on buffer detach

2011-04-04 Thread Rusty Russell
On Mon, 28 Mar 2011 19:57:06 +0530, Amit Shah wrote: > On (Thu) 17 Mar 2011 [17:56:59], Amit Shah wrote: > > On (Thu) 17 Mar 2011 [15:26:28], Rusty Russell wrote: > > > On Wed, 16 Mar 2011 19:12:10 +0530, Amit Shah > > > wrote: > > > > When detaching a buffer from a vq, the avail.idx value shoul