pcmcia: allow for cb_irq to differ from pci_dev's irq in yenta_socket
cb_irq is presumed to be the same as the pci_dev's irq. This won't be true any more as soon as we allow the ISA irq to be used for Cardbus devices. Therefore, use the pci_dev's irq explicitely whenever we care about it. Part 2 of a series to allow the ISA irq to be used for Cardbus devices if the socket's PCI irq is unusable. [linux@dominikbrodowski.net: split up the original patch, commit message] Signed-off-by: Jens Kuenzer <Jens.Kuenzer@fpga.homeip.net> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
This commit is contained in:
committed by
Dominik Brodowski
parent
28ca8dd71f
commit
ba8819e991
@@ -329,8 +329,8 @@ static int yenta_set_socket(struct pcmcia_socket *sock, socket_state_t *state)
|
|||||||
/* ISA interrupt control? */
|
/* ISA interrupt control? */
|
||||||
intr = exca_readb(socket, I365_INTCTL);
|
intr = exca_readb(socket, I365_INTCTL);
|
||||||
intr = (intr & ~0xf);
|
intr = (intr & ~0xf);
|
||||||
if (!socket->cb_irq) {
|
if (!socket->dev->irq) {
|
||||||
intr |= state->io_irq;
|
intr |= socket->cb_irq ? socket->cb_irq : state->io_irq;
|
||||||
bridge |= CB_BRIDGE_INTR;
|
bridge |= CB_BRIDGE_INTR;
|
||||||
}
|
}
|
||||||
exca_writeb(socket, I365_INTCTL, intr);
|
exca_writeb(socket, I365_INTCTL, intr);
|
||||||
@@ -340,7 +340,7 @@ static int yenta_set_socket(struct pcmcia_socket *sock, socket_state_t *state)
|
|||||||
reg = exca_readb(socket, I365_INTCTL) & (I365_RING_ENA | I365_INTR_ENA);
|
reg = exca_readb(socket, I365_INTCTL) & (I365_RING_ENA | I365_INTR_ENA);
|
||||||
reg |= (state->flags & SS_RESET) ? 0 : I365_PC_RESET;
|
reg |= (state->flags & SS_RESET) ? 0 : I365_PC_RESET;
|
||||||
reg |= (state->flags & SS_IOCARD) ? I365_PC_IOCARD : 0;
|
reg |= (state->flags & SS_IOCARD) ? I365_PC_IOCARD : 0;
|
||||||
if (state->io_irq != socket->cb_irq) {
|
if (state->io_irq != socket->dev->irq) {
|
||||||
reg |= state->io_irq;
|
reg |= state->io_irq;
|
||||||
bridge |= CB_BRIDGE_INTR;
|
bridge |= CB_BRIDGE_INTR;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user