Project

General

Profile

Actions

Bug #4547

closed

e1000g common code doesn't account for LockMAC

Added by Robert Mustacchi over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Category:
driver - device drivers
Start date:
2014-01-29
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

The e1000g mac type pch_lpt, used by the I217 and I218 family of devices, have a setting in the firmware semaphore register (FWSM) that controls the number of RAR registers that are reserved for the hardware. While the device has up to 12 RARs, three bits in this firmware register control the actual number that's available. Unfortunately the way that the Intel common code handles this is rather pessimal.

When we first try to determine the number of RARs available to this device in e1000_init_mac_params_ich8lan, we ignore that it exists. However, and almost worse, when we reach e1000_rar_set_pch_lpt to try and set one beyond this index, the driver silently drops it! This bug covers making sure that we always check the FWSM register when determining the number of MAC addresses available and adjust accordingly for pch_lpt.

I confirmed this with the following D script on the user who was affected with this problem:

#!/usr/sbin/dtrace -s

fbt::e1000_rar_set_pch_lpt:entry
{
        self->t = 1;
        printf("regs base: 0x%x\\n", (uintptr_t)args[0]->hw_addr);
        printf("index %d\\n", args[2]);
}

fbt::e1000_acquire_swflag_ich8lan:entry
/self->t/
{
        printf("acquired lock\\n")
}

fbt::e1000_rar_set_pch_lpt:return
/self->t/
{
        self->t = 0;
}
Actions #1

Updated by Electric Monk over 9 years ago

git commit 6055fc7a0767fd5991c8054028ffc6d2673ecbf6

Author: Robert Mustacchi <rm@joyent.com>

4547 e1000g common code doesn't account for LockMAC
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Jason King <jason.brian.king@gmail.com>
Approved by: Garrett D'Amore <garrett@damore.org>

Actions #2

Updated by Robert Mustacchi over 9 years ago

  • Status changed from New to Resolved
  • % Done changed from 90 to 100
Actions

Also available in: Atom PDF