From 328580d7261dbce3edc805c4486835ab74027dcd Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 1 Sep 2013 15:53:53 +0000 Subject: [PATCH] Drop ath6kl patch to avoid using virt_addr_valid() I still don't think it should be using this function, but the build failure on MIPS was fixed by: commit d3ce88431892b703b04769566338a89eda6b0477 Author: Ralf Baechle Date: Fri Dec 28 15:34:40 2012 +0100 MIPS: Fix modpost error in modules attepting to use virt_addr_valid(). svn path=/dists/trunk/linux/; revision=20553 --- .../ath6kl-do-not-use-virt_addr_valid.patch | 88 ------------------- debian/patches/series | 1 - 2 files changed, 89 deletions(-) delete mode 100644 debian/patches/bugfix/all/ath6kl-do-not-use-virt_addr_valid.patch diff --git a/debian/patches/bugfix/all/ath6kl-do-not-use-virt_addr_valid.patch b/debian/patches/bugfix/all/ath6kl-do-not-use-virt_addr_valid.patch deleted file mode 100644 index 000543f60..000000000 --- a/debian/patches/bugfix/all/ath6kl-do-not-use-virt_addr_valid.patch +++ /dev/null @@ -1,88 +0,0 @@ -From: Ben Hutchings -Subject: ath6kl: Do not use virt_addr_valid() -Date: Sun, 06 Jan 2013 05:54:24 +0000 -Forwarded: no - -virt_addr_valid() doesn't seem to be meant for drivers to use, and -currently cannot be used from modules on MIPS: - -ERROR: "min_low_pfn" [drivers/net/wireless/ath/ath6kl/ath6kl_sdio.ko] undefined! - -Instead of trying to check the given pointer, split -ath6kl_sdio_read_write_sync() into two functions: -__ath6kl_sdio_read_write_sync() takes an explicit 'may_dma' parameter -and ath6kl_sdio_read_write_sync() is a wrapper that passes false. -Make __ath6kl_sdio_write_async() pass true since we know it always has -a heap-allocated buffer and it's the one case where the performance -benefit of DMA matters. - ---- a/drivers/net/wireless/ath/ath6kl/sdio.c -+++ b/drivers/net/wireless/ath/ath6kl/sdio.c -@@ -79,17 +79,6 @@ static inline struct ath6kl_sdio *ath6kl - return ar->hif_priv; - } - --/* -- * Macro to check if DMA buffer is WORD-aligned and DMA-able. -- * Most host controllers assume the buffer is DMA'able and will -- * bug-check otherwise (i.e. buffers on the stack). virt_addr_valid -- * check fails on stack memory. -- */ --static inline bool buf_needs_bounce(u8 *buf) --{ -- return ((unsigned long) buf & 0x3) || !virt_addr_valid(buf); --} -- - static void ath6kl_sdio_set_mbox_info(struct ath6kl *ar) - { - struct ath6kl_mbox_info *mbox_info = &ar->mbox_info; -@@ -394,8 +383,8 @@ static int ath6kl_sdio_alloc_prep_scat_r - return 0; - } - --static int ath6kl_sdio_read_write_sync(struct ath6kl *ar, u32 addr, u8 *buf, -- u32 len, u32 request) -+static int __ath6kl_sdio_read_write_sync(struct ath6kl *ar, u32 addr, u8 *buf, -+ u32 len, u32 request, bool may_dma) - { - struct ath6kl_sdio *ar_sdio = ath6kl_sdio_priv(ar); - u8 *tbuf = NULL; -@@ -405,7 +394,10 @@ static int ath6kl_sdio_read_write_sync(s - if (request & HIF_BLOCK_BASIS) - len = round_down(len, HIF_MBOX_BLOCK_SIZE); - -- if (buf_needs_bounce(buf)) { -+ /* Most host controllers assume the buffer is DMA'able. We -+ * must use a bounce buffer if it isn't. -+ */ -+ if ((unsigned long) buf & 0x3 || !may_dma) { - if (!ar_sdio->dma_buffer) - return -ENOMEM; - mutex_lock(&ar_sdio->dma_buffer_mutex); -@@ -428,6 +420,13 @@ static int ath6kl_sdio_read_write_sync(s - return ret; - } - -+static int ath6kl_sdio_read_write_sync(struct ath6kl *ar, u32 addr, u8 *buf, -+ u32 len, u32 request) -+{ -+ return __ath6kl_sdio_read_write_sync(ar, addr, buf, len, request, -+ false); -+} -+ - static void __ath6kl_sdio_write_async(struct ath6kl_sdio *ar_sdio, - struct bus_request *req) - { -@@ -437,9 +436,9 @@ static void __ath6kl_sdio_write_async(st - void *context; - int status; - -- status = ath6kl_sdio_read_write_sync(ar_sdio->ar, req->address, -- req->buffer, req->length, -- req->request); -+ status = __ath6kl_sdio_read_write_sync( -+ ar_sdio->ar, req->address, req->buffer, req->length, -+ req->request, true); - context = req->packet; - ath6kl_sdio_free_bus_req(ar_sdio, req); - ath6kl_hif_rw_comp_handler(context, status); diff --git a/debian/patches/series b/debian/patches/series index 611a49f68..dff2432f9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -62,7 +62,6 @@ bugfix/mips/disable-advansys.patch bugfix/powerpc/lpar-console.patch bugfix/all/dm-Deal-with-merge_bvec_fn-in-component-devices-bett.patch bugfix/arm/ixp4xx_iobe.patch -bugfix/all/ath6kl-do-not-use-virt_addr_valid.patch features/all/cpu-devices/Partially-revert-cpufreq-Add-support-for-x86-cpuinfo.patch bugfix/x86/viafb-autoload-on-olpc-xo1.5-only.patch bugfix/all/misc-bmp085-Enable-building-as-a-module.patch