linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Douglas Gilbert <dgilbert@interlog.com>
To: Newtech Tan <tan@newtech.co.jp>, linux-scsi@vger.kernel.org
Subject: Re: Do anybody know the format of bsg device node name?
Date: Tue, 10 Dec 2013 11:04:49 +0100	[thread overview]
Message-ID: <52A6E741.8060609@interlog.com> (raw)
In-Reply-To: <20131210103247.9151.46AD7750@newtech.co.jp>

On 13-12-10 02:32 AM, Newtech Tan wrote:
>
> For example of bsg device node name:
> [4:0:0:0]
>
> Each field is Hex or Dec?
>
> [BackGroup]
> I am using lsscsi -g command to get SCSI device list as the following.
> If bsg device name's target number field is over ten, Will it display [4:0:10:0] or [4:0:a:0]?
>
> # lsscsi -g
> [0:0:0:0]    cd/dvd  HL-DT-ST DVD+-RW GSA-H53N B104  /dev/sr0   /dev/sg0
> [3:0:0:0]    disk    ATA      WDC WD1600AAJS-1 05.0  /dev/sda   /dev/sg1
> [4:0:0:0]    disk    ATA      Hitachi HDT72102 A31B  /dev/sdb   /dev/sg2
> [4:0:1:0]    disk    ATA      Hitachi HDT72502 A73A  /dev/sdc   /dev/sg3
> [4:0:2:0]    disk    ATA      Hitachi HDT72502 A73A  /dev/sdd   /dev/sg4
> [4:0:3:0]    disk    ATA      Hitachi HDT72502 A73A  /dev/sde   /dev/sg5
> [4:0:4:0]    disk    ATA      Hitachi HDT72502 A73A  /dev/sdf   /dev/sg6
> [4:0:5:0]    disk    ATA      Hitachi HDT72502 A73A  /dev/sdg   /dev/sg7
> [4:0:6:0]    disk    ATA      Hitachi HDT72502 A73A  /dev/sdh   /dev/sg8
> [4:0:7:0]    disk    ATA      Hitachi HDT72502 A73A  /dev/sdi   /dev/sg9
> [4:0:8:0]    enclosu LSI      SAS616x          0502  -         /dev/sg10

/dev/bsg/0:0:0:0
/dev/bsg/3:0:0:0
/dev/bsg/4:0:0:0
etc

Depending on your shell you may need to escape the ":"
characters (or surround the whole string in quotes).

Also CONFIG_BLK_DEV_BSG needs to be defined in your kernel
build but as udev needs that, that is probably already the
case.

Looks like you have a SAS expander there as well. It will
have a bsg node name like:
   /dev/bsg/expander-4:0
that my smp_utils package can use. There might also be a
SAS host node like this:
   /dev/bsg/sas_host4


Doug Gilbert



  reply	other threads:[~2013-12-10 10:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-09 19:47 [PATCH] isci: fix reset timeout handling Dan Williams
2013-12-10  1:32 ` Do anybody know the format of bsg device node name? Newtech Tan
2013-12-10 10:04   ` Douglas Gilbert [this message]
2013-12-10 13:18 ` [PATCH] isci: fix reset timeout handling Dorau, Lukasz

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=52A6E741.8060609@interlog.com \
    --to=dgilbert@interlog.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=tan@newtech.co.jp \
    /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;
as well as URLs for NNTP newsgroup(s).