Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp400708pxb; Thu, 19 Aug 2021 02:10:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhdNpcUOKp61pUfYD4t8MqiCAyv4NxpfrKshZ9HNtMS6BTVCaSiKLBUKqyM6FGLTiJmcMj X-Received: by 2002:a05:6e02:1aa2:: with SMTP id l2mr1091748ilv.168.1629364232210; Thu, 19 Aug 2021 02:10:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629364232; cv=none; d=google.com; s=arc-20160816; b=yCqcMRq9XTUcpkqMZzAoWzLsSLszpEwDtuxuiUym7P+TIbUUYORc0ds/yVh1FX9bWZ QgCuHOLkR2xtah6k7FpMOTMJyNGc4HsKvrWANRty8NgtqOb8HtYOoPt2ND4QloBuf2oW zjttlTvdQtDF4vpYz8Bxjb30noO+ojrEN5kyGgi7FUWt9eKwqlqBPHdqBP2tlZ5zZpTR fjy6QJ/2q5E4vT30rc5cKwPLvGc1U/M4ayIPA0HOubUn7e1zf+KwEViIhyq8OBqNUEk/ ywZ1zcT5Ow+DEOJeDUN0F18wtCBV7ZxJJYZZ0DNva82E8BHowKSfUEv7Yay6R2ELyUxm 1h6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=CxA0m0Sj7ORdVSjT2UobKCZq1ruPEF/uag2xmfOG4to=; b=SeJJRASIzCk2OHYdI0aEfBmdpa8lloPe2VMNjHWovUnwo2x5viRE9Rg1GmOvtIPkAl 4vd+ErSRWa4EuBv5JTl+6f+/OQUG2SffoeCmlToYrox8+8fp2sUB6WN7CshtJBXbjEG3 2XLHSV1pY4ih9QioI0tLF/sDmUx3nexAAcSs/11evSfr6dRRt5bleXIuLUaXgBR0M8qk HQdlxS64wGh4/kbdBtO471KPeRlfbR1eCHZXwF3npvd6Hc7ZJcKpfqTxJEiyDWabR/RK hAsGfpbxcw3bjqYCjsWCDckkia0fu9tzc8lqFOhQ51n0GroibSyjAv8YjEcLL1FhgGJ7 iqVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q17si2499925ilm.64.2021.08.19.02.10.20; Thu, 19 Aug 2021 02:10:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232653AbhHSJKJ (ORCPT + 99 others); Thu, 19 Aug 2021 05:10:09 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3671 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229804AbhHSJKI (ORCPT ); Thu, 19 Aug 2021 05:10:08 -0400 Received: from fraeml715-chm.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4GqzTG6WSDz6BGCj; Thu, 19 Aug 2021 17:08:34 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml715-chm.china.huawei.com (10.206.15.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Thu, 19 Aug 2021 11:09:29 +0200 Received: from [10.202.227.179] (10.202.227.179) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Thu, 19 Aug 2021 10:09:28 +0100 Subject: Re: [PATCH 0/3] Remove scsi_cmnd.tag To: Hannes Reinecke , Bart Van Assche , "Martin K. Petersen" CC: , , , , , , References: <1628862553-179450-1-git-send-email-john.garry@huawei.com> <176ce4f2-42c9-bba6-c8f9-70a08faa21b8@huawei.com> <038ec0c6-92c9-0f2a-7d81-afb91b8343af@suse.de> <6090371d-9688-11ae-8219-ba9929a96526@suse.de> From: John Garry Message-ID: <6c83bd7f-9fd2-1b43-627f-615467fa55d4@huawei.com> Date: Thu, 19 Aug 2021 10:09:27 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <6090371d-9688-11ae-8219-ba9929a96526@suse.de> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.202.227.179] X-ClientProxiedBy: lhreml710-chm.china.huawei.com (10.201.108.61) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/08/2021 08:50, Hannes Reinecke wrote: >>>    select CPU_32v4 if ARCH_RPC >> >> Does that build fully for xconfig or any others which you tried? >> > > Yep, xconfig and full build works. > > Well. > > Would've worked if you hadn't messed up tag handling for acornscsi :-) > > Besides: tag handling in acornscsi (and fas216, for that matter) seems > to be completely broken. > > Consider this beauty: > > #ifdef CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE >        /* >         * tagged queueing - allocate a new tag to this command >         */ >        if (SCpnt->device->simple_tags) { >            SCpnt->device->current_tag += 1; >            if (SCpnt->device->current_tag == 0) >                SCpnt->device->current_tag = 1; >            SCpnt->tag = SCpnt->device->current_tag; >        } else > #endif So isn't this just using the scsi_cmnd.tag as it own scribble? > > which is broken on _soo many_ counts. > Not only does it try to allocate its own tags, the code also assumes > that a tag value of '0' indicates that tagged queueing is not active: > In case you missed it, Arnd B tried to clear out some old platforms earlier this year. With respect to rpc, Russell King apparently still uses it and has some SCSI patches: https://lore.kernel.org/lkml/20210109174357.GB1551@shell.armlinux.org.uk/ I wonder what they are and maybe we can check. Anyway... I'd run any changes by him... > static > void acornscsi_abortcmd(AS_Host *host, unsigned char tag) > { >     host->scsi.phase = PHASE_ABORTED; >     sbic_arm_write(host, SBIC_CMND, CMND_ASSERTATN); > >     msgqueue_flush(&host->scsi.msgs); > #ifdef CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE >     if (tag) >         msgqueue_addmsg(&host->scsi.msgs, 2, ABORT_TAG, tag); >     else > #endif >         msgqueue_addmsg(&host->scsi.msgs, 1, ABORT); > } > > And, of course, there's the usual confusion about when to check for > sdev->tagged_supported and sdev->simple_tags. > > Drop me a note if I can give a hand. Thanks! Let's see what happens to the series which you just sent.