From patchwork Wed Mar 18 13:11:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stanislaw Gruszka X-Patchwork-Id: 6039041 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4BB8A9F399 for ; Wed, 18 Mar 2015 13:15:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8C2E420431 for ; Wed, 18 Mar 2015 13:15:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C36C920421 for ; Wed, 18 Mar 2015 13:15:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755958AbbCRNPL (ORCPT ); Wed, 18 Mar 2015 09:15:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37763 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755717AbbCRNPK (ORCPT ); Wed, 18 Mar 2015 09:15:10 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2IDEwsF013523 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 18 Mar 2015 09:14:59 -0400 Received: from localhost (vpn1-6-141.ams2.redhat.com [10.36.6.141]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2IDEuNt007143; Wed, 18 Mar 2015 09:14:57 -0400 Date: Wed, 18 Mar 2015 14:11:25 +0100 From: Stanislaw Gruszka To: Sebastian Andrzej Siewior Cc: Kalle Valo , linux-wireless@vger.kernel.org, Helmut Schaa Subject: Re: [1/3] rt2x00usb: initialize the read value in case of failure Message-ID: <20150318131124.GA11724@redhat.com> References: <1426170946-13918-1-git-send-email-bigeasy@linutronix.de> <20150316160652.789B313FBE6@smtp.codeaurora.org> <20150316164100.GA6208@linutronix.de> <20150317083414.GA1276@linutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150317083414.GA1276@linutronix.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Mar 17, 2015 at 09:34:14AM +0100, Sebastian Andrzej Siewior wrote: > I have no idea what AutoRun mode is (it seems that the stick already > has a firmware and is happy with it) and I have no clue why the firmware > decides to lie about it. I looked at the vendor driver I found at github > (which seems to be from 2012-10-22, DPO_RT5572_LinuxSTA_2.6.1.3) and > well, I look again if someone says it is worth looking… They seem to do > some kind "firmware is comming" magic which might be already done in the > current driver at a different spot but I think the main question is why > request is answered wrong. I *think* the vendor driver sends the > USB_MODE_AUTORUN request only once but it is hard to tell… Does the below patch solve the issue ? --- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 9a2f44a..3a6cae8 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c @@ -293,6 +293,7 @@ static int rt2800usb_write_firmware(struct rt2x00_dev *rt2x00dev, if (retval) { rt2x00_info(rt2x00dev, "Firmware loading not required - NIC in AutoRun mode\n"); + __clear_bit(REQUIRE_FIRMWARE, &rt2x00dev->cap_flags); } else { rt2x00usb_register_multiwrite(rt2x00dev, FIRMWARE_IMAGE_BASE, data + offset, length);