VirtualBox

Changeset 33201 in vbox


Ignore:
Timestamp:
Oct 18, 2010 2:37:33 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
66740
Message:

reverted r66739

Location:
trunk/src/VBox
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DevE1000.cpp

    r33200 r33201  
    4343//#define E1K_REL_STATS
    4444//#define E1K_USE_SUPLIB_SEMEVENT
     45//#define E1K_WITH_MSI
    4546
    4647#include <iprt/crc.h>
     
    134135#define E1K_CHIP_82543GC 1
    135136#define E1K_CHIP_82545EM 2
    136 #define E1K_CHIP_82566MC 3
    137 #define E1K_CHIP_LAST    E1K_CHIP_82566MC
    138 
    139 /* Flags for chip descripton */
    140 #define E1K_MSI_CHIP (1 << 0)
    141137
    142138struct E1kChips
     
    147143    uint16_t uPCISubsystemId;
    148144    const char *pcszName;
    149     uint32_t uFlags;
    150145} g_Chips[] =
    151146{
    152147    /* Vendor Device SSVendor SubSys  Name */
    153     { 0x8086, 0x100E, 0x8086, 0x001E, "82540EM", 0 }, /* Intel 82540EM-A in Intel PRO/1000 MT Desktop */
    154     { 0x8086, 0x1004, 0x8086, 0x1004, "82543GC", 0 }, /* Intel 82543GC   in Intel PRO/1000 T  Server */
    155     { 0x8086, 0x100F, 0x15AD, 0x0750, "82545EM", 0 }, /* Intel 82545EM-A in VMWare Network Adapter */
    156     { 0x8086, 0x104D, 0x8086, 0x001E, "82566MC", E1K_MSI_CHIP } /* Intel 82566MC Gigabit Ethernet Controller */
     148    { 0x8086,
     149      /* Temporary code, as MSI-aware driver dislike 0x100E. How to do that right? */
     150#ifdef E1K_WITH_MSI
     151      0x105E,
     152#else
     153      0x100E,
     154#endif
     155                      0x8086, 0x001E, "82540EM" }, /* Intel 82540EM-A in Intel PRO/1000 MT Desktop */
     156    { 0x8086, 0x1004, 0x8086, 0x1004, "82543GC" }, /* Intel 82543GC   in Intel PRO/1000 T  Server */
     157    { 0x8086, 0x100F, 0x15AD, 0x0750, "82545EM" }  /* Intel 82545EM-A in VMWare Network Adapter */
    157158};
    158159
     
    55965597    /* Capability ID: PCI-X Configuration Registers */
    55975598    e1kPCICfgSetU8( pci, 0xE4,                           VBOX_PCI_CAP_ID_PCIX);
    5598     /* Next Item Pointer: Message Signalled Interrupts */
    5599 #ifdef  VBOX_WITH_MSI_DEVICES
    5600     if (g_Chips[eChip].uFlags & E1K_MSI_CHIP)
    5601         e1kPCICfgSetU8( pci, 0xE4 + 1,                      0x80);
    5602     else
     5599#ifdef E1K_WITH_MSI
     5600    e1kPCICfgSetU8( pci, 0xE4 + 1,                      0x80);
     5601#else
     5602    /* Next Item Pointer: None (Message Signalled Interrupts are disabled) */
     5603    e1kPCICfgSetU8( pci, 0xE4 + 1,                      0x00);
    56035604#endif
    5604         /* Next Item Pointer: None (Message Signalled Interrupts are disabled) */
    5605         e1kPCICfgSetU8( pci, 0xE4 + 1,                      0x00);
    56065605    /* PCI-X Command: Enable Relaxed Ordering */
    56075606    e1kPCICfgSetU16(pci, 0xE4 + 2,                    VBOX_PCI_X_CMD_ERO);
     
    56485647        return PDMDEV_SET_ERROR(pDevIns, rc,
    56495648                                N_("Configuration error: Failed to get the value of 'AdapterType'"));
    5650     Assert(pState->eChip <= E1K_CHIP_LAST);
     5649    Assert(pState->eChip <= E1K_CHIP_82545EM);
    56515650
    56525651    E1kLog(("%s Chip=%s\n", INSTANCE(pState), g_Chips[pState->eChip].pcszName));
     
    57445743        return rc;
    57455744
    5746 #ifdef VBOX_WITH_MSI_DEVICES
    5747     if (g_Chips[pState->eChip].uFlags & E1K_MSI_CHIP)
    5748     {
    5749         PDMMSIREG aMsiReg;
    5750         aMsiReg.cVectors = 1;
    5751         aMsiReg.iCapOffset = 0x80;
    5752         aMsiReg.iNextOffset = 0x0;
    5753         aMsiReg.iMsiFlags = 0;
    5754         rc = PDMDevHlpPCIRegisterMsi(pDevIns, &aMsiReg);
    5755         AssertRC(rc);
    5756         if (RT_FAILURE (rc))
    5757         {
    5758             PCIDevSetByte( &pState->pciDevice, 0xE4 + 1, 0x0);
    5759             // continue
    5760         }
    5761     }
     5745#ifdef E1K_WITH_MSI
     5746    PDMMSIREG aMsiReg;
     5747    aMsiReg.cVectors = 1;
     5748    aMsiReg.iCapOffset = 0x80;
     5749    aMsiReg.iNextOffset = 0x0;
     5750    aMsiReg.iMsiFlags = 0;
     5751    rc = PDMDevHlpPCIRegisterMsi(pDevIns, &aMsiReg);
     5752    AssertRC(rc);
     5753    if (RT_FAILURE (rc))
     5754        return rc;
    57625755#endif
     5756
    57635757
    57645758    /* Map our registers to memory space (region 0, see e1kConfigurePCI)*/
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp

    r33200 r33201  
    213213                     "                            [--nictype<1-N> Am79C970A|Am79C973"
    214214#ifdef VBOX_WITH_E1000
    215                   "|\n                                            82540EM|82543GC|82545EM|82566MC"
     215                  "|\n                                            82540EM|82543GC|82545EM"
    216216#endif
    217217#ifdef VBOX_WITH_VIRTIO
     
    807807    va_list args;
    808808    va_start(args, pszFormat);
    809     RTMsgErrorV(pszFormat, args);
     809    RTMsgError(pszFormat, args);
    810810    va_end(args);
    811811    return 1;
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp

    r33200 r33201  
    10601060                    CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_I82545EM));
    10611061                }
    1062                  else if (!strcmp(ValueUnion.psz, "82566MC"))
    1063                 {
    1064                     CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_I82566MC));
    1065                 }
    10661062#endif
    10671063#ifdef VBOX_WITH_VIRTIO
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r33200 r33201  
    15371537                case NetworkAdapterType_I82543GC:
    15381538                case NetworkAdapterType_I82545EM:
    1539                 case NetworkAdapterType_I82566MC:
    15401539                    pDev = pDevE1000;
    15411540                    pszAdapterName = "e1000";
     
    16241623                case NetworkAdapterType_I82545EM:
    16251624                    InsertConfigInteger(pCfg, "AdapterType", 2);
    1626                     break;
    1627                 case NetworkAdapterType_I82566MC:
    1628                     InsertConfigInteger(pCfg, "AdapterType", 3);
    16291625                    break;
    16301626            }
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r33200 r33201  
    1123211232  <enum
    1123311233    name="NetworkAdapterType"
    11234     uuid="bea69445-df7d-449f-b224-3b6526d8ac81"
     11234    uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
    1123511235  >
    1123611236    <desc>
     
    1125811258    <const name="Virtio"                value="6">
    1125911259        <desc>Virtio network device.</desc>
    11260     </const>
    11261     <const name="I82566MC"              value="7">
    11262         <desc>Intel 82566MC Gigabit Ethernet Controller (82566MC).</desc>
    1126311260    </const>
    1126411261  </enum>
  • trunk/src/VBox/Main/xml/Settings.cpp

    r33200 r33201  
    18801880            else if (strTemp == "82545EM")
    18811881                nic.type = NetworkAdapterType_I82545EM;
    1882             else if (strTemp == "82566MC")
    1883                 nic.type = NetworkAdapterType_I82566MC;
    18841882            else if (strTemp == "virtio")
    18851883                nic.type = NetworkAdapterType_Virtio;
     
    35043502            case NetworkAdapterType_I82543GC:   pcszType = "82543GC"; break;
    35053503            case NetworkAdapterType_I82545EM:   pcszType = "82545EM"; break;
    3506             case NetworkAdapterType_I82566MC:   pcszType = "82566MC"; break;
    35073504            case NetworkAdapterType_Virtio:     pcszType = "virtio"; break;
    35083505            default: /*case NetworkAdapterType_Am79C970A:*/  pcszType = "Am79C970A"; break;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette