From patchwork Wed Aug 2 21:55:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexander Aring X-Patchwork-Id: 9877807 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 36A4D6037D for ; Wed, 2 Aug 2017 21:55:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2AD4627CF9 for ; Wed, 2 Aug 2017 21:55:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F3A4285A2; Wed, 2 Aug 2017 21:55:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5CA4F27CF9 for ; Wed, 2 Aug 2017 21:55:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751145AbdHBVzo (ORCPT ); Wed, 2 Aug 2017 17:55:44 -0400 Received: from mail-io0-f177.google.com ([209.85.223.177]:34029 "EHLO mail-io0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751058AbdHBVzo (ORCPT ); Wed, 2 Aug 2017 17:55:44 -0400 Received: by mail-io0-f177.google.com with SMTP id o9so275888iod.1 for ; Wed, 02 Aug 2017 14:55:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=HNG+3Pc8SunKZmsYjnZObAJKarxLvqc5mCMmP8vNFrk=; b=XKorMehXhxT2W0/YiOC6WHvVrBYHblfkfH+p1K4D/dagHWOZWnV4EmZLg5pHrEgDLs EKxPCBm7cWdXMaWw7XlI4NAKCEEJUGZPVeUhH2NSr7yprphpkMt8E+H6o9Nd4rQc5eve tqcHobJV9kE4NaZfL2UeIo2ed7T7cKPNOi8LjBrVZxzp69dyGbxXhvijW5DYRDaZ/I60 6hLWjuBKApslxCq8ITaPoajNyn4bFonBDJuM93cF/lrhqOTw3EKPLfQrzqzIQ/JSSBQ9 wj9NxvLJRPCyNFSS13V6WW0YeMnPFsZRKCxIvaXcbtxhbQ3DJFS68Wb3psLkOBIAV/xz p9iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=HNG+3Pc8SunKZmsYjnZObAJKarxLvqc5mCMmP8vNFrk=; b=IXA/KHIEG9MLRvFQ3C1FbqmM7iofqbrdCeek9n9O92tYPtBkZ1puRDgk9NWlObx5IV Q9dHf2hjv5z6yOOvEonnTzFoUJmjpT3j4vUzLMXhfArNoFyo0MVAFnDN0JTEy+/d/qyE jwJ1dZS9w/TCWnQb93eLLPIrAdVFTLSQShyfJVWf09TPabHGoD6y5iV/PSHWEKfRnqzS WtuDfi8KeQ3Ffhw4PtX03XFhao3l9eR8gcA5gL6H6gP9IR+6aJjXsc8YHTWvkWVvp9ab pX8S/Zu5XZ4szfWWEFTFz7yaBxOgahn8MxY5QIcidejpnSoHK0whAQMk3rKUnuGWbW20 4LKg== X-Gm-Message-State: AIVw111617lDPjlNEnNclCh6JjxOvHCEdHf9zWvRScHCNMUoJj3dnQoE gMUL/y4YxTB68OWeCWd7adL2uzeCCdXj X-Received: by 10.107.139.13 with SMTP id n13mr27643079iod.253.1501710943315; Wed, 02 Aug 2017 14:55:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.22.69 with HTTP; Wed, 2 Aug 2017 14:55:42 -0700 (PDT) In-Reply-To: References: <20170707110011.pwz272ppmwwu2wzh@omega> <20170708180631.l7lddi475pmua33o@omega> <20170708181113.htxnpxrzxgsrqyva@omega> <20170708181410.64zhqqyfvgp22b6c@omega> <583268dc-46a4-c78d-dfcf-d0083caa0888@hm.edu> <20170709182728.kam75j2kpt36ulju@omega> <3cf26613-fe30-c9a4-01f8-5a9219bf6da1@hm.edu> <20170710094026.4urdv5bovwiztku7@omega> <6deda57a-4a26-ecae-0846-f34174acef09@hm.edu> <20170710120303.5v3wikb3lkpvoao2@omega> <1a7c2fd3-fda8-765a-f055-c32302a23879@freenet.de> <5146468f-566c-40e4-e428-9cac2b90d470@hm.edu> From: Alexander Aring Date: Wed, 2 Aug 2017 17:55:42 -0400 Message-ID: Subject: Re: Resend : Reading corrupt IEEE 802.15.4 packages with the AT-REB233 and the BeagleBone Black with IWPAN To: Alexander Aring Cc: Balz , linux-wpan - ML Sender: linux-wpan-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, 2017-08-02 14:59 GMT-04:00 Alexander Aring : > Hi, > > On Wed, Aug 2, 2017 at 1:03 PM, Balz wrote: >> Hi Alex, >> >> I've changed the Kernel module so that i read the Framebuffer as SRAM and >> not as FrameBuffer. >> I've write a 0x00n followed by 0x00 to determine a SRAM read from the addr >> 0. >> >> But the Kernel Module can not identity the frame length any more. >> >> The Sniffed packages (all Packages have 143 byte length) do not show the >> behaviour any more. >> >> Maybe the SRAM read access is protected and the Frame-buffer Read not...? >> > > I think frame buffer read access only. > > "Dynamic Frame Buffer Protection is released on the rising edge of pin 23 (/SEL) > during a Frame Buffer read access, or on the radio transceiver’s > state change from > RX_ON or RX_AACK_ON to another state.", see [0]. Please try this patch: I think I know what could be going on... It's "... to another state."... Maybe when a RX irq occurs during the spi async handling there could be some "xmit" callbacks... This will change the transceiver into another state... (not directly, but so far I know it queues for state change). So when it will automatically go into RX_AACK_ON then it will change the state to something else and allows framebuffer overwrite. - Alex --- To unsubscribe from this list: send the line "unsubscribe linux-wpan" 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/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index 548d9d026a85..a54f0a0d3fef 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/net/ieee802154/at86rf230.c @@ -709,6 +709,8 @@ at86rf230_rx_read_frame_complete(void *context) struct sk_buff *skb; u8 len, lqi; + ieee802154_start_queue(lp->hw); + len = buf[1]; if (!ieee802154_is_valid_psdu_len(len)) { dev_vdbg(&lp->spi->dev, "corrupted frame received\n"); @@ -824,6 +826,9 @@ static irqreturn_t at86rf230_isr(int irq, void *data) disable_irq_nosync(irq); + if (!lp->is_tx) + ieee802154_stop_queue(lp->hw); + ctx = kzalloc(sizeof(*ctx), GFP_ATOMIC); if (!ctx) { enable_irq(irq);