Changeset 6fc0edd in mainline for uspace/srv/hw/netif/dp8390/dp8390_module.c
- Timestamp:
- 2011-01-06T16:37:53Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b590c21
- Parents:
- 0777f4c5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/netif/dp8390/dp8390_module.c
r0777f4c5 r6fc0edd 58 58 #define NAME "dp8390" 59 59 60 /** Returns the device from the interrupt call. 60 /** Return the device from the interrupt call. 61 * 61 62 * @param[in] call The interrupt call. 62 */ 63 #define IRQ_GET_DEVICE(call) (device_id_t) IPC_GET_IMETHOD(*call) 63 * 64 */ 65 #define IRQ_GET_DEVICE(call) ((device_id_t) IPC_GET_IMETHOD(call)) 66 67 /** Return the ISR from the interrupt call. 68 * 69 * @param[in] call The interrupt call. 70 * 71 */ 72 #define IRQ_GET_ISR(call) ((int) IPC_GET_ARG2(call)) 64 73 65 74 /** DP8390 kernel interrupt command sequence. … … 72 81 }, 73 82 { 83 .cmd = CMD_BTEST, 84 .value = 0x7f, 85 .srcarg = 2, 86 .dstarg = 3, 87 }, 88 { 74 89 .cmd = CMD_PREDICATE, 75 .value = 1, 76 .srcarg = 2 90 .value = 2, 91 .srcarg = 3 92 }, 93 { 94 .cmd = CMD_PIO_WRITE_8, 95 .addr = NULL, 96 .value = 0xff 77 97 }, 78 98 { … … 101 121 int phone; 102 122 103 device_id = IRQ_GET_DEVICE( call);123 device_id = IRQ_GET_DEVICE(*call); 104 124 fibril_rwlock_write_lock(&netif_globals.lock); 105 125 … … 117 137 assert(dep->de_flags & DEF_ENABLED); 118 138 119 dep->de_int_pending = 0; 120 dp_check_ints(dep); 139 dp_check_ints(dep, IRQ_GET_ISR(*call)); 121 140 122 141 if (dep->received_queue) { … … 279 298 280 299 if (do_pwrite(dep, packet, false) != EBUSY) 281 netif_pq_release(packet_get_id(packet)); \300 netif_pq_release(packet_get_id(packet)); 282 301 283 302 packet = next; … … 295 314 dep = (dpeth_t *) device->specific; 296 315 dp8390_cmds[0].addr = (void *) (uintptr_t) (dep->de_dp8390_port + DP_ISR); 297 dp8390_cmds[ 2].addr = dp8390_cmds[0].addr;316 dp8390_cmds[3].addr = dp8390_cmds[0].addr; 298 317 299 318 rc = ipc_register_irq(dep->de_irq, device->device_id, device->device_id, &dp8390_code);
Note:
See TracChangeset
for help on using the changeset viewer.