All of lore.kernel.org
 help / color / mirror / Atom feed
* ses enclosure stuff not working with Promise Vtrak J610S JBOD
@ 2009-11-04 13:00 John Hughes
  2009-11-04 15:17 ` John Hughes
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: John Hughes @ 2009-11-04 13:00 UTC (permalink / raw)
  To: linux-scsi

Like Lars Täuber last year I have a Promise Vtrak J610S "just a bunch of 
disks" cabinet, and like him I find that the ses enclosure services 
don't seem to be working right.

If I look in the /sys/class/enclosure hierarchy I don't see the links I 
should for the devices:

# lsscsi | grep PROMISE
[3:0:14:0]   enclosu PROMISE  3U-SAS-16-D BP   0107  -         /dev/sg17
[4:0:14:0]   enclosu PROMISE  3U-SAS-16-D BP   0107  -         /dev/sg32


(Note that's one device with two connections)

# ls -R /sys/class/enclosure/4\:0\:14\:0/
/sys/class/enclosure/4:0:14:0/:
0  10  12  14  2  4  6	8  components  power	  uevent
1  11  13  15  3  5  7	9  device      subsystem

/sys/class/enclosure/4:0:14:0/0:
active	fault  locate  power  status  type  uevent

/sys/class/enclosure/4:0:14:0/0/power:
wakeup

/sys/class/enclosure/4:0:14:0/1:
active	fault  locate  power  status  type  uevent
[...]

No sign of any "device" links in the "bay" directories.

Also the "fault" and "locate" files seem to do nothing, writing to them 
doesn't make any lights flash.

If I try looking from the device side:

# ls /sys/block/sdaa/device
block:sdaa	evt_media_change  modalias     rev		     subsystem
bsg:4:0:11:0	generic		  model        scsi_device:4:0:11:0  timeout
bus		iocounterbits	  power        scsi_disk:4:0:11:0    type
delete		iodone_cnt	  queue_depth  scsi_generic:sg29     uevent
device_blocked	ioerr_cnt	  queue_type   scsi_level	     vendor
driver		iorequest_cnt	  rescan       state

No sign of an enclosure.

I've tried with a Debian  2.6.26-2-xen-amd64 kernel, and a 2.6.31 I 
build myself.

Any clues about what I should to to diagnose this problem?

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ses enclosure stuff not working with Promise Vtrak J610S JBOD
  2009-11-04 13:00 ses enclosure stuff not working with Promise Vtrak J610S JBOD John Hughes
@ 2009-11-04 15:17 ` John Hughes
  2009-11-04 15:22 ` James Bottomley
  2009-11-04 15:51 ` John Hughes
  2 siblings, 0 replies; 16+ messages in thread
From: John Hughes @ 2009-11-04 15:17 UTC (permalink / raw)
  To: John Hughes; +Cc: linux-scsi

