Without this patch, the hardware *will* hang on <3.2 kernels when a
512-byte SDIO transfer occurs.
3.2-rc added an SDIO quirk to work around this, so this code was
stripped from the driver when committed to the mainline.
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
--- /dev/null
+--- a/drivers/net/wireless/cw1200/cw1200_sdio.c
++++ b/drivers/net/wireless/cw1200/cw1200_sdio.c
+@@ -253,6 +253,12 @@ static size_t cw1200_sdio_align_size(struct hwbus_priv *self, size_t size)
+ else
+ size = sdio_align_size(self->func, size);
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0))
++ /* A quirk to handle this was committed in 3.2-rc */
++ if (size == SDIO_BLOCK_SIZE)
++ size += SDIO_BLOCK_SIZE; /* HW bug; force use of block mode */
++#endif
++
+ return size;
+ }
+