Message ID | 20241106051347.969-1-jangsub.yi@samsung.com |
---|---|
State | New |
Headers | show |
Series | mmc: Add config_host callback to set a mmc queue | expand |
> On Thu, Nov 07, 2024 at 06:06:11PM +0900, ??? wrote: > > Currently, there is no way to configure a request queue on the host side. > > Although there are various exported symbols in > > kernel/block/blk-settings.c that can be used to configure a request > > queue, users cannot utilize them as needed. > > If you actually provided a user and didn't just try to offend the kernel > maintainers by submitting dead code I could explain you in detail why > youre idea is flawed. > If a machine uses both SD and MMC simultaneously, how should timeouts be set for each? And if different timeout values need to be used depending on the manufacturer of the SD card, how can this be implemented? I believe it is not appropriate to make such changes in the core code. There needs to be a way to configure these settings per host.
> > On Thu, Nov 07, 2024 at 06:06:11PM +0900, ??? wrote: > > > Currently, there is no way to configure a request queue on the host > side. > > > Although there are various exported symbols in > > > kernel/block/blk-settings.c that can be used to configure a request > > > queue, users cannot utilize them as needed. > > > > If you actually provided a user and didn't just try to offend the > > kernel maintainers by submitting dead code I could explain you in > > detail why youre idea is flawed. > > > If a machine uses both SD and MMC simultaneously, how should timeouts be > set > > for each? And if different timeout values need to be used depending on the > manufacturer of the SD card, how can this be implemented? I believe it is > not appropriate to make such changes in the core code. There needs to be a > way to configure these settings per host. > This is necessary to have separate policies for each device. I will also implement the host modifications related to this content and try to upstream it. Please review the core modifications.
On Tue, Dec 10, 2024 at 02:23:55PM +0900, Jangsub Yi wrote: > This is necessary to have separate policies for each device. > I will also implement the host modifications related to this content > and try to upstream it. Please review the core modifications. It is not reviewable without a user and your insistance to waste everyones time for a patch that as is adds dead code is highly offensive. Stop it.
> On Tue, Dec 10, 2024 at 02:23:55PM +0900, Jangsub Yi wrote: > > This is necessary to have separate policies for each device. > > I will also implement the host modifications related to this content > > and try to upstream it. Please review the core modifications. > > It is not reviewable without a user and your insistance to waste everyones > time for a patch that as is adds dead code is highly offensive. Stop it. > I'm sorry but I couldn't understand your intention clearly because it's my first time reflecting on the mainline. I will include the modifications made to the host (user) and upload the review again.
diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index ef06a4d5d65b..d292f93ca732 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -3261,6 +3261,9 @@ static int mmc_blk_probe(struct mmc_card *card) goto out_free; } + if (card->host->ops->config_host) + card->host->ops->config_host(card, &md->queue); + ret = mmc_blk_alloc_parts(card, md); if (ret) goto out; diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 8fc2b328ec4d..81e21553030b 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -113,6 +113,8 @@ enum mmc_err_stat { MMC_ERR_MAX, }; +struct mmc_queue; + struct mmc_host_ops { /* * It is optional for the host to implement pre_req and post_req in @@ -219,6 +221,9 @@ struct mmc_host_ops { /* Initialize an SD express card, mandatory for MMC_CAP2_SD_EXP. */ int (*init_sd_express)(struct mmc_host *host, struct mmc_ios *ios); + + /* Configure block layer setting related on MMC queue */ + void (*config_host)(struct mmc_card *card, struct mmc_queue *mq); }; struct mmc_cqe_ops {