Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp92399imm; Tue, 19 Jun 2018 16:39:00 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIxOpeuaAP5hUIwDh8LnkfV9A3L8IV0Evo8NGg/i4YvNsj2tvie7zk+b0F5XFenk/OLUMOE X-Received: by 2002:a63:721d:: with SMTP id n29-v6mr16262370pgc.194.1529451540720; Tue, 19 Jun 2018 16:39:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529451540; cv=none; d=google.com; s=arc-20160816; b=qLqestTbqH2PJK64S1xff/i4V8jozykm+FEOiD3hRy2ENMl8OlyM1V/EcbG94olLJi 2Y4yzx3NU125URnw4uaYzrCrNigkyLCJAJim1+qRftEB9dfb/k9iuOXwbGbwo1ZcisJ7 PVzq0bQ96GJ1ETdu6DtAe7KFsGcnU/254FliDPxVHSObD2GXgQsR17S47oJr6hUOViiN 37jwGv1tcXHPvFdfyymi2N+TdntaR8IHIrvimKBxEwf6lovs9jRZPKZix3fp6zHhIR1s +R86I8P7PNf7x2SpEPuPTJ63noNIg0ai3SOfoto5gd/uIlFW8VwXd+bBVSVM1Ii5zN7w foCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:arc-authentication-results; bh=mc8MYOPEKO2KNQBrePHZgE7GBGrQlq79eKeKYRyDfTc=; b=DQrvTyp7rC6ynhplNk1Ap01jIyMpBADboDVyTEw/yAsIx5A+nbEnncd4Vt0xa978b+ mDP1inM8UUb/Iy4qDX/UO4lezF//8fYG2CM2ejcu/en2EpFFk5/cjHthZ9jMYMQ8HXXr vLrC8LkzFfnzC2pGrNSK9UetEjlf1StPXeu6Bhli6SkRZ1bgG3OcjNQAuNDMu55jhL8/ T9XbdPcmatXYkRyWmiBkVbfraqB6JkvxPdJ4VPwcYxjtcr0qA2XvpOLxokXHtrOk9Zb7 vUau/DeQioI32vssC2JLoaU/GPAyZyXCZ+bYDUbBWFnCcmnMlW1iUoYlEqykJU5Udgwm Y+Mg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g66-v6si654305pfd.86.2018.06.19.16.38.16; Tue, 19 Jun 2018 16:39:00 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752121AbeFSXf7 (ORCPT + 99 others); Tue, 19 Jun 2018 19:35:59 -0400 Received: from ozlabs.org ([203.11.71.1]:41699 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750805AbeFSXfy (ORCPT ); Tue, 19 Jun 2018 19:35:54 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 419PV03X3Zz9s3C; Wed, 20 Jun 2018 09:35:52 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au From: Michael Ellerman To: Jens Axboe , Tejun Heo Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, Linus Torvalds , linuxppc-dev Subject: Re: Constant ata messages on console with commit 28361c403683 ("libata: add extra internal command") (was Re: [GIT PULL 2/2] libata changes for v4.18-rc1) In-Reply-To: References: <20180605190807.GE1351649@devbig577.frc2.facebook.com> <20180605191525.GF1351649@devbig577.frc2.facebook.com> <87bmc8a6qi.fsf@concordia.ellerman.id.au> <87sh5jxmif.fsf@concordia.ellerman.id.au> Date: Wed, 20 Jun 2018 09:35:51 +1000 Message-ID: <87r2l2wdrc.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jens Axboe writes: > On 6/19/18 1:29 AM, Michael Ellerman wrote: >> Jens Axboe writes: >>> On 6/18/18 1:33 AM, Michael Ellerman wrote: >>>> Tejun Heo writes: >>>> ... >>>>> Jens Axboe (10): >>>>> libata: introduce notion of separate hardware tags >>>>> libata: convert core and drivers to ->hw_tag usage >>>>> libata: bump ->qc_active to a 64-bit type >>>>> libata: use ata_tag_internal() consistently >>>>> libata: remove assumption that ATA_MAX_QUEUE - 1 is the max >>>>> sata_nv: set host can_queue count appropriately >>>>> libata: add extra internal command >>>> >>>> Replying here because I can't find the original mail. >>>> >>>> The above commit is causing one of my machines to constantly spew ata >>>> messages on the console, according to bisect: >>>> >>>> # first bad commit: [28361c403683c2b00d4f5e76045f3ccd299bf99d] libata: add extra internal command >>>> >>>> To get it to boot I have to also apply: >>>> >>>> 88e10092f6a6 ("sata_fsl: use the right type for tag bitshift") >>>> >>>> >>>> The system boots OK and seems fine, except that it's just printing >>>> multiple of these per second: >>>> >>>> ata2: Signature Update detected @ 0 msecs >>>> ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300) >>>> ata2.00: configured for UDMA/100 >>>> ata2: Signature Update detected @ 0 msecs >>>> ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300) >>>> ata2.00: configured for UDMA/100 >>>> ata2: Signature Update detected @ 0 msecs >>>> ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300) >>>> ata2.00: configured for UDMA/100 >>>> ata2: Signature Update detected @ 0 msecs >>>> ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300) >>>> ata2.00: configured for UDMA/100 >>>> ata2: Signature Update detected @ 0 msecs ... > > Actually, just try this one on top of current -git. Yep that fixes it. No more message spam, and when I try to mount sr0 it says "no medium". I'll have to go into the office to actually put a disc in the drive to check it's really working, but it seems likely. Thanks for debugging it, here's a tested-by if you like: Tested-by: Michael Ellerman cheers > diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c > index b8d9cfc60374..4007a9ae650d 100644 > --- a/drivers/ata/sata_fsl.c > +++ b/drivers/ata/sata_fsl.c > @@ -395,12 +395,6 @@ static inline unsigned int sata_fsl_tag(unsigned int tag, > { > /* We let libATA core do actual (queue) tag allocation */ > > - /* all non NCQ/queued commands should have tag#0 */ > - if (ata_tag_internal(tag)) { > - DPRINTK("mapping internal cmds to tag#0\n"); > - return 0; > - } > - > if (unlikely(tag >= SATA_FSL_QUEUE_DEPTH)) { > DPRINTK("tag %d invalid : out of range\n", tag); > return 0; > @@ -1229,7 +1223,7 @@ static void sata_fsl_host_intr(struct ata_port *ap) > > /* Workaround for data length mismatch errata */ > if (unlikely(hstatus & INT_ON_DATA_LENGTH_MISMATCH)) { > - for (tag = 0; tag < ATA_MAX_QUEUE; tag++) { > + for (tag = 0; tag <= ATA_MAX_QUEUE; tag++) { > qc = ata_qc_from_tag(ap, tag); > if (qc && ata_is_atapi(qc->tf.protocol)) { > u32 hcontrol; > > -- > Jens Axboe