
Enviado em 14/11/2024 - 15:51h
Contextualizando o problema
diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c
index 012b9e3fe5b0..b82d2bc4b777 100644
--- a/drivers/pci/hotplug/shpchp_hpc.c
+++ b/drivers/pci/hotplug/shpchp_hpc.c
@@ -166,6 +166,8 @@
#define SLOT_SERR_INT_MASK 0x3
static irqreturn_t shpc_isr(int irq, void *dev_id);
+static irqreturn_t shpc_ist(int irq, void *dev_id);
+
static void start_int_poll_timer(struct controller *ctrl, int sec);
static inline u8 shpc_readb(struct controller *ctrl, int reg)
@@ -746,7 +748,7 @@ int shpchp_set_bus_speed_mode(struct slot *slot, enum pci_bus_speed value)
return retval;
}
-static irqreturn_t shpc_isr(int irq, void *dev_id)
+static irqreturn_t shpc_ist(int irq, void *dev_id)
{
struct controller *ctrl = (struct controller *)dev_id;
u32 serr_int, slot_reg, intr_loc, intr_loc2;
@@ -825,6 +827,21 @@ static irqreturn_t shpc_isr(int irq, void *dev_id)
return IRQ_HANDLED;
}
+static irqreturn_t shpc_isr(int irq, void *dev_id)
+{
+ pr_info("%s: isr for interrupt handler\n", __func__);
+
+ struct controller *ctrl = dev_id;
+ struct pci_dev *pdev = ctrl->pci_dev;
+
+ if (pdev->ignore_hotplug) {
+ pr_info("ignoring hotplug");
+ return IRQ_HANDLED;
+ }
+
+ return IRQ_WAKE_THREAD;
+}
+
static int shpc_get_max_bus_speed(struct controller *ctrl)
{
int retval = 0;
@@ -1001,8 +1018,9 @@ int shpc_init(struct controller *ctrl, struct pci_dev *pdev)
pci_set_master(pdev);
}
- rc = request_irq(ctrl->pci_dev->irq, shpc_isr, IRQF_SHARED,
- MY_NAME, (void *)ctrl);
+ rc = request_threaded_irq(ctrl->pci_dev->irq, shpc_isr, shpc_ist,
+ IRQF_SHARED, MY_NAME, (void *)ctrl);
+
ctrl_dbg(ctrl, "request_irq %d (returns %d)\n",
ctrl->pci_dev->irq, rc);
if (rc) {
git apply <caminho-do-arquiv-com-o-diff>.
qemu-system-x86_64 -kernel arch/x86_64/boot/bzImage -append "root=/dev/sda1 console=ttyS0 earlyprintk=serial" -drive file=ubuntu.qcow2,format=qcow2 -m 1024 -enable-kvm -net nic -net user,hostfwd=tcp::2222-:22 -nographic -d int,cpu_reset -device pci-bridge,id=pci.1,chassis_nr=1,shpc=on
qemu-system-x86_64 -kernel arch/x86_64/boot/bzImage -append "root=/dev/sda1 console=ttyS0 earlyprintk=serial" -drive file=ubuntu.qcow2,format=qcow2 -m 1024 -enable-kvm -monitor telnet:127.0.0.1:5555,server,nowait -nographic
telnet localhost
device_add pci-bridge,id=pci.1,chassis_nr=1,shpc=on
qemu-system-x86_64 -kernel arch/x86_64/boot/bzImage -append "root=/dev/sda1 console=ttyS0 earlyprintk=serial" -drive file=ubuntu.qcow2,format=qcow2 -m 1024 -enable-kvm -monitor telnet:127.0.0.1:5555,server,nowait -nographic -device pci-bridge,id=pci.1,chassis_nr=1,shpc=on
device_add e1000 id=net1,bus=pci.1
qemu-system-x86_64 -kernel arch/x86_64/boot/bzImage -append "root=/dev/sda1 console=ttyS0 earlyprintk=serial" -drive file=ubuntu.qcow2,format=qcow2 -m 1024 -enable-kvm -monitor telnet:127.0.0.1:5555,server,nowait -nographic -device pci-bridge,id=pci.1,chassis_nr=1,shpc=on
device_add pci-bridge,id=pci.2,bus=pci.1,shpc=on
Papagaiando o XFCE com temas e recursos
WhatsApp com Chamadas no Linux via Waydroid
XFCE - quase um Gnome ou Plasma mas muito mais leve
LXQT - funcional para máquinas pererecas e usuários menos exigentes
Removendo entradas de boot UEFI "fantasmas" via terminal
Atualizações de Segurança Automáticas no Debian
Como cortar as partes de um vídeo com passagens de áudio em branco
Tiling automático no KDE Plasma
SNMP Scan no OCS Inventory só funciona com HTTPS corretamente configurado
Uma pergunta bem simples mas não achei resposta (ainda) (0)
Reflexão sobre a sobrevivência do Gentoo Linux (6)
Tentativa de instalar Linux em um notebook HP 246 G6 (1)









