Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Sep 2012 11:37:59 +0200
From:      "Paul Maulberger" <Paul.Maulberger@gmx.de>
To:        Jim Harris <jimharris@freebsd.org>
Cc:        freebsd-scsi@freebsd.org
Subject:   Re: Intel C600 SAS Controller + locate LED (SGPIO)
Message-ID:  <20120926093759.299750@gmx.net>
In-Reply-To: <CAJP=Hc__5sCNOxtHETMtJv70FPDi-8SoC6=ZQnYxKp-m9PuR%2Bw@mail.gmail.com>
References:  <20120923140816.144270@gmx.net> <CAJP=Hc__5sCNOxtHETMtJv70FPDi-8SoC6=ZQnYxKp-m9PuR%2Bw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--========GMX299751348652279484510
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Hi Jim,

your patch is working very well. Thanks a lot!

To support the locate and the fault led I extended your patch a little bit. Like the ahci driver every port has now a locate and a fault led device. 

# ls -al /dev/led
total 1
dr-xr-xr-x   2 root  wheel       512 Sep 26 08:39 .
dr-xr-xr-x  11 root  wheel       512 Sep 26 10:39 ..
crw-------   1 root  wheel    0,  47 Sep 26 08:43 ahcich0.fault
crw-------   1 root  wheel    0,  46 Sep 26 08:44 ahcich0.locate
crw-------   1 root  wheel    0,  49 Sep 26 08:39 ahcich1.fault
crw-------   1 root  wheel    0,  48 Sep 26 08:39 ahcich1.locate
crw-------   1 root  wheel    0,  51 Sep 26 08:39 ahcich2.fault
crw-------   1 root  wheel    0,  50 Sep 26 08:39 ahcich2.locate
crw-------   1 root  wheel    0,  53 Sep 26 08:39 ahcich3.fault
crw-------   1 root  wheel    0,  52 Sep 26 08:39 ahcich3.locate
crw-------   1 root  wheel    0,  55 Sep 26 08:39 ahcich4.fault
crw-------   1 root  wheel    0,  54 Sep 26 08:39 ahcich4.locate
crw-------   1 root  wheel    0,  57 Sep 26 08:44 ahcich5.fault
crw-------   1 root  wheel    0,  56 Sep 26 08:44 ahcich5.locate
crw-------   1 root  wheel    0,  36 Sep 26 08:39 igb0
crw-------   1 root  wheel    0,  37 Sep 26 08:39 igb1
crw-------   1 root  wheel    0,  38 Sep 26 08:39 isci.bus0.port0.fault
crw-------   1 root  wheel    0,  39 Sep 26 08:39 isci.bus0.port0.locate
crw-------   1 root  wheel    0,  40 Sep 26 08:42 isci.bus0.port1.fault
crw-------   1 root  wheel    0,  41 Sep 26 08:42 isci.bus0.port1.locate
crw-------   1 root  wheel    0,  42 Sep 26 08:39 isci.bus0.port2.fault
crw-------   1 root  wheel    0,  43 Sep 26 08:39 isci.bus0.port2.locate
crw-------   1 root  wheel    0,  44 Sep 26 08:39 isci.bus0.port3.fault
crw-------   1 root  wheel    0,  45 Sep 26 08:39 isci.bus0.port3.locate

By the way the main board X9DRi-F has only one bus. The X9DR3-F has 2 buses.

The patch (compared to 9.1 RC1) is attached.

Is it possible to commit this patch into 9.1 or is it too late?

Regards
Paul

Hint: If anybody is using a SC825TQ chassis and no led is blinking check ALL jumper settings of your backplane (Appendix C of http://www.supermicro.com/manuals/chassis/2U/SC825.pdf). Our backplane was wrongly configured by factory (mixture of sgpio and i2c settings).


-------- Original-Nachricht --------
> Datum: Mon, 24 Sep 2012 18:01:34 -0700
> Von: Jim Harris <jimharris@freebsd.org>
> An: Paul Maulberger <Paul.Maulberger@gmx.de>
> CC: freebsd-scsi@freebsd.org
> Betreff: Re: Intel C600 SAS Controller + locate LED (SGPIO)

> On Sun, Sep 23, 2012 at 7:08 AM, Paul Maulberger <Paul.Maulberger@gmx.de>
> wrote:
> > Hi Folks,
> >
> > I like to manipulate the eight locate LED's of my internal enclosure.
> The following hardware is used:
> >
> > Mainboard: Supermicro X9DRi-F
> > http://www.supermicro.com/products/motherboard/xeon/c600/x9dri-f.cfm
> >
> > Chassis: SC825TQ-R740LPB
> > http://www.supermicro.com/products/chassis/2U/825/SC825TQ-R740LP.cfm
> >
> > Cable from Intel C602 SAS controller to backplane:
> > SFF-8087 to 4xSATA cable with 8-pin SGPIO connector
> >
> > The backplane of the chassis has the MagaRAC MG9072 chip from AMI and is
> configured for SGPIO.
> >
> > I'm using FreeBSD 9.1 RC1.
> >
> > FreeBSD has a led driver to manipulate LED's:
> > http://www.freebsd.org/cgi/man.cgi?query=led
> >
> > # ls -al /dev/led
> > total 1
> > dr-xr-xr-x   2 root  wheel       512 Sep 23 09:42 .
> > dr-xr-xr-x  10 root  wheel       512 Sep 23 09:42 ..
> > crw-------   1 root  wheel    0,  40 Sep 23 09:42 ahcich0.fault
> > crw-------   1 root  wheel    0,  39 Sep 23 09:42 ahcich0.locate
> > crw-------   1 root  wheel    0,  42 Sep 23 09:42 ahcich1.fault
> > crw-------   1 root  wheel    0,  41 Sep 23 09:42 ahcich1.locate
> > crw-------   1 root  wheel    0,  44 Sep 23 09:42 ahcich2.fault
> > crw-------   1 root  wheel    0,  43 Sep 23 09:42 ahcich2.locate
> > crw-------   1 root  wheel    0,  46 Sep 23 09:42 ahcich3.fault
> > crw-------   1 root  wheel    0,  45 Sep 23 09:42 ahcich3.locate
> > crw-------   1 root  wheel    0,  48 Sep 23 09:42 ahcich4.fault
> > crw-------   1 root  wheel    0,  47 Sep 23 09:42 ahcich4.locate
> > crw-------   1 root  wheel    0,  50 Sep 23 09:42 ahcich5.fault
> > crw-------   1 root  wheel    0,  49 Sep 23 09:42 ahcich5.locate
> > crw-------   1 root  wheel    0,  37 Sep 23 09:42 igb0
> > crw-------   1 root  wheel    0,  38 Sep 23 09:42 igb1
> >
> > Unfortunately there are no "C600" led devices.
> >
> > I found the functions 'scic_sgpio_*' in the file
> 'sys/dev/isci/scil/scic_sgpio.h'. The function 'scic_sgpio_hardware_initialize' is called in the
> file 'sys/dev/isci/scil/scic_sds_controller.c'. Although there is no call to
> 'scic_sgpio_set_led_state' or 'scic_sgpio_update_led_state' in the whole
> sources (/usr/src).
> >
> > Can somebody give me a hint how to manipulate the LED's?
> 
> There's no way to manipulate the LEDs on the system as you have it.
> LED support is not in the current isci driver.  But can you try this
> patch?
> 
> http://people.freebsd.org/~jimharris/isci_led.patch
> 
> The LEDs will show up as /dev/led/isci.busX.portY.  On C60x SKUs with
> 8 isci ports (which I think yours has), the isci driver will create 2
> buses of 4 ports each (to match the underlying silicon
> implementation), hence the need to use bus and port numbers in the
> name, rather than just port.
> 
> Regards,
> 
> -Jim
> 
> 
> > Regards
> > Paul
> > _______________________________________________
> > freebsd-scsi@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-scsi
> > To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org"
> _______________________________________________
> freebsd-scsi@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-scsi
> To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org"

--========GMX299751348652279484510
Content-Type: application/octet-stream; name="isci_led2.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="isci_led2.patch"

LS0tIC91c3Ivc3JjL3N5cy9kZXYvaXNjaS9pc2NpLmguOTFyYzEJMjAxMi0wOS0yNSAwNjo1MToy
Mi4wMDAwMDAwMDAgKzAyMDAKKysrIC91c3Ivc3JjL3N5cy9kZXYvaXNjaS9pc2NpLmgJMjAxMi0w
OS0yNiAwOTowMjoxMC4wMDAwMDAwMDAgKzAyMDAKQEAgLTE0Myw2ICsxNDMsMTMgQEAKIAogfTsK
IAorc3RydWN0IElTQ0lfTEVECit7CisJc3RydWN0IGNkZXYJCSpjZGV2OworCVNDSV9DT05UUk9M
TEVSX0hBTkRMRV9UCWhhbmRsZTsKKwlpbnQJCQlpbmRleDsKK307CisKIHN0cnVjdCBJU0NJX0NP
TlRST0xMRVIKIHsKIAlzdHJ1Y3QgaXNjaV9zb2Z0YyAJKmlzY2k7CkBAIC0xNjksNiArMTc2LDgg
QEAKIAl1aW50MzJfdAkJcXVldWVfZGVwdGg7CiAJdWludDMyX3QJCXNpbV9xdWV1ZV9kZXB0aDsK
IAlTQ0lfRkFTVF9MSVNUX1QJCXBlbmRpbmdfZGV2aWNlX3Jlc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aW5k
ZXggPSBpOworCQlzcHJpbnRmKGxlZF9uYW1lLCAiaXNjaS5idXMlZC5wb3J0JWQubG9jYXRlIiwg
Y29udHJvbGxlci0+aW5kZXgsIGkpOworCQljb250cm9sbGVyLT5sZWRfbG9jYXRlW2ldLmNkZXYg
PSBsZWRfY3JlYXRlKGlzY2lfbGVkX2xvY2F0ZV9mdW5jLAorCQkgICAgJmNvbnRyb2xsZXItPmxl
ZF9sb2NhdGVbaV0sIGxlZF9uYW1lKTsKKwl9CQogCiAJcmV0dXJuIChzY2lmX2NvbnRyb2xsZXJf
aW5pdGlhbGl6ZShjb250cm9sbGVyLT5zY2lmX2NvbnRyb2xsZXJfaGFuZGxlKSk7CiB9Cg==
--========GMX299751348652279484510--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120926093759.299750>