Commit 87ebb81d authored by David Hinds's avatar David Hinds Committed by Linus Torvalds

[PATCH] PATCH: more PCMCIA fixes for 2.5

include/pcmcia/ciscode.h
o added product ID's for a few more cards

drivers/net/pcmcia/fmvj18x_cs.c
o Added MODULE_DESCRIPTION
o Added support for RATOC cards
o Added support for Nextcom NC5310B cards
o Added support for SSi 78Q8370 chipset
o Added support for TDK GN3410 multifunction cards
o Better errno for failed module initialization
o Cleaned up whitespace

drivers/net/pcmcia/smc91c92_cs.c
o Added full duplex support for smc91c100 based cards
o Better errno for failed module initialization
o Synced up naming of stuff to match pcmcia-cs version
o Cleaned up whitespace

drivers/pcmcia/cardbus.c
drivers/pcmcia/cistpl.c
drivers/pcmcia/cs_internal.c
o Fixed card identification bug triggered by invoking certain PCMCIA
  tools when cardmgr is not running.
parent 4546ef0b
...@@ -1322,7 +1322,7 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1322,7 +1322,7 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
return 0; return 0;
} }
/** /**
* ax_interrupt - handle the interrupts from an 8390 * ax_interrupt - handle the interrupts from an 8390
* @irq: interrupt number * @irq: interrupt number
...@@ -1853,7 +1853,7 @@ static int axdev_init(struct net_device *dev) ...@@ -1853,7 +1853,7 @@ static int axdev_init(struct net_device *dev)
return 0; return 0;
} }
/* This page of functions should be 8390 generic */ /* This page of functions should be 8390 generic */
/* Follow National Semi's recommendations for initializing the "NIC". */ /* Follow National Semi's recommendations for initializing the "NIC". */
......
This diff is collapsed.
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Cardbus device configuration Cardbus device configuration
cardbus.c 1.63 1999/11/08 20:47:02 cardbus.c 1.87 2002/10/24 06:11:41
The contents of this file are subject to the Mozilla Public The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file License Version 1.1 (the "License"); you may not use this file
...@@ -175,7 +175,7 @@ static int cb_setup_cis_mem(socket_info_t * s, struct pci_dev *dev, struct resou ...@@ -175,7 +175,7 @@ static int cb_setup_cis_mem(socket_info_t * s, struct pci_dev *dev, struct resou
=====================================================================*/ =====================================================================*/
void read_cb_mem(socket_info_t * s, u_char fn, int space, int read_cb_mem(socket_info_t * s, u_char fn, int space,
u_int addr, u_int len, void *ptr) u_int addr, u_int len, void *ptr)
{ {
struct pci_dev *dev; struct pci_dev *dev;
...@@ -194,7 +194,7 @@ void read_cb_mem(socket_info_t * s, u_char fn, int space, ...@@ -194,7 +194,7 @@ void read_cb_mem(socket_info_t * s, u_char fn, int space,
goto fail; goto fail;
for (; len; addr++, ptr++, len--) for (; len; addr++, ptr++, len--)
pci_readb(dev, addr, (u_char *) ptr); pci_readb(dev, addr, (u_char *) ptr);
return; return 0;
} }
res = dev->resource + space - 1; res = dev->resource + space - 1;
...@@ -214,11 +214,11 @@ void read_cb_mem(socket_info_t * s, u_char fn, int space, ...@@ -214,11 +214,11 @@ void read_cb_mem(socket_info_t * s, u_char fn, int space,
goto fail; goto fail;
memcpy_fromio(ptr, s->cb_cis_virt + addr, len); memcpy_fromio(ptr, s->cb_cis_virt + addr, len);
return; return 0;
fail: fail:
memset(ptr, 0xff, len); memset(ptr, 0xff, len);
return; return -1;
} }
/*===================================================================== /*=====================================================================
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
PCMCIA Card Information Structure parser PCMCIA Card Information Structure parser
cistpl.c 1.97 2001/10/04 03:33:49 cistpl.c 1.99 2002/10/24 06:11:48
The contents of this file are subject to the Mozilla Public The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file License Version 1.1 (the "License"); you may not use this file
...@@ -109,7 +109,7 @@ static void set_cis_map(socket_info_t *s, pccard_mem_map *mem) ...@@ -109,7 +109,7 @@ static void set_cis_map(socket_info_t *s, pccard_mem_map *mem)
} }
} }
void read_cis_mem(socket_info_t *s, int attr, u_int addr, int read_cis_mem(socket_info_t *s, int attr, u_int addr,
u_int len, void *ptr) u_int len, void *ptr)
{ {
pccard_mem_map *mem = &s->cis_mem; pccard_mem_map *mem = &s->cis_mem;
...@@ -118,7 +118,7 @@ void read_cis_mem(socket_info_t *s, int attr, u_int addr, ...@@ -118,7 +118,7 @@ void read_cis_mem(socket_info_t *s, int attr, u_int addr,
DEBUG(3, "cs: read_cis_mem(%d, %#x, %u)\n", attr, addr, len); DEBUG(3, "cs: read_cis_mem(%d, %#x, %u)\n", attr, addr, len);
if (setup_cis_mem(s) != 0) { if (setup_cis_mem(s) != 0) {
memset(ptr, 0xff, len); memset(ptr, 0xff, len);
return; return -1;
} }
mem->flags = MAP_ACTIVE | ((cis_width) ? MAP_16BIT : 0); mem->flags = MAP_ACTIVE | ((cis_width) ? MAP_16BIT : 0);
...@@ -156,6 +156,7 @@ void read_cis_mem(socket_info_t *s, int attr, u_int addr, ...@@ -156,6 +156,7 @@ void read_cis_mem(socket_info_t *s, int attr, u_int addr,
DEBUG(3, "cs: %#2.2x %#2.2x %#2.2x %#2.2x ...\n", DEBUG(3, "cs: %#2.2x %#2.2x %#2.2x %#2.2x ...\n",
*(u_char *)(ptr+0), *(u_char *)(ptr+1), *(u_char *)(ptr+0), *(u_char *)(ptr+1),
*(u_char *)(ptr+2), *(u_char *)(ptr+3)); *(u_char *)(ptr+2), *(u_char *)(ptr+3));
return 0;
} }
void write_cis_mem(socket_info_t *s, int attr, u_int addr, void write_cis_mem(socket_info_t *s, int attr, u_int addr,
...@@ -270,7 +271,7 @@ static int setup_cis_mem(socket_info_t *s) ...@@ -270,7 +271,7 @@ static int setup_cis_mem(socket_info_t *s)
if (find_mem_region(&s->cis_mem.sys_start, s->cap.map_size, if (find_mem_region(&s->cis_mem.sys_start, s->cap.map_size,
s->cap.map_size, low, "card services", s)) { s->cap.map_size, low, "card services", s)) {
printk(KERN_NOTICE "cs: unable to map card memory!\n"); printk(KERN_NOTICE "cs: unable to map card memory!\n");
return CS_OUT_OF_RESOURCE; return -1;
} }
s->cis_mem.sys_stop = s->cis_mem.sys_start+s->cap.map_size-1; s->cis_mem.sys_stop = s->cis_mem.sys_start+s->cap.map_size-1;
s->cis_virt = bus_ioremap(s->cap.bus, s->cis_mem.sys_start, s->cis_virt = bus_ioremap(s->cap.bus, s->cis_mem.sys_start,
...@@ -303,7 +304,7 @@ void release_cis_mem(socket_info_t *s) ...@@ -303,7 +304,7 @@ void release_cis_mem(socket_info_t *s)
static void read_cis_cache(socket_info_t *s, int attr, u_int addr, static void read_cis_cache(socket_info_t *s, int attr, u_int addr,
u_int len, void *ptr) u_int len, void *ptr)
{ {
int i; int i, ret;
char *caddr; char *caddr;
if (s->fake_cis) { if (s->fake_cis) {
...@@ -326,12 +327,12 @@ static void read_cis_cache(socket_info_t *s, int attr, u_int addr, ...@@ -326,12 +327,12 @@ static void read_cis_cache(socket_info_t *s, int attr, u_int addr,
} }
#ifdef CONFIG_CARDBUS #ifdef CONFIG_CARDBUS
if (s->state & SOCKET_CARDBUS) if (s->state & SOCKET_CARDBUS)
read_cb_mem(s, 0, attr, addr, len, ptr); ret = read_cb_mem(s, 0, attr, addr, len, ptr);
else else
#endif #endif
read_cis_mem(s, attr, addr, len, ptr); ret = read_cis_mem(s, attr, addr, len, ptr);
/* Copy data into the cache, if there is room */ /* Copy data into the cache, if there is room */
if ((i < MAX_CIS_TABLE) && if ((ret == 0) && (i < MAX_CIS_TABLE) &&
(caddr+len < s->cis_cache+MAX_CIS_DATA)) { (caddr+len < s->cis_cache+MAX_CIS_DATA)) {
s->cis_table[i].addr = addr; s->cis_table[i].addr = addr;
s->cis_table[i].len = len; s->cis_table[i].len = len;
......
/* /*
* cs_internal.h 1.54 2000/10/26 20:10:55 * cs_internal.h 1.57 2002/10/24 06:11:43
* *
* The contents of this file are subject to the Mozilla Public License * The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in * Version 1.1 (the "License"); you may not use this file except in
...@@ -202,12 +202,12 @@ int cb_config(socket_info_t *s); ...@@ -202,12 +202,12 @@ int cb_config(socket_info_t *s);
void cb_release(socket_info_t *s); void cb_release(socket_info_t *s);
void cb_enable(socket_info_t *s); void cb_enable(socket_info_t *s);
void cb_disable(socket_info_t *s); void cb_disable(socket_info_t *s);
void read_cb_mem(socket_info_t *s, u_char fn, int space, int read_cb_mem(socket_info_t *s, u_char fn, int space,
u_int addr, u_int len, void *ptr); u_int addr, u_int len, void *ptr);
void cb_release_cis_mem(socket_info_t *s); void cb_release_cis_mem(socket_info_t *s);
/* In cistpl.c */ /* In cistpl.c */
void read_cis_mem(socket_info_t *s, int attr, int read_cis_mem(socket_info_t *s, int attr,
u_int addr, u_int len, void *ptr); u_int addr, u_int len, void *ptr);
void write_cis_mem(socket_info_t *s, int attr, void write_cis_mem(socket_info_t *s, int attr,
u_int addr, u_int len, void *ptr); u_int addr, u_int len, void *ptr);
......
/* /*
* ciscode.h 1.45 2000/08/12 02:08:23 * ciscode.h 1.56 2002/10/25 06:37:30
* *
* The contents of this file are subject to the Mozilla Public License * The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in * Version 1.1 (the "License"); you may not use this file except in
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved. * are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
* *
* Alternatively, the contents of this file may be used under the * Alternatively, the contents of this file may be used under the
* terms of the GNU General Public License version 2 (the "GPL"), in which * terms of the GNU General Public License version 2 (the "GPL"), in
* case the provisions of the GPL are applicable instead of the * which case the provisions of the GPL are applicable instead of the
* above. If you wish to allow the use of your version of this file * above. If you wish to allow the use of your version of this file
* only under the terms of the GPL and not to allow others to use * only under the terms of the GPL and not to allow others to use
* your version of this file under the MPL, indicate your decision by * your version of this file under the MPL, indicate your decision by
...@@ -60,6 +60,10 @@ ...@@ -60,6 +60,10 @@
#define PRODID_INTEL_DUAL_RS232 0x0301 #define PRODID_INTEL_DUAL_RS232 0x0301
#define PRODID_INTEL_2PLUS 0x8422 #define PRODID_INTEL_2PLUS 0x8422
#define MANFID_KME 0x0032
#define PRODID_KME_KXLC005_A 0x0704
#define PRODID_KME_KXLC005_B 0x2904
#define MANFID_LINKSYS 0x0143 #define MANFID_LINKSYS 0x0143
#define PRODID_LINKSYS_PCMLM28 0xc0ab #define PRODID_LINKSYS_PCMLM28 0xc0ab
#define PRODID_LINKSYS_3400 0x3341 #define PRODID_LINKSYS_3400 0x3341
...@@ -94,6 +98,8 @@ ...@@ -94,6 +98,8 @@
#define PRODID_OSITECH_JACK_336 0x0007 #define PRODID_OSITECH_JACK_336 0x0007
#define PRODID_OSITECH_SEVEN 0x0008 #define PRODID_OSITECH_SEVEN 0x0008
#define MANFID_OXSEMI 0x0279
#define MANFID_PIONEER 0x000b #define MANFID_PIONEER 0x000b
#define MANFID_PSION 0x016c #define MANFID_PSION 0x016c
...@@ -103,7 +109,10 @@ ...@@ -103,7 +109,10 @@
#define PRODID_QUATECH_SPP100 0x0003 #define PRODID_QUATECH_SPP100 0x0003
#define PRODID_QUATECH_DUAL_RS232 0x0012 #define PRODID_QUATECH_DUAL_RS232 0x0012
#define PRODID_QUATECH_DUAL_RS232_D1 0x0007 #define PRODID_QUATECH_DUAL_RS232_D1 0x0007
#define PRODID_QUATECH_DUAL_RS232_D2 0x0052
#define PRODID_QUATECH_QUAD_RS232 0x001b #define PRODID_QUATECH_QUAD_RS232 0x001b
#define PRODID_QUATECH_DUAL_RS422 0x000e
#define PRODID_QUATECH_QUAD_RS422 0x0045
#define MANFID_SMC 0x0108 #define MANFID_SMC 0x0108
#define PRODID_SMC_ETHER 0x0105 #define PRODID_SMC_ETHER 0x0105
...@@ -118,9 +127,12 @@ ...@@ -118,9 +127,12 @@
#define MANFID_TDK 0x0105 #define MANFID_TDK 0x0105
#define PRODID_TDK_CF010 0x0900 #define PRODID_TDK_CF010 0x0900
#define PRODID_TDK_GN3410 0x4815
#define MANFID_TOSHIBA 0x0098 #define MANFID_TOSHIBA 0x0098
#define MANFID_UNGERMANN 0x02c0
#define MANFID_XIRCOM 0x0105 #define MANFID_XIRCOM 0x0105
#endif /* _LINUX_CISCODE_H */ #endif /* _LINUX_CISCODE_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment