Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42409
b: refs/heads/master
c: efd5058
h: refs/heads/master
i:
  42407: 87ab236
v: v3
  • Loading branch information
Dominik Brodowski committed Dec 5, 2006
1 parent 0e3a6ad commit 97715e0
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 86 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: 44e5e33e99e1b955ac6f0bb26abd9380629b48a9
refs/heads/master: efd50585e2ff9bd60e044fda7764d323010a7fe4
6 changes: 3 additions & 3 deletions trunk/drivers/ata/pata_pcmcia.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)

/* See if we have a manufacturer identifier. Use it to set is_kme for
vendor quirks */
tuple.DesiredTuple = CISTPL_MANFID;
if (!pcmcia_get_first_tuple(pdev, &tuple) && !pcmcia_get_tuple_data(pdev, &tuple) && !pcmcia_parse_tuple(pdev, &tuple, &stk->parse))
is_kme = ((stk->parse.manfid.manf == MANFID_KME) && ((stk->parse.manfid.card == PRODID_KME_KXLC005_A) || (stk->parse.manfid.card == PRODID_KME_KXLC005_B)));
is_kme = ((pdev->manf_id == MANFID_KME) &&
((pdev->card_id == PRODID_KME_KXLC005_A) ||
(pdev->card_id == PRODID_KME_KXLC005_B)));

/* Not sure if this is right... look up the current Vcc */
CS_CHECK(GetConfigurationInfo, pcmcia_get_configuration_info(pdev, &stk->conf));
Expand Down
10 changes: 3 additions & 7 deletions trunk/drivers/ide/legacy/ide-cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,9 @@ static int ide_config(struct pcmcia_device *link)
link->conf.ConfigBase = stk->parse.config.base;
link->conf.Present = stk->parse.config.rmask[0];

tuple.DesiredTuple = CISTPL_MANFID;
if (!pcmcia_get_first_tuple(link, &tuple) &&
!pcmcia_get_tuple_data(link, &tuple) &&
!pcmcia_parse_tuple(link, &tuple, &stk->parse))
is_kme = ((stk->parse.manfid.manf == MANFID_KME) &&
((stk->parse.manfid.card == PRODID_KME_KXLC005_A) ||
(stk->parse.manfid.card == PRODID_KME_KXLC005_B)));
is_kme = ((link->manf_id == MANFID_KME) &&
((link->card_id == PRODID_KME_KXLC005_A) ||
(link->card_id == PRODID_KME_KXLC005_B)));

/* Not sure if this is right... look up the current Vcc */
CS_CHECK(GetConfigurationInfo, pcmcia_get_configuration_info(link, &stk->conf));
Expand Down
12 changes: 4 additions & 8 deletions trunk/drivers/net/pcmcia/3c589_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,17 +272,13 @@ static int tc589_config(struct pcmcia_device *link)
CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse));
link->conf.ConfigBase = parse.config.base;
link->conf.Present = parse.config.rmask[0];

/* Is this a 3c562? */
tuple.DesiredTuple = CISTPL_MANFID;
tuple.Attributes = TUPLE_RETURN_COMMON;
if ((pcmcia_get_first_tuple(link, &tuple) == CS_SUCCESS) &&
(pcmcia_get_tuple_data(link, &tuple) == CS_SUCCESS)) {
if (le16_to_cpu(buf[0]) != MANFID_3COM)

/* Is this a 3c562? */
if (link->manf_id != MANFID_3COM)
printk(KERN_INFO "3c589_cs: hmmm, is this really a "
"3Com card??\n");
multi = (le16_to_cpu(buf[1]) == PRODID_3COM_3C562);
}
multi = (link->card_id == PRODID_3COM_3C562);

