linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/5] scsi: megaraid_sas - support devices update flag
@ 2010-08-11 20:54 bo yang
  0 siblings, 0 replies; 6+ messages in thread
From: bo yang @ 2010-08-11 20:54 UTC (permalink / raw)
  To: bo.yang, James.Bottomley, James.Bottomley; +Cc: linux-scsi, akpm, linux-kernel

Driver added the Device update flag to tell LSI application driver
will do the device
Update.  LSI MegaRAID SAS application will check this flag to decide
if it is need to
update the Device or not.

Signed-off-by Bo Yang<bo.yang@lsi.com>

---
drivers/scsi/megaraid/megaraid_sas.c |   24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff -rupN old/drivers/scsi/megaraid/megaraid_sas.c
new/drivers/scsi/megaraid/megaraid_sas.c
--- old/drivers/scsi/megaraid/megaraid_sas.c	2010-05-03 03:50:44.000000000 -0400
+++ new/drivers/scsi/megaraid/megaraid_sas.c	2010-05-03 05:46:37.000000000 -0400
@@ -99,6 +99,7 @@ static int megasas_poll_wait_aen;
 static DECLARE_WAIT_QUEUE_HEAD(megasas_poll_wait);
 static u32 support_poll_for_event;
 static u32 megasas_dbg_lvl;
+static u32 support_device_change;

 /* define lock for aen poll */
 spinlock_t poll_aen_lock;
@@ -4660,6 +4661,15 @@ megasas_sysfs_show_support_poll_for_even
 static DRIVER_ATTR(support_poll_for_event, S_IRUGO,
 			megasas_sysfs_show_support_poll_for_event, NULL);

+ static ssize_t
+megasas_sysfs_show_support_device_change(struct device_driver *dd, char *buf)
+{
+	return sprintf(buf, "%u\n", support_device_change);
+}
+
+static DRIVER_ATTR(support_device_change, S_IRUGO,
+			megasas_sysfs_show_support_device_change, NULL);
+
 static ssize_t
 megasas_sysfs_show_dbg_lvl(struct device_driver *dd, char *buf)
 {
@@ -4980,6 +4990,7 @@ static int __init megasas_init(void)
 	       MEGASAS_EXT_VERSION);

 	support_poll_for_event = 2;
+	support_device_change = 1;

 	memset(&megasas_mgmt_info, 0, sizeof(megasas_mgmt_info));

@@ -5028,8 +5039,17 @@ static int __init megasas_init(void)
 	if (rval)
 		goto err_dcf_poll_mode_io;

+	rval = driver_create_file(&megasas_pci_driver.driver,
+				&driver_attr_support_device_change);
+	if (rval)
+		goto err_dcf_support_device_change;
+
 	return rval;

+err_dcf_support_device_change:
+	driver_remove_file(&megasas_pci_driver.driver,
+		  &driver_attr_poll_mode_io);
+
 err_dcf_poll_mode_io:
 	driver_remove_file(&megasas_pci_driver.driver,
 			   &driver_attr_dbg_lvl);
@@ -5060,6 +5080,10 @@ static void __exit megasas_exit(void)
 	driver_remove_file(&megasas_pci_driver.driver,
 			   &driver_attr_dbg_lvl);
 	driver_remove_file(&megasas_pci_driver.driver,
+			&driver_attr_support_poll_for_event);
+	driver_remove_file(&megasas_pci_driver.driver,
+			&driver_attr_support_device_change);
+	driver_remove_file(&megasas_pci_driver.driver,
 			   &driver_attr_release_date);
 	driver_remove_file(&megasas_pci_driver.driver, &driver_attr_version);

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

