From: Bart Van Assche <bvanassche@acm.org>
To: Bean Huo <huobean@gmail.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>,
Avri Altman <avri.altman@wdc.com>,
Adrian Hunter <adrian.hunter@intel.com>,
linux-scsi@vger.kernel.org,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
Bean Huo <beanhuo@micron.com>,
Stanley Chu <stanley.chu@mediatek.com>,
Asutosh Das <quic_asutoshd@quicinc.com>,
James Bottomley <JBottomley@Parallels.com>,
Santosh Y <santoshsy@gmail.com>
Subject: Re: [PATCH 2/4] scsi: ufs: Fix handling of lrbp->cmd
Date: Wed, 26 Apr 2023 15:04:47 -0700 [thread overview]
Message-ID: <ffb1051c-cd1d-622b-4caf-0733facd475e@acm.org> (raw)
In-Reply-To: <59bdf91413e75b96c67480823507caaf22ae24cd.camel@gmail.com>
On 4/26/23 05:48, Bean Huo wrote:
> lrbp->cmd will always be non-NULL after this slot in the queue has been
> used once?
Hi Bean,
The reserved slot is used for device commands, UPIU commands and also for
RPMB commands. The other slots are used for SCSI commands. So lrbp->cmd
could be set after the lrbp array has been allocated instead of when a
command is queued. I haven't done that because in the near future I would
like to remove the lrbp->cmd pointer. This is possible by setting the
.cmd_size member in the SCSI host template to sizeof(struct ufshcd_lrb).
Setting that member causes the SCSI core to allocate additional memory
at the end of each struct scsi_cmnd instance.
Thanks,
Bart.
next prev parent reply other threads:[~2023-04-26 22:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-25 23:29 [PATCH 0/4] UFS host controller driver patches Bart Van Assche
2023-04-25 23:29 ` [PATCH 1/4] scsi: ufs: Increase the START STOP UNIT timeout from one to ten seconds Bart Van Assche
2023-04-26 11:39 ` Bean Huo
2023-04-25 23:29 ` [PATCH 2/4] scsi: ufs: Fix handling of lrbp->cmd Bart Van Assche
2023-04-26 12:48 ` Bean Huo
2023-04-26 22:04 ` Bart Van Assche [this message]
2023-04-25 23:29 ` [PATCH 3/4] scsi: ufs: Move ufshcd_wl_shutdown() Bart Van Assche
2023-04-25 23:29 ` [PATCH 4/4] scsi: ufs: Simplify driver shutdown Bart Van Assche
2023-04-26 6:07 ` Adrian Hunter
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=ffb1051c-cd1d-622b-4caf-0733facd475e@acm.org \
--to=bvanassche@acm.org \
--cc=JBottomley@Parallels.com \
--cc=adrian.hunter@intel.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=huobean@gmail.com \
--cc=jaegeuk@kernel.org \
--cc=jejb@linux.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=quic_asutoshd@quicinc.com \
--cc=santoshsy@gmail.com \
--cc=stanley.chu@mediatek.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox