dm9000.c (946e0f6ffcaa614012d646f4cf84efdd62628c8b) dm9000.c (a96d3b7593a3eefab62dd930e5c99201c3678ee4)
1/*
2 * Davicom DM9000 Fast Ethernet driver for Linux.
3 * Copyright (C) 1997 Sten Wang
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.

--- 1285 unchanged lines hidden (view full) ---

1294/*
1295 * Open the interface.
1296 * The interface is opened whenever "ifconfig" actives it.
1297 */
1298static int
1299dm9000_open(struct net_device *dev)
1300{
1301 struct board_info *db = netdev_priv(dev);
1/*
2 * Davicom DM9000 Fast Ethernet driver for Linux.
3 * Copyright (C) 1997 Sten Wang
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.

--- 1285 unchanged lines hidden (view full) ---

1294/*
1295 * Open the interface.
1296 * The interface is opened whenever "ifconfig" actives it.
1297 */
1298static int
1299dm9000_open(struct net_device *dev)
1300{
1301 struct board_info *db = netdev_priv(dev);
1302 unsigned int irq_flags = irq_get_trigger_type(dev->irq);
1302
1303 if (netif_msg_ifup(db))
1304 dev_dbg(db->dev, "enabling %s\n", dev->name);
1305
1306 /* If there is no IRQ type specified, tell the user that this is a
1307 * problem
1308 */
1303
1304 if (netif_msg_ifup(db))
1305 dev_dbg(db->dev, "enabling %s\n", dev->name);
1306
1307 /* If there is no IRQ type specified, tell the user that this is a
1308 * problem
1309 */
1309 if (irq_get_trigger_type(dev->irq) == IRQF_TRIGGER_NONE)
1310 if (irq_flags == IRQF_TRIGGER_NONE)
1310 dev_warn(db->dev, "WARNING: no IRQ resource flags set.\n");
1311
1311 dev_warn(db->dev, "WARNING: no IRQ resource flags set.\n");
1312
1313 irq_flags |= IRQF_SHARED;
1314
1312 /* GPIO0 on pre-activate PHY, Reg 1F is not set by reset */
1313 iow(db, DM9000_GPR, 0); /* REG_1F bit0 activate phyxcer */
1314 mdelay(1); /* delay needs by DM9000B */
1315
1316 /* Initialize DM9000 board */
1317 dm9000_init_dm9000(dev);
1318
1315 /* GPIO0 on pre-activate PHY, Reg 1F is not set by reset */
1316 iow(db, DM9000_GPR, 0); /* REG_1F bit0 activate phyxcer */
1317 mdelay(1); /* delay needs by DM9000B */
1318
1319 /* Initialize DM9000 board */
1320 dm9000_init_dm9000(dev);
1321
1319 if (request_irq(dev->irq, dm9000_interrupt, IRQF_SHARED,
1320 dev->name, dev))
1322 if (request_irq(dev->irq, dm9000_interrupt, irq_flags, dev->name, dev))
1321 return -EAGAIN;
1322 /* Now that we have an interrupt handler hooked up we can unmask
1323 * our interrupts
1324 */
1325 dm9000_unmask_interrupts(db);
1326
1327 /* Init driver variable */
1328 db->dbug_cnt = 0;

--- 479 unchanged lines hidden ---
1323 return -EAGAIN;
1324 /* Now that we have an interrupt handler hooked up we can unmask
1325 * our interrupts
1326 */
1327 dm9000_unmask_interrupts(db);
1328
1329 /* Init driver variable */
1330 db->dbug_cnt = 0;

--- 479 unchanged lines hidden ---