From owner-freebsd-wireless@freebsd.org Mon May 14 18:03:01 2018 Return-Path: Delivered-To: freebsd-wireless@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2081EDFDD8D for ; Mon, 14 May 2018 18:03:01 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 905DC7EE68 for ; Mon, 14 May 2018 18:03:00 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x243.google.com with SMTP id j4-v6so15103275wme.1 for ; Mon, 14 May 2018 11:03:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HEpFVbDQn9XxCf910lcjAx3Mn2wvm+KNH4WVeolOMWI=; b=S6eH0Y8mxkYJeTiE1Dul8hKGHJeD1AuPdrk37A72W2MHyaBPBVah67YaxYrrGmc2PD 7MJX7GcKLbNbjbwsDNkrS/SS+C31bc4uFA9vIyVmvMdV8efZ0UGKHy9zW+PxnyPDFoFH ajW6bLrZwYddYh/8+YXX8FSHGRJoVyX03LV9fc9kolDvKLIgEZ2ZJrDWFq6/DDzXtOj3 Soh81gwVgrzs15GrPLyIud3OOlBJyFwXgxOOrqcwHk/kDhIwk/lsXoVZbz28H1k60mB7 xpx0KxB4Fn5IErqZgtQYUMv5vDtCHpKoiP/qVaWvjoNeHiIaeqguhDSy2hZa1no/w/SK d/uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HEpFVbDQn9XxCf910lcjAx3Mn2wvm+KNH4WVeolOMWI=; b=VlFohFtCwqefEXRUKR5BFeLFkW8Q+4JEJ9/t3KsO3pk6nSeNYHqeszlAZttBjGxfqA NkA8ryv6MDtV5Uoha0kLBR1lU95WURzgiAnoLGs8AXQJXBkBu2/2/+BpLLcjfi8cJRDV sOnlOcgXPNYH91/ZJY+Itm9Rd43iasQn9WomdzGRRiJ65dZrmqdwvA/29VBVVmCS60hQ 8PsMczcsYoRljHZIHNRRA1oTtDUkju0IAANNBLW83FcVg3nFQtDW3dJ6LT4l5zZEa4fn aJnfdrJaQ7RgFeHpXCxTTS8aVXRGG4CA0uGHtc5pOkcSPsqGxOaInTetIGWbSJz+PNcH 1g6Q== X-Gm-Message-State: ALKqPwfC4YNH1Xv5AZqErh/hjiB9znKcy/gHdn8UO1EqP2BUaVNcFQOe XeUMmw+yM9OI14Qp8Kf621S3tNLbCKYKTPJcq+A= X-Google-Smtp-Source: AB8JxZrmY5hMrUlug5CQG/k/3LTblDB9ZohiMro3f9kysBsLTIYZJad2PsAhql5M1o4YOsmsTdlc7LN3ddMDjOGpVWE= X-Received: by 2002:a1c:da50:: with SMTP id r77-v6mr5421005wmg.105.1526320979508; Mon, 14 May 2018 11:02:59 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Adrian Chadd Date: Mon, 14 May 2018 11:02:52 -0700 Message-ID: Subject: Re: Handling C2H debug interrupt on rtwn(8) To: Farhan Khan Cc: "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2018 18:03:01 -0000 It sounds like you need to ignore it! -adrian On Mon, 14 May 2018 at 09:48, Farhan Khan wrote: > Hi all, > I have a question regarding catching an unhandled C2H event interrupt. > rtwn(4) receives C2H interrupts from the device. One type > is R92C_C2H_EVT_DEBUG as defined in sys/dev/rtwn/rtl8192c/r92c_fw_cmd.h as > 0. Interrupts are handled in r92c_handle_c2h_task() in > sys/dev/rtwn/rtl8192c/r92c_fw.c line 479. I noticed that rtl8188ee (driver > in development) sends R92C_C2H_EVT_DEBUG, but they are not handled, > resulting in the 'default' case, which is to print a warning into the > kernel messages buffer. > As a result, I am seeing a ton of warning messages across my terminal 1-2 > times a second. This is not a problem for me in development, but would > problematic for any user of the driver, as it would fill up the kernel > messages buffer very quickly. > I reviewed Linux's equivalent code and found that rtl8723ae is the only one > of the rtlwifi drivers that checks C2H_EVT_HOST_CLOSE (also defined as 0), > and immediately just does a 'return'. > Would it be correct for me to imitate this behavior, check for the same C2H > message type, and immediately issue a 'break'? I did so in my dev > repository here: https://github.com/khanzf/rtl8188ee/commit/b9dd37c8f40af1bda1ec8d82fdaa051840b85e75 > . > Thanks! > -- > Farhan Khan > PGP Fingerprint: B28D 2726 E2BC A97E 3854 5ABE 9A9F 00BC D525 16EE > _______________________________________________ > freebsd-wireless@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-wireless > To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.org "