]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
gpib: Don't use extended registers
authorDave Penkler <dpenkler@gmail.com>
Sat, 11 Apr 2026 17:25:08 +0000 (19:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 May 2026 11:47:33 +0000 (13:47 +0200)
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 <dpenkler@gmail.com>
Link: https://patch.msgid.link/20260411172511.26546-4-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpib/ines/ines_gpib.c

index dd98cb261a4cf0422ecef26ab303670bcc9dc51b..df299a9d7f4d3540dd6ebc6e96b467e062c65ee6 100644 (file)
@@ -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;
 }