All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yaniv Gardi" <ygardi@codeaurora.org>
To: 'Stephen Boyd' <sboyd@codeaurora.org>
Cc: linux-mmc@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	axboe@kernel.dk, 'open list' <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v3 2/2] mmc: card: Adding support for Sanitize in eMMC v4.5
Date: Sun, 26 Feb 2012 11:35:11 +0200	[thread overview]
Message-ID: <000a01ccf469$f18d6260$d4a82720$@org> (raw)
In-Reply-To: <4F43DCBA.5070605@codeaurora.org>



= > -----Original Message-----
= > From: Stephen Boyd [mailto:sboyd@codeaurora.org]
= > Sent: Tuesday, February 21, 2012 8:05 PM
= > To: Yaniv Gardi
= > Cc: linux-mmc@vger.kernel.org; linux-arm-msm@vger.kernel.org;
= > axboe@kernel.dk; open list
= > Subject: Re: [PATCH v3 2/2] mmc: card: Adding support for Sanitize in
= > eMMC v4.5
= > 
= > On 02/21/12 06:00, Yaniv Gardi wrote:
= > > @@ -922,6 +918,44 @@ out:
= > >  	return err ? 0 : 1;
= > >  }
= > >
= > > +int mmc_blk_issue_sanitize_rq(struct mmc_queue *mq,
= > > +			       struct request *req)
= > > +{
= > > +	struct mmc_blk_data *md = mq->data;
= > > +	struct mmc_card *card = md->queue.card;
= > > +	int err = 0;
= > > +
= > > +	if (!(mmc_can_sanitize(card) && (mq->card->host->caps2 &
= > MMC_CAP2_SANITIZE))) {
= > > +		pr_err("%s: SANITIZE is not supported", __func__);
= > > +		err = -EOPNOTSUPP;
= > > +		goto out;
= > > +	}
= > > +
= > > +	pr_info("%s: SANITIZE is supported", __func__);
= > 
= > These look like debug printks. Please remove them.

Printout Removed.


= > 
= > > +
= > > +	mmc_sd_card_set_sanitize_in_progress(card);
= > > +
= > > +	pr_info("%s: issueing SANITIZE command...", __func__);
= > > +
= > > +	err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
= > > +					 EXT_CSD_SANITIZE_START, 1, 0);
= > > +
= > > +	pr_info("%s: SANITIZE command returned...", __func__);
= > > +
= > > +	if (err)
= > > +		pr_err("%s: mmcblk: mmc_switch() failed. err=%d\n",
= > > +		       __func__, err);
= > > +
= > > +	mmc_sd_card_set_sanitize_completed(card);
= > > +
= > > +out:
= > > +	spin_lock_irq(&md->lock);
= > > +	__blk_end_request(req, err, blk_rq_bytes(req));
= > > +	spin_unlock_irq(&md->lock);
= > > +
= > > +	return err ? 0 : 1;
= > > +}
= > > +
= > >  static int mmc_blk_issue_flush(struct mmc_queue *mq, struct
= > request *req)
= > >  {
= > >  	struct mmc_blk_data *md = mq->data;
= > > @@ -181,6 +186,11 @@ int mmc_init_queue(struct mmc_queue *mq,
= > struct mmc_card *card,
= > >  	if (mmc_can_erase(card))
= > >  		mmc_queue_setup_discard(mq->queue, card);
= > >
= > > +	if ((mmc_can_sanitize(card) && (host->caps2 &
= > MMC_CAP2_SANITIZE)))
= > > +		mmc_queue_setup_sanitize(mq->queue);
= > > +	else
= > > +		pr_info("%s - card doesn't support sanitize", __func__);
= > 
= > debug printk again?

Printout removed.


= > 
= > Sent by an employee of the Qualcomm Innovation Center, Inc.
= > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
= > Forum.

WARNING: multiple messages have this Message-ID (diff)
From: "Yaniv Gardi" <ygardi@codeaurora.org>
To: "'Stephen Boyd'" <sboyd@codeaurora.org>
Cc: <linux-mmc@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>,
	<axboe@kernel.dk>, "'open list'" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v3 2/2] mmc: card: Adding support for Sanitize in eMMC v4.5
Date: Sun, 26 Feb 2012 11:35:11 +0200	[thread overview]
Message-ID: <000a01ccf469$f18d6260$d4a82720$@org> (raw)
In-Reply-To: <4F43DCBA.5070605@codeaurora.org>



= > -----Original Message-----
= > From: Stephen Boyd [mailto:sboyd@codeaurora.org]
= > Sent: Tuesday, February 21, 2012 8:05 PM
= > To: Yaniv Gardi
= > Cc: linux-mmc@vger.kernel.org; linux-arm-msm@vger.kernel.org;
= > axboe@kernel.dk; open list
= > Subject: Re: [PATCH v3 2/2] mmc: card: Adding support for Sanitize in
= > eMMC v4.5
= > 
= > On 02/21/12 06:00, Yaniv Gardi wrote:
= > > @@ -922,6 +918,44 @@ out:
= > >  	return err ? 0 : 1;
= > >  }
= > >
= > > +int mmc_blk_issue_sanitize_rq(struct mmc_queue *mq,
= > > +			       struct request *req)
= > > +{
= > > +	struct mmc_blk_data *md = mq->data;
= > > +	struct mmc_card *card = md->queue.card;
= > > +	int err = 0;
= > > +
= > > +	if (!(mmc_can_sanitize(card) && (mq->card->host->caps2 &
= > MMC_CAP2_SANITIZE))) {
= > > +		pr_err("%s: SANITIZE is not supported", __func__);
= > > +		err = -EOPNOTSUPP;
= > > +		goto out;
= > > +	}
= > > +
= > > +	pr_info("%s: SANITIZE is supported", __func__);
= > 
= > These look like debug printks. Please remove them.

Printout Removed.


= > 
= > > +
= > > +	mmc_sd_card_set_sanitize_in_progress(card);
= > > +
= > > +	pr_info("%s: issueing SANITIZE command...", __func__);
= > > +
= > > +	err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
= > > +					 EXT_CSD_SANITIZE_START, 1, 0);
= > > +
= > > +	pr_info("%s: SANITIZE command returned...", __func__);
= > > +
= > > +	if (err)
= > > +		pr_err("%s: mmcblk: mmc_switch() failed. err=%d\n",
= > > +		       __func__, err);
= > > +
= > > +	mmc_sd_card_set_sanitize_completed(card);
= > > +
= > > +out:
= > > +	spin_lock_irq(&md->lock);
= > > +	__blk_end_request(req, err, blk_rq_bytes(req));
= > > +	spin_unlock_irq(&md->lock);
= > > +
= > > +	return err ? 0 : 1;
= > > +}
= > > +
= > >  static int mmc_blk_issue_flush(struct mmc_queue *mq, struct
= > request *req)
= > >  {
= > >  	struct mmc_blk_data *md = mq->data;
= > > @@ -181,6 +186,11 @@ int mmc_init_queue(struct mmc_queue *mq,
= > struct mmc_card *card,
= > >  	if (mmc_can_erase(card))
= > >  		mmc_queue_setup_discard(mq->queue, card);
= > >
= > > +	if ((mmc_can_sanitize(card) && (host->caps2 &
= > MMC_CAP2_SANITIZE)))
= > > +		mmc_queue_setup_sanitize(mq->queue);
= > > +	else
= > > +		pr_info("%s - card doesn't support sanitize", __func__);
= > 
= > debug printk again?

Printout removed.


= > 
= > Sent by an employee of the Qualcomm Innovation Center, Inc.
= > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
= > Forum.



  reply	other threads:[~2012-02-26  9:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-21 14:00 [PATCH v3 0/2] *** exposing SANITIZE capability to the user space via a unique IOCTL *** Yaniv Gardi
2012-02-21 14:00 ` [PATCH v3 1/2] block: IOCTL support for Sanitize in eMMC v4.5 Yaniv Gardi
2012-02-21 14:00   ` Yaniv Gardi
2012-02-21 14:00 ` [PATCH v3 2/2] mmc: card: Adding " Yaniv Gardi
2012-02-21 14:00   ` Yaniv Gardi
2012-02-21 18:04   ` Stephen Boyd
2012-02-26  9:35     ` Yaniv Gardi [this message]
2012-02-26  9:35       ` Yaniv Gardi
2012-02-22  6:09   ` Jaehoon Chung
2012-02-26  9:37     ` Yaniv Gardi
2012-02-26  9:37       ` Yaniv Gardi
2012-02-27  1:26       ` Jaehoon Chung

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000a01ccf469$f18d6260$d4a82720$@org' \
    --to=ygardi@codeaurora.org \
    --cc=axboe@kernel.dk \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=sboyd@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.