diff mbox series

[v6,8/9] mmc: core: Disable SDUC for mmc_test

Message ID 20240904145256.3670679-9-avri.altman@wdc.com (mailing list archive)
State New
Headers show
Series Add SDUC Support | expand

Commit Message

Avri Altman Sept. 4, 2024, 2:52 p.m. UTC
Panning to ameliorate it in the very near future.

Signed-off-by: Avri Altman <avri.altman@wdc.com>
---
 drivers/mmc/core/mmc_test.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Adrian Hunter Sept. 6, 2024, 10:10 a.m. UTC | #1
On 4/09/24 17:52, Avri Altman wrote:
> Panning to ameliorate it in the very near future.

Panning -> Planning

> 
> Signed-off-by: Avri Altman <avri.altman@wdc.com>
> ---
>  drivers/mmc/core/mmc_test.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/mmc/core/mmc_test.c b/drivers/mmc/core/mmc_test.c
> index b7f627a9fdea..a28e1a1aded3 100644
> --- a/drivers/mmc/core/mmc_test.c
> +++ b/drivers/mmc/core/mmc_test.c
> @@ -3218,6 +3218,13 @@ static int mmc_test_register_dbgfs_file(struct mmc_card *card)
>  
>  	mutex_lock(&mmc_test_lock);
>  
> +	if (mmc_card_ult_capacity(card)) {
> +		pr_info("%s: mmc-test currently UNSUPPORTED for SDUC\n",
> +			mmc_hostname(card->host));
> +		ret = -EOPNOTSUPP;
> +		goto err;
> +	}

Probably simpler to put the check in mmc_test_probe()

> +
>  	ret = __mmc_test_register_dbgfs_file(card, "test", S_IWUSR | S_IRUGO,
>  		&mmc_test_fops_test);
>  	if (ret)
Avri Altman Sept. 6, 2024, 10:15 a.m. UTC | #2
> On 4/09/24 17:52, Avri Altman wrote:
> > Panning to ameliorate it in the very near future.
> 
> Panning -> Planning
Done.

> 
> >
> > Signed-off-by: Avri Altman <avri.altman@wdc.com>
> > ---
> >  drivers/mmc/core/mmc_test.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/drivers/mmc/core/mmc_test.c b/drivers/mmc/core/mmc_test.c
> > index b7f627a9fdea..a28e1a1aded3 100644
> > --- a/drivers/mmc/core/mmc_test.c
> > +++ b/drivers/mmc/core/mmc_test.c
> > @@ -3218,6 +3218,13 @@ static int mmc_test_register_dbgfs_file(struct
> > mmc_card *card)
> >
> >       mutex_lock(&mmc_test_lock);
> >
> > +     if (mmc_card_ult_capacity(card)) {
> > +             pr_info("%s: mmc-test currently UNSUPPORTED for SDUC\n",
> > +                     mmc_hostname(card->host));
> > +             ret = -EOPNOTSUPP;
> > +             goto err;
> > +     }
> 
> Probably simpler to put the check in mmc_test_probe()
Done.

> 
> > +
> >       ret = __mmc_test_register_dbgfs_file(card, "test", S_IWUSR | S_IRUGO,
> >               &mmc_test_fops_test);
> >       if (ret)
diff mbox series

Patch

diff --git a/drivers/mmc/core/mmc_test.c b/drivers/mmc/core/mmc_test.c
index b7f627a9fdea..a28e1a1aded3 100644
--- a/drivers/mmc/core/mmc_test.c
+++ b/drivers/mmc/core/mmc_test.c
@@ -3218,6 +3218,13 @@  static int mmc_test_register_dbgfs_file(struct mmc_card *card)
 
 	mutex_lock(&mmc_test_lock);
 
+	if (mmc_card_ult_capacity(card)) {
+		pr_info("%s: mmc-test currently UNSUPPORTED for SDUC\n",
+			mmc_hostname(card->host));
+		ret = -EOPNOTSUPP;
+		goto err;
+	}
+
 	ret = __mmc_test_register_dbgfs_file(card, "test", S_IWUSR | S_IRUGO,
 		&mmc_test_fops_test);
 	if (ret)