Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3746
b: refs/heads/master
c: ea7b388
h: refs/heads/master
v: v3
  • Loading branch information
Dominik Brodowski authored and Linus Torvalds committed Jun 28, 2005
1 parent 20819dc commit b024a34
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 23a83bfe6ab51c745d109d979c78a96fe3e93f5c
refs/heads/master: ea7b38825bba66a81745a706da70a1c81adc95bd
8 changes: 8 additions & 0 deletions trunk/drivers/pcmcia/ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,14 @@ static inline int pcmcia_devmatch(struct pcmcia_device *dev,
return 0;
}

if (did->match_flags & PCMCIA_DEV_ID_MATCH_FAKE_CIS) {
if (!dev->socket->fake_cis) {
/* FIXME: evaluate using firmware helpers to
* automagically load it from userspace */
return 0;
}
}

dev->dev.driver_data = (void *) did;

return 1;
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/mod_devicetable.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ struct pcmcia_device_id {

/* not matched against */
kernel_ulong_t driver_info;
char * cisfile;
};

#define PCMCIA_DEV_ID_MATCH_MANF_ID 0x0001
Expand All @@ -207,5 +208,6 @@ struct pcmcia_device_id {
#define PCMCIA_DEV_ID_MATCH_PROD_ID3 0x0040
#define PCMCIA_DEV_ID_MATCH_PROD_ID4 0x0080
#define PCMCIA_DEV_ID_MATCH_DEVICE_NO 0x0100
#define PCMCIA_DEV_ID_MATCH_FAKE_CIS 0x0200

#endif /* LINUX_MOD_DEVICETABLE_H */
74 changes: 74 additions & 0 deletions trunk/include/pcmcia/device_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,79 @@
.prod_id_hash = { (vh1), (vh2), (vh3), 0 }, \
.device_no = (mfc), }

/* cards needing a CIS override */

#define PCMCIA_DEVICE_CIS_MANF_CARD(manf, card, _cisfile) { \
.match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
PCMCIA_DEV_ID_MATCH_MANF_ID| \
PCMCIA_DEV_ID_MATCH_CARD_ID, \
.manf_id = (manf), \
.card_id = (card), \
.cisfile = (_cisfile)}

#define PCMCIA_DEVICE_CIS_PROD_ID12(v1, v2, vh1, vh2, _cisfile) { \
.match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
PCMCIA_DEV_ID_MATCH_PROD_ID1| \
PCMCIA_DEV_ID_MATCH_PROD_ID2, \
.prod_id = { (v1), (v2), NULL, NULL }, \
.prod_id_hash = { (vh1), (vh2), 0, 0 }, \
.cisfile = (_cisfile)}

#define PCMCIA_DEVICE_CIS_PROD_ID123(v1, v2, v3, vh1, vh2, vh3, _cisfile) { \
.match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
PCMCIA_DEV_ID_MATCH_PROD_ID1| \
PCMCIA_DEV_ID_MATCH_PROD_ID2| \
PCMCIA_DEV_ID_MATCH_PROD_ID3, \
.prod_id = { (v1), (v2), (v3), NULL },\
.prod_id_hash = { (vh1), (vh2), (vh3), 0 }, \
.cisfile = (_cisfile)}


#define PCMCIA_DEVICE_CIS_PROD_ID2(v2, vh2, _cisfile) { \
.match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
PCMCIA_DEV_ID_MATCH_PROD_ID2, \
.prod_id = { NULL, (v2), NULL, NULL }, \
.prod_id_hash = { 0, (vh2), 0, 0 }, \
.cisfile = (_cisfile)}

#define PCMCIA_PFC_DEVICE_CIS_PROD_ID12(mfc, v1, v2, vh1, vh2, _cisfile) { \
.match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
PCMCIA_DEV_ID_MATCH_PROD_ID1| \
PCMCIA_DEV_ID_MATCH_PROD_ID2| \
PCMCIA_DEV_ID_MATCH_DEVICE_NO, \
.prod_id = { (v1), (v2), NULL, NULL }, \
.prod_id_hash = { (vh1), (vh2), 0, 0 },\
.device_no = (mfc), \
.cisfile = (_cisfile)}

#define PCMCIA_MFC_DEVICE_CIS_MANF_CARD(mfc, manf, card, _cisfile) { \
.match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
PCMCIA_DEV_ID_MATCH_MANF_ID| \
PCMCIA_DEV_ID_MATCH_CARD_ID| \
PCMCIA_DEV_ID_MATCH_FUNCTION, \
.manf_id = (manf), \
.card_id = (card), \
.function = (mfc), \
.cisfile = (_cisfile)}

#define PCMCIA_MFC_DEVICE_CIS_PROD_ID12(mfc, v1, v2, vh1, vh2, _cisfile) { \
.match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
PCMCIA_DEV_ID_MATCH_PROD_ID1| \
PCMCIA_DEV_ID_MATCH_PROD_ID2| \
PCMCIA_DEV_ID_MATCH_FUNCTION, \
.prod_id = { (v1), (v2), NULL, NULL }, \
.prod_id_hash = { (vh1), (vh2), 0, 0 }, \
.function = (mfc), \
.cisfile = (_cisfile)}

#define PCMCIA_MFC_DEVICE_CIS_PROD_ID4(mfc, v4, vh4, _cisfile) { \
.match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
PCMCIA_DEV_ID_MATCH_PROD_ID4| \
PCMCIA_DEV_ID_MATCH_FUNCTION, \
.prod_id = { NULL, NULL, NULL, (v4) }, \
.prod_id_hash = { 0, 0, 0, (vh4) }, \
.function = (mfc), \
.cisfile = (_cisfile)}


#define PCMCIA_DEVICE_NULL { .match_flags = 0, }

0 comments on commit b024a34

Please sign in to comment.