Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1246184imu; Fri, 11 Jan 2019 18:36:08 -0800 (PST) X-Google-Smtp-Source: ALg8bN6qztHLXmTqvAary3MAWClxypXMKrSYHlOmZK2uBGf0MbXiZPGa4r/scDrJR36NnrO8VdzZ X-Received: by 2002:a17:902:9a8b:: with SMTP id w11mr16640585plp.121.1547260568748; Fri, 11 Jan 2019 18:36:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547260568; cv=none; d=google.com; s=arc-20160816; b=I6+Q34+wcEXUovPLTauTmbP4n+H2wvwYVIoDpvfcu7eb/NA2tNzs0rU5/pCDpQycGm HzqBYHrvFYrL4apErSMoajzzIX3ikTTFVuuiyHGbc6io5BiSnSmRUmOJ7Q0sjR7J5dqR WHg/PMxgNZgP3xMoMK3D8rj2Uctf0BF+P/LIrHIjJhpxsQZpocBgFm06QkUsvkiFPhPT P8re0f/uPqwkBBSyg0qZ7x39lDqbKs862bsoEs95pr/xZRxNlY5qZwKjN5/CiPim88su WoKYe1JY8n7SB9LBlNXC2W8s44ePspl1h7vbyLNw8btXtW3q6xCzECyB2hYdP1wWpN1l 26uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:organization:from:subject:cc:to :dkim-signature; bh=2grzZ8KhBlAoecpkfOhrU3PmA2ozXi3hys0ShEeMTqE=; b=KhjxISPE+0E1TvyjrA0a3zsmA08fPhSERmI+UFX8sBB9TNXQQbuxU2/z68/DH1RBZe J7jbm3mkyVNQ7gkiy1MJ8Pe+tU0SJ6g5s0/E1M494I5+1Y4UeXPLzXtRm0Jcca+DQbrc GDugYDr0PYKr1/ksg0Yy4I3NpET8hAsPR56iEOl3D/Xu4O7qhUyrVZrDIzMdaPFSANEQ FE2Otc+2j+IRV617egujL7/6VsZITah9TNoIMUDw9TVMEp5U1EZZcfXbXIGWqi/ANSAu kmWNnxBep1bY+IHgN8LUWFJXECg+MWYcceMHnG2MvAWvaO8Gn06JkQl8qIQgtkrf0V92 Xdeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=d2bTrNOG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bj11si32753173plb.21.2019.01.11.18.35.52; Fri, 11 Jan 2019 18:36:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=d2bTrNOG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726512AbfALCer (ORCPT + 99 others); Fri, 11 Jan 2019 21:34:47 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:55908 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726449AbfALCer (ORCPT ); Fri, 11 Jan 2019 21:34:47 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id x0C2YQH3144399; Sat, 12 Jan 2019 02:34:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=to : cc : subject : from : references : date : in-reply-to : message-id : mime-version : content-type; s=corp-2018-07-02; bh=2grzZ8KhBlAoecpkfOhrU3PmA2ozXi3hys0ShEeMTqE=; b=d2bTrNOGnst0Vt8Wr6FLa7G4u+ZNqg36IPYNBldTg3E1wyG0p0ZKp0d8Eab0VEp2fWme HfXRKJBzf1mHtzDUk9c90hhYcMC3Qx0oO7/bupRGjABUxSmn+tl9EIqDRi9c574RJfWB ZeUmJPVDkwJqw7ZChcyoJWBHM5GbzQLO+0krgmB6Nuerd7nOT6pLnWVoKVVtOMVwAepK ppmOvTRO8nJoAH7dNM/kdMvpUfmmpIfZAAgdgqXEsR65b+9GH+Fnnd8CGtQ5ebd78ASI beM4Q8HZ57TDCdGjwCoZ71vqbpFP9oJArqn4pGmmARo3bz+5YMpSK68PX4zcpPjXpuhz vw== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2ptm0uqssw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 12 Jan 2019 02:34:26 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x0C2YONo027807 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 12 Jan 2019 02:34:24 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x0C2YMOg009452; Sat, 12 Jan 2019 02:34:22 GMT Received: from ca-mkp.ca.oracle.com (/10.159.214.123) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 11 Jan 2019 18:34:22 -0800 To: John Garry Cc: Christoph Hellwig , Logan Gunthorpe , , , , Intel SCU Linux support , Artur Paszkiewicz , "James E.J. Bottomley" , "Martin K. Petersen" , Jens Axboe , Jeff Moyer , chenxiang Subject: Re: [PATCH] scsi: isci: initialize shost fully before calling scsi_add_host() From: "Martin K. Petersen" Organization: Oracle Corporation References: <20190108205043.3122-1-logang@deltatee.com> <20190109184105.GB22070@lst.de> <8d96b40d-fc83-9218-9479-3de423594ddb@huawei.com> Date: Fri, 11 Jan 2019 21:34:19 -0500 In-Reply-To: <8d96b40d-fc83-9218-9479-3de423594ddb@huawei.com> (John Garry's message of "Thu, 10 Jan 2019 09:11:44 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9133 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901120019 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org John, > So how about just drop these APIs and let the user set the shost > protection parameters directly, like other shost parameters, The protection interfaces here obviously predate the block layer allocation changes that made this particular issue pop up. > which should make it a bit clearer when these should be set, > i.e. before scsi_add_host()? In general, I am not so keen on the somewhat messy intersection between the host parameters and the host template. The static host templates made lots of sense in the days of Seagate ST01 and fixed hardware capabilities. But reality is that most modern controllers have to query firmware interfaces to figure out what their actual capabilities are. So in this case I think that accessor functions are actually better because they allow us to print a big fat warning when you twiddle something you shouldn't post-initialization. So that's something I think we could--and should--improve. -- Martin K. Petersen Oracle Linux Engineering