/* For the 3c562, the base address must be xx00-xx7f */
link->io.IOAddrLines = 16;
Expand Down
26 changes: 8 additions & 18 deletions trunk/drivers/net/pcmcia/fmvj18x_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,17 +374,12 @@ static int fmvj18x_config(struct pcmcia_device *link)
CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple));
CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse));
link->conf.ConfigIndex = parse.cftable_entry.index;
tuple.DesiredTuple = CISTPL_MANFID;
if (pcmcia_get_first_tuple(link, &tuple) == CS_SUCCESS)
CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple));
else
buf[0] = 0xffff;
switch (le16_to_cpu(buf[0])) {
switch (link->manf_id) {
case MANFID_TDK:
cardtype = TDK;
if (le16_to_cpu(buf[1]) == PRODID_TDK_GN3410
|| le16_to_cpu(buf[1]) == PRODID_TDK_NP9610
|| le16_to_cpu(buf[1]) == PRODID_TDK_MN3200) {
if (link->card_id == PRODID_TDK_GN3410
|| link->card_id == PRODID_TDK_NP9610
|| link->card_id == PRODID_TDK_MN3200) {
/* MultiFunction Card */
link->conf.ConfigBase = 0x800;
link->conf.ConfigIndex = 0x47;
Expand All @@ -395,11 +390,11 @@ static int fmvj18x_config(struct pcmcia_device *link)
cardtype = CONTEC;
break;
case MANFID_FUJITSU:
if (le16_to_cpu(buf[1]) == PRODID_FUJITSU_MBH10302)
if (link->card_id == PRODID_FUJITSU_MBH10302)
/* RATOC REX-5588/9822/4886's PRODID are 0004(=MBH10302),
but these are MBH10304 based card. */
cardtype = MBH10304;
else if (le16_to_cpu(buf[1]) == PRODID_FUJITSU_MBH10304)
else if (link->card_id == PRODID_FUJITSU_MBH10304)
cardtype = MBH10304;
else
cardtype = LA501;
Expand All @@ -409,14 +404,9 @@ static int fmvj18x_config(struct pcmcia_device *link)
}
} else {
/* old type card */
tuple.DesiredTuple = CISTPL_MANFID;
if (pcmcia_get_first_tuple(link, &tuple) == CS_SUCCESS)
CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple));
else
buf[0] = 0xffff;
switch (le16_to_cpu(buf[0])) {
switch (link->manf_id) {
case MANFID_FUJITSU:
if (le16_to_cpu(buf[1]) == PRODID_FUJITSU_MBH10304) {
if (link->card_id == PRODID_FUJITSU_MBH10304) {
cardtype = XXX10304; /* MBH10304 with buggy CIS */
link->conf.ConfigIndex = 0x20;
} else {
Expand Down
22 changes: 7 additions & 15 deletions trunk/drivers/net/pcmcia/pcnet_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ static int pcnet_config(struct pcmcia_device *link)
tuple_t tuple;
cisparse_t parse;
int i, last_ret, last_fn, start_pg, stop_pg, cm_offset;
int manfid = 0, prodid = 0, has_shmem = 0;
int has_shmem = 0;
u_short buf[64];
hw_info_t *hw_info;

Expand All @@ -536,14 +536,6 @@ static int pcnet_config(struct pcmcia_device *link)
link->conf.ConfigBase = parse.config.base;
link->conf.Present = parse.config.rmask[0];

tuple.DesiredTuple = CISTPL_MANFID;
tuple.Attributes = TUPLE_RETURN_COMMON;
if ((pcmcia_get_first_tuple(link, &tuple) == CS_SUCCESS) &&
(pcmcia_get_tuple_data(link, &tuple) == CS_SUCCESS)) {
manfid = le16_to_cpu(buf[0]);
prodid = le16_to_cpu(buf[1]);
}

tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
tuple.Attributes = 0;
CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple));
Expand Down Expand Up @@ -589,8 +581,8 @@ static int pcnet_config(struct pcmcia_device *link)
link->conf.Attributes |= CONF_ENABLE_SPKR;
link->conf.Status = CCSR_AUDIO_ENA;
}
if ((manfid == MANFID_IBM) &&
(prodid == PRODID_IBM_HOME_AND_AWAY))
if ((link->manf_id == MANFID_IBM) &&
(link->card_id == PRODID_IBM_HOME_AND_AWAY))
link->conf.ConfigIndex |= 0x10;

CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf));
Expand Down Expand Up @@ -624,10 +616,10 @@ static int pcnet_config(struct pcmcia_device *link)
info->flags = hw_info->flags;
/* Check for user overrides */
info->flags |= (delay_output) ? DELAY_OUTPUT : 0;
if ((manfid == MANFID_SOCKET) &&
((prodid == PRODID_SOCKET_LPE) ||
(prodid == PRODID_SOCKET_LPE_CF) ||
(prodid == PRODID_SOCKET_EIO)))
if ((link->manf_id == MANFID_SOCKET) &&
((link->card_id == PRODID_SOCKET_LPE) ||
(link->card_id == PRODID_SOCKET_LPE_CF) ||
(link->card_id == PRODID_SOCKET_EIO)))
info->flags &= ~USE_BIG_BUF;
if (!use_big_buf)
info->flags &= ~USE_BIG_BUF;
Expand Down
8 changes: 2 additions & 6 deletions trunk/drivers/net/pcmcia/smc91c92_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -999,12 +999,8 @@ static int smc91c92_config(struct pcmcia_device *link)
link->conf.ConfigBase = parse->config.base;
link->conf.Present = parse->config.rmask[0];

