All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Casey Connolly <casey.connolly@linaro.org>
Cc: Varadarajan Narayanan <quic_varada@quicinc.com>,
	neil.armstrong@linaro.org, sumit.garg@kernel.org,
	joe.hershberger@ni.com, avromanov@salutedevices.com,
	michael@amarulasolutions.com, hs@denx.de, sjg@chromium.org,
	michal.simek@amd.com, marek.vasut+renesas@mailbox.org,
	xypron.glpk@gmx.de, cniedermaier@dh-electronics.com,
	ansuelsmth@gmail.com, venkatesh.abbarapu@amd.com,
	ilias.apalodimas@linaro.org, u-boot-qcom@groups.io,
	u-boot@lists.denx.de
Subject: Re: [PATCH v3 2/4] scsi: Implement get_blk() function
Date: Wed, 7 May 2025 10:55:40 -0600	[thread overview]
Message-ID: <20250507165540.GP5430@bill-the-cat> (raw)
In-Reply-To: <7d3936e0-a01c-4231-90ce-a66cf944a837@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 1643 bytes --]

On Wed, May 07, 2025 at 01:57:11PM +0200, Casey Connolly wrote:
> 
> 
> On 5/7/25 13:28, Varadarajan Narayanan wrote:
> > Add a function to obtain the block device for SCSI.
> > 
> > Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
> > ---
> > v3: * s/scsi_get_blk/scsi_get_blk_by_uuid
> >      * s/partition_name/uuid
> > ---
> >   drivers/scsi/scsi-uclass.c | 30 ++++++++++++++++++++++++++++++
> >   include/scsi.h             | 10 ++++++++++
> >   2 files changed, 40 insertions(+)
> > 
> > diff --git a/drivers/scsi/scsi-uclass.c b/drivers/scsi/scsi-uclass.c
> > index 1ee8236c05c..3eb6069649f 100644
> > --- a/drivers/scsi/scsi-uclass.c
> > +++ b/drivers/scsi/scsi-uclass.c
> > @@ -10,7 +10,9 @@
> >   #define LOG_CATEGORY UCLASS_SCSI
> > +#include <blk.h>
> >   #include <dm.h>
> > +#include <part.h>
> >   #include <scsi.h>
> >   int scsi_exec(struct udevice *dev, struct scsi_cmd *pccb)
> > @@ -23,6 +25,34 @@ int scsi_exec(struct udevice *dev, struct scsi_cmd *pccb)
> >   	return ops->exec(dev, pccb);
> >   }
> > +int scsi_get_blk_by_uuid(const char *uuid,
> > +			 struct blk_desc **blk_desc_ptr,
> > +			 struct disk_partition *part_info_ptr)
> > +{
> > +	static int is_scsi_scanned;
> > +	struct blk_desc *blk;
> > +	int i, ret;
> > +
> > +	if (!is_scsi_scanned) {
> > +		scsi_scan(false /* no verbose */);
> > +		is_scsi_scanned = 1;
> 
> At this point I think we should just unconditionally scsi_scan() like we do
> with MMC... Tom (others?) any thoughts on this? Anyhow this is probably
> fine.

It's certainly something to talk about stand-alone, yeah.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2025-05-07 16:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-07 11:28 [PATCH v3 0/4] Enable env in SCSI Varadarajan Narayanan
2025-05-07 11:28 ` [PATCH v3 1/4] disk: part: implement generic function part_get_info_by_uuid() Varadarajan Narayanan
2025-05-07 11:47   ` Casey Connolly
2025-05-08  5:23     ` Varadarajan Narayanan
2025-05-09 10:52       ` Casey Connolly
2025-05-07 11:28 ` [PATCH v3 2/4] scsi: Implement get_blk() function Varadarajan Narayanan
2025-05-07 11:57   ` Casey Connolly
2025-05-07 16:55     ` Tom Rini [this message]
2025-05-07 11:28 ` [PATCH v3 3/4] env: Add support for storing env variables in SCSI devices Varadarajan Narayanan
2025-05-07 11:28 ` [PATCH v3 4/4] configs: qcs9100: Enable env in SCSI Varadarajan Narayanan
2025-05-07 11:38   ` Casey Connolly

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=20250507165540.GP5430@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=ansuelsmth@gmail.com \
    --cc=avromanov@salutedevices.com \
    --cc=casey.connolly@linaro.org \
    --cc=cniedermaier@dh-electronics.com \
    --cc=hs@denx.de \
    --cc=ilias.apalodimas@linaro.org \
    --cc=joe.hershberger@ni.com \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=michael@amarulasolutions.com \
    --cc=michal.simek@amd.com \
    --cc=neil.armstrong@linaro.org \
    --cc=quic_varada@quicinc.com \
    --cc=sjg@chromium.org \
    --cc=sumit.garg@kernel.org \
    --cc=u-boot-qcom@groups.io \
    --cc=u-boot@lists.denx.de \
    --cc=venkatesh.abbarapu@amd.com \
    --cc=xypron.glpk@gmx.de \
    /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.