Hello community,
here is the log from the commit of package kernel-source for openSUSE:12.1:Update:Test checked in at 2012-01-10 01:47:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.1:Update:Test/kernel-source (Old)
and /work/SRC/openSUSE:12.1:Update:Test/.kernel-source.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kernel-source", Maintainer is "kernel-maintainers@forge.provo.novell.com"
Changes:
--------
--- /work/SRC/openSUSE:12.1:Update:Test/kernel-source/kernel-debug.changes 2012-01-05 17:01:46.000000000 +0100
+++ /work/SRC/openSUSE:12.1:Update:Test/.kernel-source.new/kernel-debug.changes 2012-01-10 01:47:45.000000000 +0100
@@ -1,0 +2,49 @@
+Thu Jan 5 17:31:19 CET 2012 - ohering@suse.de
+
+- staging: hv: hv_mouse: use KBUILD_MODNAME as drivername.
+- Staging: hv: storvsc: Cleanup error handling in the probe
+ function.
+- Staging: hv: storvsc: Fix a bug in create_bounce_buffer()
+ (bnc#724616).
+- Staging: hv: storvsc: Fix checkpatch warnings.
+- Staging: hv: storvsc: Fix error handling storvsc_host_reset().
+- Staging: hv: storvsc: Fixup the error when processing SET_WINDOW
+ command.
+- Staging: hv: storvsc: Get rid of an unnecessary forward
+ declaration.
+- Staging: hv: storvsc: Implement per device memory pools.
+- Staging: hv: storvsc: remove last usage of DPRINT_WARN.
+- Staging: hv: storvsc: Support hot add of scsi disks.
+- Staging: hv: storvsc: Support hot-removing of scsi devices.
+- Staging: hv: storvsc: Upgrade the vmstor protocol version.
+- Staging: hv: storvsc: Use mempools to allocate struct
+ storvsc_cmd_request.
+- Staging: hv: storvsc: Use the accessor function shost_priv().
+- Staging: hv: storvsc: use the macro KBUILD_MODNAME.
+- Staging: hv: storvsc: Use the unlocked version queuecommand.
+- Staging: hv: storvsc: Cleanup storvsc_device_alloc()
+ (bnc#724616).
+- Staging: hv: storvsc: Disable clustering (bnc#724616).
+- Staging: hv: storvsc: Fix a bug in copy_from_bounce_buffer()
+ (bnc#724616).
+- Staging: hv: storvsc: Fix a bug in storvsc_command_completion()
+ (bnc#724616).
+- Refresh patches.suse/staging-hv-storvsc-module-name.patch.
+- commit 8f71365
+
+-------------------------------------------------------------------
+Thu Jan 5 09:44:28 CET 2012 - jbeulich@novell.com
+
+- Update Xen patches to 3.1.7.
+- patches.xen/1124-x86-undo-limit-pages.patch: x86: undo_limit_pages()
+ must reset page count.
+- patches.xen/1126-netback-invalidation-index.patch: netback: use
+ correct index for invalidation in netbk_tx_check_mop().
+- patches.xen/1134-blktap-locking.patch: blktap: fix locking (again)
+ (bnc#724734).
+- patches.xen/1135-blktap-map-once.patch: blktap: ensure mmap() is
+ called only once per region.
+- Delete patches.xen/xencons-tty_mutex.patch.
+- commit 48936d9
+
+-------------------------------------------------------------------
@@ -121,6 +169,0 @@
-
--------------------------------------------------------------------
-Thu Dec 15 17:47:54 CET 2011 - meissner@suse.de
-
-- updated
-- commit 7433f07
kernel-default.changes: same change
kernel-desktop.changes: same change
kernel-docs.changes: same change
kernel-ec2.changes: same change
kernel-pae.changes: same change
kernel-ppc64.changes: same change
kernel-s390.changes: same change
kernel-source.changes: same change
kernel-syms.changes: same change
kernel-trace.changes: same change
kernel-vanilla.changes: same change
kernel-xen.changes: same change
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kernel-debug.spec ++++++
--- /var/tmp/diff_new_pack.eK6Duz/_old 2012-01-10 01:47:52.000000000 +0100
+++ /var/tmp/diff_new_pack.eK6Duz/_new 2012-01-10 01:47:52.000000000 +0100
@@ -15,6 +15,8 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+# norootforbuild
+
%define srcversion 3.1
%define patchversion 3.1.7
%define variant %{nil}
@@ -54,15 +56,13 @@
Name: kernel-debug
Summary: A Debug Version of the Kernel
-License: GPL-2.0
-Group: System/Kernel
Version: 3.1.7
Release: 0
+License: GPL-2.0
+Group: System/Kernel
Url: http://www.kernel.org/
-BuildRequires: coreutils
+BuildRequires: coreutils module-init-tools sparse
BuildRequires: fdupes
-BuildRequires: module-init-tools
-BuildRequires: sparse
Provides: multiversion(kernel)
Provides: %{name}_%_target_cpu = %version-%release
Provides: %name = %version-%source_rel
kernel-default.spec: same change
++++++ kernel-desktop.spec ++++++
--- /var/tmp/diff_new_pack.eK6Duz/_old 2012-01-10 01:47:53.000000000 +0100
+++ /var/tmp/diff_new_pack.eK6Duz/_new 2012-01-10 01:47:53.000000000 +0100
@@ -15,6 +15,8 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+# norootforbuild
+
%define srcversion 3.1
%define patchversion 3.1.7
%define variant %{nil}
@@ -54,15 +56,13 @@
Name: kernel-desktop
Summary: Kernel optimized for the desktop
-License: GPL-2.0
-Group: System/Kernel
Version: 3.1.7
Release: 0
+License: GPL-2.0
+Group: System/Kernel
Url: http://www.kernel.org/
-BuildRequires: coreutils
+BuildRequires: coreutils module-init-tools sparse
BuildRequires: fdupes
-BuildRequires: module-init-tools
-BuildRequires: sparse
Provides: multiversion(kernel)
Provides: %{name}_%_target_cpu = %version-%release
Provides: %name = %version-%source_rel
@@ -131,6 +131,7 @@
%endif
Provides: kernel = %version-%source_rel
+
Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%srcversion.tar.bz2
Source2: source-post.sh
Source3: kernel-source.rpmlintrc
@@ -281,6 +282,7 @@
that support it, regardless of the amount of main memory.
%endif
+
%source_timestamp
%prep
if ! [ -e %_sourcedir/linux-%srcversion.tar.bz2 ]; then
@@ -825,6 +827,7 @@
This package contains only the base modules, required in all installs.
+
%source_timestamp
%preun base -f preun-base.sh
@@ -875,6 +878,7 @@
This package contains additional modules not supported by Novell.
+
%source_timestamp
%preun extra -f preun-extra.sh
++++++ kernel-docs.spec ++++++
--- /var/tmp/diff_new_pack.eK6Duz/_old 2012-01-10 01:47:53.000000000 +0100
+++ /var/tmp/diff_new_pack.eK6Duz/_new 2012-01-10 01:47:53.000000000 +0100
@@ -15,6 +15,8 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+# norootforbuild
+
%define patchversion 3.1.7
%define variant %{nil}
@@ -22,20 +24,13 @@
Name: kernel-docs
Summary: Kernel Documentation
-License: GPL-2.0
-Group: Documentation/Man
Version: 3.1.7
Release: 0
-BuildRequires: docbook-toys
-BuildRequires: docbook-utils
-BuildRequires: ghostscript_any
+BuildRequires: docbook-toys docbook-utils ghostscript_any libjpeg-devel texlive transfig xmlto xorg-x11-devel
BuildRequires: kernel-source%variant
-BuildRequires: libjpeg-devel
-BuildRequires: texlive
-BuildRequires: transfig
-BuildRequires: xmlto
-BuildRequires: xorg-x11-devel
Url: http://www.kernel.org/
+License: GPL-2.0
+Group: Documentation/Man
Provides: %name = %version-%source_rel
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ kernel-ec2.spec ++++++
--- /var/tmp/diff_new_pack.eK6Duz/_old 2012-01-10 01:47:53.000000000 +0100
+++ /var/tmp/diff_new_pack.eK6Duz/_new 2012-01-10 01:47:53.000000000 +0100
@@ -15,6 +15,8 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+# norootforbuild
+
%define srcversion 3.1
%define patchversion 3.1.7
%define variant %{nil}
@@ -54,15 +56,13 @@
Name: kernel-ec2
Summary: The Amazon EC2 Xen Kernel
-License: GPL-2.0
-Group: System/Kernel
Version: 3.1.7
Release: 0
+License: GPL-2.0
+Group: System/Kernel
Url: http://www.kernel.org/
-BuildRequires: coreutils
+BuildRequires: coreutils module-init-tools sparse
BuildRequires: fdupes
-BuildRequires: module-init-tools
-BuildRequires: sparse
Provides: multiversion(kernel)
Provides: %{name}_%_target_cpu = %version-%release
Provides: %name = %version-%source_rel
@@ -131,6 +131,7 @@
%endif
Provides: kernel = %version-%source_rel
+
Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%srcversion.tar.bz2
Source2: source-post.sh
Source3: kernel-source.rpmlintrc
++++++ kernel-pae.spec ++++++
--- /var/tmp/diff_new_pack.eK6Duz/_old 2012-01-10 01:47:53.000000000 +0100
+++ /var/tmp/diff_new_pack.eK6Duz/_new 2012-01-10 01:47:53.000000000 +0100
@@ -15,6 +15,8 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+# norootforbuild
+
%define srcversion 3.1
%define patchversion 3.1.7
%define variant %{nil}
@@ -54,15 +56,13 @@
Name: kernel-pae
Summary: Kernel with PAE Support
-License: GPL-2.0
-Group: System/Kernel
Version: 3.1.7
Release: 0
+License: GPL-2.0
+Group: System/Kernel
Url: http://www.kernel.org/
-BuildRequires: coreutils
+BuildRequires: coreutils module-init-tools sparse
BuildRequires: fdupes
-BuildRequires: module-init-tools
-BuildRequires: sparse
Provides: multiversion(kernel)
Provides: %{name}_%_target_cpu = %version-%release
Provides: %name = %version-%source_rel
kernel-ppc64.spec: same change
kernel-s390.spec: same change
++++++ kernel-source.spec ++++++
--- /var/tmp/diff_new_pack.eK6Duz/_old 2012-01-10 01:47:53.000000000 +0100
+++ /var/tmp/diff_new_pack.eK6Duz/_new 2012-01-10 01:47:53.000000000 +0100
@@ -14,8 +14,9 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-# icecream 0
+# norootforbuild
+# icecream 0
%define srcversion 3.1
%define patchversion 3.1.7
@@ -28,15 +29,14 @@
Name: kernel-source
Summary: The Linux Kernel Sources
-License: GPL-2.0
-Group: Development/Sources
Version: 3.1.7
Release: 0
+License: GPL-2.0
+Group: Development/Sources
Url: http://www.kernel.org/
AutoReqProv: off
-BuildRequires: coreutils
+BuildRequires: coreutils sed
BuildRequires: fdupes
-BuildRequires: sed
Requires(post): coreutils sed
Provides: multiversion(kernel)
Provides: linux
++++++ kernel-syms.spec ++++++
--- /var/tmp/diff_new_pack.eK6Duz/_old 2012-01-10 01:47:53.000000000 +0100
+++ /var/tmp/diff_new_pack.eK6Duz/_new 2012-01-10 01:47:53.000000000 +0100
@@ -15,20 +15,23 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+# norootforbuild
+
%define variant %{nil}
%include %_sourcedir/kernel-spec-macros
Name: kernel-syms
Summary: Kernel Symbol Versions (modversions)
-License: GPL-2.0
-Group: Development/Sources
Version: 3.1.7
-Release: 0
%if %using_buildservice
+Release: 0
%else
%define kernel_source_release %(LC_ALL=C rpm -q kernel-devel%variant-%version --qf "%{RELEASE}" | grep -v 'not installed' || echo 0)
+Release: %kernel_source_release
%endif
+License: GPL-2.0
+Group: Development/Sources
Url: http://www.kernel.org/
AutoReqProv: off
BuildRequires: coreutils
++++++ kernel-trace.spec ++++++
--- /var/tmp/diff_new_pack.eK6Duz/_old 2012-01-10 01:47:53.000000000 +0100
+++ /var/tmp/diff_new_pack.eK6Duz/_new 2012-01-10 01:47:53.000000000 +0100
@@ -15,6 +15,8 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+# norootforbuild
+
%define srcversion 3.1
%define patchversion 3.1.7
%define variant %{nil}
@@ -54,15 +56,13 @@
Name: kernel-trace
Summary: The Standard Kernel with Tracing Features
-License: GPL-2.0
-Group: System/Kernel
Version: 3.1.7
Release: 0
+License: GPL-2.0
+Group: System/Kernel
Url: http://www.kernel.org/
-BuildRequires: coreutils
+BuildRequires: coreutils module-init-tools sparse
BuildRequires: fdupes
-BuildRequires: module-init-tools
-BuildRequires: sparse
Provides: multiversion(kernel)
Provides: %{name}_%_target_cpu = %version-%release
Provides: %name = %version-%source_rel
kernel-vanilla.spec: same change
++++++ kernel-xen.spec ++++++
--- /var/tmp/diff_new_pack.eK6Duz/_old 2012-01-10 01:47:53.000000000 +0100
+++ /var/tmp/diff_new_pack.eK6Duz/_new 2012-01-10 01:47:53.000000000 +0100
@@ -15,6 +15,8 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+# norootforbuild
+
%define srcversion 3.1
%define patchversion 3.1.7
%define variant %{nil}
@@ -54,15 +56,13 @@
Name: kernel-xen
Summary: The Xen Kernel
-License: GPL-2.0
-Group: System/Kernel
Version: 3.1.7
Release: 0
+License: GPL-2.0
+Group: System/Kernel
Url: http://www.kernel.org/
-BuildRequires: coreutils
+BuildRequires: coreutils module-init-tools sparse
BuildRequires: fdupes
-BuildRequires: module-init-tools
-BuildRequires: sparse
Provides: multiversion(kernel)
Provides: %{name}_%_target_cpu = %version-%release
Provides: %name = %version-%source_rel
@@ -131,6 +131,7 @@
%endif
Provides: kernel = %version-%source_rel
+
Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%srcversion.tar.bz2
Source2: source-post.sh
Source3: kernel-source.rpmlintrc
++++++ patches.suse.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/staging-hv-mousevsc-module-name.patch new/patches.suse/staging-hv-mousevsc-module-name.patch
--- old/patches.suse/staging-hv-mousevsc-module-name.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/patches.suse/staging-hv-mousevsc-module-name.patch 2012-01-05 17:31:19.000000000 +0100
@@ -0,0 +1,19 @@
+From:
+Subject: staging: hv: hv_mouse: use KBUILD_MODNAME as drivername
+Patch-mainline: never
+
+---
+ drivers/staging/hv/hv_mouse.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/staging/hv/hv_mouse.c
++++ b/drivers/staging/hv/hv_mouse.c
+@@ -578,7 +578,7 @@ static const struct hv_vmbus_device_id i
+ MODULE_DEVICE_TABLE(vmbus, id_table);
+
+ static struct hv_driver mousevsc_drv = {
+- .name = "mousevsc",
++ .name = KBUILD_MODNAME,
+ .id_table = id_table,
+ .probe = mousevsc_probe,
+ .remove = mousevsc_remove,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/staging-hv-storvsc-cleanup_error_handling_in_the_probe_function.patch new/patches.suse/staging-hv-storvsc-cleanup_error_handling_in_the_probe_function.patch
--- old/patches.suse/staging-hv-storvsc-cleanup_error_handling_in_the_probe_function.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/patches.suse/staging-hv-storvsc-cleanup_error_handling_in_the_probe_function.patch 2012-01-05 17:31:19.000000000 +0100
@@ -0,0 +1,95 @@
+Subject: Staging: hv: storvsc: Cleanup error handling in the probe function
+From:
+Patch-mainline: 3.3
+
+Cleanup error handling in the probe function.
+
+Signed-off-by: K. Y. Srinivasan
+Signed-off-by: Haiyang Zhang
+---
+ drivers/staging/hv/storvsc_drv.c | 42 ++++++++++++++++++++++-----------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
+
+--- a/drivers/staging/hv/storvsc_drv.c
++++ b/drivers/staging/hv/storvsc_drv.c
+@@ -1388,17 +1388,14 @@ static int storvsc_probe(struct hv_devic
+ host_dev->request_pool);
+
+ if (!host_dev->request_mempool) {
+- kmem_cache_destroy(host_dev->request_pool);
+- scsi_host_put(host);
+- return -ENOMEM;
++ ret = -ENOMEM;
++ goto err_out0;
+ }
+
+ stor_device = kzalloc(sizeof(struct storvsc_device), GFP_KERNEL);
+ if (!stor_device) {
+- mempool_destroy(host_dev->request_mempool);
+- kmem_cache_destroy(host_dev->request_pool);
+- scsi_host_put(host);
+- return -ENOMEM;
++ ret = -ENOMEM;
++ goto err_out1;
+ }
+
+ stor_device->destroy = false;
+@@ -1409,13 +1406,8 @@ static int storvsc_probe(struct hv_devic
+
+ stor_device->port_number = host->host_no;
+ ret = storvsc_connect_to_vsp(device, storvsc_ringbuffer_size);
+- if (ret) {
+- mempool_destroy(host_dev->request_mempool);
+- kmem_cache_destroy(host_dev->request_pool);
+- scsi_host_put(host);
+- kfree(stor_device);
+- return ret;
+- }
++ if (ret)
++ goto err_out2;
+
+ if (dev_is_ide)
+ storvsc_get_ide_info(device, &target, &path);
+@@ -1435,7 +1427,7 @@ static int storvsc_probe(struct hv_devic
+ /* Register the HBA and start the scsi bus scan */
+ ret = scsi_add_host(host, &device->device);
+ if (ret != 0)
+- goto err_out;
++ goto err_out3;
+
+ if (!dev_is_ide) {
+ scsi_scan_host(host);
+@@ -1444,16 +1436,30 @@ static int storvsc_probe(struct hv_devic
+ ret = scsi_add_device(host, 0, target, 0);
+ if (ret) {
+ scsi_remove_host(host);
+- goto err_out;
++ goto err_out3;
+ }
+ return 0;
+
+-err_out:
++err_out3:
++ /*
++ * Once we have connected with the host, we would need to
++ * to invoke storvsc_dev_remove() to rollback this state and
++ * this call also frees up the stor_device; hence the jump around
++ * err_out2 label.
++ */
+ storvsc_dev_remove(device);
++ goto err_out1;
++
++err_out2:
++ kfree(stor_device);
++
++err_out1:
+ mempool_destroy(host_dev->request_mempool);
++
++err_out0:
+ kmem_cache_destroy(host_dev->request_pool);
+ scsi_host_put(host);
+- return -ENODEV;
++ return ret;
+ }
+
+ /* The one and only one */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/staging-hv-storvsc-fix-a-bug-in-create_bounce_buffer.patch new/patches.suse/staging-hv-storvsc-fix-a-bug-in-create_bounce_buffer.patch
--- old/patches.suse/staging-hv-storvsc-fix-a-bug-in-create_bounce_buffer.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/patches.suse/staging-hv-storvsc-fix-a-bug-in-create_bounce_buffer.patch 2012-01-05 17:31:19.000000000 +0100
@@ -0,0 +1,48 @@
+From:
+Subject: [PATCH 1/1] Staging: hv: storvsc: Fix a bug in create_bounce_buffer()
+References: bnc#724616
+Patch-mainline: submitted
+
+
+Signed-off-by: K. Y. Srinivasan
+---
+ drivers/staging/hv/storvsc_drv.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+--- a/drivers/staging/hv/storvsc_drv.c
++++ b/drivers/staging/hv/storvsc_drv.c
+@@ -848,12 +848,14 @@ static int do_bounce_buffer(struct scatt
+
+ static struct scatterlist *create_bounce_buffer(struct scatterlist *sgl,
+ unsigned int sg_count,
+- unsigned int len)
++ unsigned int len,
++ int write)
+ {
+ int i;
+ int num_pages;
+ struct scatterlist *bounce_sgl;
+ struct page *page_buf;
++ unsigned int buf_len = ((write == WRITE_TYPE) ? 0 : PAGE_SIZE);
+
+ num_pages = ALIGN(len, PAGE_SIZE) >> PAGE_SHIFT;
+
+@@ -865,7 +867,7 @@ static struct scatterlist *create_bounce
+ page_buf = alloc_page(GFP_ATOMIC);
+ if (!page_buf)
+ goto cleanup;
+- sg_set_page(&bounce_sgl[i], page_buf, 0, 0);
++ sg_set_page(&bounce_sgl[i], page_buf, buf_len, 0);
+ }
+
+ return bounce_sgl;
+@@ -1307,7 +1309,8 @@ static int storvsc_queuecommand(struct S
+ if (do_bounce_buffer(sgl, scsi_sg_count(scmnd)) != -1) {
+ cmd_request->bounce_sgl =
+ create_bounce_buffer(sgl, scsi_sg_count(scmnd),
+- scsi_bufflen(scmnd));
++ scsi_bufflen(scmnd),
++ vm_srb->data_in);
+ if (!cmd_request->bounce_sgl) {
+ scmnd->host_scribble = NULL;
+ mempool_free(cmd_request,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/staging-hv-storvsc-fix_checkpatch_warnings.patch new/patches.suse/staging-hv-storvsc-fix_checkpatch_warnings.patch
--- old/patches.suse/staging-hv-storvsc-fix_checkpatch_warnings.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/patches.suse/staging-hv-storvsc-fix_checkpatch_warnings.patch 2012-01-05 17:31:19.000000000 +0100
@@ -0,0 +1,46 @@
+Subject: Staging: hv: storvsc: Fix checkpatch warnings
+From:
+Patch-mainline: 3.3
+
+Fix checkpatch warnings.
+
+Signed-off-by: K. Y. Srinivasan
+---
+ drivers/staging/hv/storvsc_drv.c | 19 ++++++++++---------
+ 1 file changed, 10 insertions(+), 9 deletions(-)
+
+--- a/drivers/staging/hv/storvsc_drv.c
++++ b/drivers/staging/hv/storvsc_drv.c
+@@ -572,8 +572,9 @@ static void storvsc_on_io_completion(str
+ if (vstor_packet->vm_srb.srb_status & 0x80) {
+ /* autosense data available */
+ dev_warn(&device->device,
+- "storvsc pkt %p autosense data valid - len %d\n",
+- request, vstor_packet->vm_srb.sense_info_length);
++ "stor pkt %p autosense data valid - len %d\n",
++ request,
++ vstor_packet->vm_srb.sense_info_length);
+
+ memcpy(request->sense_buffer,
+ vstor_packet->vm_srb.sense_data,
+@@ -1250,13 +1251,13 @@ static bool storvsc_check_scsi_cmd(struc
+ u8 scsi_op = scmnd->cmnd[0];
+
+ switch (scsi_op) {
+- /* smartd sends this command, which will offline the device */
+- case SET_WINDOW:
+- scmnd->result = ILLEGAL_REQUEST << 16;
+- allowed = false;
+- break;
+- default:
+- break;
++ /* smartd sends this command, which will offline the device */
++ case SET_WINDOW:
++ scmnd->result = ILLEGAL_REQUEST << 16;
++ allowed = false;
++ break;
++ default:
++ break;
+ }
+ return allowed;
+ }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/staging-hv-storvsc-fix_error_handling_storvsc_host_reset.patch new/patches.suse/staging-hv-storvsc-fix_error_handling_storvsc_host_reset.patch
--- old/patches.suse/staging-hv-storvsc-fix_error_handling_storvsc_host_reset.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/patches.suse/staging-hv-storvsc-fix_error_handling_storvsc_host_reset.patch 2012-01-05 17:31:19.000000000 +0100
@@ -0,0 +1,70 @@
+Subject: Staging: hv: storvsc: Fix error handling storvsc_host_reset()
+From:
+Patch-mainline: 3.3
+
+Fix error handling storvsc_host_reset(). I would like to thank
+Long Li for reporting this.
+
+Signed-off-by: K. Y. Srinivasan
+Signed-off-by: Haiyang Zhang
+Reported-by: Long Li
+---
+ drivers/staging/hv/storvsc_drv.c | 20 ++++++--------------
+ 1 file changed, 6 insertions(+), 14 deletions(-)
+
+--- a/drivers/staging/hv/storvsc_drv.c
++++ b/drivers/staging/hv/storvsc_drv.c
+@@ -1018,7 +1018,7 @@ static int storvsc_host_reset(struct hv_
+
+ stor_device = get_out_stor_device(device);
+ if (!stor_device)
+- return -ENODEV;
++ return FAILED;
+
+ request = &stor_device->reset_request;
+ vstor_packet = &request->vstor_packet;
+@@ -1035,13 +1035,11 @@ static int storvsc_host_reset(struct hv_
+ VM_PKT_DATA_INBAND,
+ VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
+ if (ret != 0)
+- goto cleanup;
++ return FAILED;
+
+ t = wait_for_completion_timeout(&request->wait_event, 5*HZ);
+- if (t == 0) {
+- ret = -ETIMEDOUT;
+- goto cleanup;
+- }
++ if (t == 0)
++ return TIMEOUT_ERROR;
+
+
+ /*
+@@ -1049,8 +1047,7 @@ static int storvsc_host_reset(struct hv_
+ * should have been flushed out and return to us
+ */
+
+-cleanup:
+- return ret;
++ return SUCCESS;
+ }
+
+
+@@ -1059,16 +1056,11 @@ cleanup:
+ */
+ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd)
+ {
+- int ret;
+ struct hv_host_device *host_dev =
+ (struct hv_host_device *)scmnd->device->host->hostdata;
+ struct hv_device *dev = host_dev->dev;
+
+- ret = storvsc_host_reset(dev);
+- if (ret != 0)
+- return ret;
+-
+- return ret;
++ return storvsc_host_reset(dev);
+ }
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/staging-hv-storvsc-fixup_the_error_when_processing_set_window_command.patch new/patches.suse/staging-hv-storvsc-fixup_the_error_when_processing_set_window_command.patch
--- old/patches.suse/staging-hv-storvsc-fixup_the_error_when_processing_set_window_command.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/patches.suse/staging-hv-storvsc-fixup_the_error_when_processing_set_window_command.patch 2012-01-05 17:31:19.000000000 +0100
@@ -0,0 +1,23 @@
+Subject: Staging: hv: storvsc: Fixup the error when processing SET_WINDOW command
+From:
+Patch-mainline: 3.3
+
+Fixup the error when processing SET_WINDOW command.
+
+Signed-off-by: K. Y. Srinivasan
+Signed-off-by: Haiyang Zhang
+---
+ drivers/staging/hv/storvsc_drv.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/staging/hv/storvsc_drv.c
++++ b/drivers/staging/hv/storvsc_drv.c
+@@ -1135,7 +1135,7 @@ static bool storvsc_check_scsi_cmd(struc
+ switch (scsi_op) {
+ /* smartd sends this command, which will offline the device */
+ case SET_WINDOW:
+- scmnd->result = DID_ERROR << 16;
++ scmnd->result = ILLEGAL_REQUEST << 16;
+ allowed = false;
+ break;
+ default:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/staging-hv-storvsc-get_rid_of_an_unnecessary_forward_declaration.patch new/patches.suse/staging-hv-storvsc-get_rid_of_an_unnecessary_forward_declaration.patch
--- old/patches.suse/staging-hv-storvsc-get_rid_of_an_unnecessary_forward_declaration.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/patches.suse/staging-hv-storvsc-get_rid_of_an_unnecessary_forward_declaration.patch 2012-01-05 17:31:19.000000000 +0100
@@ -0,0 +1,23 @@
+Subject: Staging: hv: storvsc: Get rid of an unnecessary forward declaration
+From:
+Patch-mainline: 3.3
+
+Get rid of an unnecessary forward declaration.
+
+Signed-off-by: K. Y. Srinivasan
+Signed-off-by: Haiyang Zhang
+---
+ drivers/staging/hv/storvsc_drv.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/drivers/staging/hv/storvsc_drv.c
++++ b/drivers/staging/hv/storvsc_drv.c
+@@ -236,8 +236,6 @@ struct vstor_packet {
+ #define STORVSC_MAX_CHANNELS 1
+ #define STORVSC_MAX_CMD_LEN 16
+
+-struct hv_storvsc_request;
+-
+ /* Matches Windows-end */
+ enum storvsc_request_type {
+ WRITE_TYPE,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/staging-hv-storvsc-implement_per_device_memory_pools.patch new/patches.suse/staging-hv-storvsc-implement_per_device_memory_pools.patch
--- old/patches.suse/staging-hv-storvsc-implement_per_device_memory_pools.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/patches.suse/staging-hv-storvsc-implement_per_device_memory_pools.patch 2012-01-05 17:31:19.000000000 +0100
@@ -0,0 +1,255 @@
+Subject: Staging: hv: storvsc: Implement per device memory pools
+From:
+Patch-mainline: 3.3
+
+The current code implemented a per-HBA memory pool mechanism. For IDE disks
+managed by this driver, there is a one to one correspondance between the
+block device and the associated virtual HBA and since currently only IDE devices
+can be the boot device, this addressed the deadlock issues that were raised during
+the review process. This patch implements a per-lun memory pool mechanism.
+
+Signed-off-by: K. Y. Srinivasan
+Signed-off-by: Haiyang Zhang
+---
+ drivers/staging/hv/storvsc_drv.c | 106 ++++++++++++++++++++++-----------------
+ 1 file changed, 62 insertions(+), 44 deletions(-)
+
+--- a/drivers/staging/hv/storvsc_drv.c
++++ b/drivers/staging/hv/storvsc_drv.c
+@@ -285,10 +285,13 @@ struct storvsc_device {
+ struct hv_storvsc_request reset_request;
+ };
+
+-struct hv_host_device {
+- struct hv_device *dev;
++struct stor_mem_pools {
+ struct kmem_cache *request_pool;
+ mempool_t *request_mempool;
++};
++
++struct hv_host_device {
++ struct hv_device *dev;
+ unsigned int port;
+ unsigned char path;
+ unsigned char target;
+@@ -789,7 +792,48 @@ static void storvsc_get_ide_info(struct
+
+ static int storvsc_device_alloc(struct scsi_device *sdevice)
+ {
++ struct stor_mem_pools *memp;
++ int number = STORVSC_MIN_BUF_NR;
++
++ memp = kzalloc(sizeof(struct stor_mem_pools), GFP_KERNEL);
++ if (!memp)
++ return -ENOMEM;
++
++ memp->request_pool =
++ kmem_cache_create(dev_name(&sdevice->sdev_dev),
++ sizeof(struct storvsc_cmd_request), 0,
++ SLAB_HWCACHE_ALIGN, NULL);
++
++ if (!memp->request_pool)
++ goto err0;
++
++ memp->request_mempool = mempool_create(number, mempool_alloc_slab,
++ mempool_free_slab,
++ memp->request_pool);
++
++ if (!memp->request_mempool)
++ goto err1;
++
++ sdevice->hostdata = memp;
++
+ return 0;
++
++err1:
++ kmem_cache_destroy(memp->request_pool);
++
++err0:
++ kfree(memp);
++ return -ENOMEM;
++}
++
++static void storvsc_device_destroy(struct scsi_device *sdevice)
++{
++ struct stor_mem_pools *memp = sdevice->hostdata;
++
++ mempool_destroy(memp->request_mempool);
++ kmem_cache_destroy(memp->request_pool);
++ kfree(memp);
++ sdevice->hostdata = NULL;
+ }
+
+ static int storvsc_device_configure(struct scsi_device *sdevice)
+@@ -1032,19 +1076,13 @@ static int storvsc_remove(struct hv_devi
+ {
+ struct storvsc_device *stor_device = hv_get_drvdata(dev);
+ struct Scsi_Host *host = stor_device->host;
+- struct hv_host_device *host_dev = shost_priv(host);
+
+ scsi_remove_host(host);
+
+ scsi_host_put(host);
+
+ storvsc_dev_remove(dev);
+- if (host_dev->request_pool) {
+- mempool_destroy(host_dev->request_mempool);
+- kmem_cache_destroy(host_dev->request_pool);
+- host_dev->request_pool = NULL;
+- host_dev->request_mempool = NULL;
+- }
++
+ return 0;
+ }
+
+@@ -1140,6 +1178,7 @@ static void storvsc_command_completion(s
+ struct scsi_sense_hdr sense_hdr;
+ struct vmscsi_request *vm_srb;
+ struct storvsc_scan_work *wrk;
++ struct stor_mem_pools *memp = scmnd->device->hostdata;
+
+ vm_srb = &request->vstor_packet.vm_srb;
+ if (cmd_request->bounce_sgl_count) {
+@@ -1202,7 +1241,7 @@ static void storvsc_command_completion(s
+
+ scsi_done_fn(scmnd);
+
+- mempool_free(cmd_request, host_dev->request_mempool);
++ mempool_free(cmd_request, memp->request_mempool);
+ }
+
+ static bool storvsc_check_scsi_cmd(struct scsi_cmnd *scmnd)
+@@ -1237,6 +1276,7 @@ static int storvsc_queuecommand(struct S
+ struct scatterlist *sgl;
+ unsigned int sg_count = 0;
+ struct vmscsi_request *vm_srb;
++ struct stor_mem_pools *memp = scmnd->device->hostdata;
+
+ if (storvsc_check_scsi_cmd(scmnd) == false) {
+ scmnd->scsi_done(scmnd);
+@@ -1254,7 +1294,7 @@ static int storvsc_queuecommand(struct S
+
+ request_size = sizeof(struct storvsc_cmd_request);
+
+- cmd_request = mempool_alloc(host_dev->request_mempool,
++ cmd_request = mempool_alloc(memp->request_mempool,
+ GFP_ATOMIC);
+ if (!cmd_request)
+ return SCSI_MLQUEUE_DEVICE_BUSY;
+@@ -1314,7 +1354,7 @@ static int storvsc_queuecommand(struct S
+ if (!cmd_request->bounce_sgl) {
+ scmnd->host_scribble = NULL;
+ mempool_free(cmd_request,
+- host_dev->request_mempool);
++ memp->request_mempool);
+
+ return SCSI_MLQUEUE_HOST_BUSY;
+ }
+@@ -1356,7 +1396,7 @@ retry_request:
+ destroy_bounce_buffer(cmd_request->bounce_sgl,
+ cmd_request->bounce_sgl_count);
+
+- mempool_free(cmd_request, host_dev->request_mempool);
++ mempool_free(cmd_request, memp->request_mempool);
+
+ scmnd->host_scribble = NULL;
+
+@@ -1375,6 +1415,7 @@ static struct scsi_host_template scsi_dr
+ .queuecommand = storvsc_queuecommand,
+ .eh_host_reset_handler = storvsc_host_reset_handler,
+ .slave_alloc = storvsc_device_alloc,
++ .slave_destroy = storvsc_device_destroy,
+ .slave_configure = storvsc_device_configure,
+ .cmd_per_lun = 1,
+ /* 64 max_queue * 1 target */
+@@ -1416,7 +1457,6 @@ static int storvsc_probe(struct hv_devic
+ const struct hv_vmbus_device_id *dev_id)
+ {
+ int ret;
+- int number = STORVSC_MIN_BUF_NR;
+ struct Scsi_Host *host;
+ struct hv_host_device *host_dev;
+ bool dev_is_ide = ((dev_id->driver_data == IDE_GUID) ? true : false);
+@@ -1435,29 +1475,11 @@ static int storvsc_probe(struct hv_devic
+ host_dev->port = host->host_no;
+ host_dev->dev = device;
+
+- host_dev->request_pool =
+- kmem_cache_create(dev_name(&device->device),
+- sizeof(struct storvsc_cmd_request), 0,
+- SLAB_HWCACHE_ALIGN, NULL);
+-
+- if (!host_dev->request_pool) {
+- scsi_host_put(host);
+- return -ENOMEM;
+- }
+-
+- host_dev->request_mempool = mempool_create(number, mempool_alloc_slab,
+- mempool_free_slab,
+- host_dev->request_pool);
+-
+- if (!host_dev->request_mempool) {
+- ret = -ENOMEM;
+- goto err_out0;
+- }
+
+ stor_device = kzalloc(sizeof(struct storvsc_device), GFP_KERNEL);
+ if (!stor_device) {
+ ret = -ENOMEM;
+- goto err_out1;
++ goto err_out0;
+ }
+
+ stor_device->destroy = false;
+@@ -1469,7 +1491,7 @@ static int storvsc_probe(struct hv_devic
+ stor_device->port_number = host->host_no;
+ ret = storvsc_connect_to_vsp(device, storvsc_ringbuffer_size);
+ if (ret)
+- goto err_out2;
++ goto err_out1;
+
+ if (dev_is_ide)
+ storvsc_get_ide_info(device, &target, &path);
+@@ -1489,7 +1511,7 @@ static int storvsc_probe(struct hv_devic
+ /* Register the HBA and start the scsi bus scan */
+ ret = scsi_add_host(host, &device->device);
+ if (ret != 0)
+- goto err_out3;
++ goto err_out2;
+
+ if (!dev_is_ide) {
+ scsi_scan_host(host);
+@@ -1498,28 +1520,24 @@ static int storvsc_probe(struct hv_devic
+ ret = scsi_add_device(host, 0, target, 0);
+ if (ret) {
+ scsi_remove_host(host);
+- goto err_out3;
++ goto err_out2;
+ }
+ return 0;
+
+-err_out3:
++err_out2:
+ /*
+ * Once we have connected with the host, we would need to
+ * to invoke storvsc_dev_remove() to rollback this state and
+ * this call also frees up the stor_device; hence the jump around
+- * err_out2 label.
++ * err_out1 label.
+ */
+ storvsc_dev_remove(device);
+- goto err_out1;
+-
+-err_out2:
+- kfree(stor_device);
++ goto err_out0;
+
+ err_out1:
+- mempool_destroy(host_dev->request_mempool);
++ kfree(stor_device);
+
+ err_out0:
+- kmem_cache_destroy(host_dev->request_pool);
+ scsi_host_put(host);
+ return ret;
+ }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/staging-hv-storvsc-module-name.patch new/patches.suse/staging-hv-storvsc-module-name.patch
--- old/patches.suse/staging-hv-storvsc-module-name.patch 2012-01-02 13:43:17.000000000 +0100
+++ new/patches.suse/staging-hv-storvsc-module-name.patch 2012-01-05 17:31:19.000000000 +0100
@@ -5,20 +5,11 @@
Patch-mainline: 3.4.2 ?
---
- drivers/staging/hv/storvsc_drv.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
+ drivers/staging/hv/storvsc_drv.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
-@@ -1105,7 +1105,7 @@ static void storvsc_command_completion(s
- if (scmnd->result) {
- if (scsi_normalize_sense(scmnd->sense_buffer,
- SCSI_SENSE_BUFFERSIZE, &sense_hdr))
-- scsi_print_sense_hdr("storvsc", &sense_hdr);
-+ scsi_print_sense_hdr(KBUILD_MODNAME, &sense_hdr);
- }
-
- scsi_set_resid(scmnd,
@@ -1274,8 +1274,8 @@ static DEF_SCSI_QCMD(storvsc_queuecomman
/* Scsi driver */
static struct scsi_host_template scsi_driver = {
@@ -30,13 +21,3 @@
.bios_param = storvsc_get_chs,
.queuecommand = storvsc_queuecommand,
.eh_host_reset_handler = storvsc_host_reset_handler,
-@@ -1419,7 +1419,7 @@ err_out:
- /* The one and only one */
-
- static struct hv_driver storvsc_drv = {
-- .name = "storvsc",
-+ .name = KBUILD_MODNAME,
- .id_table = id_table,
- .probe = storvsc_probe,
- .remove = storvsc_remove,
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/staging-hv-storvsc-remove-last-usage-of-DPRINT_WARN.patch new/patches.suse/staging-hv-storvsc-remove-last-usage-of-DPRINT_WARN.patch
--- old/patches.suse/staging-hv-storvsc-remove-last-usage-of-DPRINT_WARN.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/patches.suse/staging-hv-storvsc-remove-last-usage-of-DPRINT_WARN.patch 2012-01-05 17:31:19.000000000 +0100
@@ -0,0 +1,45 @@
+From d181daa06dd72fa88652b1d8bf723570a9fc55ea Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman
+Date: Tue, 11 Oct 2011 09:20:31 -0600
+Subject: [PATCH 4/4] Staging: hv: storvsc: remove last usage of DPRINT_WARN
+Patch-mainline: 3.3
+
+Used the correct dev_warn() call instead.
+
+Cc: K. Y. Srinivasan
+Signed-off-by: Greg Kroah-Hartman
+---
+ drivers/staging/hv/storvsc_drv.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+--- a/drivers/staging/hv/storvsc_drv.c
++++ b/drivers/staging/hv/storvsc_drv.c
+@@ -560,20 +560,20 @@ static void storvsc_on_io_completion(str
+
+ if (vstor_packet->vm_srb.scsi_status != 0 ||
+ vstor_packet->vm_srb.srb_status != 1){
+- DPRINT_WARN(STORVSC,
+- "cmd 0x%x scsi status 0x%x srb status 0x%x\n",
+- stor_pkt->vm_srb.cdb[0],
+- vstor_packet->vm_srb.scsi_status,
+- vstor_packet->vm_srb.srb_status);
++ dev_warn(&device->device,
++ "cmd 0x%x scsi status 0x%x srb status 0x%x\n",
++ stor_pkt->vm_srb.cdb[0],
++ vstor_packet->vm_srb.scsi_status,
++ vstor_packet->vm_srb.srb_status);
+ }
+
+ if ((vstor_packet->vm_srb.scsi_status & 0xFF) == 0x02) {
+ /* CHECK_CONDITION */
+ if (vstor_packet->vm_srb.srb_status & 0x80) {
+ /* autosense data available */
+- DPRINT_WARN(STORVSC, "storvsc pkt %p autosense data "
+- "valid - len %d\n", request,
+- vstor_packet->vm_srb.sense_info_length);
++ dev_warn(&device->device,
++ "storvsc pkt %p autosense data valid - len %d\n",
++ request, vstor_packet->vm_srb.sense_info_length);
+
+ memcpy(request->sense_buffer,
+ vstor_packet->vm_srb.sense_data,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/staging-hv-storvsc-support_hot_add_of_scsi_disks.patch new/patches.suse/staging-hv-storvsc-support_hot_add_of_scsi_disks.patch
--- old/patches.suse/staging-hv-storvsc-support_hot_add_of_scsi_disks.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/patches.suse/staging-hv-storvsc-support_hot_add_of_scsi_disks.patch 2012-01-05 17:31:19.000000000 +0100
@@ -0,0 +1,71 @@
+Subject: Staging: hv: storvsc: Support hot add of scsi disks
+From:
+Patch-mainline: 3.3
+
+Support hot add of scsi disks.
+
+Signed-off-by: K. Y. Srinivasan
+Signed-off-by: Haiyang Zhang
+---
+ drivers/staging/hv/storvsc_drv.c | 38 ++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 38 insertions(+)
+
+--- a/drivers/staging/hv/storvsc_drv.c
++++ b/drivers/staging/hv/storvsc_drv.c
+@@ -304,6 +304,30 @@ struct storvsc_cmd_request {
+ struct hv_storvsc_request request;
+ };
+
++struct storvsc_scan_work {
++ struct work_struct work;
++ struct Scsi_Host *host;
++ uint lun;
++};
++
++static void storvsc_bus_scan(struct work_struct *work)
++{
++ struct storvsc_scan_work *wrk;
++ int id, order_id;
++
++ wrk = container_of(work, struct storvsc_scan_work, work);
++ for (id = 0; id < wrk->host->max_id; ++id) {
++ if (wrk->host->reverse_ordering)
++ order_id = wrk->host->max_id - id - 1;
++ else
++ order_id = id;
++
++ scsi_scan_target(&wrk->host->shost_gendev, 0,
++ order_id, SCAN_WILD_CARD, 1);
++ }
++ kfree(wrk);
++}
++
+ static inline struct storvsc_device *get_out_stor_device(
+ struct hv_device *device)
+ {
+@@ -550,11 +574,25 @@ static void storvsc_on_receive(struct hv
+ struct vstor_packet *vstor_packet,
+ struct hv_storvsc_request *request)
+ {
++ struct storvsc_scan_work *work;
++ struct storvsc_device *stor_device;
++
+ switch (vstor_packet->operation) {
+ case VSTOR_OPERATION_COMPLETE_IO:
+ storvsc_on_io_completion(device, vstor_packet, request);
+ break;
++
+ case VSTOR_OPERATION_REMOVE_DEVICE:
++ case VSTOR_OPERATION_ENUMERATE_BUS:
++ stor_device = get_in_stor_device(device);
++ work = kmalloc(sizeof(struct storvsc_scan_work), GFP_ATOMIC);
++ if (!work)
++ return;
++
++ INIT_WORK(&work->work, storvsc_bus_scan);
++ work->host = stor_device->host;
++ schedule_work(&work->work);
++ break;
+
+ default:
+ break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/staging-hv-storvsc-support_hotremoving_of_scsi_devices.patch new/patches.suse/staging-hv-storvsc-support_hotremoving_of_scsi_devices.patch
--- old/patches.suse/staging-hv-storvsc-support_hotremoving_of_scsi_devices.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/patches.suse/staging-hv-storvsc-support_hotremoving_of_scsi_devices.patch 2012-01-05 17:31:19.000000000 +0100
@@ -0,0 +1,80 @@
+Subject: Staging: hv: storvsc: Support hot-removing of scsi devices
+From:
+Patch-mainline: 3.3
+
+Support hot-removing of scsi devices.
+
+Signed-off-by: K. Y. Srinivasan
+Signed-off-by: Haiyang Zhang
+---
+ drivers/staging/hv/storvsc_drv.c | 45 +++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 45 insertions(+)
+
+--- a/drivers/staging/hv/storvsc_drv.c
++++ b/drivers/staging/hv/storvsc_drv.c
+@@ -328,6 +328,27 @@ static void storvsc_bus_scan(struct work
+ kfree(wrk);
+ }
+
++static void storvsc_remove_lun(struct work_struct *work)
++{
++ struct storvsc_scan_work *wrk;
++ struct scsi_device *sdev;
++
++ wrk = container_of(work, struct storvsc_scan_work, work);
++ if (!scsi_host_get(wrk->host))
++ goto done;
++
++ sdev = scsi_device_lookup(wrk->host, 0, 0, wrk->lun);
++
++ if (sdev) {
++ scsi_remove_device(sdev);
++ scsi_device_put(sdev);
++ }
++ scsi_host_put(wrk->host);
++
++done:
++ kfree(wrk);
++}
++
+ static inline struct storvsc_device *get_out_stor_device(
+ struct hv_device *device)
+ {
+@@ -1111,6 +1132,7 @@ static void storvsc_command_completion(s
+ void (*scsi_done_fn)(struct scsi_cmnd *);
+ struct scsi_sense_hdr sense_hdr;
+ struct vmscsi_request *vm_srb;
++ struct storvsc_scan_work *wrk;
+
+ vm_srb = &request->vstor_packet.vm_srb;
+ if (cmd_request->bounce_sgl_count) {
+@@ -1133,6 +1155,29 @@ static void storvsc_command_completion(s
+ else
+ scmnd->result = vm_srb->scsi_status;
+
++ /*
++ * If the LUN is invalid; remove the device.
++ */
++ if (vm_srb->srb_status == 0x20) {
++ struct storvsc_device *stor_dev;
++ struct hv_device *dev = host_dev->dev;
++ struct Scsi_Host *host;
++
++ stor_dev = get_in_stor_device(dev);
++ host = stor_dev->host;
++
++ wrk = kmalloc(sizeof(struct storvsc_scan_work),
++ GFP_ATOMIC);
++ if (!wrk) {
++ scmnd->result = DID_TARGET_FAILURE << 16;
++ } else {
++ wrk->host = host;
++ wrk->lun = vm_srb->lun;
++ INIT_WORK(&wrk->work, storvsc_remove_lun);
++ schedule_work(&wrk->work);
++ }
++ }
++
+ if (scmnd->result) {
+ if (scsi_normalize_sense(scmnd->sense_buffer,
+ SCSI_SENSE_BUFFERSIZE, &sense_hdr))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/staging-hv-storvsc-upgrade_the_vmstor_protocol_version.patch new/patches.suse/staging-hv-storvsc-upgrade_the_vmstor_protocol_version.patch
--- old/patches.suse/staging-hv-storvsc-upgrade_the_vmstor_protocol_version.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/patches.suse/staging-hv-storvsc-upgrade_the_vmstor_protocol_version.patch 2012-01-05 17:31:19.000000000 +0100
@@ -0,0 +1,34 @@
+Subject: Staging: hv: storvsc: Upgrade the vmstor protocol version
+From:
+Patch-mainline: 3.3
+
+In preparation for supporting hot add/remove of scsi devices,
+upgrade the vmstor protocol version.
+
+Signed-off-by: K. Y. Srinivasan
+Signed-off-by: Haiyang Zhang
+---
+ drivers/staging/hv/storvsc_drv.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/staging/hv/storvsc_drv.c
++++ b/drivers/staging/hv/storvsc_drv.c
+@@ -80,7 +80,7 @@ MODULE_PARM_DESC(storvsc_ringbuffer_size
+ /* V1 Beta 0.1 */
+ /* V1 RC < 2008/1/31 1.0 */
+ /* V1 RC > 2008/1/31 2.0 */
+-#define VMSTOR_PROTOCOL_VERSION_CURRENT VMSTOR_PROTOCOL_VERSION(2, 0)
++#define VMSTOR_PROTOCOL_VERSION_CURRENT VMSTOR_PROTOCOL_VERSION(4, 2)
+
+
+
+@@ -106,7 +106,8 @@ enum vstor_packet_operation {
+ VSTOR_OPERATION_END_INITIALIZATION = 8,
+ VSTOR_OPERATION_QUERY_PROTOCOL_VERSION = 9,
+ VSTOR_OPERATION_QUERY_PROPERTIES = 10,
+- VSTOR_OPERATION_MAXIMUM = 10
++ VSTOR_OPERATION_ENUMERATE_BUS = 11,
++ VSTOR_OPERATION_MAXIMUM = 11
+ };
+
+ /*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/staging-hv-storvsc-use_mempools_to_allocate_struct_storvsc_cmd_request.patch new/patches.suse/staging-hv-storvsc-use_mempools_to_allocate_struct_storvsc_cmd_request.patch
--- old/patches.suse/staging-hv-storvsc-use_mempools_to_allocate_struct_storvsc_cmd_request.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/patches.suse/staging-hv-storvsc-use_mempools_to_allocate_struct_storvsc_cmd_request.patch 2012-01-05 17:31:19.000000000 +0100
@@ -0,0 +1,138 @@
+Subject: Staging: hv: storvsc: Use mempools to allocate struct storvsc_cmd_request
+From:
+Patch-mainline: 3.3
+
+We intend to use the storage driver to manage the root device.
+To avoid deadlocks, use mempools to allocate struct storvsc_cmd_request.
+
+Signed-off-by: K. Y. Srinivasan
+Signed-off-by: Haiyang Zhang
+---
+ drivers/staging/hv/storvsc_drv.c | 30 +++++++++++++++++++++++++-----
+ 1 file changed, 25 insertions(+), 5 deletions(-)
+
+--- a/drivers/staging/hv/storvsc_drv.c
++++ b/drivers/staging/hv/storvsc_drv.c
+@@ -31,6 +31,7 @@
+ #include
+ #include
+ #include
++#include
+ #include
+ #include
+ #include
+@@ -42,6 +43,7 @@
+
+ #include "hyperv.h"
+
++#define STORVSC_MIN_BUF_NR 64
+ #define STORVSC_RING_BUFFER_SIZE (20*PAGE_SIZE)
+ static int storvsc_ringbuffer_size = STORVSC_RING_BUFFER_SIZE;
+
+@@ -287,6 +289,7 @@ struct storvsc_device {
+ struct hv_host_device {
+ struct hv_device *dev;
+ struct kmem_cache *request_pool;
++ mempool_t *request_mempool;
+ unsigned int port;
+ unsigned char path;
+ unsigned char target;
+@@ -973,8 +976,10 @@ static int storvsc_remove(struct hv_devi
+
+ storvsc_dev_remove(dev);
+ if (host_dev->request_pool) {
++ mempool_destroy(host_dev->request_mempool);
+ kmem_cache_destroy(host_dev->request_pool);
+ host_dev->request_pool = NULL;
++ host_dev->request_mempool = NULL;
+ }
+ return 0;
+ }
+@@ -1119,7 +1124,7 @@ static void storvsc_command_completion(s
+
+ scsi_done_fn(scmnd);
+
+- kmem_cache_free(host_dev->request_pool, cmd_request);
++ mempool_free(cmd_request, host_dev->request_mempool);
+ }
+
+ static bool storvsc_check_scsi_cmd(struct scsi_cmnd *scmnd)
+@@ -1175,12 +1180,13 @@ static int storvsc_queuecommand_lck(stru
+
+ request_size = sizeof(struct storvsc_cmd_request);
+
+- cmd_request = kmem_cache_zalloc(host_dev->request_pool,
++ cmd_request = mempool_alloc(host_dev->request_mempool,
+ GFP_ATOMIC);
+ if (!cmd_request) {
+ scmnd->scsi_done = NULL;
+ return SCSI_MLQUEUE_DEVICE_BUSY;
+ }
++ memset(cmd_request, 0, sizeof(struct storvsc_cmd_request));
+
+ /* Setup the cmd request */
+ cmd_request->bounce_sgl_count = 0;
+@@ -1234,8 +1240,8 @@ static int storvsc_queuecommand_lck(stru
+ if (!cmd_request->bounce_sgl) {
+ scmnd->scsi_done = NULL;
+ scmnd->host_scribble = NULL;
+- kmem_cache_free(host_dev->request_pool,
+- cmd_request);
++ mempool_free(cmd_request,
++ host_dev->request_mempool);
+
+ return SCSI_MLQUEUE_HOST_BUSY;
+ }
+@@ -1277,7 +1283,7 @@ retry_request:
+ destroy_bounce_buffer(cmd_request->bounce_sgl,
+ cmd_request->bounce_sgl_count);
+
+- kmem_cache_free(host_dev->request_pool, cmd_request);
++ mempool_free(cmd_request, host_dev->request_mempool);
+
+ scmnd->scsi_done = NULL;
+ scmnd->host_scribble = NULL;
+@@ -1348,6 +1354,7 @@ static int storvsc_probe(struct hv_devic
+ const struct hv_vmbus_device_id *dev_id)
+ {
+ int ret;
++ int number = STORVSC_MIN_BUF_NR;
+ struct Scsi_Host *host;
+ struct hv_host_device *host_dev;
+ bool dev_is_ide = ((dev_id->driver_data == IDE_GUID) ? true : false);
+@@ -1376,8 +1383,19 @@ static int storvsc_probe(struct hv_devic
+ return -ENOMEM;
+ }
+
++ host_dev->request_mempool = mempool_create(number, mempool_alloc_slab,
++ mempool_free_slab,
++ host_dev->request_pool);
++
++ if (!host_dev->request_mempool) {
++ kmem_cache_destroy(host_dev->request_pool);
++ scsi_host_put(host);
++ return -ENOMEM;
++ }
++
+ stor_device = kzalloc(sizeof(struct storvsc_device), GFP_KERNEL);
+ if (!stor_device) {
++ mempool_destroy(host_dev->request_mempool);
+ kmem_cache_destroy(host_dev->request_pool);
+ scsi_host_put(host);
+ return -ENOMEM;
+@@ -1392,6 +1410,7 @@ static int storvsc_probe(struct hv_devic
+ stor_device->port_number = host->host_no;
+ ret = storvsc_connect_to_vsp(device, storvsc_ringbuffer_size);
+ if (ret) {
++ mempool_destroy(host_dev->request_mempool);
+ kmem_cache_destroy(host_dev->request_pool);
+ scsi_host_put(host);
+ kfree(stor_device);
+@@ -1431,6 +1450,7 @@ static int storvsc_probe(struct hv_devic
+
+ err_out:
+ storvsc_dev_remove(device);
++ mempool_destroy(host_dev->request_mempool);
+ kmem_cache_destroy(host_dev->request_pool);
+ scsi_host_put(host);
+ return -ENODEV;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/staging-hv-storvsc-use_the_accessor_function_shost_priv.patch new/patches.suse/staging-hv-storvsc-use_the_accessor_function_shost_priv.patch
--- old/patches.suse/staging-hv-storvsc-use_the_accessor_function_shost_priv.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/patches.suse/staging-hv-storvsc-use_the_accessor_function_shost_priv.patch 2012-01-05 17:31:19.000000000 +0100
@@ -0,0 +1,63 @@
+Subject: Staging: hv: storvsc: Use the accessor function shost_priv()
+From:
+Patch-mainline: 3.3
+
+Use the accessor function shost_priv().
+
+Signed-off-by: K. Y. Srinivasan
+Signed-off-by: Haiyang Zhang
+---
+ drivers/staging/hv/storvsc_drv.c | 14 +++++---------
+ 1 file changed, 5 insertions(+), 9 deletions(-)
+
+--- a/drivers/staging/hv/storvsc_drv.c
++++ b/drivers/staging/hv/storvsc_drv.c
+@@ -967,8 +967,7 @@ static int storvsc_remove(struct hv_devi
+ {
+ struct storvsc_device *stor_device = hv_get_drvdata(dev);
+ struct Scsi_Host *host = stor_device->host;
+- struct hv_host_device *host_dev =
+- (struct hv_host_device *)host->hostdata;
++ struct hv_host_device *host_dev = shost_priv(host);
+
+ scsi_remove_host(host);
+
+@@ -1056,8 +1055,7 @@ static int storvsc_host_reset(struct hv_
+ */
+ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd)
+ {
+- struct hv_host_device *host_dev =
+- (struct hv_host_device *)scmnd->device->host->hostdata;
++ struct hv_host_device *host_dev = shost_priv(scmnd->device->host);
+ struct hv_device *dev = host_dev->dev;
+
+ return storvsc_host_reset(dev);
+@@ -1072,8 +1070,7 @@ static void storvsc_command_completion(s
+ struct storvsc_cmd_request *cmd_request =
+ (struct storvsc_cmd_request *)request->context;
+ struct scsi_cmnd *scmnd = cmd_request->cmd;
+- struct hv_host_device *host_dev =
+- (struct hv_host_device *)scmnd->device->host->hostdata;
++ struct hv_host_device *host_dev = shost_priv(scmnd->device->host);
+ void (*scsi_done_fn)(struct scsi_cmnd *);
+ struct scsi_sense_hdr sense_hdr;
+ struct vmscsi_request *vm_srb;
+@@ -1143,8 +1140,7 @@ static int storvsc_queuecommand_lck(stru
+ void (*done)(struct scsi_cmnd *))
+ {
+ int ret;
+- struct hv_host_device *host_dev =
+- (struct hv_host_device *)scmnd->device->host->hostdata;
++ struct hv_host_device *host_dev = shost_priv(scmnd->device->host);
+ struct hv_device *dev = host_dev->dev;
+ struct hv_storvsc_request *request;
+ struct storvsc_cmd_request *cmd_request;
+@@ -1359,7 +1355,7 @@ static int storvsc_probe(struct hv_devic
+ if (!host)
+ return -ENOMEM;
+
+- host_dev = (struct hv_host_device *)host->hostdata;
++ host_dev = shost_priv(host);
+ memset(host_dev, 0, sizeof(struct hv_host_device));
+
+ host_dev->port = host->host_no;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/staging-hv-storvsc-use_the_macro_kbuild_modname.patch new/patches.suse/staging-hv-storvsc-use_the_macro_kbuild_modname.patch
--- old/patches.suse/staging-hv-storvsc-use_the_macro_kbuild_modname.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/patches.suse/staging-hv-storvsc-use_the_macro_kbuild_modname.patch 2012-01-05 17:31:19.000000000 +0100
@@ -0,0 +1,23 @@
+Subject: Staging: hv: storvsc: use the macro KBUILD_MODNAME
+From:
+Patch-mainline: 3.3
+
+Use the macro KBUILD_MODNAME.
+
+Signed-off-by: K. Y. Srinivasan
+Signed-off-by: Haiyang Zhang
+---
+ drivers/staging/hv/storvsc_drv.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/staging/hv/storvsc_drv.c
++++ b/drivers/staging/hv/storvsc_drv.c
+@@ -1444,7 +1444,7 @@ err_out0:
+ /* The one and only one */
+
+ static struct hv_driver storvsc_drv = {
+- .name = "storvsc",
++ .name = KBUILD_MODNAME,
+ .id_table = id_table,
+ .probe = storvsc_probe,
+ .remove = storvsc_remove,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/staging-hv-storvsc-use_the_unlocked_version_queuecommand.patch new/patches.suse/staging-hv-storvsc-use_the_unlocked_version_queuecommand.patch
--- old/patches.suse/staging-hv-storvsc-use_the_unlocked_version_queuecommand.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/patches.suse/staging-hv-storvsc-use_the_unlocked_version_queuecommand.patch 2012-01-05 17:31:19.000000000 +0100
@@ -0,0 +1,82 @@
+Subject: Staging: hv: storvsc: Use the unlocked version queuecommand
+From:
+Patch-mainline: 3.3
+
+Use the unlocked version queuecommand.
+
+Signed-off-by: K. Y. Srinivasan
+Signed-off-by: Haiyang Zhang
+---
+ drivers/staging/hv/storvsc_drv.c | 19 +++++--------------
+ 1 file changed, 5 insertions(+), 14 deletions(-)
+
+--- a/drivers/staging/hv/storvsc_drv.c
++++ b/drivers/staging/hv/storvsc_drv.c
+@@ -1136,11 +1136,10 @@ static bool storvsc_check_scsi_cmd(struc
+ /*
+ * storvsc_queuecommand - Initiate command processing
+ */
+-static int storvsc_queuecommand_lck(struct scsi_cmnd *scmnd,
+- void (*done)(struct scsi_cmnd *))
++static int storvsc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scmnd)
+ {
+ int ret;
+- struct hv_host_device *host_dev = shost_priv(scmnd->device->host);
++ struct hv_host_device *host_dev = shost_priv(host);
+ struct hv_device *dev = host_dev->dev;
+ struct hv_storvsc_request *request;
+ struct storvsc_cmd_request *cmd_request;
+@@ -1151,7 +1150,7 @@ static int storvsc_queuecommand_lck(stru
+ struct vmscsi_request *vm_srb;
+
+ if (storvsc_check_scsi_cmd(scmnd) == false) {
+- done(scmnd);
++ scmnd->scsi_done(scmnd);
+ return 0;
+ }
+
+@@ -1164,16 +1163,13 @@ static int storvsc_queuecommand_lck(stru
+ goto retry_request;
+ }
+
+- scmnd->scsi_done = done;
+-
+ request_size = sizeof(struct storvsc_cmd_request);
+
+ cmd_request = mempool_alloc(host_dev->request_mempool,
+ GFP_ATOMIC);
+- if (!cmd_request) {
+- scmnd->scsi_done = NULL;
++ if (!cmd_request)
+ return SCSI_MLQUEUE_DEVICE_BUSY;
+- }
++
+ memset(cmd_request, 0, sizeof(struct storvsc_cmd_request));
+
+ /* Setup the cmd request */
+@@ -1226,7 +1222,6 @@ static int storvsc_queuecommand_lck(stru
+ create_bounce_buffer(sgl, scsi_sg_count(scmnd),
+ scsi_bufflen(scmnd));
+ if (!cmd_request->bounce_sgl) {
+- scmnd->scsi_done = NULL;
+ scmnd->host_scribble = NULL;
+ mempool_free(cmd_request,
+ host_dev->request_mempool);
+@@ -1273,7 +1268,6 @@ retry_request:
+
+ mempool_free(cmd_request, host_dev->request_mempool);
+
+- scmnd->scsi_done = NULL;
+ scmnd->host_scribble = NULL;
+
+ ret = SCSI_MLQUEUE_DEVICE_BUSY;
+@@ -1282,9 +1276,6 @@ retry_request:
+ return ret;
+ }
+
+-static DEF_SCSI_QCMD(storvsc_queuecommand)
+-
+-
+ /* Scsi driver */
+ static struct scsi_host_template scsi_driver = {
+ .module = THIS_MODULE,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/staging-hv-storvsc_cleanup_storvsc_device_alloc.patch new/patches.suse/staging-hv-storvsc_cleanup_storvsc_device_alloc.patch
--- old/patches.suse/staging-hv-storvsc_cleanup_storvsc_device_alloc.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/patches.suse/staging-hv-storvsc_cleanup_storvsc_device_alloc.patch 2012-01-05 17:31:19.000000000 +0100
@@ -0,0 +1,29 @@
+From:
+Subject: Staging: hv: storvsc: Cleanup storvsc_device_alloc()
+References: bnc#724616
+Patch-mainline: submitted
+
+The code in storvsc_device_alloc() is not needed as this would be
+done by default. Get rid of it. We still keep the function as we use
+this hook to allocate per-LUN memory pools in a later patch.
+
+Signed-off-by: K. Y. Srinivasan
+Signed-off-by: Haiyang Zhang
+---
+ drivers/staging/hv/storvsc_drv.c | 5 -----
+ 1 file changed, 5 deletions(-)
+
+--- a/drivers/staging/hv/storvsc_drv.c
++++ b/drivers/staging/hv/storvsc_drv.c
+@@ -789,11 +789,6 @@ static void storvsc_get_ide_info(struct
+
+ static int storvsc_device_alloc(struct scsi_device *sdevice)
+ {
+- /*
+- * This enables luns to be located sparsely. Otherwise, we may not
+- * discovered them.
+- */
+- sdevice->sdev_bflags |= BLIST_SPARSELUN | BLIST_LARGELUN;
+ return 0;
+ }
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/staging-hv-storvsc_disable_clustering.patch new/patches.suse/staging-hv-storvsc_disable_clustering.patch
--- old/patches.suse/staging-hv-storvsc_disable_clustering.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/patches.suse/staging-hv-storvsc_disable_clustering.patch 2012-01-05 17:31:19.000000000 +0100
@@ -0,0 +1,58 @@
+From:
+Subject: Staging: hv: storvsc: Disable clustering
+References: bnc#724616
+Patch-mainline: submitted
+
+Disable clustering, since the host side on Hyper-V requires that
+each I/O element not exceed the page size. As part of this
+cleanup, get rid of the function to merge bvecs, as the primary
+reason for this function was to avoid having an element exceed
+the page size.
+
+Signed-off-by: K. Y. Srinivasan
+Signed-off-by: Haiyang Zhang
+---
+ drivers/staging/hv/storvsc_drv.c | 18 +-----------------
+ 1 file changed, 1 insertion(+), 17 deletions(-)
+
+--- a/drivers/staging/hv/storvsc_drv.c
++++ b/drivers/staging/hv/storvsc_drv.c
+@@ -797,13 +797,6 @@ static int storvsc_device_alloc(struct s
+ return 0;
+ }
+
+-static int storvsc_merge_bvec(struct request_queue *q,
+- struct bvec_merge_data *bmd, struct bio_vec *bvec)
+-{
+- /* checking done by caller. */
+- return bvec->bv_len;
+-}
+-
+ static int storvsc_device_configure(struct scsi_device *sdevice)
+ {
+ scsi_adjust_queue_depth(sdevice, MSG_SIMPLE_TAG,
+@@ -811,8 +804,6 @@ static int storvsc_device_configure(stru
+
+ blk_queue_max_segment_size(sdevice->request_queue, PAGE_SIZE);
+
+- blk_queue_merge_bvec(sdevice->request_queue, storvsc_merge_bvec);
+-
+ blk_queue_bounce_limit(sdevice->request_queue, BLK_BOUNCE_ANY);
+
+ return 0;
+@@ -1375,14 +1366,7 @@ static struct scsi_host_template scsi_dr
+ /* no use setting to 0 since ll_blk_rw reset it to 1 */
+ /* currently 32 */
+ .sg_tablesize = MAX_MULTIPAGE_BUFFER_COUNT,
+- /*
+- * ENABLE_CLUSTERING allows mutiple physically contig bio_vecs to merge
+- * into 1 sg element. If set, we must limit the max_segment_size to
+- * PAGE_SIZE, otherwise we may get 1 sg element that represents
+- * multiple
+- */
+- /* physically contig pfns (ie sg[x].length > PAGE_SIZE). */
+- .use_clustering = ENABLE_CLUSTERING,
++ .use_clustering = DISABLE_CLUSTERING,
+ /* Make sure we dont get a sg segment crosses a page boundary */
+ .dma_boundary = PAGE_SIZE-1,
+ };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/staging-hv-storvsc_fix_a_bug_in_copy_from_bounce_buffer.patch new/patches.suse/staging-hv-storvsc_fix_a_bug_in_copy_from_bounce_buffer.patch
--- old/patches.suse/staging-hv-storvsc_fix_a_bug_in_copy_from_bounce_buffer.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/patches.suse/staging-hv-storvsc_fix_a_bug_in_copy_from_bounce_buffer.patch 2012-01-05 17:31:19.000000000 +0100
@@ -0,0 +1,60 @@
+From:
+Subject: Staging: hv: storvsc: Fix a bug in copy_from_bounce_buffer()
+References: bnc#724616
+Patch-mainline: submitted
+
+Fix a bug in copy_from_bounce_buffer().
+
+Signed-off-by: K. Y. Srinivasan
+Signed-off-by: Haiyang Zhang
+---
+ drivers/staging/hv/storvsc_drv.c | 24 ++++++++++++++++++++++--
+ 1 file changed, 22 insertions(+), 2 deletions(-)
+
+--- a/drivers/staging/hv/storvsc_drv.c
++++ b/drivers/staging/hv/storvsc_drv.c
+@@ -879,7 +879,8 @@ cleanup:
+ /* Assume the original sgl has enough room */
+ static unsigned int copy_from_bounce_buffer(struct scatterlist *orig_sgl,
+ struct scatterlist *bounce_sgl,
+- unsigned int orig_sgl_count)
++ unsigned int orig_sgl_count,
++ unsigned int bounce_sgl_count)
+ {
+ int i;
+ int j = 0;
+@@ -920,6 +921,24 @@ static unsigned int copy_from_bounce_buf
+ kunmap_atomic((void *)bounce_addr, KM_IRQ0);
+ j++;
+
++ /*
++ * It is possible that the number of elements
++ * in the bounce buffer may not be equal to
++ * the number of elements in the original
++ * scatter list. Handle this correctly.
++ */
++
++ if (j == bounce_sgl_count) {
++ /*
++ * We are done; cleanup and return.
++ */
++ kunmap_atomic((void *)(dest_addr -
++ orig_sgl[i].offset),
++ KM_IRQ0);
++ local_irq_restore(flags);
++ return total_copied;
++ }
++
+ /* if we need to use another bounce buffer */
+ if (destlen || i != orig_sgl_count - 1)
+ bounce_addr =
+@@ -1125,7 +1144,8 @@ static void storvsc_command_completion(s
+ if (vm_srb->data_in == READ_TYPE)
+ copy_from_bounce_buffer(scsi_sglist(scmnd),
+ cmd_request->bounce_sgl,
+- scsi_sg_count(scmnd));
++ scsi_sg_count(scmnd),
++ cmd_request->bounce_sgl_count);
+ destroy_bounce_buffer(cmd_request->bounce_sgl,
+ cmd_request->bounce_sgl_count);
+ }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/staging-hv-storvsc_fix_a_bug_in_storvsc_command_completion.patch new/patches.suse/staging-hv-storvsc_fix_a_bug_in_storvsc_command_completion.patch
--- old/patches.suse/staging-hv-storvsc_fix_a_bug_in_storvsc_command_completion.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/patches.suse/staging-hv-storvsc_fix_a_bug_in_storvsc_command_completion.patch 2012-01-05 17:31:19.000000000 +0100
@@ -0,0 +1,32 @@
+From:
+Subject: Staging: hv: storvsc: Fix a bug in storvsc_command_completion()
+References: bnc#724616
+Patch-mainline: submitted
+
+Fix a bug in storvsc_command_completion() that leaks memory when scatter/gather
+lists are used on the "write" side.
+
+Signed-off-by: K. Y. Srinivasan
+Signed-off-by: Haiyang Zhang
+---
+ drivers/staging/hv/storvsc_drv.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+--- a/drivers/staging/hv/storvsc_drv.c
++++ b/drivers/staging/hv/storvsc_drv.c
+@@ -1122,13 +1122,12 @@ static void storvsc_command_completion(s
+
+ vm_srb = &request->vstor_packet.vm_srb;
+ if (cmd_request->bounce_sgl_count) {
+- if (vm_srb->data_in == READ_TYPE) {
++ if (vm_srb->data_in == READ_TYPE)
+ copy_from_bounce_buffer(scsi_sglist(scmnd),
+ cmd_request->bounce_sgl,
+ scsi_sg_count(scmnd));
+- destroy_bounce_buffer(cmd_request->bounce_sgl,
++ destroy_bounce_buffer(cmd_request->bounce_sgl,
+ cmd_request->bounce_sgl_count);
+- }
+ }
+
+ /*
++++++ patches.xen.tar.bz2 ++++++
++++ 19924 lines of diff (skipped)
++++++ series.conf ++++++
--- /var/tmp/diff_new_pack.eK6Duz/_old 2012-01-10 01:47:54.000000000 +0100
+++ /var/tmp/diff_new_pack.eK6Duz/_new 2012-01-10 01:47:54.000000000 +0100
@@ -854,6 +854,26 @@
patches.suse/staging-hv-pata_piix-ignore-disks.patch
patches.suse/staging-hv-bind-hv_blkkvsc-to-hv_storvsc.patch
patches.suse/staging-hv-storvsc-ignore-SET_WINDOW.patch
+ patches.suse/staging-hv-mousevsc-module-name.patch
+ patches.suse/staging-hv-storvsc-use_mempools_to_allocate_struct_storvsc_cmd_request.patch
+ patches.suse/staging-hv-storvsc-cleanup_error_handling_in_the_probe_function.patch
+ patches.suse/staging-hv-storvsc-fixup_the_error_when_processing_set_window_command.patch
+ patches.suse/staging-hv-storvsc-fix_error_handling_storvsc_host_reset.patch
+ patches.suse/staging-hv-storvsc-use_the_accessor_function_shost_priv.patch
+ patches.suse/staging-hv-storvsc-use_the_unlocked_version_queuecommand.patch
+ patches.suse/staging-hv-storvsc-use_the_macro_kbuild_modname.patch
+ patches.suse/staging-hv-storvsc-get_rid_of_an_unnecessary_forward_declaration.patch
+ patches.suse/staging-hv-storvsc-upgrade_the_vmstor_protocol_version.patch
+ patches.suse/staging-hv-storvsc-support_hot_add_of_scsi_disks.patch
+ patches.suse/staging-hv-storvsc-support_hotremoving_of_scsi_devices.patch
+ patches.suse/staging-hv-storvsc_disable_clustering.patch
+ patches.suse/staging-hv-storvsc_cleanup_storvsc_device_alloc.patch
+ patches.suse/staging-hv-storvsc_fix_a_bug_in_storvsc_command_completion.patch
+ patches.suse/staging-hv-storvsc_fix_a_bug_in_copy_from_bounce_buffer.patch
+ patches.suse/staging-hv-storvsc-fix-a-bug-in-create_bounce_buffer.patch
+ patches.suse/staging-hv-storvsc-implement_per_device_memory_pools.patch
+ patches.suse/staging-hv-storvsc-remove-last-usage-of-DPRINT_WARN.patch
+ patches.suse/staging-hv-storvsc-fix_checkpatch_warnings.patch
patches.fixes/parport-mutex
@@ -1005,6 +1025,10 @@
patches.xen/xen3-fixup-xen
# newer changeset backports
+ patches.xen/1124-x86-undo-limit-pages.patch
+ patches.xen/1126-netback-invalidation-index.patch
+ patches.xen/1134-blktap-locking.patch
+ patches.xen/1135-blktap-map-once.patch
# changes outside arch/{i386,x86_64}/xen
patches.xen/xen3-fixup-kconfig
@@ -1037,6 +1061,8 @@
patches.xen/xen3-patch-2.6.39
patches.xen/xen3-patch-3.0
patches.xen/xen3-patch-3.1
+ patches.xen/xen3-patch-3.1.4-5
+ patches.xen/xen3-patch-3.1.5-6
patches.xen/xen3-apei_allow_drivers_access_nvs_ram.patch
patches.xen/xen3-acpi_implement_overriding_of_arbitrary_acpi_tables_via_initrd.patch
patches.xen/xen3-stack-unwind
@@ -1087,4 +1113,3 @@
patches.xen/xen-x86_64-dump-user-pgt
patches.xen/xen-x86_64-note-init-p2m
patches.xen/xen-x86_64-unmapped-initrd
-- patches.xen/xencons-tty_mutex.patch
++++++ source-timestamp ++++++
--- /var/tmp/diff_new_pack.eK6Duz/_old 2012-01-10 01:47:54.000000000 +0100
+++ /var/tmp/diff_new_pack.eK6Duz/_new 2012-01-10 01:47:54.000000000 +0100
@@ -1,3 +1,3 @@
-2012-01-04 14:55:49 +0100
-GIT Revision: 7c0c986672144f9c9fa88d286f8558643aac52ad
+2012-01-05 17:31:19 +0100
+GIT Revision: 8f71365f5dff2261753a18e8e75ecd28de52125d
GIT Branch: openSUSE-12.1
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org