* [PATCH 2/5] scsi: megaraid_sas - support devices update flag
@ 2010-09-23  2:50 bo yang
  2010-10-07 22:35 ` James Bottomley
  0 siblings, 1 reply; 6+ messages in thread
From: bo yang @ 2010-09-23  2:50 UTC (permalink / raw)
  To: bo.yang, linux-scsi, akpm, linux-kernel, James.Bottomley

Driver added the Device update flag to tell LSI application driver
will do the device Update.  LSI MegaRAID SAS application will check
this flag to decide if it is need to update the Device or not.

Signed-off-by Bo Yang<bo.yang@lsi.com>

---
 drivers/scsi/megaraid/megaraid_sas.c |   24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff -rupN old/drivers/scsi/megaraid/megaraid_sas.c
new/drivers/scsi/megaraid/megaraid_sas.c
--- old/drivers/scsi/megaraid/megaraid_sas.c	2010-09-17 03:00:15.000000000 -0400
+++ new/drivers/scsi/megaraid/megaraid_sas.c	2010-09-17 03:03:22.000000000 -0400
@@ -104,6 +104,7 @@ static int megasas_poll_wait_aen;
 static DECLARE_WAIT_QUEUE_HEAD(megasas_poll_wait);
 static u32 support_poll_for_event;
 static u32 megasas_dbg_lvl;
+static u32 support_device_change;

 /* define lock for aen poll */
 spinlock_t poll_aen_lock;
@@ -4659,6 +4660,15 @@ megasas_sysfs_show_support_poll_for_even
 static DRIVER_ATTR(support_poll_for_event, S_IRUGO,
 			megasas_sysfs_show_support_poll_for_event, NULL);

+ static ssize_t
+megasas_sysfs_show_support_device_change(struct device_driver *dd, char *buf)
+{
+	return sprintf(buf, "%u\n", support_device_change);
+}
+
+static DRIVER_ATTR(support_device_change, S_IRUGO,
+			megasas_sysfs_show_support_device_change, NULL);
+
 static ssize_t
 megasas_sysfs_show_dbg_lvl(struct device_driver *dd, char *buf)
 {
@@ -4979,6 +4989,7 @@ static int __init megasas_init(void)
 	       MEGASAS_EXT_VERSION);

 	support_poll_for_event = 2;
+	support_device_change = 1;

 	memset(&megasas_mgmt_info, 0, sizeof(megasas_mgmt_info));

@@ -5027,8 +5038,17 @@ static int __init megasas_init(void)
 	if (rval)
 		goto err_dcf_poll_mode_io;

+	rval = driver_create_file(&megasas_pci_driver.driver,
+				&driver_attr_support_device_change);
+	if (rval)
+		goto err_dcf_support_device_change;
+
 	return rval;

+err_dcf_support_device_change:
+	driver_remove_file(&megasas_pci_driver.driver,
+		  &driver_attr_poll_mode_io);
+
 err_dcf_poll_mode_io:
 	driver_remove_file(&megasas_pci_driver.driver,
 			   &driver_attr_dbg_lvl);
@@ -5059,6 +5079,10 @@ static void __exit megasas_exit(void)
 	driver_remove_file(&megasas_pci_driver.driver,
 			   &driver_attr_dbg_lvl);
 	driver_remove_file(&megasas_pci_driver.driver,
+			&driver_attr_support_poll_for_event);
+	driver_remove_file(&megasas_pci_driver.driver,
+			&driver_attr_support_device_change);
+	driver_remove_file(&megasas_pci_driver.driver,
 			   &driver_attr_release_date);
 	driver_remove_file(&megasas_pci_driver.driver, &driver_attr_version);

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

* Re: [PATCH 2/5] scsi: megaraid_sas - support devices update flag
  2010-09-23  2:50 [PATCH 2/5] scsi: megaraid_sas - support devices update flag bo yang
@ 2010-10-07 22:35 ` James Bottomley
  2010-10-08 13:47   ` Yang, Bo
  0 siblings, 1 reply; 6+ messages in thread
From: James Bottomley @ 2010-10-07 22:35 UTC (permalink / raw)
  To: bo yang; +Cc: bo.yang, linux-scsi, akpm, linux-kernel

On Wed, 2010-09-22 at 22:50 -0400, bo yang wrote:
> Driver added the Device update flag to tell LSI application driver
> will do the device Update.  LSI MegaRAID SAS application will check
> this flag to decide if it is need to update the Device or not.

Well, the good news is I've got the Online Controller reset update. The
bad news is that this patch now fails to apply: looks like an attachment
problem again:

Applying: megaraid_sas: support devices update flag
fatal: corrupt patch at line 70
Patch failed at 0001 megaraid_sas: support devices update flag

James



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

* RE: [PATCH 2/5] scsi: megaraid_sas - support devices update flag
  2010-10-07 22:35 ` James Bottomley
