Ticket #17174: ipro1000_cometlake.patch

File ipro1000_cometlake.patch, 7.3 KB (added by s40in, 3 years ago)
  • ipro1000/dev/e1000/e1000_api.c

    diff -ruN /Data64/HaikuSrc/haiku/src/add-ons/kernel/drivers/network/ipro1000/dev/e1000/e1000_api.c /Data64/drivers_patched/ipro1000/dev/e1000/e1000_api.c
    old new  
    309309    case E1000_DEV_ID_PCH_SPT_I219_V4:
    310310    case E1000_DEV_ID_PCH_SPT_I219_LM5:
    311311    case E1000_DEV_ID_PCH_SPT_I219_V5:
     312    case E1000_DEV_ID_PCH_CMP_I219_LM12:
     313    case E1000_DEV_ID_PCH_CMP_I219_V12:
    312314        mac->type = e1000_pch_spt;
    313315        break;
    314316    case E1000_DEV_ID_PCH_CNP_I219_LM6:
     
    319321    case E1000_DEV_ID_PCH_ICP_I219_V8:
    320322    case E1000_DEV_ID_PCH_ICP_I219_LM9:
    321323    case E1000_DEV_ID_PCH_ICP_I219_V9:
     324    case E1000_DEV_ID_PCH_CMP_I219_LM10:
     325    case E1000_DEV_ID_PCH_CMP_I219_V10:
     326    case E1000_DEV_ID_PCH_CMP_I219_LM11:
     327    case E1000_DEV_ID_PCH_CMP_I219_V11:
    322328        mac->type = e1000_pch_cnp;
    323329        break;
    324330    case E1000_DEV_ID_82575EB_COPPER:
  • ipro1000/dev/e1000/e1000_api.patch

    diff -ruN /Data64/HaikuSrc/haiku/src/add-ons/kernel/drivers/network/ipro1000/dev/e1000/e1000_api.patch /Data64/drivers_patched/ipro1000/dev/e1000/e1000_api.patch
    old new  
    1 --- /Data64/drivers_patched/ipro1000/dev/e1000/e1000_api.c  2021-08-03 12:10:57.972029952 +0000
    2 +++ /Data64/HaikuSrc/haiku/src/add-ons/kernel/drivers/network/ipro1000/dev/e1000/e1000_api.c    2021-08-06 20:34:25.503054336 +0000
    3 @@ -309,8 +309,6 @@
    4     case E1000_DEV_ID_PCH_SPT_I219_V4:
    5     case E1000_DEV_ID_PCH_SPT_I219_LM5:
    6     case E1000_DEV_ID_PCH_SPT_I219_V5:
    7 -   case E1000_DEV_ID_PCH_CMP_I219_LM12:
    8 -   case E1000_DEV_ID_PCH_CMP_I219_V12:
    9         mac->type = e1000_pch_spt;
    10         break;
    11     case E1000_DEV_ID_PCH_CNP_I219_LM6:
    12 @@ -321,10 +319,6 @@
    13     case E1000_DEV_ID_PCH_ICP_I219_V8:
    14     case E1000_DEV_ID_PCH_ICP_I219_LM9:
    15     case E1000_DEV_ID_PCH_ICP_I219_V9:
    16 -   case E1000_DEV_ID_PCH_CMP_I219_LM10:
    17 -   case E1000_DEV_ID_PCH_CMP_I219_V10:
    18 -   case E1000_DEV_ID_PCH_CMP_I219_LM11:
    19 -   case E1000_DEV_ID_PCH_CMP_I219_V11:
    20         mac->type = e1000_pch_cnp;
    21         break;
    22     case E1000_DEV_ID_82575EB_COPPER:
  • ipro1000/dev/e1000/e1000_hw.h

    diff -ruN /Data64/HaikuSrc/haiku/src/add-ons/kernel/drivers/network/ipro1000/dev/e1000/e1000_hw.h /Data64/drivers_patched/ipro1000/dev/e1000/e1000_hw.h
    old new  
    155155#define E1000_DEV_ID_PCH_ICP_I219_V8        0x15E0
    156156#define E1000_DEV_ID_PCH_ICP_I219_LM9       0x15E1
    157157#define E1000_DEV_ID_PCH_ICP_I219_V9        0x15E2
     158#define E1000_DEV_ID_PCH_CMP_I219_LM10      0x0D4E
     159#define E1000_DEV_ID_PCH_CMP_I219_V10       0x0D4F
     160#define E1000_DEV_ID_PCH_CMP_I219_LM11      0x0D4C
     161#define E1000_DEV_ID_PCH_CMP_I219_V11       0x0D4D
     162#define E1000_DEV_ID_PCH_CMP_I219_LM12      0x0D53
     163#define E1000_DEV_ID_PCH_CMP_I219_V12       0x0D55
    158164#define E1000_DEV_ID_82576          0x10C9
    159165#define E1000_DEV_ID_82576_FIBER        0x10E6
    160166#define E1000_DEV_ID_82576_SERDES       0x10E7
  • ipro1000/dev/e1000/e1000_i210.c

    diff -ruN /Data64/HaikuSrc/haiku/src/add-ons/kernel/drivers/network/ipro1000/dev/e1000/e1000_i210.c /Data64/drivers_patched/ipro1000/dev/e1000/e1000_i210.c
    old new  
    775775s32 e1000_init_hw_i210(struct e1000_hw *hw)
    776776{
    777777    s32 ret_val;
     778   
     779    struct e1000_mac_info *mac = &hw->mac; //s40in: HZ work or not
    778780
    779781    DEBUGFUNC("e1000_init_hw_i210");
    780782    if ((hw->mac.type >= e1000_i210) &&
     
    784786            return ret_val;
    785787    }
    786788    hw->phy.ops.get_cfg_done = e1000_get_cfg_done_i210;
     789   
     790    /* Initialize identification LED */
     791    mac->ops.id_led_init(hw);//s40in: HZ work or not
     792   
    787793    ret_val = e1000_init_hw_82575(hw);
    788794    return ret_val;
    789795}
  • ipro1000/dev/e1000/e1000_ich8lan.c

    diff -ruN /Data64/HaikuSrc/haiku/src/add-ons/kernel/drivers/network/ipro1000/dev/e1000/e1000_ich8lan.c /Data64/drivers_patched/ipro1000/dev/e1000/e1000_ich8lan.c
    old new  
    10911091    value = ltr & E1000_LTRV_VALUE_MASK;
    10921092    scale = (ltr & E1000_LTRV_SCALE_MASK) >> E1000_LTRV_SCALE_SHIFT;
    10931093
    1094     return value * (1 << (scale * E1000_LTRV_SCALE_FACTOR));
     1094    //return value * (1 << (scale * E1000_LTRV_SCALE_FACTOR));
     1095    return value * (1ULL << (scale * E1000_LTRV_SCALE_FACTOR));
    10951096}
    10961097
    10971098/**
     
    41664167     * done without an erase because flash erase sets all bits
    41674168     * to 1's. We can write 1's to 0's without an erase
    41684169     */
    4169     act_offset = (old_bank_offset + E1000_ICH_NVM_SIG_WORD) * 2 + 1;
     4170    //act_offset = (old_bank_offset + E1000_ICH_NVM_SIG_WORD) * 2 + 1;
    41704171
    41714172    /* offset in words but we read dword*/
    41724173    act_offset = old_bank_offset + E1000_ICH_NVM_SIG_WORD - 1;
     
    52355236
    52365237    DEBUGFUNC("e1000_setup_link_ich8lan");
    52375238
    5238     if (hw->phy.ops.check_reset_block(hw))
    5239         return E1000_SUCCESS;
     5239//  if (hw->phy.ops.check_reset_block(hw))
     5240//      return E1000_SUCCESS;
    52405241
    52415242    /* ICH parts do not have a word in the NVM to determine
    52425243     * the default flow control setting, so we explicitly
     
    52535254    DEBUGOUT1("After fix-ups FlowControl is now = %x\n",
    52545255        hw->fc.current_mode);
    52555256
    5256     /* Continue to configure the copper link. */
    5257     ret_val = hw->mac.ops.setup_physical_interface(hw);
    5258     if (ret_val)
    5259         return ret_val;
     5257//  /* Continue to configure the copper link. */
     5258//  ret_val = hw->mac.ops.setup_physical_interface(hw);
     5259//  if (ret_val)
     5260//      return ret_val;
     5261    if (!hw->phy.ops.check_reset_block(hw)) {
     5262        /* Continue to configure the copper link. */
     5263        ret_val = hw->mac.ops.setup_physical_interface(hw);
     5264        if (ret_val)
     5265            return ret_val;
     5266    }
    52605267
    52615268    E1000_WRITE_REG(hw, E1000_FCTTV, hw->fc.pause_time);
    52625269    if ((hw->phy.type == e1000_phy_82578) ||
  • ipro1000/dev/e1000/if_em.c

    diff -ruN /Data64/HaikuSrc/haiku/src/add-ons/kernel/drivers/network/ipro1000/dev/e1000/if_em.c /Data64/drivers_patched/ipro1000/dev/e1000/if_em.c
    old new  
    173173    PVID(0x8086, E1000_DEV_ID_PCH_ICP_I219_V8, "Intel(R) PRO/1000 Network Connection"),
    174174    PVID(0x8086, E1000_DEV_ID_PCH_ICP_I219_LM9, "Intel(R) PRO/1000 Network Connection"),
    175175    PVID(0x8086, E1000_DEV_ID_PCH_ICP_I219_V9, "Intel(R) PRO/1000 Network Connection"),
     176    PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_LM10, "Intel(R) PRO/1000 Network Connection"),
     177    PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_V10, "Intel(R) PRO/1000 Network Connection"),
     178    PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_LM11, "Intel(R) PRO/1000 Network Connection"),
     179    PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_V11, "Intel(R) PRO/1000 Network Connection"),
     180    PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_LM12, "Intel(R) PRO/1000 Network Connection"),
     181    PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_V12, "Intel(R) PRO/1000 Network Connection"),
    176182    /* required last entry */
    177183    PVID_END
    178184};