if (s->state & SOCKET_CARDBUS_CONFIG) {
config->Attributes = CONF_VALID_CLIENT;
config->IntType = INT_CARDBUS;
- config->AssignedIRQ = s->irq.AssignedIRQ;
+ config->AssignedIRQ = s->pcmcia_irq;
if (config->AssignedIRQ)
config->Attributes |= CONF_ENABLE_IRQ;
if (s->io[0].res) {
config->ExtStatus = c->ExtStatus;
config->Present = config->CardValues = c->CardValues;
config->IRQAttributes = c->irq.Attributes;
- config->AssignedIRQ = s->irq.AssignedIRQ;
+ config->AssignedIRQ = s->pcmcia_irq;
config->BasePort1 = c->io.BasePort1;
config->NumPorts1 = c->io.NumPorts1;
config->Attributes1 = c->io.Attributes1;
dev_dbg(&s->dev, "IRQ attributes must match assigned ones\n");
goto out;
}
- if (s->irq.AssignedIRQ != req->AssignedIRQ) {
+ if (s->pcmcia_irq != req->AssignedIRQ) {
dev_dbg(&s->dev, "IRQ must match assigned one\n");
goto out;
}
- if (--s->irq.Config == 0) {
- c->state &= ~CONFIG_IRQ_REQ;
- }
if (req->Handler)
free_irq(req->AssignedIRQ, p_dev->priv);
if (req->Attributes & CONF_ENABLE_SPKR)
s->socket.flags |= SS_SPKR_ENA;
if (req->Attributes & CONF_ENABLE_IRQ)
- s->socket.io_irq = s->irq.AssignedIRQ;
+ s->socket.io_irq = s->pcmcia_irq;
else
s->socket.io_irq = 0;
s->ops->set_socket(s, &s->socket);
if (req->Present & PRESENT_IOBASE_0)
c->Option |= COR_ADDR_DECODE;
}
- if (c->state & CONFIG_IRQ_REQ)
+ if (req->Attributes & CONF_ENABLE_IRQ)
if (!(c->irq.Attributes & IRQ_FORCED_PULSE))
c->Option |= COR_LEVEL_REQ;
pcmcia_write_cis_mem(s, 1, (base + CISREG_COR)>>1, 1, &c->Option);
dev_dbg(&s->dev, "Configuration is locked\n");
goto out;
}
- if (c->state & CONFIG_IRQ_REQ) {
- dev_dbg(&s->dev, "IRQ already configured\n");
- goto out;
- }
if (!irq) {
dev_dbg(&s->dev, "no IRQ available\n");
if (!(req->Attributes & IRQ_TYPE_DYNAMIC_SHARING)) {
req->Attributes |= IRQ_TYPE_DYNAMIC_SHARING;
- dev_printk(KERN_WARNING, &p_dev->dev, "pcmcia: "
- "request for exclusive IRQ could not be fulfilled.\n");
dev_printk(KERN_WARNING, &p_dev->dev, "pcmcia: the driver "
"needs updating to supported shared IRQ lines.\n");
}
c->irq.Attributes = req->Attributes;
req->AssignedIRQ = irq;
- s->irq.Config++;
- c->state |= CONFIG_IRQ_REQ;
p_dev->_irq = 1;
ret = 0;
p_dev);
if (!ret) {
free_irq(irq, p_dev);
- p_dev->irq_v = s->irq.AssignedIRQ = irq;
+ p_dev->irq_v = s->pcmcia_irq = irq;
pcmcia_used_irq[irq]++;
break;
}
void pcmcia_cleanup_irq(struct pcmcia_socket *s)
{
- pcmcia_used_irq[s->irq.AssignedIRQ]--;
- s->irq.AssignedIRQ = 0;
+ pcmcia_used_irq[s->pcmcia_irq]--;
+ s->pcmcia_irq = 0;
}
#else /* CONFIG_PCMCIA_PROBE */
void pcmcia_cleanup_irq(struct pcmcia_socket *s)
{
- s->irq.AssignedIRQ = 0;
+ s->pcmcia_irq = 0;
return;
}
return 0;
/* already assigned? */
- if (s->irq.AssignedIRQ) {
- p_dev->irq_v = s->irq.AssignedIRQ;
+ if (s->pcmcia_irq) {
+ p_dev->irq_v = s->pcmcia_irq;
return 0;
}
/* but use the PCI irq otherwise */
if (s->pci_irq) {
- p_dev->irq_v = s->irq.AssignedIRQ = s->pci_irq;
+ p_dev->irq_v = s->pcmcia_irq = s->pci_irq;
return 0;
}