Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752126Ab3HUQEy (ORCPT ); Wed, 21 Aug 2013 12:04:54 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:44498 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751523Ab3HUQEw (ORCPT ); Wed, 21 Aug 2013 12:04:52 -0400 Date: Wed, 21 Aug 2013 09:04:50 -0700 From: Christoph Hellwig To: "Nicholas A. Bellinger" Cc: Christoph Hellwig , "Nicholas A. Bellinger" , target-devel , lkml , linux-scsi , Christoph Hellwig , Hannes Reinecke , Martin Petersen , Chris Mason , James Bottomley , Giridhar Malavali , Chad Dupuis Subject: Re: [PATCH 9/9] tcm_qla2xxx: Add special case for COMPARE_AND_WRITE data_direction Message-ID: <20130821160450.GA30848@infradead.org> References: <1377029280-19144-1-git-send-email-nab@daterainc.com> <1377029280-19144-10-git-send-email-nab@daterainc.com> <20130821063702.GI25506@infradead.org> <1377070267.32763.26.camel@haakon3.risingtidesystems.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1377070267.32763.26.camel@haakon3.risingtidesystems.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1115 Lines: 26 On Wed, Aug 21, 2013 at 12:31:07AM -0700, Nicholas A. Bellinger wrote: > Is it really worth having two se_cmd_flags for COMPARE_AND_WRITE..? Not leaking the abstraction into the driver is always worth the effort. But looking at the other patches I haven't reviewed yet I think the issue is more severe anyway, see my next reply. > > Also it might make sense to lift this helper to get a dma direction from > > a command into common code. > > > > Mmm, perhaps. I don't recall of the top of my head why tcm_qla2xxx > actually needed to reverse it's dma direction (I'm sure that Roland > knows, CC'ed), but IIRC it was a tcm_qla2xxx specific thing..? It's the same issue for any hardware driver that directly maps a se_cmd - the direction the target expects is reversed to what the driver expects, in addition any BIDI or other special meanings will need handling. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/