Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38209
b: refs/heads/master
c: efd92df
h: refs/heads/master
i:
  38207: 31a7bb4
v: v3
  • Loading branch information
Russell King authored and Russell King committed Oct 1, 2006
1 parent 330ad85 commit 0664c35
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7ef057fa707897c19725d7e07123e57f6aea79db
refs/heads/master: efd92dfaad962c4fbaf4251b28578c97bd3aa85f
39 changes: 34 additions & 5 deletions trunk/drivers/serial/serial_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ struct serial_quirk {
unsigned int manfid;
unsigned int prodid;
int multi; /* 1 = multifunction, > 1 = # ports */
void (*config)(struct pcmcia_device *);
void (*wakeup)(struct pcmcia_device *);
int (*post)(struct pcmcia_device *);
};
Expand Down Expand Up @@ -164,6 +165,19 @@ static void quirk_wakeup_possio_gcc(struct pcmcia_device *link)
outb(0xC, ctrl + 1);
}

/*
* Socket Dual IO: this enables irq's for second port
*/
static void quirk_config_socket(struct pcmcia_device *link)
{
struct serial_info *info = link->priv;

if (info->multi) {
link->conf.Present |= PRESENT_EXT_STATUS;
link->conf.ExtStatus = ESR_REQ_ATTN_ENA;
}
}

static const struct serial_quirk quirks[] = {
{
.manfid = MANFID_IBM,
Expand Down Expand Up @@ -208,6 +222,12 @@ static const struct serial_quirk quirks[] = {
.manfid = MANFID_SOCKET,
.prodid = PRODID_SOCKET_DUAL_RS232,
.multi = 2,
.config = quirk_config_socket,
}, {
.manfid = MANFID_SOCKET,
.prodid = ~0,
.multi = -1,
.config = quirk_config_socket,
}
};

Expand Down Expand Up @@ -504,6 +524,13 @@ static int simple_config(struct pcmcia_device *link)
}
if (info->multi && (info->manfid == MANFID_3COM))
link->conf.ConfigIndex &= ~(0x08);

/*
* Apply any configuration quirks.
*/
if (info->quirk && info->quirk->config)
info->quirk->config(link);

i = pcmcia_request_configuration(link, &link->conf);
if (i != CS_SUCCESS) {
cs_error(link, RequestConfiguration, i);
Expand Down Expand Up @@ -592,11 +619,13 @@ static int multi_config(struct pcmcia_device * link)
cs_error(link, RequestIRQ, i);
link->irq.AssignedIRQ = 0;
}
/* Socket Dual IO: this enables irq's for second port */
if (info->multi && (info->manfid == MANFID_SOCKET)) {
link->conf.Present |= PRESENT_EXT_STATUS;
link->conf.ExtStatus = ESR_REQ_ATTN_ENA;
}

/*
* Apply any configuration quirks.
*/
if (info->quirk && info->quirk->config)
info->quirk->config(link);

i = pcmcia_request_configuration(link, &link->conf);
if (i != CS_SUCCESS) {
cs_error(link, RequestConfiguration, i);
Expand Down

0 comments on commit 0664c35

Please sign in to comment.