From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Garzik Subject: Re: [PATCH #upstream-fixes] libata: unbreak TPM filtering by reorganizing ata_scsi_pass_thru() Date: Tue, 08 Sep 2009 21:19:13 -0400 Message-ID: <4AA70291.1000306@garzik.org> References: <4A9F6B5B.80701@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from srv5.dvmed.net ([207.36.208.214]:51554 "EHLO mail.dvmed.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751192AbZIIBTO (ORCPT ); Tue, 8 Sep 2009 21:19:14 -0400 In-Reply-To: <4A9F6B5B.80701@kernel.org> Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: Tejun Heo Cc: IDE/ATA development list , Thilo-Alexander Ginkel On 09/03/2009 03:08 AM, Tejun Heo wrote: > ata_scsi_pass_thru() was checking for input sanity and disallowed > commands while initializaing qc from scmd. TPM filtering was added > right after protocol check at which point tf wasn't initialized > properly. This means that TPM filtering has never really worked. > > This patch fixes the bug by reorganizing ata_scsi_pass_thru() such > that qc is fully initialized before checking for invalid conditions > which is way less error prone. > > Discovered while Thilo-Alexander Ginkel was trying debug patches for > bko#13416. > > Signed-off-by: Tejun Heo > Cc: Thilo-Alexander Ginkel applied #upstream