From: Tejun Heo Date: Thu, 3 Sep 2009 07:08:11 +0000 (+0900) Subject: libata: unbreak TPM filtering by reorganizing ata_scsi_pass_thru() X-Git-Tag: v2.6.32-rc1~717^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd30add88cea831dfb854d564478f09ee66206b5;p=pandora-kernel.git libata: unbreak TPM filtering by reorganizing ata_scsi_pass_thru() 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 Signed-off-by: Jeff Garzik --- Reading git-diff-tree failed