From: Dave Penkler Date: Sat, 11 Apr 2026 17:25:08 +0000 (+0200) Subject: gpib: Don't use extended registers X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=1b2bfb7ac25bca1b184a525bdac77ab51fabb295;p=thirdparty%2Flinux.git gpib: Don't use extended registers When the chip type is 72310 then avoid accessing extended registers Apart from the BSR the 72310 supports only the standard NEC u7210 registers. Signed-off-by: Dave Penkler Link: https://patch.msgid.link/20260411172511.26546-4-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/gpib/ines/ines_gpib.c b/drivers/gpib/ines/ines_gpib.c index dd98cb261a4c..df299a9d7f4d 100644 --- a/drivers/gpib/ines/ines_gpib.c +++ b/drivers/gpib/ines/ines_gpib.c @@ -103,6 +103,9 @@ static int ines_t1_delay(struct gpib_board *board, unsigned int nano_sec) retval = nec7210_t1_delay(board, nec_priv, nano_sec); + if (ines_priv->pci_chip_type == PCI_CHIP_INES_72130) + return retval; + if (nano_sec <= 250) { write_byte(nec_priv, INES_AUXD | INES_FOLLOWING_T1_250ns | INES_INITIAL_T1_2000ns, AUXMR); @@ -322,6 +325,8 @@ static irqreturn_t ines_interrupt(struct gpib_board *board) spin_lock_irqsave(&board->spinlock, flags); nec7210_interrupt(board, nec_priv); + if (priv->pci_chip_type == PCI_CHIP_INES_72130) + goto out; isr3_bits = ines_inb(priv, ISR3); isr4_bits = ines_inb(priv, ISR4); if (isr3_bits & IFC_ACTIVE_BIT) { @@ -339,6 +344,7 @@ static irqreturn_t ines_interrupt(struct gpib_board *board) if (wake) wake_up_interruptible(&board->wait); +out: spin_unlock_irqrestore(&board->spinlock, flags); return IRQ_HANDLED; }