28 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
30 #include <linux/module.h>
31 #include <linux/kernel.h>
33 #include <linux/slab.h>
34 #include <linux/string.h>
39 #include <linux/netdevice.h>
42 #include <linux/if_arp.h>
44 #include <linux/ethtool.h>
45 #include <linux/mii.h>
56 #include <asm/uaccess.h>
60 static const char *if_names[] = {
"auto",
"10baseT",
"10base2"};
63 #define FIRMWARE_NAME "ositech/Xilinx7OD.bin"
71 #define INT_MODULE_PARM(n, v) static int n = v; module_param(n, int, 0)
82 #define DRV_NAME "smc91c92_cs"
83 #define DRV_VERSION "1.123"
90 #define TX_TIMEOUT ((400*HZ)/1000)
97 #define MEMORY_WAIT_TIME 8
120 #define MEGAHERTZ_ISR 0x0380
123 #define MOT_LAN 0x0000
124 #define MOT_UART 0x0020
125 #define MOT_EEPROM 0x20
128 (COR_LEVEL_REQ | COR_FUNC_ENA | COR_ADDR_DECODE | COR_IREQ_ENA)
131 #define OSITECH_AUI_CTL 0x0c
132 #define OSITECH_PWRDOWN 0x0d
133 #define OSITECH_RESET 0x0e
134 #define OSITECH_ISR 0x0f
135 #define OSITECH_AUI_PWR 0x0c
136 #define OSITECH_RESET_ISR 0x0e
138 #define OSI_AUI_PWR 0x40
139 #define OSI_LAN_PWRDOWN 0x02
140 #define OSI_MODEM_PWRDOWN 0x01
141 #define OSI_LAN_RESET 0x02
142 #define OSI_MODEM_RESET 0x01
145 #define BANK_SELECT 14
146 #define SMC_SELECT_BANK(x) { outw(x, ioaddr + BANK_SELECT); }
151 #define TCR_ENABLE 0x0001
152 #define TCR_PAD_EN 0x0080
153 #define TCR_MONCSN 0x0400
154 #define TCR_FDUPLX 0x0800
155 #define TCR_NORMAL TCR_ENABLE | TCR_PAD_EN
158 #define EPH_TX_SUC 0x0001
159 #define EPH_SNGLCOL 0x0002
160 #define EPH_MULCOL 0x0004
161 #define EPH_LTX_MULT 0x0008
162 #define EPH_16COL 0x0010
163 #define EPH_SQET 0x0020
164 #define EPH_LTX_BRD 0x0040
165 #define EPH_TX_DEFR 0x0080
166 #define EPH_LAT_COL 0x0200
167 #define EPH_LOST_CAR 0x0400
168 #define EPH_EXC_DEF 0x0800
169 #define EPH_CTR_ROL 0x1000
170 #define EPH_RX_OVRN 0x2000
171 #define EPH_LINK_OK 0x4000
172 #define EPH_TX_UNRN 0x8000
178 #define CFG_MII_SELECT 0x8000
179 #define CFG_NO_WAIT 0x1000
180 #define CFG_FULL_STEP 0x0400
181 #define CFG_SET_SQLCH 0x0200
182 #define CFG_AUI_SELECT 0x0100
183 #define CFG_16BIT 0x0080
184 #define CFG_DIS_LINK 0x0040
185 #define CFG_STATIC 0x0030
186 #define CFG_IRQ_SEL_1 0x0004
187 #define CFG_IRQ_SEL_0 0x0002
192 #define CTL_STORE 0x0001
193 #define CTL_RELOAD 0x0002
194 #define CTL_EE_SELECT 0x0004
195 #define CTL_TE_ENABLE 0x0020
196 #define CTL_CR_ENABLE 0x0040
197 #define CTL_LE_ENABLE 0x0080
198 #define CTL_AUTO_RELEASE 0x0800
199 #define CTL_POWERDOWN 0x2000
203 #define MC_ALLOC 0x20
204 #define MC_RESET 0x40
205 #define MC_RELEASE 0x80
206 #define MC_FREEPKT 0xA0
207 #define MC_ENQUEUE 0xC0
210 #define FP_RXEMPTY 0x8000
212 #define PTR_AUTO_INC 0x0040
213 #define PTR_READ 0x2000
214 #define PTR_AUTOINC 0x4000
215 #define PTR_RCV 0x8000
218 #define IM_RCV_INT 0x1
219 #define IM_TX_INT 0x2
220 #define IM_TX_EMPTY_INT 0x4
221 #define IM_ALLOC_INT 0x8
222 #define IM_RX_OVRN_INT 0x10
223 #define IM_EPH_INT 0x20
228 #define RCR_SOFTRESET 0x8000
229 #define RCR_STRIP_CRC 0x200
230 #define RCR_ENABLE 0x100
231 #define RCR_ALMUL 0x4
232 #define RCR_PROMISC 0x2
235 #define RCR_NORMAL (RCR_STRIP_CRC | RCR_ENABLE)
236 #define RCR_CLEAR 0x0
245 #define REVISION 0x0a
248 #define TS_SUCCESS 0x0001
249 #define TS_16COL 0x0010
250 #define TS_LATCOL 0x0200
251 #define TS_LOSTCAR 0x0400
254 #define RS_ALGNERR 0x8000
255 #define RS_BADCRC 0x2000
256 #define RS_ODDFRAME 0x1000
257 #define RS_TOOLONG 0x0800
258 #define RS_TOOSHORT 0x0400
259 #define RS_MULTICAST 0x0001
260 #define RS_ERRORS (RS_ALGNERR | RS_BADCRC | RS_TOOLONG | RS_TOOSHORT)
262 #define set_bits(v, p) outw(inw(p)|(v), (p))
263 #define mask_bits(v, p) outw(inw(p)&(v), (p))
267 static void smc91c92_detach(
struct pcmcia_device *p_dev);
268 static int smc91c92_config(
struct pcmcia_device *
link);
269 static void smc91c92_release(
struct pcmcia_device *
link);
281 static void smc_set_xcvr(
struct net_device *
dev,
int if_port);
284 static void mdio_sync(
unsigned int addr);
291 .ndo_open = smc_open,
292 .ndo_stop = smc_close,
293 .ndo_start_xmit = smc_start_xmit,
294 .ndo_tx_timeout = smc_tx_timeout,
295 .ndo_set_config = s9k_config,
296 .ndo_set_rx_mode = set_rx_mode,
297 .ndo_do_ioctl = smc_ioctl,
303 static int smc91c92_probe(
struct pcmcia_device *
link)
308 dev_dbg(&link->dev,
"smc91c92_attach()\n");
314 smc = netdev_priv(dev);
326 smc->
mii_if.mdio_read = mdio_read;
327 smc->
mii_if.mdio_write = mdio_write;
328 smc->
mii_if.phy_id_mask = 0x1f;
329 smc->
mii_if.reg_num_mask = 0x1f;
331 return smc91c92_config(link);
334 static void smc91c92_detach(
struct pcmcia_device *link)
338 dev_dbg(&link->dev,
"smc91c92_detach\n");
342 smc91c92_release(link);
349 static int cvt_ascii_address(
struct net_device *dev,
char *
s)
355 for (i = 0; i < 6; i++) {
357 for (j = 0; j < 2; j++) {
360 da += ((c >=
'0') && (c <=
'9')) ?
361 (c -
'0') : ((c & 0x0f) + 9);
379 static int mhz_3288_power(
struct pcmcia_device *link)
401 static int mhz_mfc_config_check(
struct pcmcia_device *
p_dev,
void *priv_data)
404 p_dev->io_lines = 16;
405 p_dev->resource[1]->start = p_dev->resource[0]->start;
406 p_dev->resource[1]->end = 8;
407 p_dev->resource[1]->flags &= ~IO_DATA_PATH_WIDTH;
408 p_dev->resource[1]->flags |= IO_DATA_PATH_WIDTH_8;
409 p_dev->resource[0]->end = 16;
410 p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH;
411 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
412 for (k = 0; k < 0x400; k += 0x10) {
415 p_dev->resource[0]->start = k ^ 0x300;
422 static int mhz_mfc_config(
struct pcmcia_device *link)
429 link->config_flags |= CONF_ENABLE_SPKR | CONF_ENABLE_IRQ |
434 if (pcmcia_loop_config(link, mhz_mfc_config_check,
NULL))
437 dev->
base_addr = link->resource[0]->start;
440 link->resource[2]->flags = WIN_DATA_WIDTH_8|WIN_MEMORY_TYPE_AM|
WIN_ENABLE;
441 link->resource[2]->start = link->resource[2]->end = 0;
447 resource_size(link->resource[2]));
453 mhz_3288_power(link);
458 static int pcmcia_get_versmac(
struct pcmcia_device *p_dev,
471 if ((parse.
version_1.
ns > 3) && (cvt_ascii_address(dev, buf) == 0))
477 static int mhz_setup(
struct pcmcia_device *link)
486 if ((link->prod_id[3]) &&
487 (cvt_ascii_address(dev, link->prod_id[3]) == 0))
492 if (!pcmcia_loop_tuple(link,
CISTPL_VERS_1, pcmcia_get_versmac, dev))
497 len = pcmcia_get_tuple(link, 0x81, &buf);
498 if (buf && len >= 13) {
500 if (cvt_ascii_address(dev, buf) == 0)
517 static void mot_config(
struct pcmcia_device *link)
522 unsigned int iouart = link->resource[1]->start;
538 static int mot_setup(
struct pcmcia_device *link)
547 for (i = 0; i < 3; i++) {
553 for (loop = wait = 0; loop < 200; loop++) {
556 if (wait == 0)
break;
564 dev->
dev_addr[2*i+1] = (addr >> 8) & 0xff;
572 static int smc_configcheck(
struct pcmcia_device *p_dev,
void *priv_data)
574 p_dev->resource[0]->end = 16;
575 p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH;
576 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
581 static int smc_config(
struct pcmcia_device *link)
586 link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO;
588 i = pcmcia_loop_config(link, smc_configcheck,
NULL);
590 dev->
base_addr = link->resource[0]->start;
596 static int smc_setup(
struct pcmcia_device *link)
601 if (!pcmcia_get_mac_from_cis(link, dev))
605 if (link->prod_id[2]) {
606 if (cvt_ascii_address(dev, link->prod_id[2]) == 0)
614 static int osi_config(
struct pcmcia_device *link)
617 static const unsigned int com[4] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 };
620 link->config_flags |= CONF_ENABLE_SPKR | CONF_ENABLE_IRQ;
621 link->resource[0]->end = 64;
622 link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8;
623 link->resource[1]->end = 8;
627 link->config_index = 0x23;
629 for (i = j = 0; j < 4; j++) {
630 link->resource[1]->start = com[
j];
637 link->config_index = 0x03;
638 link->resource[1]->end = 0;
641 dev->
base_addr = link->resource[0]->start + 0x10;
645 static int osi_load_firmware(
struct pcmcia_device *link)
657 for (i = 0; i < fw->
size; i++) {
658 outb(fw->
data[i], link->resource[0]->start + 2);
665 static int pcmcia_osi_mac(
struct pcmcia_device *p_dev,
676 for (i = 0; i < 6; i++)
682 static int osi_setup(
struct pcmcia_device *link,
u_short manfid,
u_short cardid)
688 if (pcmcia_loop_tuple(link, 0x90, pcmcia_osi_mac, dev))
695 rc = osi_load_firmware(link);
703 dev_dbg(&link->dev,
"AUI/PWR: %4.4x RESET/ISR: %4.4x\n",
710 static int smc91c92_suspend(
struct pcmcia_device *link)
720 static int smc91c92_resume(
struct pcmcia_device *link)
728 mhz_3288_power(link);
741 i = osi_load_firmware(link);
743 pr_err(
"smc91c92_cs: Failed to load firmware\n");
763 static int check_sig(
struct pcmcia_device *link)
778 width = (link->resource[0]->flags == IO_DATA_PATH_WIDTH_AUTO);
789 ((s >> 8) != (s & 0xff))) {
796 pr_info(
"using 8-bit IO window\n");
798 smc91c92_suspend(link);
800 smc91c92_resume(link);
801 return check_sig(link);
806 static int smc91c92_config(
struct pcmcia_device *link)
815 dev_dbg(&link->dev,
"smc91c92_config\n");
817 smc->
manfid = link->manf_id;
818 smc->
cardid = link->card_id;
822 i = osi_config(link);
827 i = mhz_mfc_config(link);
844 dev->
irq = link->irq;
846 if ((if_port >= 0) && (if_port <= 2))
849 dev_notice(&link->dev,
"invalid if_port requested\n");
857 i = smc_setup(link);
break;
860 i = mhz_setup(link);
break;
863 i = mot_setup(link);
break;
867 dev_notice(&link->dev,
"Unable to find hardware address.\n");
874 rev = check_sig(link);
878 case 3: name =
"92";
break;
879 case 4: name = ((rev & 15) >= 6) ?
"96" :
"94";
break;
880 case 5: name =
"95";
break;
881 case 7: name =
"100";
break;
882 case 8: name =
"100-FD";
break;
883 case 9: name =
"110";
break;
891 if (mir == 0xff) mir++;
893 mcr = ((rev >> 4) > 3) ?
inw(ioaddr +
MEMCFG) : 0x0200;
894 mir *= 128 * (1<<((mcr >> 9) & 7));
908 for (i = 0; i < 32; i++) {
909 j = mdio_read(dev, i, 1);
910 if ((j != 0) && (j != 0xffff))
break;
912 smc->
mii_if.phy_id = (i < 32) ? i : -1;
920 dev_err(&link->dev,
"register_netdev() failed\n");
924 netdev_info(dev,
"smc91c%s rev %d: io %#3lx, irq %d, hw_addr %pM\n",
929 netdev_info(dev,
" %lu byte", mir);
931 netdev_info(dev,
" %lu kb", mir>>10);
937 if (smc->
mii_if.phy_id != -1) {
938 netdev_dbg(dev,
" MII transceiver at index %d, status %x\n",
941 netdev_notice(dev,
" No MII transceivers found!\n");
949 smc91c92_release(link);
954 static void smc91c92_release(
struct pcmcia_device *link)
956 dev_dbg(&link->dev,
"smc91c92_release\n");
957 if (link->resource[2]->end) {
970 #define MDIO_SHIFT_CLK 0x04
971 #define MDIO_DATA_OUT 0x01
972 #define MDIO_DIR_WRITE 0x08
973 #define MDIO_DATA_WRITE0 (MDIO_DIR_WRITE)
974 #define MDIO_DATA_WRITE1 (MDIO_DIR_WRITE | MDIO_DATA_OUT)
975 #define MDIO_DATA_READ 0x02
977 static void mdio_sync(
unsigned int addr)
980 for (bits = 0; bits < 32; bits++) {
993 for (i = 13; i >= 0; i--) {
998 for (i = 19; i > 0; i--) {
1003 return (retval>>1) & 0xffff;
1006 static void mdio_write(
struct net_device *dev,
int phy_id,
int loc,
int value)
1009 u_int cmd = (0x05<<28)|(phy_id<<23)|(loc<<18)|(1<<17)|
value;
1013 for (i = 31; i >= 0; i--) {
1018 for (i = 1; i >= 0; i--) {
1037 for (w = 0; w < 4; w++) {
1040 for (i = 0; i < 14; i += 2)
1051 struct pcmcia_device *link = smc->
p_dev;
1053 dev_dbg(&link->dev,
"%s: smc_open(%p), ID/Window %4.4x.\n",
1063 if (check_sig(link) < 0) {
1064 netdev_info(dev,
"Yikes! Bad chip signature!\n");
1069 netif_start_queue(dev);
1075 smc->
media.function = media_check;
1088 struct pcmcia_device *link = smc->
p_dev;
1091 dev_dbg(&link->dev,
"%s: smc_close(), status %4.4x.\n",
1094 netif_stop_queue(dev);
1122 static void smc_hardware_send_packet(
struct net_device * dev)
1130 netdev_err(dev,
"In XMIT with no packet to send\n");
1136 if (packet_no & 0x80) {
1138 netdev_warn(dev,
"hardware Tx buffer allocation failed, status %#2.2x\n",
1142 netif_start_queue(dev);
1158 netdev_dbg(dev,
"Trying to xmit packet of length %d\n", length);
1166 outw((length & 1) ? 0x2000 | buf[length-1] : 0, ioaddr +
DATA_1);
1180 netif_start_queue(dev);
1185 static void smc_tx_timeout(
struct net_device *dev)
1190 netdev_notice(dev,
"transmit timed out, Tx_status %2.2x status %4.4x.\n",
1191 inw(ioaddr)&0xff,
inw(ioaddr + 2));
1192 dev->
stats.tx_errors++;
1196 netif_wake_queue(dev);
1206 unsigned long flags;
1208 netif_stop_queue(dev);
1210 netdev_dbg(dev,
"smc_start_xmit(length = %d) called, status %04x\n",
1211 skb->
len,
inw(ioaddr + 2));
1215 dev->
stats.tx_aborted_errors++;
1217 "Internal error -- sent packet while busy\n");
1222 num_pages = skb->
len >> 8;
1224 if (num_pages > 7) {
1225 netdev_err(dev,
"Far too big packet error: %d pages\n", num_pages);
1226 dev_kfree_skb (skb);
1228 dev->
stats.tx_dropped++;
1250 smc_hardware_send_packet(dev);
1251 spin_unlock_irqrestore(&smc->
lock, flags);
1257 pr_debug(
"%s: memory allocation deferred.\n", dev->
name);
1258 outw((IM_ALLOC_INT << 8) | (ir & 0xff00), ioaddr +
INTERRUPT);
1259 spin_unlock_irqrestore(&smc->
lock, flags);
1270 static void smc_tx_err(
struct net_device * dev)
1274 int saved_packet =
inw(ioaddr +
PNR_ARR) & 0xff;
1286 dev->
stats.tx_errors++;
1290 dev->
stats.tx_aborted_errors++;
1295 netdev_notice(dev,
"Successful packet caused error interrupt?\n");
1312 static void smc_eph_irq(
struct net_device *dev)
1319 ephs =
inw(ioaddr +
EPH);
1320 pr_debug(
"%s: Ethernet protocol handler interrupt, status"
1321 " %4.4x.\n", dev->
name, ephs);
1325 dev->
stats.collisions += card_stats & 0xF;
1328 dev->
stats.collisions += card_stats & 0xF;
1350 unsigned int ioaddr;
1352 unsigned int handled = 1;
1355 if (!netif_device_present(dev))
1360 pr_debug(
"%s: SMC91c92 interrupt %d at %#x.\n", dev->
name,
1363 spin_lock(&smc->
lock);
1366 if ((saved_bank & 0xff00) != 0x3300) {
1369 pr_debug(
"%s: SMC91c92 interrupt %d for non-existent"
1370 "/ejected device.\n", dev->
name, irq);
1383 pr_debug(
"%s: Status is %#2.2x (mask %#2.2x).\n", dev->
name,
1385 if ((status & mask) == 0) {
1401 mask &= ~IM_TX_EMPTY_INT;
1405 if (status & IM_ALLOC_INT) {
1407 mask &= ~IM_ALLOC_INT;
1409 smc_hardware_send_packet(dev);
1415 netif_wake_queue(dev);
1418 dev->
stats.rx_errors++;
1419 dev->
stats.rx_fifo_errors++;
1426 }
while (--bogus_cnt);
1428 pr_debug(
" Restoring saved registers mask %2.2x bank %4.4x"
1429 " pointer %4.4x.\n", mask, saved_bank, saved_pointer);
1436 pr_debug(
"%s: Exiting interrupt IRQ%d.\n", dev->
name, irq);
1469 spin_unlock(&smc->
lock);
1485 netdev_err(dev,
"smc_rx() with nothing on Rx FIFO\n");
1492 packet_length =
inw(ioaddr +
DATA_1) & 0x07ff;
1494 pr_debug(
"%s: Receive status %4.4x length %d.\n",
1495 dev->
name, rx_status, packet_length);
1502 skb = netdev_alloc_skb(dev, packet_length+2);
1505 pr_debug(
"%s: Low memory, packet dropped.\n", dev->
name);
1506 dev->
stats.rx_dropped++;
1511 packet_length -= (rx_status &
RS_ODDFRAME ? 5 : 6);
1512 skb_reserve(skb, 2);
1514 (packet_length+1)>>1);
1519 dev->
stats.rx_packets++;
1520 dev->
stats.rx_bytes += packet_length;
1522 dev->
stats.multicast++;
1525 dev->
stats.rx_errors++;
1529 dev->
stats.rx_length_errors++;
1547 static void set_rx_mode(
struct net_device *dev)
1551 unsigned char multicast_table[8];
1552 unsigned long flags;
1556 memset(multicast_table, 0,
sizeof(multicast_table));
1568 multicast_table[position >> 29] |= 1 << ((position >> 26) & 7);
1577 for (i = 0; i < 8; i++)
1580 outw(rx_cfg_setting, ioaddr +
RCR);
1582 spin_unlock_irqrestore(&smc->
lock, flags);
1597 else if (map->
port > 2)
1600 netdev_info(dev,
"switched to %s port\n", if_names[dev->
if_port]);
1616 static void smc_set_xcvr(
struct net_device *dev,
int if_port)
1640 static void smc_reset(
struct net_device *dev)
1666 smc_set_xcvr(dev, dev->
if_port);
1674 for (i = 0; i < 6; i += 2)
1676 ioaddr +
ADDR0 + i);
1693 mdio_write(dev, smc->
mii_if.phy_id, 0, 0x8000);
1696 mdio_write(dev, smc->
mii_if.phy_id, 4, 0x01e1);
1699 mdio_write(dev, smc->
mii_if.phy_id, 0, 0x0000);
1700 mdio_write(dev, smc->
mii_if.phy_id, 0, 0x1200);
1722 unsigned long flags;
1728 if (!netif_device_present(dev))
1745 spin_unlock_irqrestore(&smc->
lock, flags);
1749 if (smc->
watchdog++ && ((i>>8) & i)) {
1751 netdev_info(dev,
"interrupt(s) dropped!\n");
1753 smc_interrupt(dev->
irq, dev);
1769 if (smc->
mii_if.phy_id < 0)
1773 link = mdio_read(dev, smc->
mii_if.phy_id, 1);
1774 if (!link || (link == 0xffff)) {
1775 netdev_info(dev,
"MII is missing!\n");
1783 netdev_info(dev,
"%s link beat\n", link ?
"found" :
"lost");
1784 smc->
duplex = (((p & 0x0100) || ((p & 0x1c0) == 0x40))
1787 netdev_info(dev,
"autonegotiation complete: "
1788 "%dbaseT-%cD selected\n",
1789 (p & 0x0180) ? 100 : 10, smc->
duplex ?
'F' :
'H');
1808 netdev_info(dev,
"%s link beat\n",
1812 netdev_info(dev,
"coax cable %s\n",
1813 media & EPH_16COL ?
"problem" :
"ok");
1816 if (media & EPH_LINK_OK)
1817 netdev_info(dev,
"flipped to 10baseT\n");
1819 smc_set_xcvr(dev, 2);
1821 if (media & EPH_16COL)
1822 smc_set_xcvr(dev, 1);
1824 netdev_info(dev,
"flipped to 10base2\n");
1834 spin_unlock_irqrestore(&smc->
lock, flags);
1837 static int smc_link_ok(
struct net_device *dev)
1862 ethtool_cmd_speed_set(ecmd,
SPEED_10);
1877 if (ethtool_cmd_speed(ecmd) !=
SPEED_10)
1887 smc_set_xcvr(dev, 1);
1889 smc_set_xcvr(dev, 0);
1902 static int check_if_running(
struct net_device *dev)
1904 if (!netif_running(dev))
1921 unsigned long flags;
1928 ret = smc_netdev_get_ecmd(dev, ecmd);
1930 spin_unlock_irqrestore(&smc->
lock, flags);
1940 unsigned long flags;
1947 ret = smc_netdev_set_ecmd(dev, ecmd);
1949 spin_unlock_irqrestore(&smc->
lock, flags);
1959 unsigned long flags;
1963 ret = smc_link_ok(dev);
1965 spin_unlock_irqrestore(&smc->
lock, flags);
1969 static int smc_nway_reset(
struct net_device *dev)
1987 .
begin = check_if_running,
1988 .get_drvinfo = smc_get_drvinfo,
1989 .get_settings = smc_get_settings,
1990 .set_settings = smc_set_settings,
1991 .get_link = smc_get_link,
1992 .nway_reset = smc_nway_reset,
2002 unsigned long flags;
2004 if (!netif_running(dev))
2012 spin_unlock_irqrestore(&smc->
lock, flags);
2017 PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x0109, 0x0501),
2018 PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x0140, 0x000a),
2019 PCMCIA_PFC_DEVICE_PROD_ID123(0,
"MEGAHERTZ",
"CC/XJEM3288",
"DATA/FAX/CELL ETHERNET MODEM", 0xf510db04, 0x04cd2988, 0x46a52d63),
2020 PCMCIA_PFC_DEVICE_PROD_ID123(0,
"MEGAHERTZ",
"CC/XJEM3336",
"DATA/FAX/CELL ETHERNET MODEM", 0xf510db04, 0x0143b773, 0x46a52d63),
2021 PCMCIA_PFC_DEVICE_PROD_ID123(0,
"MEGAHERTZ",
"EM1144T",
"PCMCIA MODEM", 0xf510db04, 0x856d66c8, 0xbd6c43ef),
2022 PCMCIA_PFC_DEVICE_PROD_ID123(0,
"MEGAHERTZ",
"XJEM1144/CCEM1144",
"PCMCIA MODEM", 0xf510db04, 0x52d21e1e, 0xbd6c43ef),
2023 PCMCIA_PFC_DEVICE_PROD_ID12(0,
"Gateway 2000",
"XJEM3336", 0xdd9989be, 0x662c394c),
2024 PCMCIA_PFC_DEVICE_PROD_ID12(0,
"MEGAHERTZ",
"XJEM1144/CCEM1144", 0xf510db04, 0x52d21e1e),
2025 PCMCIA_PFC_DEVICE_PROD_ID12(0,
"Ositech",
"Trumpcard:Jack of Diamonds Modem+Ethernet", 0xc2f80cd, 0x656947b9),
2026 PCMCIA_PFC_DEVICE_PROD_ID12(0,
"Ositech",
"Trumpcard:Jack of Hearts Modem+Ethernet", 0xc2f80cd, 0xdc9ba5ed),
2027 PCMCIA_MFC_DEVICE_MANF_CARD(0, 0x016c, 0x0020),
2028 PCMCIA_DEVICE_MANF_CARD(0x016c, 0x0023),
2029 PCMCIA_DEVICE_PROD_ID123(
"BASICS by New Media Corporation",
"Ethernet",
"SMC91C94", 0x23c78a9d, 0x00b2e941, 0xcef397fb),
2030 PCMCIA_DEVICE_PROD_ID12(
"ARGOSY",
"Fast Ethernet PCCard", 0x78f308dc, 0xdcea68bc),
2031 PCMCIA_DEVICE_PROD_ID12(
"dit Co., Ltd.",
"PC Card-10/100BTX", 0xe59365c8, 0x6a2161d1),
2032 PCMCIA_DEVICE_PROD_ID12(
"DYNALINK",
"L100C", 0x6a26d1cf, 0xc16ce9c5),
2033 PCMCIA_DEVICE_PROD_ID12(
"Farallon",
"Farallon Enet", 0x58d93fc4, 0x244734e9),
2034 PCMCIA_DEVICE_PROD_ID12(
"Megahertz",
"CC10BT/2", 0x33234748, 0x3c95b953),
2035 PCMCIA_DEVICE_PROD_ID12(
"MELCO/SMC",
"LPC-TX", 0xa2cd8e6d, 0x42da662a),
2036 PCMCIA_DEVICE_PROD_ID12(
"Ositech",
"Trumpcard:Four of Diamonds Ethernet", 0xc2f80cd, 0xb3466314),
2037 PCMCIA_DEVICE_PROD_ID12(
"Ositech",
"Trumpcard:Seven of Diamonds Ethernet", 0xc2f80cd, 0x194b650a),
2038 PCMCIA_DEVICE_PROD_ID12(
"PCMCIA",
"Fast Ethernet PCCard", 0x281f1c5d, 0xdcea68bc),
2039 PCMCIA_DEVICE_PROD_ID12(
"Psion",
"10Mb Ethernet", 0x4ef00b21, 0x844be9e9),
2040 PCMCIA_DEVICE_PROD_ID12(
"SMC",
"EtherEZ Ethernet 8020", 0xc4f8b18b, 0x4a0eeb2d),
2048 static struct pcmcia_driver smc91c92_cs_driver = {
2050 .name =
"smc91c92_cs",
2051 .probe = smc91c92_probe,
2052 .remove = smc91c92_detach,
2053 .id_table = smc91c92_ids,
2054 .suspend = smc91c92_suspend,
2055 .resume = smc91c92_resume,
2058 static int __init init_smc91c92_cs(
void)
2063 static void __exit exit_smc91c92_cs(
void)