tuple->DesiredTuple = CISTPL_MANFID;
tuple->Attributes = TUPLE_RETURN_COMMON;
if (first_tuple(link, tuple, parse) == CS_SUCCESS) {
smc->manfid = parse->manfid.manf;
smc->cardid = parse->manfid.card;
}
smc->manfid = link->manf_id;
smc->cardid = link->card_id;

if ((smc->manfid == MANFID_OSITECH) &&
(smc->cardid != PRODID_OSITECH_SEVEN)) {
Expand Down
7 changes: 2 additions & 5 deletions trunk/drivers/net/wireless/hostap/hostap_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,15 +293,12 @@ static int sandisk_enable_wireless(struct net_device *dev)
goto done;
}

tuple.DesiredTuple = CISTPL_MANFID;
tuple.Attributes = TUPLE_RETURN_COMMON;
tuple.TupleData = buf;
tuple.TupleDataMax = sizeof(buf);
tuple.TupleOffset = 0;
if (pcmcia_get_first_tuple(hw_priv->link, &tuple) ||
pcmcia_get_tuple_data(hw_priv->link, &tuple) ||
pcmcia_parse_tuple(hw_priv->link, &tuple, parse) ||
parse->manfid.manf != 0xd601 || parse->manfid.card != 0x0101) {

if (hw_priv->link->manf_id != 0xd601 || hw_priv->link->card_id != 0x0101) {
/* No SanDisk manfid found */
ret = -ENODEV;
goto done;
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/scsi/pcmcia/qlogic_stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,7 @@ static int qlogic_config(struct pcmcia_device * link)
CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse));
link->conf.ConfigBase = parse.config.base;

tuple.DesiredTuple = CISTPL_MANFID;
if ((pcmcia_get_first_tuple(link, &tuple) == CS_SUCCESS) && (pcmcia_get_tuple_data(link, &tuple) == CS_SUCCESS))
info->manf_id = le16_to_cpu(tuple.TupleData[0]);
info->manf_id = link->manf_id;

tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple));
Expand Down
5 changes: 1 addition & 4 deletions trunk/drivers/scsi/pcmcia/sym53c500_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -731,10 +731,7 @@ SYM53C500_config(struct pcmcia_device *link)
CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse));
link->conf.ConfigBase = parse.config.base;

tuple.DesiredTuple = CISTPL_MANFID;
if ((pcmcia_get_first_tuple(link, &tuple) == CS_SUCCESS) &&
(pcmcia_get_tuple_data(link, &tuple) == CS_SUCCESS))
info->manf_id = le16_to_cpu(tuple.TupleData[0]);
info->manf_id = link->manf_id;

tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple));
Expand Down
30 changes: 14 additions & 16 deletions trunk/drivers/serial/serial_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,27 +757,25 @@ static int serial_config(struct pcmcia_device * link)

/* Is this a multiport card? */
tuple->DesiredTuple = CISTPL_MANFID;
if (first_tuple(link, tuple, parse) == CS_SUCCESS) {
info->manfid = parse->manfid.manf;
info->prodid = parse->manfid.card;

for (i = 0; i < ARRAY_SIZE(quirks); i++)
if ((quirks[i].manfid == ~0 ||
quirks[i].manfid == info->manfid) &&
(quirks[i].prodid == ~0 ||
quirks[i].prodid == info->prodid)) {
info->quirk = &quirks[i];
break;
}
}
info->manfid = link->manf_id;
info->prodid = link->card_id;

for (i = 0; i < ARRAY_SIZE(quirks); i++)
if ((quirks[i].manfid == ~0 ||
quirks[i].manfid == info->manfid) &&
(quirks[i].prodid == ~0 ||
quirks[i].prodid == info->prodid)) {
info->quirk = &quirks[i];
break;
}

/* Another check for dual-serial cards: look for either serial or
multifunction cards that ask for appropriate IO port ranges */
tuple->DesiredTuple = CISTPL_FUNCID;
if ((info->multi == 0) &&
((first_tuple(link, tuple, parse) != CS_SUCCESS) ||
(parse->funcid.func == CISTPL_FUNCID_MULTI) ||
(parse->funcid.func == CISTPL_FUNCID_SERIAL))) {
(link->has_func_id) &&
((link->func_id == CISTPL_FUNCID_MULTI) ||
(link->func_id == CISTPL_FUNCID_SERIAL))) {
tuple->DesiredTuple = CISTPL_CFTABLE_ENTRY;
if (first_tuple(link, tuple, parse) == CS_SUCCESS) {
if ((cf->io.nwin == 1) && (cf->io.win[0].len % 8 == 0))
Expand Down

0 comments on commit 97715e0

Please sign in to comment.