summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Boyer <jwboyer@redhat.com>2012-09-05 08:24:45 -0400
committerJosh Boyer <jwboyer@redhat.com>2012-09-05 08:24:53 -0400
commit4755af6ee497e2034540cde0798f7325ed3935f7 (patch)
tree82534b2b65275426ed1c502878603f7367637eb6
parent221b79a9ac885a40f42e9bd9ef786a7ba53a2d64 (diff)
downloadkernel-4755af6ee497e2034540cde0798f7325ed3935f7.tar.gz
kernel-4755af6ee497e2034540cde0798f7325ed3935f7.tar.xz
kernel-4755af6ee497e2034540cde0798f7325ed3935f7.zip
Linux v3.6-rc4-53-g5b716ac
- Add patch to fix ibmveth issue from Santiago Leon (rhbz 852842)
-rw-r--r--ibmveth-Fix-alignment-of-rx-queue-bug.patch80
-rw-r--r--kernel.spec14
-rw-r--r--sources1
3 files changed, 93 insertions, 2 deletions
diff --git a/ibmveth-Fix-alignment-of-rx-queue-bug.patch b/ibmveth-Fix-alignment-of-rx-queue-bug.patch
new file mode 100644
index 000000000..79353a61c
--- /dev/null
+++ b/ibmveth-Fix-alignment-of-rx-queue-bug.patch
@@ -0,0 +1,80 @@
+This patch fixes a bug found by Nish Aravamudan
+(https://lkml.org/lkml/2012/5/15/220) where the driver is not following
+the spec (it is not aligning the rx buffer on a 16-byte boundary) and the
+hypervisor aborts the registration, making the device unusable.
+
+The fix follows BenH's recommendation (https://lkml.org/lkml/2012/7/20/461)
+to replace the kmalloc+map for a single call to dma_alloc_coherent()
+because that function always aligns to a 16-byte boundary.
+
+The stable trees will run into this bug whenever the rx buffer kmalloc call
+returns something not aligned on a 16-byte boundary.
+
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Santiago Leon <santil@linux.vnet.ibm.com>
+---
+ ibmveth.c | 26 +++++++++-----------------
+ 1 file changed, 9 insertions(+), 17 deletions(-)
+
+--- a/drivers/net/ethernet/ibm/ibmveth.c 2012-07-09 16:00:53.000000000 -0400
++++ b/drivers/net/ethernet/ibm/ibmveth.c 2012-08-17 19:51:02.840000188 -0400
+@@ -472,14 +472,9 @@ static void ibmveth_cleanup(struct ibmve
+ }
+
+ if (adapter->rx_queue.queue_addr != NULL) {
+- if (!dma_mapping_error(dev, adapter->rx_queue.queue_dma)) {
+- dma_unmap_single(dev,
+- adapter->rx_queue.queue_dma,
+- adapter->rx_queue.queue_len,
+- DMA_BIDIRECTIONAL);
+- adapter->rx_queue.queue_dma = DMA_ERROR_CODE;
+- }
+- kfree(adapter->rx_queue.queue_addr);
++ dma_free_coherent(dev, adapter->rx_queue.queue_len,
++ adapter->rx_queue.queue_addr,
++ adapter->rx_queue.queue_dma);
+ adapter->rx_queue.queue_addr = NULL;
+ }
+
+@@ -556,10 +551,13 @@ static int ibmveth_open(struct net_devic
+ goto err_out;
+ }
+
++ dev = &adapter->vdev->dev;
++
+ adapter->rx_queue.queue_len = sizeof(struct ibmveth_rx_q_entry) *
+ rxq_entries;
+- adapter->rx_queue.queue_addr = kmalloc(adapter->rx_queue.queue_len,
+- GFP_KERNEL);
++ adapter->rx_queue.queue_addr =
++ dma_alloc_coherent(dev, adapter->rx_queue.queue_len,
++ &adapter->rx_queue.queue_dma, GFP_KERNEL);
+
+ if (!adapter->rx_queue.queue_addr) {
+ netdev_err(netdev, "unable to allocate rx queue pages\n");
+@@ -567,19 +565,13 @@ static int ibmveth_open(struct net_devic
+ goto err_out;
+ }
+
+- dev = &adapter->vdev->dev;
+-
+ adapter->buffer_list_dma = dma_map_single(dev,
+ adapter->buffer_list_addr, 4096, DMA_BIDIRECTIONAL);
+ adapter->filter_list_dma = dma_map_single(dev,
+ adapter->filter_list_addr, 4096, DMA_BIDIRECTIONAL);
+- adapter->rx_queue.queue_dma = dma_map_single(dev,
+- adapter->rx_queue.queue_addr,
+- adapter->rx_queue.queue_len, DMA_BIDIRECTIONAL);
+
+ if ((dma_mapping_error(dev, adapter->buffer_list_dma)) ||
+- (dma_mapping_error(dev, adapter->filter_list_dma)) ||
+- (dma_mapping_error(dev, adapter->rx_queue.queue_dma))) {
++ (dma_mapping_error(dev, adapter->filter_list_dma))) {
+ netdev_err(netdev, "unable to map filter or buffer list "
+ "pages\n");
+ rc = -ENOMEM;
+
+--
+To unsubscribe from this list: send the line "unsubscribe netdev" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at http://vger.kernel.org/majordomo-info.html \ No newline at end of file
diff --git a/kernel.spec b/kernel.spec
index a157e0ea4..b70854f54 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -62,7 +62,7 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be appended after the rcX and
# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
#
-%global baserelease 2
+%global baserelease 1
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@@ -95,7 +95,7 @@ Summary: The Linux kernel
# The rc snapshot level
%define rcrev 4
# The git snapshot level
-%define gitrev 0
+%define gitrev 1
# Set rpm version accordingly
%define rpmversion 3.%{upstream_sublevel}.0
%endif
@@ -756,6 +756,9 @@ Patch22066: virtio-scsi-Initialize-scatterlist-structure.patch
#rhbz 846037
Patch22067: selinux-Fix-sel_netnode_insert-suspicious-rcu-dereference.patch
+#rhbz 852842
+Patch22068: ibmveth-Fix-alignment-of-rx-queue-bug.patch
+
Patch30000: 0001-ALSA-snd-usb-Fix-URB-cancellation-at-stream-start.patch
# END OF PATCH DEFINITIONS
@@ -1457,6 +1460,9 @@ ApplyPatch virtio-scsi-Initialize-scatterlist-structure.patch
#rhbz 846037
ApplyPatch selinux-Fix-sel_netnode_insert-suspicious-rcu-dereference.patch
+#rhbz 852842
+ApplyPatch ibmveth-Fix-alignment-of-rx-queue-bug.patch
+
ApplyPatch 0001-ALSA-snd-usb-Fix-URB-cancellation-at-stream-start.patch
# END OF PATCH APPLICATIONS
@@ -2321,6 +2327,10 @@ fi
# ||----w |
# || ||
%changelog
+* Wed Sep 05 2012 Josh Boyer <jwboyer@redhat.com> - 3.6.0-0.rc4.git1.1
+- Linux v3.6-rc4-53-g5b716ac
+- Add patch to fix ibmveth issue from Santiago Leon (rhbz 852842)
+
* Wed Sep 05 2012 Josh Boyer <jwboyer@redhat.com> - 3.6.0-0.rc4.git0.2
- Reenable debugging options.
diff --git a/sources b/sources
index 6d42899fe..0c7e61629 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,3 @@
24153eaaa81dedc9481ada8cd9c3b83d linux-3.5.tar.xz
85a05f267b2a883d0a444f3f2f91ec0b patch-3.6-rc4.xz
+2f77d7e0612827bbcc097bcadf43a1ee patch-3.6-rc4-git1.xz