public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] mmc: block: command issue cleanups
@ 2017-01-24 10:17 Linus Walleij
  2017-01-24 10:17 ` [PATCH 1/6] mmc: block: break out mmc_blk_rw_cmd_abort() Linus Walleij
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Linus Walleij @ 2017-01-24 10:17 UTC (permalink / raw)
  To: linux-mmc, linux-block, Ulf Hansson
  Cc: Chunyan Zhang, Baolin Wang, Paolo Valente, Linus Walleij

The function mmc_blk_issue_rw_rq() is hopelessly convoluted and
need to be refactored to it can be understood by humans.

In the process I found some weird magic return values passed
around for no good reason.

Things are more readable after this.

This work is done towards the goal of breaking the function in
two parts: one just submitting the requests and one checking the
result and possibly resubmitting the command on error, so we
can make the usual path (non-errorpath) smooth and quick, and
be called directly when the driver completes a request.

That in turn is a prerequisite for proper blk-mq integration
with the MMC/SD stack.

All that comes later.

Linus Walleij (6):
  mmc: block: break out mmc_blk_rw_cmd_abort()
  mmc: block: break out mmc_blk_rw_start_new()
  mmc: block: do not assign mq_rq when aborting command
  mmc: block: inline command abortions
  mmc: block: introduce new_areq and old_areq
  mmc: block: stop passing around pointless return values

 drivers/mmc/core/block.c | 108 ++++++++++++++++++++++++++---------------------
 drivers/mmc/core/block.h |   2 +-
 2 files changed, 60 insertions(+), 50 deletions(-)

-- 
2.9.3


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-01-30 13:30 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-24 10:17 [PATCH 0/6] mmc: block: command issue cleanups Linus Walleij
2017-01-24 10:17 ` [PATCH 1/6] mmc: block: break out mmc_blk_rw_cmd_abort() Linus Walleij
2017-01-25  9:23   ` Mateusz Nowak
2017-01-26 15:01     ` Linus Walleij
2017-01-24 10:17 ` [PATCH 2/6] mmc: block: break out mmc_blk_rw_start_new() Linus Walleij
2017-01-24 10:17 ` [PATCH 3/6] mmc: block: do not assign mq_rq when aborting command Linus Walleij
2017-01-24 10:17 ` [PATCH 4/6] mmc: block: inline command abortions Linus Walleij
2017-01-24 10:17 ` [PATCH 5/6] mmc: block: introduce new_areq and old_areq Linus Walleij
2017-01-24 10:17 ` [PATCH 6/6] mmc: block: stop passing around pointless return values Linus Walleij
2017-01-26  8:07 ` [PATCH 0/6] mmc: block: command issue cleanups Ulf Hansson
2017-01-27  7:58   ` Ulf Hansson
2017-01-27  9:46     ` Maxime Ripard
2017-01-30 13:05     ` Linus Walleij
2017-01-30 13:30       ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox