hreinecke / sg3_utils

Deprecated git-svn mirror for sg3_utils
http://sg.danny.cz/sg/sg3_utils.html
Other
154 stars 91 forks source link

sg_ses is not parsing page 0xa correctly #91

Open kollapu opened 1 year ago

kollapu commented 1 year ago

Dell MD1420 enclosure reports in Page 0x1 that it doesn't support "Device slot" and "Expander" element types. So, the only mandatory element type that needs to be present in page 0xa is the "Array Device" type element. The remaining other element types are optional.

However, sg_ses is trying to parse the 0xa page buffer even after the "Array Device" elements and says "<<>>"

The issue is seen with the latest code from github and is also seen on the last 3 release versions. Any feedback or help on this issue is greatly appreciated. Thanks.

[root@ocebst ~]# sg_ses -p 1 /dev/sg6 DELL MD1420 1.07 Configuration diagnostic page: number of secondary subenclosures: 0 generation code: 0x0 enclosure descriptor list Subenclosure identifier: 0 [primary] relative ES process id: 1, number of ES processes: 1 number of type descriptor headers: 15 enclosure logical identifier (hex): 520474729a993c00 enclosure vendor: DELL product: MD1420 rev: 1.07 vendor-specific data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

type descriptor header and text list Element type: Array device slot, subenclosure id: 0 number of possible elements: 24 text: Enclosure Drive Slot Element type: Enclosure services controller electronics, subenclosure id: 0 number of possible elements: 2 text: Controller Module Element type: Enclosure, subenclosure id: 0 number of possible elements: 1 text: Enclosure Element type: Power supply, subenclosure id: 0 number of possible elements: 2 text: Power Supply Element type: Cooling, subenclosure id: 0 number of possible elements: 4 text: Cooling Fan Element type: Temperature sensor, subenclosure id: 0 number of possible elements: 7 text: Temp Sensor Element type: Voltage sensor, subenclosure id: 0 number of possible elements: 6 text: Voltage Sensor Element type: Current sensor, subenclosure id: 0 number of possible elements: 6 text: Current Sensor Element type: SAS connector, subenclosure id: 0 number of possible elements: 8 text: SAS Connector Element type: Display, subenclosure id: 0 number of possible elements: 4 text: Display Element Element type: vendor specific [0x80], subenclosure id: 0 number of possible elements: 6 text: Dell Power Sensor Element type: vendor specific [0x81], subenclosure id: 0 number of possible elements: 1 text: Dell Enclosure Element type: vendor specific [0x82], subenclosure id: 0 number of possible elements: 2 text: Dell Controller Module Element type: vendor specific [0x85], subenclosure id: 0 number of possible elements: 1 text: Dell Midplane Element type: vendor specific [0x86], subenclosure id: 0 number of possible elements: 1 text: Dell Control Panel [root@ocebst ~]#

[root@ocebst ~]# sg_ses -p 0xa /dev/sg6 DELL MD1420 1.07 Primary enclosure logical identifier (hex): 520474729a993c00 Additional element status diagnostic page: generation code: 0x0 additional element status descriptor list Element type: Array device slot, subenclosure id: 0 [ti=0] Element index: 0 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 0 phy index: 0 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993c7f SAS address: 0x5000c500596e2b19 phy identifier: 0x0 phy index: 1 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993cff SAS address: 0x5000c500596e2b1a phy identifier: 0x1 Element index: 1 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 1 phy index: 0 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993c7f SAS address: 0x5000c50059503a95 phy identifier: 0x0 phy index: 1 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993cff SAS address: 0x5000c50059503a96 phy identifier: 0x1 Element index: 2 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 2 phy index: 0 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993c7f SAS address: 0x5000c500d3294295 phy identifier: 0x0 phy index: 1 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993cff SAS address: 0x5000c500d3294296 phy identifier: 0x1 Element index: 3 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 3 phy index: 0 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993c7f SAS address: 0x5000c500d33832d1 phy identifier: 0x0 phy index: 1 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993cff SAS address: 0x5000c500d33832d2 phy identifier: 0x1 Element index: 4 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 4 phy index: 0 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993c7f SAS address: 0x5000c500d3382935 phy identifier: 0x0 phy index: 1 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993cff SAS address: 0x5000c500d3382936 phy identifier: 0x1 Element index: 5 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 5 phy index: 0 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993c7f SAS address: 0x5000c500d1a65b21 phy identifier: 0x0 phy index: 1 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993cff SAS address: 0x5000c500d1a65b22 phy identifier: 0x1 Element index: 6 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 6 phy index: 0 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993c7f SAS address: 0x5000c500d18b01c5 phy identifier: 0x0 phy index: 1 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993cff SAS address: 0x5000c500d18b01c6 phy identifier: 0x1 Element index: 7 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 7 phy index: 0 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993c7f SAS address: 0x5000c500d1716e15 phy identifier: 0x0 phy index: 1 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993cff SAS address: 0x5000c500d1716e16 phy identifier: 0x1 Element index: 8 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 8 phy index: 0 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993c7f SAS address: 0x5000c500d18b99a5 phy identifier: 0x0 phy index: 1 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993cff SAS address: 0x5000c500d18b99a6 phy identifier: 0x1 Element index: 9 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 9 phy index: 0 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993c7f SAS address: 0x5000c500d3385059 phy identifier: 0x0 phy index: 1 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993cff SAS address: 0x5000c500d338505a phy identifier: 0x1 Element index: 10 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 10 phy index: 0 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993c7f SAS address: 0x5000c500d338ea89 phy identifier: 0x0 phy index: 1 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993cff SAS address: 0x5000c500d338ea8a phy identifier: 0x1 Element index: 11 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 11 phy index: 0 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993c7f SAS address: 0x5000c500d1a8cc69 phy identifier: 0x0 phy index: 1 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993cff SAS address: 0x5000c500d1a8cc6a phy identifier: 0x1 Element index: 12 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 12 phy index: 0 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993c7f SAS address: 0x500000e119a53b32 phy identifier: 0x0 phy index: 1 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993cff SAS address: 0x500000e119a53b33 phy identifier: 0x1 Element index: 13 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 13 phy index: 0 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993c7f SAS address: 0x5000c500d3388059 phy identifier: 0x0 phy index: 1 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993cff SAS address: 0x5000c500d338805a phy identifier: 0x1 Element index: 14 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 14 phy index: 0 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993c7f SAS address: 0x5000c500d3384fc1 phy identifier: 0x0 phy index: 1 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993cff SAS address: 0x5000c500d3384fc2 phy identifier: 0x1 Element index: 15 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 15 phy index: 0 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993c7f SAS address: 0x5000c500d1a71899 phy identifier: 0x0 phy index: 1 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993cff SAS address: 0x5000c500d1a7189a phy identifier: 0x1 Element index: 16 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 16 phy index: 0 SAS device type: no SAS device attached initiator port for: target port for: attached SAS address: 0x0 SAS address: 0x0 phy identifier: 0x0 phy index: 1 SAS device type: no SAS device attached initiator port for: target port for: attached SAS address: 0x0 SAS address: 0x0 phy identifier: 0x0 Element index: 17 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 17 phy index: 0 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993c7f SAS address: 0x5000c500d171fdb9 phy identifier: 0x0 phy index: 1 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993cff SAS address: 0x5000c500d171fdba phy identifier: 0x1 Element index: 18 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 18 phy index: 0 SAS device type: no SAS device attached initiator port for: target port for: attached SAS address: 0x0 SAS address: 0x0 phy identifier: 0x0 phy index: 1 SAS device type: no SAS device attached initiator port for: target port for: attached SAS address: 0x0 SAS address: 0x0 phy identifier: 0x0 Element index: 19 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 19 phy index: 0 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993c7f SAS address: 0x5000c500d18ade5d phy identifier: 0x0 phy index: 1 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993cff SAS address: 0x5000c500d18ade5e phy identifier: 0x1 Element index: 20 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 20 phy index: 0 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993c7f SAS address: 0x5000039a4819810a phy identifier: 0x0 phy index: 1 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993cff SAS address: 0x5000039a4819810b phy identifier: 0x1 Element index: 21 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 21 phy index: 0 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993c7f SAS address: 0x5000039a4842685a phy identifier: 0x0 phy index: 1 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993cff SAS address: 0x5000039a4842685b phy identifier: 0x1 Element index: 22 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 22 phy index: 0 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993c7f SAS address: 0x5000039a4842663a phy identifier: 0x0 phy index: 1 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993cff SAS address: 0x5000039a4842663b phy identifier: 0x1 Element index: 23 eiioe=0 Transport protocol: SAS number of phys: 2, not all phys: 0, device slot number: 23 phy index: 0 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993c7f SAS address: 0x5000039a481980de phy identifier: 0x0 phy index: 1 SAS device type: end device initiator port for: target port for: SSP attached SAS address: 0x520474729a993cff SAS address: 0x5000039a481980df phy identifier: 0x1 <<>> [root@ocebst ~]#

