Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755928Ab0KSR3t (ORCPT ); Fri, 19 Nov 2010 12:29:49 -0500 Received: from na3sys009aog109.obsmtp.com ([74.125.149.201]:59906 "EHLO na3sys009aog109.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755832Ab0KSR3s (ORCPT ); Fri, 19 Nov 2010 12:29:48 -0500 From: "Yang, Bo" To: "Yang, Bo" , "'James.Bottomley@HansenPartnership.com'" , "'James.Bottomley@suse.de'" CC: "'linux-scsi@vger.kernel.org'" , "'akpm@osdl.org'" , "'linux-kernel@vger.kernel.org'" , Tomas Henzl Date: Fri, 19 Nov 2010 10:29:58 -0700 Subject: [PATCH 6/9] scsi: megaraid_sas - Add the online reset to iMR chip Thread-Topic: [PATCH 6/9] scsi: megaraid_sas - Add the online reset to iMR chip Thread-Index: AcsIRXwfwbieNXNUR6GBvdSy0cxVCQskSL/AFMvf1xAAAOfyYAAAMuKQAABVOuAAAICF8AAALm3A Message-ID: <4B6A08C587958942AA3002690DD4F8C30106A96218@cosmail02.lsi.com> References: <4B6A08C587958942AA3002690DD4F8C3D0804533@cosmail02.lsi.com> <4B6A08C587958942AA3002690DD4F8C3DBD67F68@cosmail02.lsi.com> <4B6A08C587958942AA3002690DD4F8C30106A961BD@cosmail02.lsi.com> <4B6A08C587958942AA3002690DD4F8C30106A961D6@cosmail02.lsi.com> <4B6A08C587958942AA3002690DD4F8C30106A961E4@cosmail02.lsi.com> <4B6A08C587958942AA3002690DD4F8C30106A961F2@cosmail02.lsi.com> <4B6A08C587958942AA3002690DD4F8C30106A96213@cosmail02.lsi.com> In-Reply-To: <4B6A08C587958942AA3002690DD4F8C30106A96213@cosmail02.lsi.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/mixed; boundary="_002_4B6A08C587958942AA3002690DD4F8C30106A96218cosmail02lsic_" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 9462 Lines: 138 --_002_4B6A08C587958942AA3002690DD4F8C30106A96218cosmail02lsic_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Driver added the OCR (online controller reset) support to megaraid sas iMR = chip. Signed-off-by Bo Yang --- drivers/scsi/megaraid/megaraid_sas.c | 74 ++++++++++++++++++++-----------= ---- drivers/scsi/megaraid/megaraid_sas.h | 5 +- 2 files changed, 47 insertions(+), 32 deletions(-) --_002_4B6A08C587958942AA3002690DD4F8C30106A96218cosmail02lsic_ Content-Type: application/octet-stream; name="megasas-p6-imrocr.patch" Content-Description: megasas-p6-imrocr.patch Content-Disposition: attachment; filename="megasas-p6-imrocr.patch"; size=6137; creation-date="Thu, 18 Nov 2010 20:37:02 GMT"; modification-date="Wed, 17 Nov 2010 13:09:12 GMT" Content-Transfer-Encoding: base64 ZGlmZiAtcnVwTiBvbGQvZHJpdmVycy9zY3NpL21lZ2FyYWlkL21lZ2FyYWlkX3Nhcy5jIG5ldy9k cml2ZXJzL3Njc2kvbWVnYXJhaWQvbWVnYXJhaWRfc2FzLmMKLS0tIG9sZC9kcml2ZXJzL3Njc2kv bWVnYXJhaWQvbWVnYXJhaWRfc2FzLmMJMjAxMC0xMS0xNiAwNjoyOTozMS4wMDAwMDAwMDAgLTA1 MDAKKysrIG5ldy9kcml2ZXJzL3Njc2kvbWVnYXJhaWQvbWVnYXJhaWRfc2FzLmMJMjAxMC0xMS0x NyAxMzowODowMy4wMDAwMDAwMDAgLTA1MDAKQEAgLTEyMSw2ICsxMjEsMTIgQEAgc3RhdGljIHZv aWQKIG1lZ2FzYXNfY29tcGxldGVfY21kKHN0cnVjdCBtZWdhc2FzX2luc3RhbmNlICppbnN0YW5j ZSwgc3RydWN0IG1lZ2FzYXNfY21kICpjbWQsCiAJCSAgICAgdTggYWx0X3N0YXR1cyk7CiAKK3N0 YXRpYyB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bl9zZXFfb2Zm c2V0OwkJLyowMDA0aCovCisJdTMyCWZ1c2lvbl9ob3N0X2RpYWc7CQkvKjAwMDhoKi8KKwl1MzIJ cmVzZXJ2ZWRfMDE7CQkJLyowMDBDaCovCiAKIAl1MzIgCWluYm91bmRfbXNnXzA7CQkJLyowMDEw aCovCiAJdTMyIAlpbmJvdW5kX21zZ18xOwkJCS8qMDAxNGgqLwo= --_002_4B6A08C587958942AA3002690DD4F8C30106A96218cosmail02lsic_-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/