Avoiding an infinite loop in e1000 82575
Adrian Chadd
adrian at freebsd.org
Fri Dec 6 23:26:28 UTC 2013
Heh, your solution isn't correct. There's a higher level race
condition somewhere.. :(
-a
On 6 December 2013 14:54, Karim Fodil-Lemelin
<fodillemlinkarim at gmail.com> 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: <Intel(R) PRO/1000 Network Connection version - 2.3.10> 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: <Intel(R) PRO/1000 Network Connection version - 2.3.10> 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: <Intel(R) PRO/1000 Network Connection version - 2.3.10> 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: <Intel(R) PRO/1000 Network Connection version - 2.3.10> 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 at pci0:4:0:0: class=0x020000 card=0x00008086 chip=0x150e8086
> rev=0x01 hdr=0x00
> igb1 at pci0:4:0:1: class=0x020000 card=0x00008086 chip=0x150e8086
> rev=0x01 hdr=0x00
> igb2 at pci0:5:0:0: class=0x020000 card=0x00008086 chip=0x150e8086
> rev=0x01 hdr=0x00
> igb3 at pci0:5:0:1: class=0x020000 card=0x00008086 chip=0x150e8086
> rev=0x01 hdr=0x00
>
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
More information about the freebsd-net
mailing list