From owner-freebsd-net@FreeBSD.ORG Fri Dec 6 23:26:28 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2BF31CC1 for ; Fri, 6 Dec 2013 23:26:28 +0000 (UTC) Received: from mail-qa0-x22c.google.com (mail-qa0-x22c.google.com [IPv6:2607:f8b0:400d:c00::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E022E1CDB for ; Fri, 6 Dec 2013 23:26:27 +0000 (UTC) Received: by mail-qa0-f44.google.com with SMTP id i13so1041941qae.17 for ; Fri, 06 Dec 2013 15:26:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=+hx6Q8PAcqLWlg81Rd0NBizlRy1v2VkAwDD6V6lpLak=; b=aZ4cECot0lL1Z1FzzewUunkFXxE+7siwmYk9xaiIbwBLKmSfJl8wwW+OG/cZoYKTby MkPYXugH5ra9JDAKnqzW6xbRicOAYEp9UQO+YIuiBz2sF4peSHx4P8XnppDliq39oyTm Y8lJc67LXJ1ubc6BqUQY6gZH7Kz77BFErO6fHMbequMe8f7TRikIBl5eBix49bFiaTJ5 3mCuu4vFHg7jQgBU0nWw2Vnys9wKN+1nlrAAB1E6VrPTabDP9eQgeZDuTyg9CX9t3L9f 9EVWZjmxXq7MOqQHxSTp9dqzqZbj2VdjiU775GB4XJ5WmfDL20QsZufgYa9VMYnT3Lip 6Dgw== MIME-Version: 1.0 X-Received: by 10.229.56.200 with SMTP id z8mr10765856qcg.1.1386372387046; Fri, 06 Dec 2013 15:26:27 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.53.200 with HTTP; Fri, 6 Dec 2013 15:26:27 -0800 (PST) In-Reply-To: <52A255AB.8040905@gmail.com> References: <52A255AB.8040905@gmail.com> Date: Fri, 6 Dec 2013 15:26:27 -0800 X-Google-Sender-Auth: aUEcvx-obMbMaL5hhxIhlI-mkgs Message-ID: Subject: Re: Avoiding an infinite loop in e1000 82575 From: Adrian Chadd To: Karim Fodil-Lemelin Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD Net , Jack Vogel X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 23:26:28 -0000 Heh, your solution isn't correct. There's a higher level race condition somewhere.. :( -a On 6 December 2013 14:54, Karim Fodil-Lemelin wrote: > Hi, > > I have encountered a strange issue were the igb driver goes into an infinite > loop (I'm using version - 2.3.10) if many incantations of ifconfig are > running in a while loop very fast. The following patch fixed it for me: > > @@ -1052,12 +1052,11 @@ static void e1000_release_swfw_sync_82575(struct > e1000_hw *hw, u16 mask) > { > u32 swfw_sync; > > DEBUGFUNC("e1000_release_swfw_sync_82575"); > > - while (e1000_get_hw_semaphore_generic(hw) != E1000_SUCCESS) > - ; /* Empty */ > + e1000_get_hw_semaphore_generic(hw); > > swfw_sync = E1000_READ_REG(hw, E1000_SW_FW_SYNC); > swfw_sync &= ~mask; > E1000_WRITE_REG(hw, E1000_SW_FW_SYNC, swfw_sync); > > Now, I haven't seen any side effect of this change except that it fixed my > issue although I wonder what they are and what effect will this change have > on the system? > > Thanks, > > Karim. > > PS: Some more information on the devices: > > dmesg: > > igb0: port > 0xc880-0xc89f mem 0xfba80000-0xfbafffff,0xfbb78000-0xfbb7bfff irq 16 at > device 0.0 on pci4 > igb0: Using MSIX interrupts with 2 vectors > igb0: Ethernet address: 00:90:0b:2f:b8:00 > igb0: [ITHREAD] > igb0: [ITHREAD] > igb1: port > 0xcc00-0xcc1f mem 0xfbb80000-0xfbbfffff,0xfbb7c000-0xfbb7ffff irq 17 at > device 0.1 on pci4 > igb1: Using MSIX interrupts with 2 vectors > igb1: Ethernet address: 00:90:0b:2f:b8:01 > igb1: [ITHREAD] > igb1: [ITHREAD] > igb2: port > 0xd880-0xd89f mem 0xfbc80000-0xfbcfffff,0xfbd78000-0xfbd7bfff irq 16 at > device 0.0 on pci5 > igb2: Using MSIX interrupts with 2 vectors > igb2: Ethernet address: 00:90:0b:2f:b8:02 > igb2: [ITHREAD] > igb2: [ITHREAD] > igb3: port > 0xdc00-0xdc1f mem 0xfbd80000-0xfbdfffff,0xfbd7c000-0xfbd7ffff irq 17 at > device 0.1 on pci5 > igb3: Using MSIX interrupts with 2 vectors > igb3: Ethernet address: 00:90:0b:2f:b8:03 > igb3: [ITHREAD] > igb3: [ITHREAD] > > pciconf > > igb0@pci0:4:0:0: class=0x020000 card=0x00008086 chip=0x150e8086 > rev=0x01 hdr=0x00 > igb1@pci0:4:0:1: class=0x020000 card=0x00008086 chip=0x150e8086 > rev=0x01 hdr=0x00 > igb2@pci0:5:0:0: class=0x020000 card=0x00008086 chip=0x150e8086 > rev=0x01 hdr=0x00 > igb3@pci0:5:0:1: class=0x020000 card=0x00008086 chip=0x150e8086 > rev=0x01 hdr=0x00 > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"