kernel-packages team mailing list archive
-
kernel-packages team
-
Mailing list archive
-
Message #132922
[Bug 1440072] Re: [Hyper-V] Legacy network adapter is not detected
Recent work on bug 101301 was done in email rather than in the bug. The
following patch was tested on Hyper-V and then accepted into the PCI
tree.
arch/x86/kernel/acpi/boot.c | 1 +
drivers/acpi/pci_link.c | 16 ++++++++++++++++
include/linux/acpi.h | 2 +-
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index e49ee24da85e..9393896717d0 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -445,6 +445,7 @@ static void __init acpi_sci_ioapic_setup(u8 bus_irq, u16 polarity, u16 trigger,
polarity = acpi_sci_flags & ACPI_MADT_POLARITY_MASK;
mp_override_legacy_irq(bus_irq, polarity, trigger, gsi);
+ acpi_penalize_sci_irq(bus_irq, trigger, polarity);
/*
* stash over-ride to indicate we've been here diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index cfd7581cc19f..b09ad554430a 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -826,6 +826,22 @@ void acpi_penalize_isa_irq(int irq, int active) }
/*
+ * Penalize IRQ used by ACPI SCI. If ACPI SCI pin attributes conflict
+with
+ * PCI IRQ attributes, mark ACPI SCI as ISA_ALWAYS so it won't be use
+for
+ * PCI IRQs.
+ */
+void acpi_penalize_sci_irq(int irq, int trigger, int polarity) {
+ if (irq >= 0 && irq < ARRAY_SIZE(acpi_irq_penalty)) {
+ if (trigger != ACPI_MADT_TRIGGER_LEVEL ||
+ polarity != ACPI_MADT_POLARITY_ACTIVE_LOW)
+ acpi_irq_penalty[irq] += PIRQ_PENALTY_ISA_ALWAYS;
+ else
+ acpi_irq_penalty[irq] += PIRQ_PENALTY_PCI_USING;
+ }
+}
+
+/*
* Over-ride default table to reserve additional IRQs for use by ISA
* e.g. acpi_irq_isa=5
* Useful for telling ACPI how not to interfere with your ISA sound card.
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index d2445fa9999f..0b2394f61af4 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -221,7 +221,7 @@ struct pci_dev;
int acpi_pci_irq_enable (struct pci_dev *dev); void acpi_penalize_isa_irq(int irq, int active);
-
+void acpi_penalize_sci_irq(int irq, int trigger, int polarity);
void acpi_pci_irq_disable (struct pci_dev *dev);
extern int ec_read(u8 addr, u8 *val);
--
1.7.10.4
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1440072
Title:
[Hyper-V] Legacy network adapter is not detected
Status in Linux:
Unknown
Status in linux package in Ubuntu:
In Progress
Status in linux source package in Vivid:
In Progress
Bug description:
Issue description:
Attaching a Legacy network adapter to a VM will not be detected on the VM side.
This is not the case with synthetic adapters, which are properly identified.
Steps to Reproduce:
1. Add a Legacy Network adapter to the VM
2. Boot the vm
3. Verify the identified network adapter, the legacy NIC is missing
Versions details:
Windows Server Host Edition: Microsoft Windows Server 2012 R2 Datacenter build 9600 and Microsoft Windows Server 2008 R2 Standard SP 1 build 7601
Distribution name and release: Ubuntu Vivid Vervet
Kernel version: Linux ubuntu31 3.19.0-11-generic #11lp14233432v201504021617 SMP
Hyper-V side:
PS> Get-VMNetworkAdapter -VMName vivid1
Name IsManagementOs VMName SwitchName MacAddress Status IPAddresses
---- -------------- ------ ---------- ---------- ------ -----------
Network Adapter False vivid1 external 00155D06332D {Ok} {IP, fe80::215:5dff:fe06:332d}
Legacy Network Adapter False vivid1 external 00155D063336 {Ok} {}
On the VM Side:
root@ubuntu31:~# ls /sys/class/net/
eth0 lo
eth0 has the MAC of the Network Adapter, which is the synthetic
interface.
This has been verified with also 1 vCPU or with irqbalancer daemon disabled, as that is a common requirements when using legacy adapters.
---
AlsaDevices:
total 0
crw-rw---- 1 root audio 116, 1 May 6 08:17 seq
crw-rw---- 1 root audio 116, 33 May 6 08:17 timer
AplayDevices: Error: [Errno 2] No such file or directory
ApportVersion: 2.17.2-0ubuntu1
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
DistroRelease: Ubuntu 15.04
HibernationDevice: RESUME=/dev/mapper/ubuntu1504--vg-swap_1
InstallationDate: Installed on 2015-04-23 (12 days ago)
InstallationMedia: Ubuntu-Server 15.04 "Vivid Vervet" - Release amd64 (20150422)
IwConfig:
eth0 no wireless extensions.
lo no wireless extensions.
Lsusb: Error: command ['lsusb'] failed with exit code 1: unable to initialize libusb: -99
MachineType: Microsoft Corporation Virtual Machine
Package: linux (not installed)
PciMultimedia:
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcFB: 0 hyperv_fb
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.19.0-15-generic root=/dev/mapper/hostname--vg-root ro crashkernel=384M-:128M console=tty0 console=ttyS1
ProcVersionSignature: Ubuntu 3.19.0-15.15-generic 3.19.3
RelatedPackageVersions:
linux-restricted-modules-3.19.0-15-generic N/A
linux-backports-modules-3.19.0-15-generic N/A
linux-firmware 1.143
RfKill: Error: [Errno 2] No such file or directory
Tags: vivid
UdevLog: Error: [Errno 2] No such file or directory: '/var/log/udev'
Uname: Linux 3.19.0-15-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:
_MarkForUpload: True
dmi.bios.date: 05/23/2012
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 090006
dmi.board.name: Virtual Machine
dmi.board.vendor: Microsoft Corporation
dmi.board.version: 7.0
dmi.chassis.asset.tag: 6473-7986-1993-5777-7899-0719-77
dmi.chassis.type: 3
dmi.chassis.vendor: Microsoft Corporation
dmi.chassis.version: 7.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr090006:bd05/23/2012:svnMicrosoftCorporation:pnVirtualMachine:pvr7.0:rvnMicrosoftCorporation:rnVirtualMachine:rvr7.0:cvnMicrosoftCorporation:ct3:cvr7.0:
dmi.product.name: Virtual Machine
dmi.product.version: 7.0
dmi.sys.vendor: Microsoft Corporation
To manage notifications about this bug go to:
https://bugs.launchpad.net/linux/+bug/1440072/+subscriptions
References