From: Douglas Gilbert <dgilbert@interlog.com>
To: Newtech Tan <tan@newtech.co.jp>, linux-scsi@vger.kernel.org
Subject: Re: how to use SES driver to send SES commands?
Date: Fri, 29 Nov 2013 07:50:25 -0500 [thread overview]
Message-ID: <52988D91.1070803@interlog.com> (raw)
In-Reply-To: <20131129190730.B2FC.46AD7750@newtech.co.jp>
On 13-11-29 05:07 AM, Newtech Tan wrote:
> Hi friends
>
> I subscribed the mailing list just now. Would you please to give me help?
>
> Who can tell me how to use SES driver(linux/driver/scsi/ses.c) to send SES command(SEND DIAGNOSTIC, RECEIVE DIAGNOSTIC RESULTS) in my linux program?
> (I don't want to use sg_ses.)
Then look at the source for sg_senddiag (sg_senddiag.c).
Your SES device is either /dev/sg2 or /dev/bsg/4:0:0:0
> The following is my system info. /dev/sg2 is my SES device.
>
> [root@tan-sl dev]# 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 TOSHIBA MK8061GS ME0A /dev/sda /dev/sg1
> [4:0:0:0] enclosu LSI SAS616x 0502 - /dev/sg2
>
> [root@tan-sl enclosure]# pwd
> /sys/class/enclosure
> [root@tan-sl enclosure]# ls -l
> total 0
> lrwxrwxrwx 1 root root 0 Nov 29 14:51 4:0:0:0 -> ../../devices/pci0000:00/0000:00:1c.0/0000:02:00.0/host4/port-4:0/expan
> der-4:0/port-4:0:0/end_device-4:0:0/target4:0:0/4:0:0:0/enclosure/4:0:0:0
>
> in linux, I can't find ses device. Under /sys/class/enclosure, folder 4:0:0:0 existed.
>
> I will apprectiate for your help.
next prev parent reply other threads:[~2013-11-29 12:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-29 10:07 how to use SES driver to send SES commands? Newtech Tan
2013-11-29 12:50 ` Douglas Gilbert [this message]
2013-12-02 1:12 ` Newtech Tan
2013-12-02 14:53 ` Douglas Gilbert
2013-12-04 0:42 ` Newtech Tan
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=52988D91.1070803@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 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.