1 From 2a350cab9daf9a46322d83b091bb05cf54ccf6ab Mon Sep 17 00:00:00 2001
2 From: Douglas Gilbert <dgilbert@interlog.com>
3 Date: Thu, 9 Jun 2011 00:27:07 -0400
4 Subject: [SCSI] ses: requesting a fault indication
6 From: Douglas Gilbert <dgilbert@interlog.com>
8 commit 2a350cab9daf9a46322d83b091bb05cf54ccf6ab upstream.
10 Noticed that when the sysfs interface of the SCSI SES
11 driver was used to request a fault indication the LED
12 flashed but the buzzer didn't sound. So it was doing
13 what REQUEST IDENT (locate) should do.
16 - fix the setting of REQUEST FAULT for the device slot
17 and array device slot elements in the enclosure control
19 - note the potentially defective code that reads the
20 FAULT SENSED and FAULT REQUESTED bits from the enclosure
21 status diagnostic page
23 The attached patch is against git/scsi-misc-2.6
25 Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
26 Signed-off-by: James Bottomley <JBottomley@Parallels.com>
27 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
30 drivers/scsi/ses.c | 6 +++++-
31 1 file changed, 5 insertions(+), 1 deletion(-)
33 --- a/drivers/scsi/ses.c
34 +++ b/drivers/scsi/ses.c
35 @@ -160,6 +160,10 @@ static unsigned char *ses_get_page2_desc
39 +/* For device slot and array device slot elements, byte 3 bit 6
40 + * is "fault sensed" while byte 3 bit 5 is "fault reqstd". As this
41 + * code stands these bits are shifted 4 positions right so in
42 + * sysfs they will appear as bits 2 and 1 respectively. Strange. */
43 static void ses_get_fault(struct enclosure_device *edev,
44 struct enclosure_component *ecomp)
46 @@ -181,7 +185,7 @@ static int ses_set_fault(struct enclosur
47 /* zero is disabled */
49 case ENCLOSURE_SETTING_ENABLED:
54 /* SES doesn't do the SGPIO blink settings */