From owner-freebsd-drivers@FreeBSD.ORG Tue Mar 13 17:33:02 2012 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5161310657DC for ; Tue, 13 Mar 2012 17:33:02 +0000 (UTC) (envelope-from innsmouth.rain@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id CC5F38FC1A for ; Tue, 13 Mar 2012 17:33:01 +0000 (UTC) Received: by lagv3 with SMTP id v3so989955lag.13 for ; Tue, 13 Mar 2012 10:33:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=hCryM8FOhyoezsDQe8Vi2BRw8sBXts0Ozr38zU0InuA=; b=uQ0qY9rMBxp5JciM9E+FJs3XqChoGN3LfTe7Fa+oaGM2wuSnl8sznFn6L40EzsLCw9 pyEvM7QXlsZl5kzr72Jqy1KYany7TG9pXu0BmyGf5q9Vc9fZoA2VlyPOrwFdueFNLMaJ zi8kHd4+WXsejGZEBCala2lnAtfeH+X4uMq14EqvBiR3CY/2SAIfEi+znS+nlQBH+wwP RqUzWWASIwuR0DcUQrP45cKyRwEbH9sZQU4ynZNh+TqnaLaE2S2adKg7SOOoyeMgWyJG QbjJbe6MNtgwnSegEf9P5/5WA9eTM4ciisqvAgoHgSt2Tj5QKuLkrOjm3wz+vqPEYP24 80kQ== MIME-Version: 1.0 Received: by 10.112.84.233 with SMTP id c9mr6517307lbz.1.1331659980557; Tue, 13 Mar 2012 10:33:00 -0700 (PDT) Received: by 10.152.134.203 with HTTP; Tue, 13 Mar 2012 10:33:00 -0700 (PDT) Date: Tue, 13 Mar 2012 17:33:00 +0000 Message-ID: From: Love von Melen Ekman To: freebsd-drivers@freebsd.org X-Mailman-Approved-At: Tue, 13 Mar 2012 17:50:06 +0000 Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Writing a SIM card reader device driver X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 17:33:02 -0000 Hello, freebsd-drivers I have decided to write the driver for the built-in card-reader in Samsung netbooks (nc10). It's called Samsung Y3100. I have not contributed code outside of work before, and nothing this low level, but I am bent on learning what it takes. So, I have two questions. Is "porting" the linux driver a good idea? The kernel is of course very different, but maybe the linux code will teach me about the device? And can you point me to good information or give good advice to an aspiring device driver developer? Do's and dont's and general ideas would be appreciated. I have google, of course, but any additional advice I can get I will listen heartily to. Sincerely, Love von Melen On 9 March 2012 12:00, wrote: > Send freebsd-drivers mailing list submissions to > freebsd-drivers@freebsd.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.freebsd.org/mailman/listinfo/freebsd-drivers > or, via email, send a message with subject or body 'help' to > freebsd-drivers-request@freebsd.org > > You can reach the person managing the list at > freebsd-drivers-owner@freebsd.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of freebsd-drivers digest..." > > > Today's Topics: > > 1. iSCSI Target For Freebsd (David Somayajulu) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 8 Mar 2012 18:30:28 -0800 > From: David Somayajulu > Subject: iSCSI Target For Freebsd > To: "freebsd-net@freebsd.org" , > "freebsd-current@freebsd.org (freebsd-current@FreeBSD.org)" > , "freebsd-drivers@freebsd.org" > > Message-ID: > <75E1A2A7D185F841A975979B0906BBA67C79E3F37F@AVEXMB1.qlogic.org> > Content-Type: text/plain; charset="us-ascii" > > Hi All, > Is there are an iSCSI Software Target that you can recommend. I have tried > using istgt ( on Freebsd7.2) with Windows iSCSI Software Initiator. The > initiator is able to discover the target however it is unable to login to > the target. > > The login Response shows that the = <0203> > indicating that "the requested ITN does not exist at this address" > > Thanks > David S. > > ________________________________ > This message and any attached documents contain information from QLogic > Corporation or its wholly-owned subsidiaries that may be confidential. If > you are not the intended recipient, you may not read, copy, distribute, or > use this information. If you have received this transmission in error, > please notify the sender immediately by reply e-mail and then delete this > message. > > > ------------------------------ > > _______________________________________________ > freebsd-drivers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-drivers > To unsubscribe, send any mail to "freebsd-drivers-unsubscribe@freebsd.org" > > > End of freebsd-drivers Digest, Vol 197, Issue 1 > *********************************************** > From owner-freebsd-drivers@FreeBSD.ORG Wed Mar 14 21:06:41 2012 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF797106566C for ; Wed, 14 Mar 2012 21:06:41 +0000 (UTC) (envelope-from adarsh.joshi@qlogic.com) Received: from tx2outboundpool.messaging.microsoft.com (tx2ehsobe001.messaging.microsoft.com [65.55.88.11]) by mx1.freebsd.org (Postfix) with ESMTP id A5AAD8FC18 for ; Wed, 14 Mar 2012 21:06:41 +0000 (UTC) Received: from mail80-tx2-R.bigfish.com (10.9.14.251) by TX2EHSOBE008.bigfish.com (10.9.40.28) with Microsoft SMTP Server id 14.1.225.23; Wed, 14 Mar 2012 21:06:36 +0000 Received: from mail80-tx2 (localhost [127.0.0.1]) by mail80-tx2-R.bigfish.com (Postfix) with ESMTP id 1E8E82E046F for ; Wed, 14 Mar 2012 21:06:36 +0000 (UTC) X-SpamScore: -7 X-BigFish: VPS-7(zzc85fh14ffOzz1202hzz8275bh8275dhz2fh2a8h668h839hd25h) X-Forefront-Antispam-Report: CIP:198.70.193.61; KIP:(null); UIP:(null); IPV:NLI; H:avexcashub1.qlogic.com; RD:avexcashub1.qlogic.com; EFVD:NLI Received-SPF: pass (mail80-tx2: domain of qlogic.com designates 198.70.193.61 as permitted sender) client-ip=198.70.193.61; envelope-from=adarsh.joshi@qlogic.com; helo=avexcashub1.qlogic.com ; 1.qlogic.com ; Received: from mail80-tx2 (localhost.localdomain [127.0.0.1]) by mail80-tx2 (MessageSwitch) id 1331759194148145_22211; Wed, 14 Mar 2012 21:06:34 +0000 (UTC) Received: from TX2EHSMHS039.bigfish.com (unknown [10.9.14.236]) by mail80-tx2.bigfish.com (Postfix) with ESMTP id 1AD9EE009C for ; Wed, 14 Mar 2012 21:06:34 +0000 (UTC) Received: from avexcashub1.qlogic.com (198.70.193.61) by TX2EHSMHS039.bigfish.com (10.9.99.139) with Microsoft SMTP Server (TLS) id 14.1.225.23; Wed, 14 Mar 2012 21:06:33 +0000 Received: from avexmb1.qlogic.org ([fe80::9545:3a4f:c131:467d]) by avexcashub1.qlogic.org ([::1]) with mapi; Wed, 14 Mar 2012 14:06:31 -0700 From: Adarsh Joshi To: "freebsd-drivers@freebsd.org" Date: Wed, 14 Mar 2012 14:06:28 -0700 Thread-Topic: Zero MAC address Thread-Index: Ac0CJTucOy6uhlImT8Ws0ELhIr4yHA== Message-ID: <5E4F49720D0BAD499EE1F01232234BA87438162F44@AVEXMB1.qlogic.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-OriginatorOrg: qlogic.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Zero MAC address X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 21:06:42 -0000 Hello everyone, I assigned a 00:00:00:00:00:00 MAC address to one of my interfaces on a mac= hine and tried to ping the peer machine. The ping did go through fine. I can the see the request and reply packets on the packet capture. I am won= dering if that is legitimate and if not, who is supposed to check that. I m= ean, the stack or the driver on the sending machine or the receiving machin= e. Basically, I am trying to test a statistics utility which keeps track of pa= ckets with invalid MAC addresses. Are the packets with zero MAC addresses = be classified as invalid? Thanks a lot Adarsh ________________________________ This message and any attached documents contain information from QLogic Cor= poration or its wholly-owned subsidiaries that may be confidential. If you = are not the intended recipient, you may not read, copy, distribute, or use = this information. If you have received this transmission in error, please n= otify the sender immediately by reply e-mail and then delete this message. From owner-freebsd-drivers@FreeBSD.ORG Wed Mar 14 22:48:05 2012 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D979F106567A; Wed, 14 Mar 2012 22:48:05 +0000 (UTC) (envelope-from adarsh.joshi@qlogic.com) Received: from va3outboundpool.messaging.microsoft.com (va3ehsobe004.messaging.microsoft.com [216.32.180.14]) by mx1.freebsd.org (Postfix) with ESMTP id 722818FC14; Wed, 14 Mar 2012 22:48:05 +0000 (UTC) Received: from mail22-va3-R.bigfish.com (10.7.14.245) by VA3EHSOBE010.bigfish.com (10.7.40.12) with Microsoft SMTP Server id 14.1.225.22; Wed, 14 Mar 2012 22:48:05 +0000 Received: from mail22-va3 (localhost [127.0.0.1]) by mail22-va3-R.bigfish.com (Postfix) with ESMTP id 8B5832E04E8; Wed, 14 Mar 2012 22:48:05 +0000 (UTC) X-SpamScore: -6 X-BigFish: VPS-6(zzc85fh14ffOzz1202hzz8275bh8275dhz2ei2a8h668h839hd25h) X-Forefront-Antispam-Report: CIP:198.70.193.64; KIP:(null); UIP:(null); IPV:NLI; H:avexcashub1.qlogic.com; RD:avexcashub2.qlogic.com; EFVD:NLI Received-SPF: neutral (mail22-va3: 198.70.193.64 is neither permitted nor denied by domain of qlogic.com) client-ip=198.70.193.64; envelope-from=adarsh.joshi@qlogic.com; helo=avexcashub1.qlogic.com ; 1.qlogic.com ; Received: from mail22-va3 (localhost.localdomain [127.0.0.1]) by mail22-va3 (MessageSwitch) id 1331765284322753_17788; Wed, 14 Mar 2012 22:48:04 +0000 (UTC) Received: from VA3EHSMHS010.bigfish.com (unknown [10.7.14.237]) by mail22-va3.bigfish.com (Postfix) with ESMTP id 3ECD338004A; Wed, 14 Mar 2012 22:48:04 +0000 (UTC) Received: from avexcashub1.qlogic.com (198.70.193.64) by VA3EHSMHS010.bigfish.com (10.7.99.20) with Microsoft SMTP Server (TLS) id 14.1.225.23; Wed, 14 Mar 2012 22:48:03 +0000 Received: from avexmb1.qlogic.org ([fe80::9545:3a4f:c131:467d]) by avexcashub2.qlogic.org ([::1]) with mapi; Wed, 14 Mar 2012 15:48:01 -0700 From: Adarsh Joshi To: "freebsd-net@freebsd.org" Date: Wed, 14 Mar 2012 15:48:00 -0700 Thread-Topic: crash on lagg interface destroy Thread-Index: Ac0CMnbp3TERp9AsQx20j/ko44054A== Message-ID: <5E4F49720D0BAD499EE1F01232234BA87438162FA4@AVEXMB1.qlogic.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-OriginatorOrg: qlogic.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "freebsd-drivers@freebsd.org" Subject: crash on lagg interface destroy X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 22:48:05 -0000 Hello everyone, I tried to destroy a lagg interface (created using laggproto none) and I se= e the system crash. Steps to reproduce: Kldload if_lagg Ifconfig lagg0 create ifconfig lagg0 up laggproto none laggport ql0 laggport ql1 192.168.100.1 ne= tmask 255.255.255.0 ifconfig lagg0 destroy uname -a FreeBSD bsd-02 7.4-RELEASE FreeBSD 7.4-RELEASE #0: Wed Mar 7 18:16:06 PST = 2012 root@bsd-02:/usr/src/sys/amd64/compile/MYKERNEL amd64 Crash: Tracing command ifconfig pid 1443 tid 100182 td 0xffffff0023358740 Uart_z8530_class() at 0 Ifc_simple_destroy() at Ifc_simple_destroy+0x2a If_clone_destroyif() at If_clone_destroyif+0xa5 Ifioctl() at ifioctl+0x300 Kern_ioctl() at kern_ioctl+0xa2 Ioctl() at ioctl+0xf9 Syscall() at syscall+0x252 Xfast_syscall() at Xfast_syscall+0xab --- syscall (54, FreeBSD ELF64, ioctl), rip =3D 0x8008324bc, rsp =3D 0x7fff= ffffe348, rbp =3D 0x7ffffffffee27 --- Hope it helps. Let me know if you need more info. Adarsh ________________________________ This message and any attached documents contain information from QLogic Cor= poration or its wholly-owned subsidiaries that may be confidential. If you = are not the intended recipient, you may not read, copy, distribute, or use = this information. If you have received this transmission in error, please n= otify the sender immediately by reply e-mail and then delete this message. From owner-freebsd-drivers@FreeBSD.ORG Wed Mar 14 23:43:33 2012 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E8681106564A for ; Wed, 14 Mar 2012 23:43:33 +0000 (UTC) (envelope-from sendtomatt@gmail.com) Received: from mail-pz0-f45.google.com (mail-pz0-f45.google.com [209.85.210.45]) by mx1.freebsd.org (Postfix) with ESMTP id AA7028FC0C for ; Wed, 14 Mar 2012 23:43:33 +0000 (UTC) Received: by dadp14 with SMTP id p14so10079227dad.18 for ; Wed, 14 Mar 2012 16:43:33 -0700 (PDT) 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:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=68Ykq4ef2vxKwO9XpNZQjSt29OjgY9qELlpWtUNYoDE=; b=K4wymvv2TTpeeZscrhLejVhxP8hxOXoVxcxatYjYWPkvPbkd08Ka6YhwE4CeAgsYtD FYFzA379LbGuRS+GMVNqgqxjsZSPyU21ytBwyoIwnZ3rvhLEI5+BvZuUGtKICPcnx+3P fLBiub1r21yZx29Ik+YDqvnDFlUEvS8njEpFkXttXgyC4EVq/fil00NffPKIyqC4a12u +29Bu6ub6lXvssUm0uv0vK3/g7ovmFh2XE4fUaJOEABsmpyOoNnNRwvmfwlCQmzM+5HC v1Ml+7HVfhUM0y1aRAcU81tPawPPPyYQ6b0pG7s1xOlGQEXEhfEBE7SpNJKsmLKlrOtl kM6w== Received: by 10.68.228.69 with SMTP id sg5mr4784853pbc.91.1331768613190; Wed, 14 Mar 2012 16:43:33 -0700 (PDT) Received: from flatline.local (70-36-223-154.dsl.dynamic.sonic.net. [70.36.223.154]) by mx.google.com with ESMTPS id r6sm429838pbq.56.2012.03.14.16.43.29 (version=SSLv3 cipher=OTHER); Wed, 14 Mar 2012 16:43:32 -0700 (PDT) Message-ID: <4F612D1A.9020207@gmail.com> Date: Wed, 14 Mar 2012 16:43:22 -0700 From: matt User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120314 Thunderbird/10.0.3 MIME-Version: 1.0 To: Adarsh Joshi References: <5E4F49720D0BAD499EE1F01232234BA87438162F44@AVEXMB1.qlogic.org> In-Reply-To: <5E4F49720D0BAD499EE1F01232234BA87438162F44@AVEXMB1.qlogic.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "freebsd-drivers@freebsd.org" Subject: Re: Zero MAC address X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 23:43:34 -0000 On 03/14/12 14:06, Adarsh Joshi wrote: > Hello everyone, > > I assigned a 00:00:00:00:00:00 MAC address to one of my interfaces on a machine and tried to ping the peer machine. The ping did go through fine. > > I can the see the request and reply packets on the packet capture. I am wondering if that is legitimate and if not, who is supposed to check that. I mean, the stack or the driver on the sending machine or the receiving machine. > > Basically, I am trying to test a statistics utility which keeps track of packets with invalid MAC addresses. Are the packets with zero MAC addresses be classified as invalid? > > Thanks a lot > Adarsh > > > ________________________________ > This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message. > _______________________________________________ > freebsd-drivers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-drivers > To unsubscribe, send any mail to "freebsd-drivers-unsubscribe@freebsd.org" > My impression is that 00:00:00:00:00:00 is the very first ethernet phy as assigned by Xerox? As far as I know there is no special role at layer 2 for zeros. Matt From owner-freebsd-drivers@FreeBSD.ORG Thu Mar 15 07:14:15 2012 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED22A1065670; Thu, 15 Mar 2012 07:14:15 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2EA6E8FC14; Thu, 15 Mar 2012 07:14:14 +0000 (UTC) Received: by lagv3 with SMTP id v3so2958820lag.13 for ; Thu, 15 Mar 2012 00:14:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=K6XgLHNz0GkZ/ypk8akl5gg66lk+E5vk4XWn8S70TjM=; b=hQ5nttDzFNt0blCZBevFTCScfS4R9iuJ8/YS8Sa1Kln32wV/wTfelh7W4wqDwtk02z DxvgOaCE4m+Sfs0zdB7Eq2gqIFDn6PjRY5YSmAiUaP4Hm+APZWX5/CzIj9NywUp3HtPk x+oUqqS2P7wpilYAmozfKMBCNuX9BPfv0vocSMxBM230SarOr5p1S1B9RZj2a3gjyLOh MJ0xPvfHpyQXUds4Nd6skZbW8NEgMlRm2QAX8HOJippkV2zIxQ1s7kG6TrPKXLrHT/wM Od5uK2LwUjksph1PX0FpHjynfNjEJL9c0fgiyX0nfss5wWuLQ9tncb/Vsd0xDhU55Po9 1jGw== MIME-Version: 1.0 Received: by 10.152.133.68 with SMTP id pa4mr448791lab.12.1331795653878; Thu, 15 Mar 2012 00:14:13 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.152.21.73 with HTTP; Thu, 15 Mar 2012 00:14:13 -0700 (PDT) In-Reply-To: <5E4F49720D0BAD499EE1F01232234BA87438162FA4@AVEXMB1.qlogic.org> References: <5E4F49720D0BAD499EE1F01232234BA87438162FA4@AVEXMB1.qlogic.org> Date: Thu, 15 Mar 2012 10:14:13 +0300 X-Google-Sender-Auth: kl77sVak8cX0bqpPA87Le9PeBu4 Message-ID: From: Sergey Kandaurov To: Adarsh Joshi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-net@freebsd.org" , "freebsd-drivers@freebsd.org" Subject: Re: crash on lagg interface destroy X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 07:14:16 -0000 On 15 March 2012 02:48, Adarsh Joshi wrote: > Hello everyone, > > I tried to destroy a lagg interface (created using laggproto none) and I = see the system crash. > > Steps to reproduce: > Kldload if_lagg > Ifconfig lagg0 create > ifconfig lagg0 up laggproto none laggport ql0 laggport ql1 192.168.100.1 = netmask 255.255.255.0 > ifconfig lagg0 destroy > > uname -a > FreeBSD bsd-02 7.4-RELEASE FreeBSD 7.4-RELEASE #0: Wed Mar =A07 18:16:06 = PST 2012 =A0 =A0 root@bsd-02:/usr/src/sys/amd64/compile/MYKERNEL =A0amd64 > > Crash: > > Tracing command ifconfig pid 1443 tid 100182 td 0xffffff0023358740 > Uart_z8530_class() at 0 > Ifc_simple_destroy() at Ifc_simple_destroy+0x2a > If_clone_destroyif() at If_clone_destroyif+0xa5 > Ifioctl() at ifioctl+0x300 > Kern_ioctl() at kern_ioctl+0xa2 > Ioctl() at ioctl+0xf9 > Syscall() at syscall+0x252 > Xfast_syscall() at Xfast_syscall+0xab > --- syscall (54, FreeBSD ELF64, ioctl), rip =3D 0x8008324bc, rsp =3D 0x7f= ffffffe348, rbp =3D 0x7ffffffffee27 --- This is just a thought. This thread has probably lost the race when tried to take a valid pointer to ifnet for the given interface using ifunit() function (as done in if_clone_destroyif()) and then is de-referencing a pointer to an already freed memory. Since FreeBSD 8.1 this was changed to use ifunit_ref() to protect ifnet pointer against early destroy by reference counting the ifnet pointer. But this function doesn't exists in 7.x. If this is the case, then this should be easily reproduced when two parallel threads are trying to destroy the cloned interface. So, first I'd try to upgrade to 8.1 or above. --=20 wbr, pluknet From owner-freebsd-drivers@FreeBSD.ORG Fri Mar 16 02:06:21 2012 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CF76E106566B; Fri, 16 Mar 2012 02:06:21 +0000 (UTC) (envelope-from yong.fan@exar.com) Received: from smtp1.exar.com (webmail.exar.com [204.154.183.83]) by mx1.freebsd.org (Postfix) with ESMTP id 90BF98FC16; Fri, 16 Mar 2012 02:06:18 +0000 (UTC) Received: from FRE1-CAS2.hq.exar.com (10.127.1.158) by FRE1-CAS.hq.exar.com (10.127.1.162) with Microsoft SMTP Server (TLS) id 8.1.436.0; Thu, 15 Mar 2012 19:06:18 -0700 Received: from HZU1EXCH02.hq.exar.com (172.18.10.52) by FRE1-CAS2.hq.exar.com (10.127.1.158) with Microsoft SMTP Server (TLS) id 8.1.436.0; Thu, 15 Mar 2012 19:06:17 -0700 Received: from HZU1EXCH02.hq.exar.com ([fe80::5528:f080:2385:1c90]) by HZU1EXCH02.hq.exar.com ([fe80::5528:f080:2385:1c90%13]) with mapi; Fri, 16 Mar 2012 10:06:14 +0800 From: Yong Fan To: "freebsd-drivers@freebsd.org" Date: Fri, 16 Mar 2012 10:06:13 +0800 Thread-Topic: How can I decide whether my code is running in interrupt context or not? Thread-Index: Ac0DGV0OX75nc9eZRhmtkw2kDgQB5Q== Message-ID: <88AB8EB2D3F1D249AE07FAFFF17A396F0384C3956A@HZU1EXCH02.hq.exar.com> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US, zh-CN MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "drivers@FreeBSD.org" Subject: How can I decide whether my code is running in interrupt context or not? X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 02:06:22 -0000 Hi all, In Linux, I can use in_interrupt() function. FreeBSD has such a similar kernel function for drivers? Thanks ________________________________ The information and any attached documents contained in this message may be confidential and/or legally privileged. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, dissemination, or reproduction is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender immediately by return e-mail and destroy all copies of the original message. From owner-freebsd-drivers@FreeBSD.ORG Fri Mar 16 02:06:21 2012 Return-Path: Delivered-To: drivers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CF76E106566B; Fri, 16 Mar 2012 02:06:21 +0000 (UTC) (envelope-from yong.fan@exar.com) Received: from smtp1.exar.com (webmail.exar.com [204.154.183.83]) by mx1.freebsd.org (Postfix) with ESMTP id 90BF98FC16; Fri, 16 Mar 2012 02:06:18 +0000 (UTC) Received: from FRE1-CAS2.hq.exar.com (10.127.1.158) by FRE1-CAS.hq.exar.com (10.127.1.162) with Microsoft SMTP Server (TLS) id 8.1.436.0; Thu, 15 Mar 2012 19:06:18 -0700 Received: from HZU1EXCH02.hq.exar.com (172.18.10.52) by FRE1-CAS2.hq.exar.com (10.127.1.158) with Microsoft SMTP Server (TLS) id 8.1.436.0; Thu, 15 Mar 2012 19:06:17 -0700 Received: from HZU1EXCH02.hq.exar.com ([fe80::5528:f080:2385:1c90]) by HZU1EXCH02.hq.exar.com ([fe80::5528:f080:2385:1c90%13]) with mapi; Fri, 16 Mar 2012 10:06:14 +0800 From: Yong Fan To: "freebsd-drivers@freebsd.org" Date: Fri, 16 Mar 2012 10:06:13 +0800 Thread-Topic: How can I decide whether my code is running in interrupt context or not? Thread-Index: Ac0DGV0OX75nc9eZRhmtkw2kDgQB5Q== Message-ID: <88AB8EB2D3F1D249AE07FAFFF17A396F0384C3956A@HZU1EXCH02.hq.exar.com> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US, zh-CN MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "drivers@FreeBSD.org" Subject: How can I decide whether my code is running in interrupt context or not? X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 02:06:22 -0000 Hi all, In Linux, I can use in_interrupt() function. FreeBSD has such a similar kernel function for drivers? Thanks ________________________________ The information and any attached documents contained in this message may be confidential and/or legally privileged. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, dissemination, or reproduction is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender immediately by return e-mail and destroy all copies of the original message.