/* HP's Diva chip puts the 4th/5th serial port further out, and some serial ports are supposed to be hidden on certain models.  */
static int pci_hp_diva_setup(struct serial_private *priv, const struct pciserial_board *board, struct uart_port *port, int idx)
/* HP's Diva chip puts the 4th/5th serial port further out, and some serial ports are supposed to be hidden on certain models.  */
static int pci_hp_diva_setup(struct serial_private *priv, const struct pciserial_board *board, struct uart_port *port, int idx)
{
	unsigned int offset = board->first_offset;
	unsigned int bar = FL_GET_BASE(board->flags);
	switch (priv->dev->subsystem_device) {
	case PCI_DEVICE_ID_HP_DIVA_MAESTRO:
		if (idx == 3)
			idx++;
		break;
	case PCI_DEVICE_ID_HP_DIVA_EVEREST:
		if (idx > 0)
			idx++;
		if (idx > 2)
			idx++;
		break;
	}
	if (idx > 2)
		offset = 0x18;
	offset += idx * board->uart_offset;
	return setup_port(priv, port, bar, offset, board->reg_shift);
}