John Hughes wrote:
> Like Lars Täuber last year I have a Promise Vtrak J610S "just a bunch 
> of disks" cabinet, and like him I find that the ses enclosure services 
> don't seem to be working right.
The problem may not be related to the Promise box, in the same machine I 
have a built-in enclosure (It's a Dell R710):

[    1.461216] scsi 0:0:32:0: Enclosure         DP       BACKPLANE        1.07 PQ: 0 ANSI: 5
[    1.472957] scsi 0:2:0:0: Direct-Access     DELL     PERC 6/i         1.21 PQ: 0 ANSI: 5
[    1.492211] sd 0:2:0:0: [sda] 285474816 512-byte logical blocks: (146 GB/136 GiB)
[    1.492299] sd 0:2:0:0: [sda] Write Protect is off
[    1.492302] sd 0:2:0:0: [sda] Mode Sense: 1f 00 10 08
[    1.492354] sd 0:2:0:0: [sda] Write cache: disabled, read cache: enabled, supports DPO and FUA
[    1.492564]  sda: sda1 sda2 sda3 sda4
[    1.493167] sd 0:2:0:0: [sda] Attached SCSI disk


But when I look in /sys/class/enclosure/0:0:32:0 I find no devices, and 
in /sys/block/sda/device I see no trace of the enclosure.

This is with 2.6.31.


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ses enclosure stuff not working with Promise Vtrak J610S JBOD
  2009-11-04 13:00 ses enclosure stuff not working with Promise Vtrak J610S JBOD John Hughes
  2009-11-04 15:17 ` John Hughes
@ 2009-11-04 15:22 ` James Bottomley
  2009-11-04 15:53   ` John Hughes
  2009-11-04 15:51 ` John Hughes
  2 siblings, 1 reply; 16+ messages in thread
From: James Bottomley @ 2009-11-04 15:22 UTC (permalink / raw)
  To: John Hughes; +Cc: linux-scsi

On Wed, 2009-11-04 at 14:00 +0100, John Hughes wrote:
> No sign of an enclosure.
> 
> I've tried with a Debian  2.6.26-2-xen-amd64 kernel, and a 2.6.31 I 
> build myself.
> 
> Any clues about what I should to to diagnose this problem?

Tell me what disks you have first.  Currently the matching algorithm
only works with SAS disks because we have no VPD translation for SATA.
Hopefully I'll be getting a SATA device to put in an enclosure at some
point, so I can play with this (at the moment I only have one SATA
device and I'm using it for data storage ...).

James



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ses enclosure stuff not working with Promise Vtrak J610S JBOD
  2009-11-04 13:00 ses enclosure stuff not working with Promise Vtrak J610S JBOD John Hughes
  2009-11-04 15:17 ` John Hughes
  2009-11-04 15:22 ` James Bottomley
@ 2009-11-04 15:51 ` John Hughes
  2009-11-04 16:54   ` John Hughes
  2009-11-04 16:55   ` John Hughes
  2 siblings, 2 replies; 16+ messages in thread
From: John Hughes @ 2009-11-04 15:51 UTC (permalink / raw)
  To: John Hughes; +Cc: linux-scsi

John Hughes wrote:
> Like Lars Täuber last year I have a Promise Vtrak J610S "just a bunch 
> of disks" cabinet, and like him I find that the ses enclosure services 
> don't seem to be working right.

> Also the "fault" and "locate" files seem to do nothing, writing to 
> them doesn't make any lights flash.
Well the "locate" light does work, you just have to first write zero, 
then one.

I.E.

echo 0 > locate
echo 1 > locate

starts the light flashing.

Attempts to change the "status" fail:

# echo "unconfigured" > status
[  626.389093] general protection fault: 0000 [#1] SMP 
[  626.389243] last sysfs file: /sys/class/enclosure/0:0:32:0/0/status
[  626.389310] CPU 0 
[  626.389412] Modules linked in: ipv6 dm_round_robin dm_multipath loop snd_pcsp snd_pcm snd_timer snd soundcore snd_page_alloc psmouse serio_raw shpchp pci_hotplug button processor dcdbas joydev evdev ext3 jbd mbcache dm_mirror dm_region_hash dm_log dm_snapshot dm_mod raid10 raid456 raid6_pq async_xor async_memcpy async_tx xor raid1 raid0 multipath linear md_mod usbhid hid sg sr_mod cdrom ide_pci_generic ide_core ata_generic sd_mod ses enclosure ata_piix libata mptsas mptscsih ehci_hcd mptbase uhci_hcd scsi_transport_sas megaraid_sas scsi_mod bnx2 thermal fan thermal_sys [last unloaded: scsi_wait_scan]
[  626.392419] Pid: 5685, comm: bash Not tainted 2.6.31 #1 PowerEdge R710
[  626.392487] RIP: 0010:[<ffffffffa00ff563>]  [<ffffffffa00ff563>] set_component_status+0x31/0xa5 [enclosure]
[  626.392621] RSP: 0018:ffff88063bdf9e78  EFLAGS: 00010286
[  626.392687] RAX: 0000000000000000 RBX: 000000000000000c RCX: ffffffffffffffff
[  626.392755] RDX: 0000000000000009 RSI: 000a7325000a6425 RDI: 000a7325000a6425
[  626.392824] RBP: ffffffffa00ff980 R08: ffff88063c4cc263 R09: ffff88063fc0b600
[  626.392893] R10: 00000000002e85af R11: ffffffffa00ff532 R12: 0000000000000008
[  626.392962] R13: ffff88063b80d000 R14: ffff88063c461980 R15: ffff88063c461818
[  626.393031] FS:  00007f6f2de856e0(0000) GS:ffffc90000000000(0000) knlGS:0000000000000000
[  626.393115] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  626.393182] CR2: 0000000000d19588 CR3: 000000063682b000 CR4: 00000000000006f0
[  626.393251] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  626.393319] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[  626.393388] Process bash (pid: 5685, threadinfo ffff88063bdf8000, task ffff88063bd34480)
[  626.393472] Stack:
[  626.393531]  0000000000000000 ffff88063c8a29c0 000000000000000d 000000000000000d
[  626.393726] <0> ffff88063d4b19c0 ffff88063c4cc190 00000000ffffffed ffff88063c461990
[  626.394018] <0> ffffffff81413600 ffffffff81121414 0000000000000202 ffff88063bdf9f50
[  626.394365] Call Trace:
[  626.394430]  [<ffffffff81121414>] ? sysfs_write_file+0xd0/0x107
[  626.394501]  [<ffffffff810d387f>] ? vfs_write+0xad/0x169
[  626.394567]  [<ffffffff810d39f7>] ? sys_write+0x45/0x6e
[  626.394635]  [<ffffffff8100ba02>] ? system_call_fastpath+0x16/0x1b
[  626.394701] Code: fe 41 55 49 89 d5 41 54 45 31 e4 55 48 c7 c5 40 f9 0f a0 53 48 83 ec 18 48 89 4c 24 10 4c 8b 3f eb 35 48 89 f7 31 c0 48 83 c9 ff <f2> ae 4c 89 ef 48 89 cb 48 f7 d3 48 8d 53 ff e8 c2 fa 06 e1 85 
[  626.397521] RIP  [<ffffffffa00ff563>] set_component_status+0x31/0xa5 [enclosure]
[  626.397648]  RSP <ffff88063bdf9e78>
[  626.397760] ---[ end trace a4c1b502958318fc ]---


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ses enclosure stuff not working with Promise Vtrak J610S JBOD
  2009-11-04 15:22 ` James Bottomley
@ 2009-11-04 15:53   ` John Hughes
  2009-11-04 16:07     ` James Bottomley
  0 siblings, 1 reply; 16+ messages in thread
From: John Hughes @ 2009-11-04 15:53 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi

James Bottomley wrote:
> On Wed, 2009-11-04 at 14:00 +0100, John Hughes wrote:
>   
>> No sign of an enclosure.
>>
>> I've tried with a Debian  2.6.26-2-xen-amd64 kernel, and a 2.6.31 I 
>> build myself.
>>
>> Any clues about what I should to to diagnose this problem?
>>     
>
> Tell me what disks you have first.  Currently the matching algorithm
> only works with SAS disks because we have no VPD translation for SATA.
> Hopefully I'll be getting a SATA device to put in an enclosure at some
> point, so I can play with this (at the moment I only have one SATA
> device and I'm using it for data storage ...).
>
> James
>
>
>   
All but one are SAS.

# lsscsi
[0:0:32:0]   enclosu DP       BACKPLANE        1.07  -       
[0:2:0:0]    disk    DELL     PERC 6/i         1.21  /dev/sda
[1:0:0:0]    cd/dvd  TEAC     DVD-ROM DV28SV   D.0J  /dev/sr0
[3:0:0:0]    disk    SEAGATE  ST373455SS       S528  /dev/sdb
[3:0:1:0]    disk    SEAGATE  ST373455SS       S528  /dev/sdc
[3:0:2:0]    disk    SEAGATE  ST373455SS       S528  /dev/sdd
[3:0:3:0]    disk    SEAGATE  ST373455SS       S528  /dev/sde
[3:0:4:0]    disk    ATA      ST3808110AS      J     /dev/sdf
[3:0:5:0]    disk    SEAGATE  ST373455SS       S528  /dev/sdg
[3:0:6:0]    disk    SEAGATE  ST373455SS       S528  /dev/sdh
[3:0:7:0]    disk    SEAGATE  ST373455SS       S528  /dev/sdi
[3:0:8:0]    disk    SEAGATE  ST373455SS       S528  /dev/sdj
[3:0:9:0]    disk    SEAGATE  ST373455SS       S528  /dev/sdk
[3:0:10:0]   disk    SEAGATE  ST373455SS       S528  /dev/sdl
[3:0:11:0]   disk    SEAGATE  ST373455SS       S528  /dev/sdm
[3:0:12:0]   disk    SEAGATE  ST373455SS       S528  /dev/sdn
[3:0:13:0]   disk    SEAGATE  ST373455SS       S528  /dev/sdo
[3:0:14:0]   enclosu PROMISE  3U-SAS-16-D BP   0107  -       
[4:0:0:0]    disk    SEAGATE  ST373455SS       S528  /dev/sdp
[4:0:1:0]    disk    SEAGATE  ST373455SS       S528  /dev/sdq
[4:0:2:0]    disk    SEAGATE  ST373455SS       S528  /dev/sdr
[4:0:3:0]    disk    SEAGATE  ST373455SS       S528  /dev/sds
[4:0:4:0]    disk    ATA      ST3808110AS      J     /dev/sdt
[4:0:5:0]    disk    SEAGATE  ST373455SS       S528  /dev/sdu
[4:0:6:0]    disk    SEAGATE  ST373455SS       S528  /dev/sdv
[4:0:7:0]    disk    SEAGATE  ST373455SS       S528  /dev/sdw
[4:0:8:0]    disk    SEAGATE  ST373455SS       S528  /dev/sdx
[4:0:9:0]    disk    SEAGATE  ST373455SS       S528  /dev/sdy
[4:0:10:0]   disk    SEAGATE  ST373455SS       S528  /dev/sdz
[4:0:11:0]   disk    SEAGATE  ST373455SS       S528  /dev/sdaa
[4:0:12:0]   disk    SEAGATE  ST373455SS       S528  /dev/sdab
[4:0:13:0]   disk    SEAGATE  ST373455SS       S528  /dev/sdac
[4:0:14:0]   enclosu PROMISE  3U-SAS-16-D BP   0107  -       



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ses enclosure stuff not working with Promise Vtrak J610S JBOD
  2009-11-04 15:53   ` John Hughes
@ 2009-11-04 16:07     ` James Bottomley
  2009-11-04 16:12       ` John Hughes
  0 siblings, 1 reply; 16+ messages in thread
From: James Bottomley @ 2009-11-04 16:07 UTC (permalink / raw)
  To: John Hughes; +Cc: linux-scsi

On Wed, 2009-11-04 at 16:53 +0100, John Hughes wrote:
> James Bottomley wrote:
> > On Wed, 2009-11-04 at 14:00 +0100, John Hughes wrote:
> >   
> >> No sign of an enclosure.
> >>
> >> I've tried with a Debian  2.6.26-2-xen-amd64 kernel, and a 2.6.31 I 
> >> build myself.
> >>
> >> Any clues about what I should to to diagnose this problem?
> >>     
> >
> > Tell me what disks you have first.  Currently the matching algorithm
> > only works with SAS disks because we have no VPD translation for SATA.
> > Hopefully I'll be getting a SATA device to put in an enclosure at some
> > point, so I can play with this (at the moment I only have one SATA
> > device and I'm using it for data storage ...).
> >
> > James
> >
> >
> >   
> All but one are SAS.
> 
> # lsscsi
> [0:0:32:0]   enclosu DP       BACKPLANE        1.07  -       
> [0:2:0:0]    disk    DELL     PERC 6/i         1.21  /dev/sda

OK, so this one is a RAID emulation device and likely won't work, but
the rest (apart from the ATA one) should.

Could you tell me what the enclosure page 0 (supported diagnostic pages)
and page 10 (additional information page that allows us to do the
matching) say?  I suspect the enclosure either doesn't support the page
needed for the matching or there's some problem with the way the
information is encoded.

To get this information, you'll need to run sg_ses on the sg device for
the enclosure (the two promise ones).

Thanks,

James



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ses enclosure stuff not working with Promise Vtrak J610S JBOD
  2009-11-04 16:07     ` James Bottomley
@ 2009-11-04 16:12       ` John Hughes
  2009-11-04 16:20         ` James Bottomley
  0 siblings, 1 reply; 16+ messages in thread
From: John Hughes @ 2009-11-04 16:12 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi

James Bottomley wrote:
> Could you tell me what the enclosure page 0 (supported diagnostic pages)
> and page 10 (additional information page that allows us to do the
> matching) say?  I suspect the enclosure either doesn't support the page
> needed for the matching or there's some problem with the way the
> information is encoded.
>   
Ok, here we go.   (I wonder whether the "<<<additional: response too 
short>>>" at the end of page 10 has something to do with the problem).

# sg_ses -p 0 /dev/sg17
  PROMISE   3U-SAS-16-D BP    0107
    enclosure services device
Supported diagnostic pages:
  Supported diagnostic pages [0x0]
  Configuration (SES) [0x1]
  Enclosure status/control (SES) [0x2]
  Threshold In/Out (SES) [0x5]
  Enclosure busy (SES-2) [0x9]
  Additional (device) element status (SES-2) [0xa]

# sg_ses -p 10 /dev/sg17
  PROMISE   3U-SAS-16-D BP    0107
    enclosure services device
Additional (device) element status diagnostic page:
  generation code: 0x0
  Element type: Array device, subenclosure id: 0
    element index: 0 [0x0]
    Transport protocol: SAS
    number of phys: 1, not all phys: 1, bay number: 1
    phy index: 0
      device type: end device
      initiator port for:
      target port for: SSP
      attached SAS address: 0x5000155359a7723f
      SAS address: 0x5000c50012b081fd
      phy identifier: 0x0
    element index: 1 [0x1]
    Transport protocol: SAS
    number of phys: 1, not all phys: 1, bay number: 2
    phy index: 0
      device type: end device
      initiator port for:
      target port for: SSP
      attached SAS address: 0x5000155359a7723f
      SAS address: 0x5000c50012b07c69
      phy identifier: 0x0
    element index: 2 [0x2]
    Transport protocol: SAS
    number of phys: 1, not all phys: 1, bay number: 3
    phy index: 0
      device type: end device
      initiator port for:
      target port for: SSP
      attached SAS address: 0x5000155359a7723f
      SAS address: 0x5000c50012af7b95
      phy identifier: 0x0
    element index: 3 [0x3]
    Transport protocol: SAS
    number of phys: 1, not all phys: 1, bay number: 4
    phy index: 0
      device type: end device
      initiator port for:
      target port for: SSP
      attached SAS address: 0x5000155359a7723f
      SAS address: 0x5000c50012ac04dd
      phy identifier: 0x0
    element index: 4 [0x4]
    Transport protocol: SAS
    number of phys: 1, not all phys: 1, bay number: 5
    phy index: 0
      device type: no device attached
      initiator port for:
      target port for: SATA_device
      attached SAS address: 0x5000155359a7723f
      SAS address: 0x5000155359a77204
      phy identifier: 0x0
    element index: 5 [0x5]
    Transport protocol: SAS
    number of phys: 1, not all phys: 1, bay number: 6
    phy index: 0
      device type: end device
      initiator port for:
      target port for: SSP
      attached SAS address: 0x5000155359a7723f
      SAS address: 0x5000c50012b020a9
      phy identifier: 0x0
    element index: 6 [0x6]
    Transport protocol: SAS
    number of phys: 1, not all phys: 1, bay number: 7
    phy index: 0
      device type: end device
      initiator port for:
      target port for: SSP
      attached SAS address: 0x5000155359a7723f
      SAS address: 0x5000c50012b069c1
      phy identifier: 0x0
    element index: 7 [0x7]
    Transport protocol: SAS
    number of phys: 1, not all phys: 1, bay number: 8
    phy index: 0
      device type: end device
      initiator port for:
      target port for: SSP
      attached SAS address: 0x5000155359a7723f
      SAS address: 0x5000c50012b0658d
      phy identifier: 0x0
    element index: 8 [0x8]
      flagged as invalid (no further information)
    element index: 9 [0x9]
    Transport protocol: SAS
    number of phys: 1, not all phys: 1, bay number: 10
    phy index: 0
      device type: end device
      initiator port for:
      target port for: SSP
      attached SAS address: 0x5000155359a7723f
      SAS address: 0x5000c50012b05a69
      phy identifier: 0x0
    element index: 10 [0xa]
    Transport protocol: SAS
    number of phys: 1, not all phys: 1, bay number: 11
    phy index: 0
      device type: end device
      initiator port for:
      target port for: SSP
      attached SAS address: 0x5000155359a7723f
      SAS address: 0x5000c50012b071e5
      phy identifier: 0x0
    element index: 11 [0xb]
    Transport protocol: SAS
    number of phys: 1, not all phys: 1, bay number: 12
    phy index: 0
      device type: end device
      initiator port for:
      target port for: SSP
      attached SAS address: 0x5000155359a7723f
      SAS address: 0x5000c50012b0815d
      phy identifier: 0x0
    element index: 12 [0xc]
      flagged as invalid (no further information)
    element index: 13 [0xd]
    Transport protocol: SAS
    number of phys: 1, not all phys: 1, bay number: 14
    phy index: 0
      device type: end device
      initiator port for:
      target port for: SSP
      attached SAS address: 0x5000155359a7723f
      SAS address: 0x5000c50012a76085
      phy identifier: 0x0
    element index: 14 [0xe]
    Transport protocol: SAS
    number of phys: 1, not all phys: 1, bay number: 15
    phy index: 0
      device type: end device
      initiator port for:
      target port for: SSP
      attached SAS address: 0x5000155359a7723f
      SAS address: 0x5000c50012b07459
      phy identifier: 0x0
    element index: 15 [0xf]
    Transport protocol: SAS
    number of phys: 1, not all phys: 1, bay number: 16
    phy index: 0
      device type: end device
      initiator port for:
      target port for: SSP
      attached SAS address: 0x5000155359a7723f
      SAS address: 0x5000c50012a82989
      phy identifier: 0x0
  Element type: Enclosure services controller electronics, subenclosure id: 0
    element index: 38 [0x26]
    Transport protocol: SAS
    number of phys: 24
    phy index: 0
      phy identifier: 0x50
      connector element index: 21, other element index: 83
      SAS address: 0x59a7723f28002a01
    phy index: 1
      phy identifier: 0x2c
      connector element index: 46, other element index: 3
      SAS address: 0x3004320534063607
    phy index: 2
      phy identifier: 0x38
      connector element index: 58, other element index: 9
      SAS address: 0x3c0a3e0b400c420d
    phy index: 3
      phy identifier: 0x44
      connector element index: 70, other element index: 15
      SAS address: 0x48ff49ff4aff4bff
    phy index: 4
      phy identifier: 0x4c
      connector element index: 77
      SAS address: 0x4eff4fff163e0027
    phy index: 5
      phy identifier: 0x18
      connector element index: 0, other element index: 0
      SAS address: 0x5000155359a7733f
    phy index: 6
      phy identifier: 0x29
      connector element index: 43, other element index: 1
      SAS address: 0x2d022f0331043305
    phy index: 7
      phy identifier: 0x35
      connector element index: 55, other element index: 7
      SAS address: 0x39083b093d0a3f0b
    phy index: 8
      phy identifier: 0x41
      connector element index: 67, other element index: 13
      SAS address: 0x450e470f50ff51ff
    phy index: 9
      phy identifier: 0x52
      connector element index: 83
      SAS address: 0x54ff55ff56ff57ff
    phy index: 10
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 11
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 12
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 13
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 14
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 15
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 16
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 17
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 18
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 19
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 20
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 21
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 22
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 23
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    element index: 39 [0x27]
    Transport protocol: SAS
    number of phys: 24
    phy index: 0
      phy identifier: 0x50
      connector element index: 21, other element index: 83
      SAS address: 0x59a7733f29002b01
    phy index: 1
      phy identifier: 0x2d
      connector element index: 47, other element index: 3
      SAS address: 0x3104330535063707
    phy index: 2
      phy identifier: 0x39
      connector element index: 59, other element index: 9
      SAS address: 0x3d0a3f0b410c430d
    phy index: 3
      phy identifier: 0x45
      connector element index: 71, other element index: 15
      SAS address: 0x50ff51ff52ff53ff
    phy index: 4
      phy identifier: 0x54
      connector element index: 85
      SAS address: 0x56ff57ff00000000
    phy index: 5
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 6
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 7
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 8
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 9
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 10
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 11
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 12
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 13
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 14
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 15
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 16
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 17
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 18
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 19
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 20
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 21
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 22
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    phy index: 23
      phy identifier: 0x0
      connector element index: 0, other element index: 0
      SAS address: 0x0000000000000000
    <<<additional: response too short>>>





^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ses enclosure stuff not working with Promise Vtrak J610S JBOD
  2009-11-04 16:12       ` John Hughes
@ 2009-11-04 16:20         ` James Bottomley
  2009-11-04 18:01           ` John Hughes
  0 siblings, 1 reply; 16+ messages in thread
From: James Bottomley @ 2009-11-04 16:20 UTC (permalink / raw)
  To: John Hughes; +Cc: linux-scsi

On Wed, 2009-11-04 at 17:12 +0100, John Hughes wrote:
> James Bottomley wrote:
> > Could you tell me what the enclosure page 0 (supported diagnostic pages)
> > and page 10 (additional information page that allows us to do the
> > matching) say?  I suspect the enclosure either doesn't support the page
> > needed for the matching or there's some problem with the way the
> > information is encoded.
> >   
> Ok, here we go.   (I wonder whether the "<<<additional: response too 
> short>>>" at the end of page 10 has something to do with the problem).

Possibly ... that tends to indicate the enclosure data returned stopped
in the middle of the actual specification ... although looking at the
output this doesn't seem to be the case.  The zeros at the end
definitely indicate we have enough data, just that the expected
termination doesn't seem to be present.

> # sg_ses -p 0 /dev/sg17
>   PROMISE   3U-SAS-16-D BP    0107
>     enclosure services device
> Supported diagnostic pages:
>   Supported diagnostic pages [0x0]
>   Configuration (SES) [0x1]
>   Enclosure status/control (SES) [0x2]
>   Threshold In/Out (SES) [0x5]
>   Enclosure busy (SES-2) [0x9]
>   Additional (device) element status (SES-2) [0xa]

This may also be a problem.  My enclosure returns page 7 as well.  The
traversal routine has special code to try to parse page 10 without a
page 7 ... I don't think I actually ever tested that ...

James



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ses enclosure stuff not working with Promise Vtrak J610S JBOD
  2009-11-04 15:51 ` John Hughes
@ 2009-11-04 16:54   ` John Hughes
  2009-11-04 16:55   ` John Hughes
  1 sibling, 0 replies; 16+ messages in thread
From: John Hughes @ 2009-11-04 16:54 UTC (permalink / raw)
  To: John Hughes; +Cc: linux-scsi

John Hughes wrote:
> Well the "locate" light does work, you just have to first write zero, 
> then one.
>
> I.E.
>
> echo 0 > locate
> echo 1 > locate
>
> starts the light flashing.
This appears to be a problem with the Promise firmware; once a zero has 
been written to "locate" then it works as expected until the next time 
the promise is power-cycled.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ses enclosure stuff not working with Promise Vtrak J610S JBOD
  2009-11-04 15:51 ` John Hughes
  2009-11-04 16:54   ` John Hughes
@ 2009-11-04 16:55   ` John Hughes
  1 sibling, 0 replies; 16+ messages in thread
From: John Hughes @ 2009-11-04 16:55 UTC (permalink / raw)
  To: John Hughes; +Cc: linux-scsi

John Hughes wrote:
> Attempts to change the "status" fail:
>
> # echo "unconfigured" > status
> [  626.389093] general protection fault: 0000 [#1] SMP [  626.389243] 
> last sysfs file: /sys/class/enclosure/0:0:32:0/0/status
This bug still exists in 2.6.32-rc6.

It's pretty crazy - if we use a legal value then the routine correctly 
returns -EINVAL as there is no setter.

If we write an illegal value to status we get an oops!

Aha!  It's because the enclosure_status array is not NULL terminated, so 
if we try to write an illegal value we run off the end of the array!




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ses enclosure stuff not working with Promise Vtrak J610S JBOD
  2009-11-04 16:20         ` James Bottomley
@ 2009-11-04 18:01           ` John Hughes
  2009-11-04 18:05             ` James Bottomley
  2009-11-05  9:41             ` John Hughes
  0 siblings, 2 replies; 16+ messages in thread
From: John Hughes @ 2009-11-04 18:01 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi

James Bottomley wrote:
> On Wed, 2009-11-04 at 17:12 +0100, John Hughes wrote:
>   
>> # sg_ses -p 0 /dev/sg17
>>   PROMISE   3U-SAS-16-D BP    0107
>>     enclosure services device
>> Supported diagnostic pages:
>>   Supported diagnostic pages [0x0]
>>   Configuration (SES) [0x1]
>>   Enclosure status/control (SES) [0x2]
>>   Threshold In/Out (SES) [0x5]
>>   Enclosure busy (SES-2) [0x9]
>>   Additional (device) element status (SES-2) [0xa]
>>     
>
> This may also be a problem.  My enclosure returns page 7 as well.  The
> traversal routine has special code to try to parse page 10 without a
> page 7 ... I don't think I actually ever tested that ...
>   
As far as I can tell you only use page 7 to get the slot names, but you 
ignore the "addl_desc_ptr" information in page10 if you didn't get page7.

With the following patch I get the "device" directories in the enclosure 
bay directories, even for the SATA drive.  (Maybe this is because the 
SATA drive is behind a so-called "aamux" device).

I also find the "enclosure_device:xxx" link in the 
/sys/block/sdxx/device directory

# ls -l /sys/block/sdaa/device/enclosure_device:13
lrwxrwxrwx 1 root root 0 2009-11-04 18:57 /sys/block/sdaa/device/enclosure_device:13 -> ../../../../../../../../../../../../class/enclosure/4:0:14:0/13

Yay!

diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
index 55b034b..725a095 100644
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -389,9 +389,9 @@ static void ses_enclosure_data_process(struct enclosure_devi
                len = (desc_ptr[2] << 8) + desc_ptr[3];
                /* skip past overall descriptor */
                desc_ptr += len + 4;
-               if (ses_dev->page10)
-                       addl_desc_ptr = ses_dev->page10 + 8;
        }
+       if (ses_dev->page10)
+               addl_desc_ptr = ses_dev->page10 + 8;
        type_ptr = ses_dev->page1 + 12 + ses_dev->page1[11];
        components = 0;
        for (i = 0; i < types; i++, type_ptr += 4) {



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: ses enclosure stuff not working with Promise Vtrak J610S JBOD
  2009-11-04 18:01           ` John Hughes
@ 2009-11-04 18:05             ` James Bottomley
  2009-11-04 18:10               ` John Hughes
  2009-11-05  9:41             ` John Hughes
  1 sibling, 1 reply; 16+ messages in thread
From: James Bottomley @ 2009-11-04 18:05 UTC (permalink / raw)
  To: John Hughes; +Cc: linux-scsi

On Wed, 2009-11-04 at 19:01 +0100, John Hughes wrote:
> James Bottomley wrote:
> > On Wed, 2009-11-04 at 17:12 +0100, John Hughes wrote:
> >   
> >> # sg_ses -p 0 /dev/sg17
> >>   PROMISE   3U-SAS-16-D BP    0107
> >>     enclosure services device
> >> Supported diagnostic pages:
> >>   Supported diagnostic pages [0x0]
> >>   Configuration (SES) [0x1]
> >>   Enclosure status/control (SES) [0x2]
> >>   Threshold In/Out (SES) [0x5]
> >>   Enclosure busy (SES-2) [0x9]
> >>   Additional (device) element status (SES-2) [0xa]
> >>     
> >
> > This may also be a problem.  My enclosure returns page 7 as well.  The
> > traversal routine has special code to try to parse page 10 without a
> > page 7 ... I don't think I actually ever tested that ...
> >   
> As far as I can tell you only use page 7 to get the slot names, but you 
> ignore the "addl_desc_ptr" information in page10 if you didn't get page7.
> 
> With the following patch I get the "device" directories in the enclosure 
> bay directories, even for the SATA drive.  (Maybe this is because the 
> SATA drive is behind a so-called "aamux" device).
> 
> I also find the "enclosure_device:xxx" link in the 
> /sys/block/sdxx/device directory
> 
> # ls -l /sys/block/sdaa/device/enclosure_device:13
> lrwxrwxrwx 1 root root 0 2009-11-04 18:57 /sys/block/sdaa/device/enclosure_device:13 -> ../../../../../../../../../../../../class/enclosure/4:0:14:0/13
> 
> Yay!
> 
> diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
> index 55b034b..725a095 100644
> --- a/drivers/scsi/ses.c
> +++ b/drivers/scsi/ses.c
> @@ -389,9 +389,9 @@ static void ses_enclosure_data_process(struct enclosure_devi
>                 len = (desc_ptr[2] << 8) + desc_ptr[3];
>                 /* skip past overall descriptor */
>                 desc_ptr += len + 4;
> -               if (ses_dev->page10)
> -                       addl_desc_ptr = ses_dev->page10 + 8;
>         }
> +       if (ses_dev->page10)
> +               addl_desc_ptr = ses_dev->page10 + 8;

Ah, yes ... knew I'd done something stupid.

Could you format this properly (as in with description) and add a signed
off by line and I'll put it in the bug fixes tree.

Thanks,

James



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ses enclosure stuff not working with Promise Vtrak J610S JBOD
  2009-11-04 18:05             ` James Bottomley
@ 2009-11-04 18:10               ` John Hughes
  0 siblings, 0 replies; 16+ messages in thread
From: John Hughes @ 2009-11-04 18:10 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi

James Bottomley wrote:
> On Wed, 2009-11-04 at 19:01 +0100, John Hughes wrote:
>   
>>
>> diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
>> index 55b034b..725a095 100644
>> --- a/drivers/scsi/ses.c
>> +++ b/drivers/scsi/ses.c
>> @@ -389,9 +389,9 @@ static void ses_enclosure_data_process(struct enclosure_devi
>>                 len = (desc_ptr[2] << 8) + desc_ptr[3];
>>                 /* skip past overall descriptor */
>>                 desc_ptr += len + 4;
>> -               if (ses_dev->page10)
>> -                       addl_desc_ptr = ses_dev->page10 + 8;
>>         }
>> +       if (ses_dev->page10)
>> +               addl_desc_ptr = ses_dev->page10 + 8;
>>     
>
> Ah, yes ... knew I'd done something stupid.
>
> Could you format this properly (as in with description) and add a signed
> off by line and I'll put it in the bug fixes tree.
>   
I'll do that tomorrow, off home to play some fallout3 now.

(Well, and feed the kids).

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ses enclosure stuff not working with Promise Vtrak J610S JBOD
  2009-11-04 18:01           ` John Hughes
  2009-11-04 18:05             ` James Bottomley
@ 2009-11-05  9:41             ` John Hughes
  2009-11-05 15:30               ` John Hughes
  1 sibling, 1 reply; 16+ messages in thread
From: John Hughes @ 2009-11-05  9:41 UTC (permalink / raw)
  To: John Hughes; +Cc: James Bottomley, linux-scsi

John Hughes wrote:
> With the following patch I get the "device" directories in the 
> enclosure bay directories, even for the SATA drive.  (Maybe this is 
> because the SATA drive is behind a so-called "aamux" device).
>
> I also find the "enclosure_device:xxx" link in the 
> /sys/block/sdxx/device directory
One problem with the patch is that, since I don't have a page 7 (bay 
names) it's using the "enclosure component index" as the name, and that 
(at least for me) seems to be an index starting from zero, where my bays 
are numbered from one.

sg_ses shows a "bay number", I think I'll try to make the patch look for 
the bay number and make the name something like "bay-nn" if there is a 
bay number.


# sg_ses -p 10 /dev/sg32
 PROMISE   3U-SAS-16-D BP    0107
    enclosure services device
Additional (device) element status diagnostic page:
  generation code: 0x0
  Element type: Array device, subenclosure id: 0
    element index: 0 [0x0]
    Transport protocol: SAS
    number of phys: 1, not all phys: 1, bay number: 1
[...]



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ses enclosure stuff not working with Promise Vtrak J610S JBOD
  2009-11-05  9:41             ` John Hughes
@ 2009-11-05 15:30               ` John Hughes
  2009-11-05 15:44                 ` James Bottomley
  0 siblings, 1 reply; 16+ messages in thread
From: John Hughes @ 2009-11-05 15:30 UTC (permalink / raw)
  To: John Hughes; +Cc: James Bottomley, linux-scsi

John Hughes wrote:
> One problem with the patch is that, since I don't have a page 7 (bay 
> names) it's using the "enclosure component index" as the name, and 
> that (at least for me) seems to be an index starting from zero, where 
> my bays are numbered from one.
>
> sg_ses shows a "bay number", I think I'll try to make the patch look 
> for the bay number and make the name something like "bay-nn" if there 
> is a bay number.
Doesn't work because bays without a device don't show a bay number and 
hot-plugging a device doesn't make things change dynamically.

Buggeration.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ses enclosure stuff not working with Promise Vtrak J610S JBOD
  2009-11-05 15:30               ` John Hughes
@ 2009-11-05 15:44                 ` James Bottomley
  0 siblings, 0 replies; 16+ messages in thread
From: James Bottomley @ 2009-11-05 15:44 UTC (permalink / raw)
  To: John Hughes; +Cc: linux-scsi

On Thu, 2009-11-05 at 16:30 +0100, John Hughes wrote:
> John Hughes wrote:
> > One problem with the patch is that, since I don't have a page 7 (bay 
> > names) it's using the "enclosure component index" as the name, and 
> > that (at least for me) seems to be an index starting from zero, where 
> > my bays are numbered from one.
> >
> > sg_ses shows a "bay number", I think I'll try to make the patch look 
> > for the bay number and make the name something like "bay-nn" if there 
> > is a bay number.
> Doesn't work because bays without a device don't show a bay number and 
> hot-plugging a device doesn't make things change dynamically.

Let me dig around in the standards.  My instinct from the implementation
notes was that page 7 was more likely to be present than page 10, so
that's how I coded it.  There may still be a way to get the slot number
in a persistent fashion without the actual page telling you this.

> Buggeration.

Welcome to the wonderful world of SCSI standards implementation.

James



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-11-05 15:44 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-04 13:00 ses enclosure stuff not working with Promise Vtrak J610S JBOD John Hughes
2009-11-04 15:17 ` John Hughes
2009-11-04 15:22 ` James Bottomley
2009-11-04 15:53   ` John Hughes
2009-11-04 16:07     ` James Bottomley
2009-11-04 16:12       ` John Hughes
2009-11-04 16:20         ` James Bottomley
2009-11-04 18:01           ` John Hughes
2009-11-04 18:05             ` James Bottomley
2009-11-04 18:10               ` John Hughes
2009-11-05  9:41             ` John Hughes
2009-11-05 15:30               ` John Hughes
2009-11-05 15:44                 ` James Bottomley
2009-11-04 15:51 ` John Hughes
2009-11-04 16:54   ` John Hughes
2009-11-04 16:55   ` John Hughes

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.