From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752632AbbKPPbk (ORCPT ); Mon, 16 Nov 2015 10:31:40 -0500 Received: from mail-yk0-f172.google.com ([209.85.160.172]:36521 "EHLO mail-yk0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751646AbbKPPbh (ORCPT ); Mon, 16 Nov 2015 10:31:37 -0500 Date: Mon, 16 Nov 2015 10:31:33 -0500 From: Tejun Heo To: Mark Lord Cc: vinayak.kale@gmail.com, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, sumit.g.gupta@seagate.com, Vinayak Kale Subject: Re: [PATCH v2] libata: add support for NCQ commands for SG interface Message-ID: <20151116153133.GA18894@mtj.duckdns.org> References: <1445924955-11124-1-git-send-email-vinayak.kale@seagate.com> <5649DE67.7080509@start.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5649DE67.7080509@start.ca> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 16, 2015 at 08:47:19AM -0500, Mark Lord wrote: > On 15-10-27 01:49 AM, vinayak.kale@gmail.com wrote: > >From: Vinayak Kale > > > >This patch is needed to make NCQ commands with FPDMA protocol value > >(eg READ/WRITE FPDMA) work over SCSI Generic (SG) interface. > .. > >+ /* For NCQ commands with FPDMA protocol, copy the tag value */ > >+ if (tf->protocol == ATA_PROT_NCQ) > >+ tf->nsect = qc->tag << 3; > >+ > > > What prevents the qc-tag value here from conflicting with in-flight I/O > using the exact same qc-tag ?? The SG command doesn't set the tag, it's being set from an allocated qc which can't otherwise be in-flight. Thanks. -- tejun