]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.0.1/ses-requesting-a-fault-indication.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.0.1 / ses-requesting-a-fault-indication.patch
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
5
6 From: Douglas Gilbert <dgilbert@interlog.com>
7
8 commit 2a350cab9daf9a46322d83b091bb05cf54ccf6ab upstream.
9
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.
14
15 Changelog:
16 - fix the setting of REQUEST FAULT for the device slot
17 and array device slot elements in the enclosure control
18 diagnostic page
19 - note the potentially defective code that reads the
20 FAULT SENSED and FAULT REQUESTED bits from the enclosure
21 status diagnostic page
22
23 The attached patch is against git/scsi-misc-2.6
24
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>
28
29 ---
30 drivers/scsi/ses.c | 6 +++++-
31 1 file changed, 5 insertions(+), 1 deletion(-)
32
33 --- a/drivers/scsi/ses.c
34 +++ b/drivers/scsi/ses.c
35 @@ -160,6 +160,10 @@ static unsigned char *ses_get_page2_desc
36 return NULL;
37 }
38
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)
45 {
46 @@ -181,7 +185,7 @@ static int ses_set_fault(struct enclosur
47 /* zero is disabled */
48 break;
49 case ENCLOSURE_SETTING_ENABLED:
50 - desc[2] = 0x02;
51 + desc[3] = 0x20;
52 break;
53 default:
54 /* SES doesn't do the SGPIO blink settings */