@ 2010-10-08 13:47   ` Yang, Bo
  2010-10-08 16:02     ` Tomas Henzl
  0 siblings, 1 reply; 6+ messages in thread
From: Yang, Bo @ 2010-10-08 13:47 UTC (permalink / raw)
  To: James Bottomley, bo yang
  Cc: linux-scsi@vger.kernel.org, akpm@osdl.org,
	linux-kernel@vger.kernel.org, Daftardar, Jayant

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1287 bytes --]

James,

Thanks for getting the online controller reset in.  I downloaded patch 2/5 from  http://marc.info/?l=linux-scsi&m=128521127203199&w=2 and I can apply it without errors.

Can you try it again?  otherwise I need to re-attach it.

Thanks,

Bo Yang    

-----Original Message-----
From: James Bottomley [mailto:James.Bottomley@suse.de] 
Sent: Thursday, October 07, 2010 6:36 PM
To: bo yang
Cc: Yang, Bo; linux-scsi@vger.kernel.org; akpm@osdl.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] scsi: megaraid_sas - support devices update flag

On Wed, 2010-09-22 at 22:50 -0400, bo yang wrote:
> Driver added the Device update flag to tell LSI application driver
> will do the device Update.  LSI MegaRAID SAS application will check
> this flag to decide if it is need to update the Device or not.

Well, the good news is I've got the Online Controller reset update. The
bad news is that this patch now fails to apply: looks like an attachment
problem again:

Applying: megaraid_sas: support devices update flag
fatal: corrupt patch at line 70
Patch failed at 0001 megaraid_sas: support devices update flag

James


ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* Re: [PATCH 2/5] scsi: megaraid_sas - support devices update flag
  2010-10-08 13:47   ` Yang, Bo
@ 2010-10-08 16:02     ` Tomas Henzl
  2010-10-11 12:59       ` Yang, Bo
  0 siblings, 1 reply; 6+ messages in thread
From: Tomas Henzl @ 2010-10-08 16:02 UTC (permalink / raw)
  To: Yang, Bo
  Cc: James Bottomley, bo yang, linux-scsi@vger.kernel.org,
	akpm@osdl.org, linux-kernel@vger.kernel.org, Daftardar, Jayant

On 10/08/2010 03:47 PM, Yang, Bo wrote:
> James,
>
> Thanks for getting the online controller reset in.  I downloaded patch 2/5 from  http://marc.info/?l=linux-scsi&m=128521127203199&w=2 and I can apply it without errors.
>
> Can you try it again?  otherwise I need to re-attach it.
>   
I've tried it (http://marc.info/?l=linux-scsi&m=128521127203199&w=2) and it is broken.
If you look at the end of the patche there should be 3 lines of the original code after 
the last + sign.

tomash

Broken:
+	driver_remove_file(&megasas_pci_driver.driver,
 			   &driver_attr_release_date);
 	driver_remove_file(&megasas_pci_driver.driver, &driver_attr_version);
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in

Works for me:
+	driver_remove_file(&megasas_pci_driver.driver,
 			   &driver_attr_release_date);
 	driver_remove_file(&megasas_pci_driver.driver, &driver_attr_version);
 <- this line is missing in your patch
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in



> Thanks,
>
> Bo Yang    
>
> -----Original Message-----
> From: James Bottomley [mailto:James.Bottomley@suse.de] 
> Sent: Thursday, October 07, 2010 6:36 PM
> To: bo yang
> Cc: Yang, Bo; linux-scsi@vger.kernel.org; akpm@osdl.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH 2/5] scsi: megaraid_sas - support devices update flag
>
> On Wed, 2010-09-22 at 22:50 -0400, bo yang wrote:
>   
>> Driver added the Device update flag to tell LSI application driver
>> will do the device Update.  LSI MegaRAID SAS application will check
>> this flag to decide if it is need to update the Device or not.
>>     
> Well, the good news is I've got the Online Controller reset update. The
> bad news is that this patch now fails to apply: looks like an attachment
> problem again:
>
> Applying: megaraid_sas: support devices update flag
> fatal: corrupt patch at line 70
> Patch failed at 0001 megaraid_sas: support devices update flag
>
> James
>
>
> N�����r��y���b�X��ǧv�^�)޺{.n�+����{���"�{ay�\x1dʇڙ�,j\a��f���h���z�\x1e�w���\f���j:+v���w�j�m����\a����zZ+��ݢj"��!tml=


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

* RE: [PATCH 2/5] scsi: megaraid_sas - support devices update flag
  2010-10-08 16:02     ` Tomas Henzl
