Return-path: Received: from galiil.marvell.com ([199.203.130.254]:35815 "EHLO galiil.marvell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754623AbZJEStE (ORCPT ); Mon, 5 Oct 2009 14:49:04 -0400 From: Bing Zhao To: Dan Williams CC: "libertas-dev@lists.infradead.org" , Amitkumar Karwar , "linux-wireless@vger.kernel.org" Date: Mon, 5 Oct 2009 11:47:58 -0700 Subject: RE: [PATCH v2] libertas: Add auto deep sleep support for SD8385/SD8686/SD8688 Message-ID: <477F20668A386D41ADCC57781B1F704306DDD5BE9B@SC-VEXCH1.marvell.com> References: <1254366278-15483-1-git-send-email-bzhao@marvell.com> <1254421642.9657.60.camel@localhost.localdomain> In-Reply-To: <1254421642.9657.60.camel@localhost.localdomain> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: SGkgRGFuLA0KDQo+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+IEZyb206IERhbiBXaWxs aWFtcyBbbWFpbHRvOmRjYndAcmVkaGF0LmNvbV0NCj4gU2VudDogVGh1cnNkYXksIE9jdG9iZXIg MDEsIDIwMDkgMTE6MjcgQU0NCj4gVG86IEJpbmcgWmhhbw0KPiBDYzogbGliZXJ0YXMtZGV2QGxp c3RzLmluZnJhZGVhZC5vcmc7IEFtaXRrdW1hciBLYXJ3YXI7IGxpbnV4LXdpcmVsZXNzQHZnZXIu a2VybmVsLm9yZw0KPiBTdWJqZWN0OiBSZTogW1BBVENIIHYyXSBsaWJlcnRhczogQWRkIGF1dG8g ZGVlcCBzbGVlcCBzdXBwb3J0IGZvciBTRDgzODUvU0Q4Njg2L1NEODY4OA0KPg0KPiBPbiBXZWQs IDIwMDktMDktMzAgYXQgMjA6MDQgLTA3MDAsIEJpbmcgWmhhbyB3cm90ZToNCj4gPiBGcm9tOiBB bWl0a3VtYXIgS2Fyd2FyIDxha2Fyd2FyQG1hcnZlbGwuY29tPg0KPiA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5pc19kZWVwX3NsZWVwLCAoMTAgKiBIWikpKSB7DQo+ID4gKyAg ICAgICAgICAgICAgICAgICBsYnNfcHJfZXJyKCJkc19hd2FrZV9xOiB0aW1lciBleHBpcmVkXG4i KTsNCj4gPiArICAgICAgICAgICAgICAgICAgIHJldCA9IC0xOw0KPiA+ICsgICAgICAgICAgIH0N Cj4gPiArICAgfQ0KPiA+ICsNCj4gPiArICAgbGJzX2RlYl9sZWF2ZV9hcmdzKExCU19ERUJfQ01E LCAicmV0ICVkIiwgcmV0KTsNCj4gPiArICAgcmV0dXJuIHJldDsNCj4gPiArfQ0KPiA+ICsNCj4g PiAraW50IGxic19zZXRfZGVlcF9zbGVlcChzdHJ1Y3QgbGJzX3ByaXZhdGUgKnByaXYsIGludCBk ZWVwX3NsZWVwKQ0KPiA+ICt7DQo+ID4gKyAgIGludCByZXQgPSAgMDsNCj4gPiArDQo+ID4gKyAg IGxic19kZWJfZW50ZXIoTEJTX0RFQl9DTUQpOw0KPiA+ICsNCj4gPiArICAgaWYgKGRlZXBfc2xl ZXApIHsNCj4gPiArICAgICAgICAgICBpZiAocHJpdi0+aXNfZGVlcF9zbGVlcCAhPSAxKSB7DQo+ ID4gKyAgICAgICAgICAgICAgICAgICBsYnNfZGViX2NtZCgiZGVlcCBzbGVlcDogc2xlZXBcbiIp Ow0KPiA+ICsgICAgICAgICAgICAgICAgICAgQlVHX09OKCFwcml2LT5lbnRlcl9kZWVwX3NsZWVw KTsNCj4gPiArICAgICAgICAgICAgICAgICAgIHJldCA9IHByaXYtPmVudGVyX2RlZXBfc2xlZXAo cHJpdik7DQo+ID4gKyAgICAgICAgICAgICAgICAgICBpZiAoIXJldCkgew0KPiA+ICsgICAgICAg ICAgICAgICAgICAgICAgICAgICBuZXRpZl9zdG9wX3F1ZXVlKHByaXYtPmRldik7DQo+ID4gKyAg ICAgICAgICAgICAgICAgICAgICAgICAgIG5ldGlmX2NhcnJpZXJfb2ZmKHByaXYtPmRldik7DQo+ ID4gKyAgICAgICAgICAgICAgICAgICB9DQo+ID4gKyAgICAgICAgICAgfSBlbHNlIHsNCj4gPiAr ICAgICAgICAgICAgICAgICAgIGxic19wcl9lcnIoImRlZXAgc2xlZXA6IGFscmVhZHkgZW5hYmxl ZFxuIik7DQo+ID4gKyAgICAgICAgICAgfQ0KPiA+ICsgICB9IGVsc2Ugew0KPiA+ICsgICAgICAg ICAgIGlmIChwcml2LT5pc19kZWVwX3NsZWVwKSB7DQo+ID4gKyAgICAgICAgICAgICAgICAgICBs YnNfZGViX2NtZCgiZGVlcCBzbGVlcDogd2FrZXVwXG4iKTsNCj4gPiArICAgICAgICAgICAgICAg ICAgIEJVR19PTighcHJpdi0+ZXhpdF9kZWVwX3NsZWVwKTsNCj4gPiArICAgICAgICAgICAgICAg ICAgIHJldCA9IHByaXYtPmV4aXRfZGVlcF9zbGVlcChwcml2KTsNCj4gPiArICAgICAgICAgICAg ICAgICAgIGlmICghcmV0KSB7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldCA9 IGxic193YWl0X2Zvcl9kc19hd2FrZShwcml2KTsNCj4gPiArICAgICAgICAgICAgICAgICAgICAg ICAgICAgaWYgKHJldCkNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBs YnNfcHJfZXJyKCJkZWVwIHNsZWVwOiB3YWtldXAiDQo+ID4gKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJmYWlsZWRcbiIpOw0KPiA+ICsgICAgICAg ICAgICAgICAgICAgfQ0KPiA+ICsgICAgICAgICAgIH0NCj4gPiArICAgfQ0KPiA+ICsNCj4gPiAr ICAgbGJzX2RlYl9sZWF2ZV9hcmdzKExCU19ERUJfQ01ELCAicmV0ICVkIiwgcmV0KTsNCj4gPiAr ICAgcmV0dXJuIHJldDsNCj4gPiArfQ0KPiA+ICsNCj4gPiAgaW50IGxic19jbWRfODAyXzExX3Nl dF93ZXAoc3RydWN0IGxic19wcml2YXRlICpwcml2LCB1aW50MTZfdCBjbWRfYWN0aW9uLA0KPiA+ ICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGFzc29jX3JlcXVlc3QgKmFzc29jKQ0KPiA+ ICB7DQo+ID4gQEAgLTEyNDIsOCArMTI5NSwxNyBAQCBzdGF0aWMgdm9pZCBsYnNfc3VibWl0X2Nv bW1hbmQoc3RydWN0IGxic19wcml2YXRlICpwcml2LA0KPiA+ICAgICAgICAgICAgIHRpbWVvID0g SFovNDsNCj4gPiAgICAgfQ0KPiA+DQo+ID4gLSAgIC8qIFNldHVwIHRoZSB0aW1lciBhZnRlciB0 cmFuc21pdCBjb21tYW5kICovDQo+ID4gLSAgIG1vZF90aW1lcigmcHJpdi0+Y29tbWFuZF90aW1l ciwgamlmZmllcyArIHRpbWVvKTsNCj4gPiArICAgaWYgKGNvbW1hbmQgPT0gQ01EXzgwMl8xMV9E RUVQX1NMRUVQKSB7DQo+ID4gKyAgICAgICAgICAgaWYgKHByaXYtPmlzX2F1dG9fZGVlcF9zbGVl cF9lbmFibGVkKSB7DQo+ID4gKyAgICAgICAgICAgICAgICAgICBwcml2LT53YWtldXBfZGV2X3Jl cXVpcmVkID0gMTsNCj4gPiArICAgICAgICAgICAgICAgICAgIHByaXYtPmRubGRfc2VudCA9IDA7 DQo+ID4gKyAgICAgICAgICAgfQ0KPiA+ICsgICAgICAgICAgIHByaXYtPmlzX2RlZXBfc2xlZXAg PSAxOw0KPiA+ICsgICAgICAgICAgIGxic19jb21wbGV0ZV9jb21tYW5kKHByaXYsIGNtZG5vZGUs IDApOw0KPiA+ICsgICB9IGVsc2Ugew0KPiA+ICsgICAgICAgICAgIC8qIFNldHVwIHRoZSB0aW1l ciBhZnRlciB0cmFuc21pdCBjb21tYW5kICovDQo+ID4gKyAgICAgICAgICAgbW9kX3RpbWVyKCZw cml2LT5jb21tYW5kX3RpbWVyLCBqaWZmaWVzICsgdGltZW8pOw0KPiA+ICsgICB9DQo+ID4NCj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EBAIC01MDQsOSArNTA0LDIxIEBAIGludCBsYnNfcHJvY2Vzc19ldmVudChzdHJ1 Y3QgbGJzX3ByaXZhdGUgKnByaXYsIHUzMiBldmVudCkNCj4gPg0KPiA+ICAgICBjYXNlIE1BQ1JF R19JTlRfQ09ERV9IT1NUX0FXQUtFOg0KPiA+ICAgICAgICAgICAgIGxic19kZWJfY21kKCJFVkVO VDogaG9zdCBhd2FrZVxuIik7DQo+ID4gKyAgICAgICAgICAgaWYgKHByaXYtPnJlc2V0X2RlZXBf c2xlZXBfd2FrZXVwKQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgcHJpdi0+cmVzZXRfZGVlcF9z bGVlcF93YWtldXAocHJpdik7DQo+ID4gKyAgICAgICAgICAgcHJpdi0+aXNfZGVlcF9zbGVlcCA9 IDA7DQo+ID4gICAgICAgICAgICAgbGJzX3NlbmRfY29uZmlybXdha2UocHJpdik7DQo+ID4gICAg ICAgICAgICAgYnJlYWs7DQo+ID4NCj4gPiArICAgY2FzZSBNQUNSRUdfSU5UX0NPREVfREVFUF9T TEVFUF9BV0FLRToNCj4gPiArICAgICAgICAgICBpZiAocHJpdi0+cmVzZXRfZGVlcF9zbGVlcF93 YWtldXApDQo+ID4gKyAgICAgICAgICAgICAgICAgICBwcml2LT5yZXNldF9kZWVwX3NsZWVwX3dh a2V1cChwcml2KTsNCj4gPiArICAgICAgICAgICBsYnNfZGViX2NtZCgiRVZFTlQ6IGRzIGF3YWtl XG4iKTsNCj4gPiArICAgICAgICAgICBwcml2LT5pc19kZWVwX3NsZWVwID0gMDsNCj4gPiArICAg ICAgICAgICBwcml2LT53YWtldXBfZGV2X3JlcXVpcmVkID0gMDsNCj4gPiArICAgICAgICAgICB3 YWtlX3VwX2ludGVycnVwdGlibGUoJnByaXYtPmRzX2F3YWtlX3EpOw0KPiA+ICsgICAgICAgICAg IGJyZWFrOw0KPiA+ICsNCj4gPiAgICAgY2FzZSBNQUNSRUdfSU5UX0NPREVfUFNfQVdBS0U6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cSk7DQo+ID4gKyAgIGlmICghcHJpdi0+Y3VyX2NtZCB8fCBw cml2LT50eF9wZW5kaW5nX2xlbiA+IDApIHsNCj4gPiArICAgICAgICAgICBpZiAoIXByaXYtPndh a2V1cF9kZXZfcmVxdWlyZWQpDQo+ID4gKyAgICAgICAgICAgICAgICAgICB3YWtlX3VwX2ludGVy cnVwdGlibGUoJnByaXYtPndhaXRxKTsNCj4gPiArICAgfQ0KPiA+DQo+ID4gICAgIHNwaW5fdW5s b2NrX2lycXJlc3RvcmUoJnByaXYtPmRyaXZlcl9sb2NrLCBmbGFncyk7DQo+ID4gICAgIGxic19k ZWJfbGVhdmUoTEJTX0RFQl9USFJFQUQpOw0KPiA+IEBAIC03NzAsNyArNzcyLDggQEAgc3RhdGlj IGludCBsYnNfdGhyZWFkKHZvaWQgKmRhdGEpDQo+ID4gICAgICAgICAgICAgICAgICAgICBzaG91 bGRzbGVlcCA9IDA7ICAgICAgICAvKiBXZSBoYXZlIGEgY29tbWFuZCByZXNwb25zZSAqLw0KPiA+ ICAgICAgICAgICAgIGVsc2UgaWYgKHByaXYtPmN1cl9jbWQpDQo+ID4gICAgICAgICAgICAgICAg ICAgICBzaG91bGRzbGVlcCA9IDE7ICAgICAgICAvKiBDYW4ndCBzZW5kIGEgY29tbWFuZDsgb25l IGFscmVhZHkgcnVubmluZyAqLw0KPiA+IC0gICAgICAgICAgIGVsc2UgaWYgKCFsaXN0X2VtcHR5 KCZwcml2LT5jbWRwZW5kaW5ncSkpDQo+ID4gKyAgICAgICAgICAgZWxzZSBpZiAoIWxpc3RfZW1w dHkoJnByaXYtPmNtZHBlbmRpbmdxKSAmJg0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICEocHJpdi0+d2FrZXVwX2Rldl9yZXF1aXJlZCkpDQo+ID4gICAgICAgICAgICAg ICAgICAgICBzaG91bGRzbGVlcCA9IDA7ICAgICAgICAvKiBXZSBoYXZlIGEgY29tbWFuZCB0byBz ZW5kICovDQo+ID4gICAgICAgICAgICAgZWxzZSBpZiAoX19rZmlmb19sZW4ocHJpdi0+ZXZlbnRf ZmlmbykpDQo+ID4gICAgICAgICAgICAgICAgICAgICBzaG91bGRzbGVlcCA9IDA7ICAgICAgICAv KiBXZSBoYXZlIGFuIGV2ZW50IHRvIHByb2Nlc3MgKi8NCj4gPiBAQCAtODIyLDYgKzgyNSwyNiBA QCBzdGF0aWMgaW50IGxic190aHJlYWQodm9pZCAqZGF0YSkNCj4gPiAgICAgICAgICAgICB9DQo+ ID4gICAgICAgICAgICAgc3Bpbl91bmxvY2tfaXJxKCZwcml2LT5kcml2ZXJfbG9jayk7DQo+ID4N Cj4gPiArICAgICAgICAgICAvKiBQcm9jZXNzIGhhcmR3YXJlIGV2ZW50cywgZS5nLiBjYXJkIHJl bW92ZWQsIGxpbmsgbG9zdCAqLw0KPiA+ICsgICAgICAgICAgIHNwaW5fbG9ja19pcnEoJnByaXYt PmRyaXZlcl9sb2NrKTsNCj4gPiArICAgICAgICAgICB3aGlsZSAoX19rZmlmb19sZW4ocHJpdi0+ ZXZlbnRfZmlmbykpIHsNCj4gPiArICAgICAgICAgICAgICAgICAgIHUzMiBldmVudDsNCj4gPiAr ICAgICAgICAgICAgICAgICAgIF9fa2ZpZm9fZ2V0KHByaXYtPmV2ZW50X2ZpZm8sICh1bnNpZ25l ZCBjaGFyICopICZldmVudCwNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZW9m KGV2ZW50KSk7DQo+ID4gKyAgICAgICAgICAgICAgICAgICBzcGluX3VubG9ja19pcnEoJnByaXYt PmRyaXZlcl9sb2NrKTsNCj4gPiArICAgICAgICAgICAgICAgICAgIGxic19wcm9jZXNzX2V2ZW50 KHByaXYsIGV2ZW50KTsNCj4gPiArICAgICAgICAgICAgICAgICAgIHNwaW5fbG9ja19pcnEoJnBy aXYtPmRyaXZlcl9sb2NrKTsNCj4gPiArICAgICAgICAgICB9DQo+ID4gKyAgICAgICAgICAgc3Bp bl91bmxvY2tfaXJxKCZwcml2LT5kcml2ZXJfbG9jayk7DQo+ID4gKw0KPiA+ICsgICAgICAgICAg IGlmIChwcml2LT53YWtldXBfZGV2X3JlcXVpcmVkKSB7DQo+ID4gKyAgICAgICAgICAgICAgICAg ICBsYnNfZGViX3RocmVhZCgiV2FraW5nIHVwIGRldmljZS4uLlxuIik7DQo+ID4gKyAgICAgICAg ICAgICAgICAgICAvKiBXYWtlIHVwIGRldmljZSAqLw0KPiA+ICsgICAgICAgICAgICAgICAgICAg aWYgKHByaXYtPmV4aXRfZGVlcF9zbGVlcChwcml2KSkNCj4gPiArICAgICAgICAgICAgICAgICAg ICAgICAgICAgbGJzX2RlYl90aHJlYWQoIldha2V1cCBkZXZpY2UgZmFpbGVkXG4iKTsNCj4gPiAr ICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOw0KPiA+ICsgICAgICAgICAgIH0NCj4gPiArDQo+ ID4gICAgICAgICAgICAgLyogY29tbWFuZCB0aW1lb3V0IHN0dWZmICovDQo+ID4gICAgICAgICAg ICAgaWYgKHByaXYtPmNtZF90aW1lZF9vdXQgJiYgcHJpdi0+Y3VyX2NtZCkgew0KPiA+ICAgICAg ICAgICAgICAgICAgICAgc3RydWN0IGNtZF9jdHJsX25vZGUgKmNtZG5vZGUgPSBwcml2LT5jdXJf Y21kOw0KPiA+IEBAIC04NDksMTggKzg3Miw3IEBAIHN0YXRpYyBpbnQgbGJzX3RocmVhZCh2b2lk ICpkYXRhKQ0KPiA+ICAgICAgICAgICAgIH0NCj4gPiAgICAgICAgICAgICBwcml2LT5jbWRfdGlt ZWRfb3V0ID0gMDsNCj4gPg0KPiA+IC0gICAgICAgICAgIC8qIFByb2Nlc3MgaGFyZHdhcmUgZXZl bnRzLCBlLmcuIGNhcmQgcmVtb3ZlZCwgbGluayBsb3N0ICovDQo+ID4gLSAgICAgICAgICAgc3Bp bl9sb2NrX2lycSgmcHJpdi0+ZHJpdmVyX2xvY2spOw0KPiA+IC0gICAgICAgICAgIHdoaWxlIChf X2tmaWZvX2xlbihwcml2LT5ldmVudF9maWZvKSkgew0KPiA+IC0gICAgICAgICAgICAgICAgICAg dTMyIGV2ZW50Ow0KPiA+DQo+ID4gLSAgICAgICAgICAgICAgICAgICBfX2tmaWZvX2dldChwcml2 LT5ldmVudF9maWZvLCAodW5zaWduZWQgY2hhciAqKSAmZXZlbnQsDQo+ID4gLSAgICAgICAgICAg ICAgICAgICAgICAgICAgIHNpemVvZihldmVudCkpOw0KPiA+IC0gICAgICAgICAgICAgICAgICAg c3Bpbl91bmxvY2tfaXJxKCZwcml2LT5kcml2ZXJfbG9jayk7DQo+ID4gLSAgICAgICAgICAgICAg ICAgICBsYnNfcHJvY2Vzc19ldmVudChwcml2LCBldmVudCk7DQo+ID4gLSAgICAgICAgICAgICAg ICAgICBzcGluX2xvY2tfaXJxKCZwcml2LT5kcml2ZXJfbG9jayk7DQo+ID4gLSAgICAgICAgICAg fQ0KPiA+IC0gICAgICAgICAgIHNwaW5fdW5sb2NrX2lycSgmcHJpdi0+ZHJpdmVyX2xvY2spOw0K PiA+DQo+ID4gICAgICAgICAgICAgaWYgKCFwcml2LT5md19yZWFkeSkNCj4gPiAgICAgICAgICAg ICAgICAgICAgIGNvbnRpbnVlOw0KPiA+IEBAIC04OTQsNiArOTA2LDkgQEAgc3RhdGljIGludCBs YnNfdGhyZWFkKHZvaWQgKmRhdGEpDQo+ID4gICAgICAgICAgICAgICAgIChwcml2LT5wc3N0YXRl ID09IFBTX1NUQVRFX1BSRV9TTEVFUCkpDQo+ID4gICAgICAgICAgICAgICAgICAgICBjb250aW51 ZTsNCj4gPg0KPiA+ICsgICAgICAgICAgIGlmIChwcml2LT5pc19kZWVwX3NsZWVwKQ0KPiA+ICsg ICAgICAgICAgICAgICAgICAgY29udGludWU7DQo+ID4gKw0KPiA+ICAgICAgICAgICAgIC8qIEV4 ZWN1dGUgdGhlIG5leHQgY29tbWFuZCAqLw0KPiA+ICAgICAgICAgICAgIGl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ID4gKw0KPiA+ICsg ICBpZiAocHJpdi0+aXNfYWN0aXZpdHlfZGV0ZWN0ZWQpIHsNCj4gPiArICAgICAgICAgICBwcml2 LT5pc19hY3Rpdml0eV9kZXRlY3RlZCA9IDA7DQo+ID4gKyAgIH0gZWxzZSB7DQo+ID4gKyAgICAg ICAgICAgaWYgKHByaXYtPmlzX2F1dG9fZGVlcF9zbGVlcF9lbmFibGVkICYmDQo+ID4gKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICghcHJpdi0+d2FrZXVwX2Rldl9yZXF1aXJlZCkgJiYNCj4g PiArICAgICAgICAgICAgICAgICAgICAgICAgICAgKHByaXYtPmNvbm5lY3Rfc3RhdHVzICE9IExC U19DT05ORUNURUQpKSB7DQo+ID4gKyAgICAgICAgICAgICAgICAgICBsYnNfZGViX21haW4oIkVu dGVyaW5nIGF1dG8gZGVlcCBzbGVlcCBtb2RlLi4uXG4iKTsNCj4gPiArICAgICAgICAgICAgICAg ICAgIHJldCA9IGxic19wcmVwYXJlX2FuZF9zZW5kX2NvbW1hbmQocHJpdiwNCj4gPiArICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDTURfODAyXzExX0RFRVBfU0xFRVAsIDAsDQo+ ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwgMCwgTlVMTCk7DQo+ID4g KyAgICAgICAgICAgfQ0KPiA+ICsgICB9DQo+ID4gKyAgIG1vZF90aW1lcigmcHJpdi0+YXV0b19k ZWVwc2xlZXBfdGltZXIgLCBqaWZmaWVzICsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAg ICAgKHByaXYtPmF1dG9fZGVlcF9zbGVlcF90aW1lb3V0ICogSFopLzEwMDApOw0KPiA+ICsgICBs YnNfZGViX2xlYXZlKExCU19ERUJfQ01EKTsNCj4gPiArfQ0KPiA+ICsNCj4gPiAraW50IGxic19l bnRlcl9hdXRvX2RlZXBfc2xlZXAoc3RydWN0IGxic19wcml2YXRlICpwc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ZWVwIHNsZWVwIGZlYXR1cmUgaXMgbm90IGltcGxlbWVudGVk ICINCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiZm9yIHRoaXMgaW50 ZXJmYWNlIGRyaXZlclxuIik7DQo+ID4gKyAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVJTlZB TDsNCj4gPiArICAgICAgICAgICB9DQo+ID4gKw0KPiA+ICsgICAgICAgICAgIGlmIChwcml2LT5j b25uZWN0X3N0YXR1cyA9PSBMQlNfQ09OTkVDVEVEKSB7DQo+ID4gKyAgICAgICAgICAgICAgICAg ICBpZiAoKHByaXYtPmlzX2F1dG9fZGVlcF9zbGVlcF9lbmFibGVkKSAmJg0KPiA+ICsgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHZ3cnEtPnZhbHVlID09IC0xMDAw KSkgew0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICBsYnNfZXhpdF9hdXRvX2RlZXBf c2xlZXAocHJpdik7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwOw0K PiA+ICsgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsNCj4gPiArICAgICAgICAgICAgICAgICAg ICAgICAgICAgbGJzX3ByX2VycigiY2FuJ3QgdXNlIGRlZXAgc2xlZXAgY21kIGluICINCj4gPiAr ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJjb25uZWN0ZWQgc3Rh dGVcbiIpOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVJTlZBTDsN Cj4gPiArICAgICAgICAgICAgICAgICAgIH0NCj4gPiArICAgICAgICAgICB9DQo+ID4gKw0KPiA+ ICsgICAgICAgICAgIGlmICgodndycS0+dmFsdWUgPCAwKSAmJiAodndycS0+dmFsdWUgIT0gLTEw MDApKSB7DQo+ID4gKyAgICAgICAgICAgICAgICAgICBsYnNfcHJfZXJyKCJ1bmtub3duIG9wdGlv blxuIik7DQo+ID4gKyAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVJTlZBTDsNCj4gPiArICAg ICAgICAgICB9DQo+ID4gKw0KPiA+ICsgICAgICAgICAgIGlmICh2d3JxLT52YWx1ZSA+IDApIHsN Cj4gPiArICAgICAgICAgICAgICAgICAgIGlmICghcHJpdi0+aXNfYXV0b19kZWVwX3NsZWVwX2Vu YWJsZWQpIHsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJpdi0+aXNfYWN0aXZp dHlfZGV0ZWN0ZWQgPSAwOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICBwcml2LT5h dXRvX2RlZXBfc2xlZXBfdGltZW91dCA9IHZ3cnEtPnZhbHVlOw0KPiA+ICsgICAgICAgICAgICAg ICAgICAgICAgICAgICBsYnNfZW50ZXJfYXV0b19kZWVwX3NsZWVwKHByaXYpOw0KPiA+ICsgICAg ICAgICAgICAgICAgICAgfSBlbHNlIHsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAg cHJpdi0+YXV0b19kZWVwX3NsZWVwX3RpbWVvdXQgPSB2d3JxLT52YWx1ZTsNCj4gPiArICAgICAg ICAgICAgICAgICAgICAgICAgICAgbGJzX2RlYl9kZWJ1Z2ZzKCJhdXRvIGRlZXAgc2xlZXA6ICIN Cj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJhbHJlYWR5 IGVuYWJsZWRcbiIpOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgfQ0KPiA+ICsgICAgICAgICAg ICAgICAgICAgcmV0dXJuIDA7DQo+ID4gKyAgICAgICAgICAgfSBlbHNlIHsNCj4gPiArICAgICAg ICAgICAgICAgICAgIGlmIChwcml2LT5pc19hdXRvX2RlZXBfc2xlZXBfZW5hYmxlZCkgew0KPiA+ ICsgICAgICAgICAgICAgICAgICAgICAgICAgICBsYnNfZXhpdF9hdXRvX2RlZXBfc2xlZXAocHJp dik7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIFRyeSB0byBleGl0IGRlZXAg c2xlZXAgaWYgYXV0byAqLw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAvKmRlZXAg c2xlZXAgZGlzYWJsZWQgKi8NCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0ID0g bGJzX3NldF9kZWVwX3NsZWVwKHByaXYsIDApOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgfQ0K PiA+ICsgICAgICAgICAgICAgICAgICAgaWYgKHZ3cnEtPnZhbHVlID09IDApDQo+ID4gKyAgICAg ICAgICAgICAgICAgICAgICAgICAgIHJldCA9IGxic19zZXRfZGVlcF9zbGVlcChwcml2LCAxKTsN Cj4gPiArICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHZ3cnEtPnZhbHVlID09IC0xMDAwKQ0K PiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICByZXQgPSBsYnNfc2V0X2RlZXBfc2xlZXAo cHJpdiwgMCk7DQo+ID4gKyAgICAgICAgICAgICAgICAgICByZXR1cm4gcmV0Ow0KPiA+ICsgICAg ICAgICAgIH0NCj4gPiAgICAgfQ0KPiA+DQo+ID4gICAgIGlmIChwcml2LT5wc21vZGUgIT0gTEJT ODAyXzExUE9XRVJNT0RFQ0FNKSB7DQo+ID4gQEAgLTc1Miw2ICs4NjYsNyBAQCBzdGF0aWMgaW50 IGxic19zZXRfcG93ZXIoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwgc3RydWN0IGl3X3JlcXVlc3Rf aW5mbyAqaW5mbywNCj4gPiAgICAgfQ0KPiA+DQo+ID4gICAgIGxic19kZWJfbGVhdmUoTEJTX0RF Ql9XRVhUKTsNCj4gPiArDQo+ID4gICAgIHJldHVybiAwOw0KPiA+ICB9DQo+ID4NCj4gPiBAQCAt NzkyLDYgKzkwNyw5IEBAIHN0YXRpYyBzdHJ1Y3QgaXdfc3Rhd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