From owner-freebsd-drivers@FreeBSD.ORG Fri Feb 7 08:45:45 2014 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 897D127E for ; Fri, 7 Feb 2014 08:45:45 +0000 (UTC) Received: from mail-ea0-x230.google.com (mail-ea0-x230.google.com [IPv6:2a00:1450:4013:c01::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1DAFF11F8 for ; Fri, 7 Feb 2014 08:45:44 +0000 (UTC) Received: by mail-ea0-f176.google.com with SMTP id h14so1371453eaj.21 for ; Fri, 07 Feb 2014 00:45:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=YLFsxAAQgJ3a6n0TqQVRFudhjnuUNScLRs2RTPOu2Sw=; b=QwHCGvxmwc3AK69T4ZiUK1prKccEk71OOaitO9NJZh8h2IlhWifPlPYK34QOxC42nP knXa9wZCMN1t309Mz0yjQoW4Qvly0Gp2i69YQErVKep98dovYR5W1Z3feXKi3WgOU/iy K2DyHjDPr7nI+SLf18zEZ5f1C0fdrxug6Gtf8yUJkxg4wH8aWpZtDlqs7okrSyCunAJP cbZugNza489tW2YWzid8Yo+V2YBzEwln9HNvkx8OC5a/Uxte/Bjbe/yyQ1VEIp9RwDZN ltzoSoOFcECoG2qjgMuGZELdxxahGA8N5xiOGr8515mbUCeU6mJygJQDynHEKQ5uyANO RfhQ== X-Received: by 10.14.98.193 with SMTP id v41mr365762eef.112.1391762743473; Fri, 07 Feb 2014 00:45:43 -0800 (PST) Received: from ?IPv6:2001:67c:2154:ffff:951e:2b6:ce23:542e? ([2001:67c:2154:ffff:951e:2b6:ce23:542e]) by mx.google.com with ESMTPSA id s46sm13698877eeb.0.2014.02.07.00.45.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Feb 2014 00:45:43 -0800 (PST) Message-ID: <52F49D36.8000103@gmail.com> Date: Fri, 07 Feb 2014 10:45:42 +0200 From: Viktor User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: freebsd-drivers@freebsd.org Subject: Receiving jumbo frames Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Feb 2014 08:45:45 -0000 Hi, folks! I'm writing an extension functionality to not-yet published network driver. I'm receiving the typical ethernet frames without problems. Considering the datasheet of the device, I'm capable of receiving jumbo frames. When I try to do that, e.g. to send jumbo frame of 8000 bytes, I'm receiving only a limited count of them - 105, then the kernel crashes with the following message: "panic: vm_fault: fault on nofault entry, addr: cfcec000". I have inspected a kernel dump with kgdb and the problem occurs at the function bus_dmamap_sync. Some background information: To enable the jumbo frame, one must set the appropriate register. At the software level, a ring buffer with the descriptors is implemented. The device, under which the driver runs, is arm-based. The freebsd version is 8.0. The device uses SerialDMA queues for transmitting and receiving. To receive packets, the CPU must perform the following: 1. Prepare a linked list of descriptors 2. Configure a given queue with the address of the first descriptor in the list, 3. enable SerialDMA; With the transmission - I don't have any problems. The logic is the same as by the reception of packets - ring buffer with descriptors. Any ideas what can cause this type of crashes?