@ 2010-10-11 12:59       ` Yang, Bo
  0 siblings, 0 replies; 6+ messages in thread
From: Yang, Bo @ 2010-10-11 12:59 UTC (permalink / raw)
  To: Tomas Henzl
  Cc: James Bottomley, bo yang, linux-scsi@vger.kernel.org,
	akpm@osdl.org, linux-kernel@vger.kernel.org, Daftardar, Jayant

[-- Attachment #1: Type: text/plain, Size: 2665 bytes --]

James/Tomas,

I am re-attaching the 2/5 patch.

Thanks,

Bo Yang 

-----Original Message-----
From: Tomas Henzl [mailto:thenzl@redhat.com] 
Sent: Friday, October 08, 2010 12:03 PM
To: Yang, Bo
Cc: James Bottomley; bo yang; linux-scsi@vger.kernel.org; akpm@osdl.org; linux-kernel@vger.kernel.org; Daftardar, Jayant
Subject: Re: [PATCH 2/5] scsi: megaraid_sas - support devices update flag

On 10/08/2010 03:47 PM, Yang, Bo wrote:
> James,
>
> Thanks for getting the online controller reset in.  I downloaded patch 2/5 from  http://marc.info/?l=linux-scsi&m=128521127203199&w=2 and I can apply it without errors.
>
> Can you try it again?  otherwise I need to re-attach it.
>   
I've tried it (http://marc.info/?l=linux-scsi&m=128521127203199&w=2) and it is broken.
If you look at the end of the patche there should be 3 lines of the original code after 
the last + sign.

tomash

Broken:
+	driver_remove_file(&megasas_pci_driver.driver,
 			   &driver_attr_release_date);
 	driver_remove_file(&megasas_pci_driver.driver, &driver_attr_version);
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in

Works for me:
+	driver_remove_file(&megasas_pci_driver.driver,
 			   &driver_attr_release_date);
 	driver_remove_file(&megasas_pci_driver.driver, &driver_attr_version);
 <- this line is missing in your patch
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in



> Thanks,
>
> Bo Yang    
>
> -----Original Message-----
> From: James Bottomley [mailto:James.Bottomley@suse.de] 
> Sent: Thursday, October 07, 2010 6:36 PM
> To: bo yang
> Cc: Yang, Bo; linux-scsi@vger.kernel.org; akpm@osdl.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH 2/5] scsi: megaraid_sas - support devices update flag
>
> On Wed, 2010-09-22 at 22:50 -0400, bo yang wrote:
>   
>> Driver added the Device update flag to tell LSI application driver
>> will do the device Update.  LSI MegaRAID SAS application will check
>> this flag to decide if it is need to update the Device or not.
>>     
> Well, the good news is I've got the Online Controller reset update. The
> bad news is that this patch now fails to apply: looks like an attachment
> problem again:
>
> Applying: megaraid_sas: support devices update flag
> fatal: corrupt patch at line 70
> Patch failed at 0001 megaraid_sas: support devices update flag
>
> James
>
>
> N�����r��y���b�X��ǧv�^�)޺{.n�+����{���"�{ay�\x1dʇڙ�,j\r��f���h���z�\x1e�w���
���j:+v���w�j�m����\r����zZ+��ݢj"��!tml=


[-- Attachment #2: megasas-p2-device.patch --]
[-- Type: application/octet-stream, Size: 2228 bytes --]

diff -rupN old/drivers/scsi/megaraid/megaraid_sas.c new/drivers/scsi/megaraid/megaraid_sas.c
--- old/drivers/scsi/megaraid/megaraid_sas.c	2010-09-17 03:00:15.000000000 -0400
+++ new/drivers/scsi/megaraid/megaraid_sas.c	2010-09-17 03:03:22.000000000 -0400
@@ -104,6 +104,7 @@ static int megasas_poll_wait_aen;
 static DECLARE_WAIT_QUEUE_HEAD(megasas_poll_wait);
 static u32 support_poll_for_event;
 static u32 megasas_dbg_lvl;
+static u32 support_device_change;
 
 /* define lock for aen poll */
 spinlock_t poll_aen_lock;
@@ -4659,6 +4660,15 @@ megasas_sysfs_show_support_poll_for_even
 static DRIVER_ATTR(support_poll_for_event, S_IRUGO,
 			megasas_sysfs_show_support_poll_for_event, NULL);
 
+ static ssize_t
+megasas_sysfs_show_support_device_change(struct device_driver *dd, char *buf)
+{
+	return sprintf(buf, "%u\n", support_device_change);
+}
+
+static DRIVER_ATTR(support_device_change, S_IRUGO,
+			megasas_sysfs_show_support_device_change, NULL);
+
 static ssize_t
 megasas_sysfs_show_dbg_lvl(struct device_driver *dd, char *buf)
 {
@@ -4979,6 +4989,7 @@ static int __init megasas_init(void)
 	       MEGASAS_EXT_VERSION);
 
 	support_poll_for_event = 2;
+	support_device_change = 1;
 
 	memset(&megasas_mgmt_info, 0, sizeof(megasas_mgmt_info));
 
@@ -5027,8 +5038,17 @@ static int __init megasas_init(void)
 	if (rval)
 		goto err_dcf_poll_mode_io;
 
+	rval = driver_create_file(&megasas_pci_driver.driver,
+				&driver_attr_support_device_change);
+	if (rval)
+		goto err_dcf_support_device_change;
+
 	return rval;
 
+err_dcf_support_device_change:
+	driver_remove_file(&megasas_pci_driver.driver,
+		  &driver_attr_poll_mode_io);
+
 err_dcf_poll_mode_io:
 	driver_remove_file(&megasas_pci_driver.driver,
 			   &driver_attr_dbg_lvl);
@@ -5059,6 +5079,10 @@ static void __exit megasas_exit(void)
 	driver_remove_file(&megasas_pci_driver.driver,
 			   &driver_attr_dbg_lvl);
 	driver_remove_file(&megasas_pci_driver.driver,
+			&driver_attr_support_poll_for_event);
+	driver_remove_file(&megasas_pci_driver.driver,
+			&driver_attr_support_device_change);
+	driver_remove_file(&megasas_pci_driver.driver,
 			   &driver_attr_release_date);
 	driver_remove_file(&megasas_pci_driver.driver, &driver_attr_version);
 

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

end of thread, other threads:[~2010-10-11 12:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-23  2:50 [PATCH 2/5] scsi: megaraid_sas - support devices update flag bo yang
2010-10-07 22:35 ` James Bottomley
2010-10-08 13:47   ` Yang, Bo
2010-10-08 16:02     ` Tomas Henzl
2010-10-11 12:59       ` Yang, Bo
  -- strict thread matches above, loose matches on Subject: below --
2010-08-11 20:54 bo yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).