From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0AA5468 for ; Thu, 11 Nov 2021 10:54:15 +0000 (UTC) Received: by mail-lj1-f173.google.com with SMTP id d11so11093682ljg.8 for ; Thu, 11 Nov 2021 02:54:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=exuvo-se.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=dRLHwqrTsyOcJE6upu8cYqSGo8L6w9AqKKbX0nen3sw=; b=wZApJBu/3B1yHkQcgDVreFJ7//jvgeJqTiRJ6+ZhbbfvOzSz67+TRphnj0F5LBuwC5 Ue0I0Dpd+TxARhQS5XIH3awjfUV/m2BrKG96BOdWVOWtlvDKbqZ8KBcC5yUlJilKeI2U NpR/puDDnZY4xx3iGxHX+eCa5+iJ7HeGWKk4VqPFzvhBUh4MRJLUSSN04EI2ezansRQe qzL/8xQS+DNdP8XObh68b/kNBNKRMvTXySvMMraAXAnC59fLFoVFTfDLbhIU3GarrmHW NPzXm+gbm0AWj84uhVmdtp6KP4oGQV7uuoS03xFT48jtW1JmYMdis/gD8aYDOW4uepjF KBVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=dRLHwqrTsyOcJE6upu8cYqSGo8L6w9AqKKbX0nen3sw=; b=CByzY0Vd+hZS040Iyf9krMKodauu3hzy2fr77lkOTT7NbVYqhi8j7EQMkdnnOgT7Ps DHHSWpmqw7DfliUSslSaE+T6WzTGwUN1UoFUF1/B1ATrc0jrO8VtvAFrGlXznPlfSt9t 7do/8BmpqtYpU5Rhn+rzUM9iPAu+R9LQIeXE6m2SZwol1G0QLm4bSyKVMEgBsJl6W4FY W+FNOjN4ExCt+Jv/cSYv7usQoa6ri1XDd88xgb+3MSbRH6TDsvpHm2cnrfe4LS6Rgyqc oOGDrGr2lSWUF2a44Yxgwi6HMuK1aUQC8eLMhfskf9WkUB363KojrllTw3fIV1Rpd3/6 ryOA== X-Gm-Message-State: AOAM532lApyfhvHcIdvlcy8EDpZKrDoYA4x7AI/eiUkp2KxlAxl6E8T1 hWw+VywOmEYtCWJjIWZjDRCy6w== X-Google-Smtp-Source: ABdhPJwbtGi5L/PvJf7+aam1+CKynLnSusufMnfQGhdyJqzPdnhEbj4xQmeUz+eV4u8InDRxUNksIw== X-Received: by 2002:a2e:a785:: with SMTP id c5mr6147076ljf.384.1636628053744; Thu, 11 Nov 2021 02:54:13 -0800 (PST) Received: from ?IPV6:2001:9b0:218:2b00::30? ([2001:9b0:218:2b00::30]) by smtp.googlemail.com with ESMTPSA id y1sm252858lfd.204.2021.11.11.02.54.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Nov 2021 02:54:13 -0800 (PST) Message-ID: Date: Thu, 11 Nov 2021 11:54:12 +0100 Precedence: bulk X-Mailing-List: regressions@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: rt2x00 regression Content-Language: en-US To: Stanislaw Gruszka , Kalle Valo Cc: Thorsten Leemhuis , Stanislaw Gruszka , "linux-wireless@vger.kernel.org" , Helmut Schaa , "regressions@lists.linux.dev" References: <87czop5j33.fsf@tynnyri.adurom.net> <6366d9bd-9752-dbc2-8970-442bdc6e8eea@leemhuis.info> <7d353dd2-2ffb-6d5e-9983-f983c8b4f6da@leemhuis.info> <20211109073127.ga109212@wp.pl> <20211109120737.ga120005@wp.pl> <87wnlgo5rp.fsf@codeaurora.org> <20211110080141.GA123566@wp.pl> From: Exuvo In-Reply-To: <20211110080141.GA123566@wp.pl> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Yes that patch works :D Anton "exuvo" Olsson exuvo@exuvo.se On 2021-11-10 09:01, Stanislaw Gruszka wrote: > On Wed, Nov 10, 2021 at 08:59:22AM +0200, Kalle Valo wrote: >> Stanisław Gruszka writes: >> >>> Dnia 9 listopada 2021 16:22 Exuvo napisał(a): >>> >>> Just tested it and it passes the rt2x00lib_load_firmware but still errors on >>> rt2800usb_set_device_state: >>> >>> >>> >>> @@ -30,7 +30,8 @@ static bool rt2x00usb_check_usb_error(struct rt2x00_dev *rt2x00dev, int status) >>> else >>> rt2x00dev->num_proto_errs = 0; >>> >>> - if (rt2x00dev->num_proto_errs > 3) >>> + if (rt2x00dev->num_proto_errs > 3 && >>> + !test_bit(DEVICE_STATE_STARTED, &rt2x00dev->flags)) >>> return true; >>> >>> return false; >>> >>> Sorry, I screwed logic in my patch. It should be test_bit() instead of !test_bit(). >>> And also we should not count when device did not start. So patch should be somewhat different. I'll >>> send tomorrow hopefully better patch. >> No HTML, please :) I'll reply so that lists see your email. > Eh, I sent from my phone to give quick update, did not realize > it send in HTML. > > Anyway, below is updated patch. I hope it will work correctly now. > > Regards > Stanislaw > > diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c > index e4473a551241..74c3d8cb3100 100644 > --- a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c > +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c > @@ -25,6 +25,9 @@ static bool rt2x00usb_check_usb_error(struct rt2x00_dev *rt2x00dev, int status) > if (status == -ENODEV || status == -ENOENT) > return true; > > + if (!test_bit(DEVICE_STATE_STARTED, &rt2x00dev->flags)) > + return false; > + > if (status == -EPROTO || status == -ETIMEDOUT) > rt2x00dev->num_proto_errs++; > else > >