Return-Path: From: "Ge, Ethan" To: "An, Tedd" , "Poulain, Loic" CC: Marcel Holtmann , "linux-bluetooth@vger.kernel.org" Subject: RE: [PATCHv2] Bluetooth: btusb: Fix Intel controller hang after shutdown Date: Mon, 8 Jun 2015 07:42:25 +0000 Message-ID: <86D221DC0B85F94D9B05B97827669A3403CA5E7F@PGSMSX106.gar.corp.intel.com> References: <1432218957-3400-1-git-send-email-loic.poulain@intel.com> <69A96222-5518-4341-9F0B-32F3CEACCC35@holtmann.org> <55703D8F.6010602@intel.com> <41F028F6-E05E-4816-ACE8-3B0F121F2081@intel.com> In-Reply-To: <41F028F6-E05E-4816-ACE8-3B0F121F2081@intel.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 List-ID: SGkgTG9naWMsDQoNCkkgYW0gaGVscGluZyBUZWRkIHRvIHRlc3QgdGhpcyBwYXRjaCBub3csIGJ1 dCBJIGhhdmUgYSBxdWVzdGlvbiBhYm91dCB0aGlzIHBhdGNoLiANCg0KRm9yIHlvdXIgY29tbWVu dCBJdCBsb29rcyBsaWtlIHlvdSB3YW50IHRvIHNlbmQgSENJIFJFU0VUIGNvbW1hbmQgdG8gY29u dHJvbGxlciBmaXJzdCB3aGVuIEJUIGVuYWJsZWQsIHRoZW4gSSBmb3VuZCBiZWxvdyBwYXRjaCBh bHNvIGRvIHNhbWUgdGhpbmcgYXMgeW91ciBwYXRjaC4gTWF5IEkga25vdyBhbnkgZGlmZmVyZW5j ZSBmb3IgeW91ciBwYXRjaD8gVGhhbmtzLg0KDQpjb21taXQgZGZmZDMwZWU5NjE5Y2NkNzE1M2Yx ODYxYmEwNDM2YmJjNDQwMGYzNg0KQXV0aG9yOiBUZWRkIEhvLUplb25nIEFuIDx0ZWRkLmFuQGlu dGVsLmNvbT4NCkRhdGU6ICAgRnJpIEFwciAxOSAwOTo1Nzo0MyAyMDEzIC0wNzAwDQoNCiAgICBC bHVldG9vdGg6IEFkZCBzdXBwb3J0IGZvciBJbnRlbCBCbHVldG9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