--- zzzz-none-000/linux-4.9.279/drivers/mmc/card/queue.c 2021-08-08 06:38:54.000000000 +0000 +++ puma7-arm-6591-750/linux-4.9.279/drivers/mmc/card/queue.c 2023-02-08 10:58:13.000000000 +0000 @@ -9,6 +9,15 @@ * published by the Free Software Foundation. * */ + +/****************************************************************** + + Includes Intel Corporation's changes/modifications dated: 07/2011. + Changed/modified portions - Copyright(c) 2011-2014, Intel Corporation. + +******************************************************************/ + + #include #include #include @@ -19,7 +28,9 @@ #include #include - +#ifdef CONFIG_ARCH_GEN3 +#include +#endif #include "queue.h" #include "block.h" @@ -289,6 +300,12 @@ goto cleanup_queue; } +#ifdef CONFIG_ARCH_GEN3 + mq->bp_sg = mmc_alloc_sg(host->max_segs, &ret); + if (ret) + goto cleanup_queue; +#endif + sema_init(&mq->thread_sem, 1); mq->thread = kthread_run(mmc_queue_thread, mq, "mmcqd/%d%s", @@ -317,6 +334,11 @@ kfree(mqrq_prev->bounce_buf); mqrq_prev->bounce_buf = NULL; +#ifdef CONFIG_ARCH_GEN3 + kfree(mq->bp_sg); + mq->bp_sg = NULL; +#endif + blk_cleanup_queue(mq->queue); return ret; } @@ -358,6 +380,11 @@ kfree(mqrq_prev->bounce_buf); mqrq_prev->bounce_buf = NULL; +#ifdef CONFIG_ARCH_GEN3 + kfree(mq->bp_sg); + mq->bp_sg = NULL; +#endif + mq->card = NULL; } EXPORT_SYMBOL(mmc_cleanup_queue);