The below pagedump is from a different Dell MD1420 enclosure but the same issue is seen.

Page 0xA raw dump: [Mar 1'23 12:58:36_541_649_120] PgLen:604 [Mar 1'23 12:58:36_541_659_280] 8310B000: 0406000A 00000000 00003E16 00000002 [Mar 1'23 12:58:36_541_675_480] 8310B010: 08000010 72740452 7F3C999A 00C50050 [Mar 1'23 12:58:36_541_691_960] 8310B020: 192B6E59 00000000 00000000 08000010 [Mar 1'23 12:58:36_541_707_520] 8310B030: 72740452 FF3C999A 00C50050 1A2B6E59 [Mar 1'23 12:58:36_541_723_120] 8310B040: 00000001 00000000 01003E16 01000002 [Mar 1'23 12:58:36_541_738_160] 8310B050: 08000010 72740452 7F3C999A 00C50050 [Mar 1'23 12:58:36_541_754_040] 8310B060: 953A5059 00000000 00000000 08000010 [Mar 1'23 12:58:36_541_768_880] 8310B070: 72740452 FF3C999A 00C50050 963A5059 [Mar 1'23 12:58:36_541_784_280] 8310B080: 00000001 00000000 02003E16 02000002 [Mar 1'23 12:58:36_541_799_760] 8310B090: 08000010 72740452 7F3C999A 00C50050 [Mar 1'23 12:58:36_541_814_960] 8310B0A0: 954229D3 00000000 00000000 08000010 [Mar 1'23 12:58:36_541_830_200] 8310B0B0: 72740452 FF3C999A 00C50050 964229D3 [Mar 1'23 12:58:36_541_846_080] 8310B0C0: 00000001 00000000 03003E16 03000002 [Mar 1'23 12:58:36_541_860_760] 8310B0D0: 08000010 72740452 7F3C999A 00C50050 [Mar 1'23 12:58:36_541_876_200] 8310B0E0: D13238D3 00000000 00000000 08000010 [Mar 1'23 12:58:36_541_892_120] 8310B0F0: 72740452 FF3C999A 00C50050 D23238D3 [Mar 1'23 12:58:36_541_907_320] 8310B100: 00000001 00000000 04003E16 04000002 [Mar 1'23 12:58:36_541_922_200] 8310B110: 08000010 72740452 7F3C999A 00C50050 [Mar 1'23 12:58:36_541_937_480] 8310B120: 352938D3 00000000 00000000 08000010 [Mar 1'23 12:58:36_541_952_920] 8310B130: 72740452 FF3C999A 00C50050 362938D3 [Mar 1'23 12:58:36_541_968_080] 8310B140: 00000001 00000000 05003E16 05000002 [Mar 1'23 12:58:36_541_982_840] 8310B150: 08000010 72740452 7F3C999A 00C50050 [Mar 1'23 12:58:36_541_998_600] 8310B160: 215BA6D1 00000000 00000000 08000010 [Mar 1'23 12:58:36_542_013_320] 8310B170: 72740452 FF3C999A 00C50050 225BA6D1 [Mar 1'23 12:58:36_542_028_320] 8310B180: 00000001 00000000 06003E16 06000002 [Mar 1'23 12:58:36_542_044_200] 8310B190: 08000010 72740452 7F3C999A 00C50050 [Mar 1'23 12:58:36_542_060_200] 8310B1A0: C5018BD1 00000000 00000000 08000010 [Mar 1'23 12:58:36_542_075_440] 8310B1B0: 72740452 FF3C999A 00C50050 C6018BD1 [Mar 1'23 12:58:36_542_091_400] 8310B1C0: 00000001 00000000 07003E16 07000002 [Mar 1'23 12:58:36_542_106_040] 8310B1D0: 08000010 72740452 7F3C999A 00C50050 [Mar 1'23 12:58:36_542_120_880] 8310B1E0: 156E71D1 00000000 00000000 08000010 [Mar 1'23 12:58:36_542_135_720] 8310B1F0: 72740452 FF3C999A 00C50050 166E71D1 [Mar 1'23 12:58:36_542_151_400] 8310B200: 00000001 00000000 08003E16 08000002 [Mar 1'23 12:58:36_542_166_120] 8310B210: 08000010 72740452 7F3C999A 00C50050 [Mar 1'23 12:58:36_542_181_120] 8310B220: A5998BD1 00000000 00000000 08000010 [Mar 1'23 12:58:36_542_196_520] 8310B230: 72740452 FF3C999A 00C50050 A6998BD1 [Mar 1'23 12:58:36_542_211_600] 8310B240: 00000001 00000000 09003E16 09000002 [Mar 1'23 12:58:36_542_226_440] 8310B250: 08000010 72740452 7F3C999A 00C50050 [Mar 1'23 12:58:36_542_242_080] 8310B260: 595038D3 00000000 00000000 08000010 [Mar 1'23 12:58:36_542_256_720] 8310B270: 72740452 FF3C999A 00C50050 5A5038D3 [Mar 1'23 12:58:36_542_271_640] 8310B280: 00000001 00000000 0A003E16 0A000002 [Mar 1'23 12:58:36_542_287_040] 8310B290: 08000010 72740452 7F3C999A 00C50050 [Mar 1'23 12:58:36_542_301_840] 8310B2A0: 89EA38D3 00000000 00000000 08000010 [Mar 1'23 12:58:36_542_316_880] 8310B2B0: 72740452 FF3C999A 00C50050 8AEA38D3 [Mar 1'23 12:58:36_542_332_080] 8310B2C0: 00000001 00000000 0B003E16 0B000002 [Mar 1'23 12:58:36_542_347_400] 8310B2D0: 08000010 72740452 7F3C999A 00C50050 [Mar 1'23 12:58:36_542_362_480] 8310B2E0: 69CCA8D1 00000000 00000000 08000010 [Mar 1'23 12:58:36_542_377_200] 8310B2F0: 72740452 FF3C999A 00C50050 6ACCA8D1 [Mar 1'23 12:58:36_542_580_840] 8310B300: 00000001 00000000 0C003E16 0C000002 [Mar 1'23 12:58:36_542_595_600] 8310B310: 08000010 72740452 7F3C999A E1000050 [Mar 1'23 12:58:36_542_610_560] 8310B320: 323BA519 00000000 00000000 08000010 [Mar 1'23 12:58:36_542_626_000] 8310B330: 72740452 FF3C999A E1000050 333BA519 [Mar 1'23 12:58:36_542_640_960] 8310B340: 00000001 00000000 0D003E16 0D000002 [Mar 1'23 12:58:36_542_655_840] 8310B350: 08000010 72740452 7F3C999A 00C50050 [Mar 1'23 12:58:36_542_671_560] 8310B360: 598038D3 00000000 00000000 08000010 [Mar 1'23 12:58:36_542_686_440] 8310B370: 72740452 FF3C999A 00C50050 5A8038D3 [Mar 1'23 12:58:36_542_701_440] 8310B380: 00000001 00000000 0E003E16 0E000002 [Mar 1'23 12:58:36_542_716_680] 8310B390: 08000010 72740452 7F3C999A 00C50050 [Mar 1'23 12:58:36_542_731_760] 8310B3A0: C14F38D3 00000000 00000000 08000010 [Mar 1'23 12:58:36_542_746_520] 8310B3B0: 72740452 FF3C999A 00C50050 C24F38D3 [Mar 1'23 12:58:36_542_762_240] 8310B3C0: 00000001 00000000 0F003E16 0F000002 [Mar 1'23 12:58:36_542_776_800] 8310B3D0: 08000010 72740452 7F3C999A 00C50050 [Mar 1'23 12:58:36_542_791_800] 8310B3E0: 9918A7D1 00000000 00000000 08000010 [Mar 1'23 12:58:36_542_806_560] 8310B3F0: 72740452 FF3C999A 00C50050 9A18A7D1 [Mar 1'23 12:58:36_542_822_320] 8310B400: 00000001 00000000 10003E16 10000002 [Mar 1'23 12:58:36_542_837_240] 8310B410: 08000010 72740452 7F3C999A 00C50050 [Mar 1'23 12:58:36_542_852_160] 8310B420: 79E238D3 00000000 00000000 08000010 [Mar 1'23 12:58:36_542_867_480] 8310B430: 72740452 FF3C999A 00C50050 7AE238D3 [Mar 1'23 12:58:36_542_882_480] 8310B440: 00000001 00000000 11003E16 11000002 [Mar 1'23 12:58:36_542_897_280] 8310B450: 08000010 72740452 7F3C999A 00C50050 [Mar 1'23 12:58:36_542_912_760] 8310B460: B9FD71D1 00000000 00000000 08000010 [Mar 1'23 12:58:36_542_927_600] 8310B470: 72740452 FF3C999A 00C50050 BAFD71D1 [Mar 1'23 12:58:36_542_942_680] 8310B480: 00000001 00000000 12003E16 12000002 [Mar 1'23 12:58:36_542_958_080] [skipped 0x000C empty dwords] [Mar 1'23 12:58:36_542_967_480] 8310B4C0: 00000000 00000000 13003E16 13000002 [Mar 1'23 12:58:36_542_982_120] 8310B4D0: 08000010 72740452 7F3C999A 00C50050 [Mar 1'23 12:58:36_542_997_000] 8310B4E0: 5DDE8AD1 00000000 00000000 08000010 [Mar 1'23 12:58:36_543_012_160] 8310B4F0: 72740452 FF3C999A 00C50050 5EDE8AD1 [Mar 1'23 12:58:36_543_027_600] 8310B500: 00000001 00000000 14003E16 14000002 [Mar 1'23 12:58:36_543_042_160] 8310B510: 08000010 72740452 7F3C999A 9A030050 [Mar 1'23 12:58:36_543_057_720] 8310B520: 0A811948 00000000 00000000 08000010 [Mar 1'23 12:58:36_543_072_200] 8310B530: 72740452 FF3C999A 9A030050 0B811948 [Mar 1'23 12:58:36_543_087_240] 8310B540: 00000001 00000000 15003E16 15000002 [Mar 1'23 12:58:36_543_102_480] 8310B550: 08000010 72740452 7F3C999A 9A030050 [Mar 1'23 12:58:36_543_117_400] 8310B560: 5A684248 00000000 00000000 08000010 [Mar 1'23 12:58:36_543_132_040] 8310B570: 72740452 FF3C999A 9A030050 5B684248 [Mar 1'23 12:58:36_543_146_920] 8310B580: 00000001 00000000 16003E16 16000002 [Mar 1'23 12:58:36_543_162_320] 8310B590: 08000010 72740452 7F3C999A 9A030050 [Mar 1'23 12:58:36_543_177_360] 8310B5A0: 3A664248 00000000 00000000 08000010 [Mar 1'23 12:58:36_543_191_920] 8310B5B0: 72740452 FF3C999A 9A030050 3B664248 [Mar 1'23 12:58:36_543_207_560] 8310B5C0: 00000001 00000000 17003E16 17000002 [Mar 1'23 12:58:36_543_222_120] 8310B5D0: 08000010 72740452 7F3C999A 9A030050 [Mar 1'23 12:58:36_543_237_080] 8310B5E0: DE801948 00000000 00000000 08000010 [Mar 1'23 12:58:36_543_252_280] 8310B5F0: 72740452 FF3C999A 9A030050 DF801948 [Mar 1'23 12:58:36_543_267_200] 8310B600: 00000001 00000000 00000000 00000000 [Mar 1'23 12:58:36_543_293_240] [skipped 0x1E7C empty dwords]

doug-gilbert commented 1 year ago

First, could you try this with my latest version at: https://github.com/doug-gilbert/sg3_utils . Note that to build it this sequence is required: ' ./autogen.sh ; ./configure; make '. It can be executed from there with 'src/sg_ses ' or to install it, use: ' make install ' as root. If the problem persists, could you send me the output of 'sg_ses -a -HHHH > md1420.hex' . There is an example in the inhex/ses_areca_all.hex file in the version referenced above. You can find my email address in the sg_ses manpage.

kollapu commented 1 year ago

Hi Douglas, here is the data you asked for. The issue is seen with the latest code also.

SES page 0xa data coming from the Dell enclosure only has information about "Array device elements" but the tool is trying to parse even after the valid buffer ends. Thanks.

On Mon, Mar 6, 2023 at 9:31 PM doug-gilbert @.***> wrote:

First, could you try this with my latest version at: https://github.com/doug-gilbert/sg3_utils . Note that to build it this sequence is required: ' ./autogen.sh ; ./configure; make '. It can be executed from there with 'src/sg_ses ' or to install it, use: ' make install ' as root. If the problem persists, could you send me the output of 'sg_ses -a -HHHH

md1420.hex' . There is an example in the inhex/ses_areca_all.hex file in the version referenced above. You can find my email address in the sg_ses manpage.

— Reply to this email directly, view it on GitHub https://github.com/hreinecke/sg3_utils/issues/91#issuecomment-1456408424, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZUQKRAXFNWKADGGG36J7TTW2YC6LANCNFSM6AAAAAAVQWKGHI . You are receiving this because you authored the thread.Message ID: @.***>

doug-gilbert commented 1 year ago

The file you attached wasn't hex. To be more precise: 'sg_ses -a -HHHH {expander_device} > md1420.hex ' where the {expander_device} is something like /dev/sg3 in Linux.Perhaps I found the bug but it would be good to test it against the failure case before uploading it. An issue is the "Enclosure services controller electronics" element type which is an "optional" candidate for the Additional Element Status (aes) dpage. In the case of the md1420 it seems that it is not present in the aes dpage and there are no following element types (in the configuration dpage) that are aes candidates.

kollapu commented 1 year ago

Hi, the file that I attached earlier was the file that got generated from the command you gave. There are some hex dumps at the end of that file if that is what you are looking for.

Please let me know if I can provide any further information. Thanks.

lsscsi -g [0:2:0:0] disk SEAGATE ST600MM0069 ST34 /dev/sda /dev/sg0 [0:2:1:0] disk SEAGATE ST600MM0069 ST34 /dev/sdb /dev/sg1 [11:0:0:0] disk ATA SSDSCKKB240G8R DL6R /dev/sdc /dev/sg2 [13:0:0:0] process Marvell Console 1.01 - /dev/sg3 [14:0:641:0] enclosu DELL MD1420 1.07 - /dev/sg5 [14:0:667:0] enclosu DELL MD1420 1.07 - /dev/sg4

./sg_ses -a -HHHH /dev/sg5 > md1420.hex

On Tue, Mar 7, 2023 at 12:05 PM doug-gilbert @.***> wrote:

The file you attached wasn't hex. To be more precise: 'sg_ses -a -HHHH {expander_device} > md1420.hex ' where the {expander_device} is something like /dev/sg3 in Linux.Perhaps I found the bug but it would be good to test it against the failure case before uploading it. An issue is the "Enclosure services controller electronics" element type which is an "optional" candidate for the Additional Element Status (aes) dpage. In the case of the md1420 it seems that it is not present in the aes dpage and there are no following element types (in the configuration dpage) that are aes candidates.

— Reply to this email directly, view it on GitHub https://github.com/hreinecke/sg3_utils/issues/91#issuecomment-1457621913, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZUQKRBJ5AHTRCTPTXUGG23W23JJXANCNFSM6AAAAAAVQWKGHI . You are receiving this because you authored the thread.Message ID: @.***>

-- Regards, Purushotham Kolla

doug-gilbert commented 1 year ago

My bad. That invocation should have been: 'sg_ses --page=all -HHHH {expander_device} > md1420.hex '. So I don't fall down that rabbit hole again, now the option combination '-a -HHHH' and similar variants will give a "contradict" error message and suggest using '--page=all -HHHH' instead. A new version is at my github site (link above) and it also has my proposed fix for this issue. Could you test it? I would still like to get the "real" hex version of md1420.hex which I plan to keep in my private collection for unit testing. IOWs I will not include your md1420.hex in my package's 'inhex' directory. The hex at the end of the previous md1420.hex file was incomplete (e.g. no Element Status dpage) and therefore not parsable.

vishalm50 commented 1 year ago

./sg_ses --page=all -HHHH /dev/sg5 > md1420.hex

Issue is seen with the latest code as well. md1420.zip

doug-gilbert commented 1 year ago

And again ... my theory was correct but my implementation was lacking, pointer issue. Tested with md1420.hex which is now very useful. Work-in-progress patch: added code to call Report timestamp on enclosure; also re-arranging the --help pages but not finished yet. Please tell me how this version goes.

vishalm50 commented 1 year ago

Issue is not seen with the latest code.

md1420_working.zip

doug-gilbert commented 1 year ago

Good. Can this issue be closed now?

vishalm50 commented 1 year ago

Sure, Thanks.