Code Monkey home page Code Monkey logo

Comments (6)

parinzee avatar parinzee commented on June 6, 2024

Thank you for reporting! It seems I have misspelled the patch name. That should be fixed now as of the newest commit 35cd28e. Please test it out.

from linux-surface-overlay.

LeoAlex0 avatar LeoAlex0 commented on June 6, 2024

Fixed, but new error appears

patching file drivers/platform/x86/amd-pmc.c                             [ ok ]
 * Applying 0007-surface-hotplug.patch ...
patching file drivers/pci/pci.c
Hunk #1 FAILED at 1870.
1 out of 1 hunk FAILED -- saving rejects to file drivers/pci/pci.c.rej   [ !! ]
 * ERROR: sys-kernel/surface-sources-5.12.9::linux-surface failed (prepare phase):
 *   patch -p1  failed with /var/tmp/portage/sys-kernel/surface-sources-5.12.9/files/5.12/0007-surface-hotplug.patch
 * 
 * Call stack:
 *               ebuild.sh, line  127:  Called src_prepare
 *             environment, line 2688:  Called eapply '/var/tmp/portage/sys-kernel/surface-sources-5.12.9/files/5.12/0007-surface-hotplug.patch'
 *             environment, line  846:  Called _eapply_patch '/var/tmp/portage/sys-kernel/surface-sources-5.12.9/files/5.12/0007-surface-hotplug.patch'
 *             environment, line  784:  Called __helpers_die 'patch -p1  failed with /var/tmp/portage/sys-kernel/surface-sources-5.12.9/files/5.12/0007-surface-hotplug.patch'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *   		die "$@"
 * 
 * If you need support, post the output of `emerge --info '=sys-kernel/surface-sources-5.12.9::linux-surface'`,
 * the complete build log and the output of `emerge -pqv '=sys-kernel/surface-sources-5.12.9::linux-surface'`.
 * The complete build log is located at '/var/tmp/portage/sys-kernel/surface-sources-5.12.9/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-kernel/surface-sources-5.12.9/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-kernel/surface-sources-5.12.9/work/linux-5.12.9-surface'
 * S: '/var/tmp/portage/sys-kernel/surface-sources-5.12.9/work/linux-5.12.9-surface'

from linux-surface-overlay.

LeoAlex0 avatar LeoAlex0 commented on June 6, 2024

I have compared the patch and source file and find the patch is already be applied.

图片

and 0007-surface-hotplug.patch is a revert patch

From 0e803e7c36a7486f1b9ebf3dee79bda3f38b6086 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <[email protected]>
Date: Fri, 2 Jul 2021 14:27:14 +0200
Subject: [PATCH] Revert "Revert "PCI: PM: Do not read power state in
 pci_enable_device_flags()""

This reverts commit 133ad06e0419eea137cce7b0c453b9c9622de161.

Patchset: surface-hotplug
---
 drivers/pci/pci.c | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 16a17215f633..e4d4e399004b 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1870,20 +1870,10 @@ static int pci_enable_device_flags(struct pci_dev *dev, unsigned long flags)
 	int err;
 	int i, bars = 0;
 
-	/*
-	 * Power state could be unknown at this point, either due to a fresh
-	 * boot or a device removal call.  So get the current power state
-	 * so that things like MSI message writing will behave as expected
-	 * (e.g. if the device really is in D0 at enable time).
-	 */
-	if (dev->pm_cap) {
-		u16 pmcsr;
-		pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pmcsr);
-		dev->current_state = (pmcsr & PCI_PM_CTRL_STATE_MASK);
-	}
-
-	if (atomic_inc_return(&dev->enable_cnt) > 1)
+	if (atomic_inc_return(&dev->enable_cnt) > 1) {
+		pci_update_current_state(dev, dev->current_state);
 		return 0;		/* already enabled */
+	}
 
 	bridge = pci_upstream_bridge(dev);
 	if (bridge)
-- 
2.32.0

So maybe skip this patch it the way to fix it.

from linux-surface-overlay.

parinzee avatar parinzee commented on June 6, 2024

So... I skipped it. It basically wasn't the way to go either as the other patch immediately failed. You can test it out. cc80766

I looked at that patch and the gentoo version is completely different (At least for a part of the file in question). So there are two options to go from here. I can either maintain our own specific version of a patch or just drop the 5.12 all together. The latter option is looking more sustainable for me since gentoo has also dropped sources for 5.12.

Unless you are willing to maintain our own local patchset then I believe that it is favorable to go with dropping 5.12 support.

from linux-surface-overlay.

LeoAlex0 avatar LeoAlex0 commented on June 6, 2024

I find out the surface patch is for vanilla-sources 5.12.14 and not compatible for gentoo patches, so I create an pull-request to fix this.

Tested on surface pro 4
See Pull request: #6

from linux-surface-overlay.

parinzee avatar parinzee commented on June 6, 2024

Right thank you. Please go take a look at my comment in your pull request.

from linux-surface-overlay.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.