233 /*
234 * modldrv(9s) structure
235 *
236 * Definition for module specific device driver linkage structures (modctl.h)
237 */
238
239 static struct modldrv modldrv = {
240 &mod_driverops, /* driver module */
241 VERSION,
242 &ch_ops, /* driver ops */
243 };
244
245 /*
246 * modlinkage(9s) structure
247 *
248 * module linkage base structure (modctl.h)
249 */
250
251 static struct modlinkage modlinkage = {
252 MODREV_1, /* revision # of system */
253 &modldrv, /* NULL terminated list of linkage strucures */
254 NULL
255 };
256
257 /* ===================== start of STREAMS driver code ================== */
258
259 #ifdef CONFIG_CHELSIO_T1_OFFLOAD
260 /*
261 * global pointer to toe per-driver control structure.
262 */
263 #define MAX_CARDS 4
264 ch_t *gchp[MAX_CARDS];
265 #endif
266
267 kmutex_t in_use_l;
268 uint32_t buffers_in_use[SZ_INUSE];
269 uint32_t in_use_index;
270
271 /*
272 * Ethernet broadcast address definition.
273 */
274 static struct ether_addr etherbroadcastaddr = {
275 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
276 };
277
278 /*
279 * Module initialization functions.
280 *
281 * Routine Called by
282 * _init(9E) modload(9F)
283 * _info(9E) modinfo(9F)
284 * _fini(9E) modunload(9F)
285 */
286
287 /*
288 * _init(9E):
289 *
290 * Initial, one-time, resource allocation and data initialization.
291 */
292
293 int
294 _init(void)
295 {
|
233 /*
234 * modldrv(9s) structure
235 *
236 * Definition for module specific device driver linkage structures (modctl.h)
237 */
238
239 static struct modldrv modldrv = {
240 &mod_driverops, /* driver module */
241 VERSION,
242 &ch_ops, /* driver ops */
243 };
244
245 /*
246 * modlinkage(9s) structure
247 *
248 * module linkage base structure (modctl.h)
249 */
250
251 static struct modlinkage modlinkage = {
252 MODREV_1, /* revision # of system */
253 { &modldrv, NULL } /* NULL terminated list of linkage strucures */
254 };
255
256 /* ===================== start of STREAMS driver code ================== */
257
258 #ifdef CONFIG_CHELSIO_T1_OFFLOAD
259 /*
260 * global pointer to toe per-driver control structure.
261 */
262 #define MAX_CARDS 4
263 ch_t *gchp[MAX_CARDS];
264 #endif
265
266 kmutex_t in_use_l;
267 uint32_t buffers_in_use[SZ_INUSE];
268 uint32_t in_use_index;
269
270 /*
271 * Ethernet broadcast address definition.
272 */
273 static struct ether_addr etherbroadcastaddr = {
274 { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }
275 };
276
277 /*
278 * Module initialization functions.
279 *
280 * Routine Called by
281 * _init(9E) modload(9F)
282 * _info(9E) modinfo(9F)
283 * _fini(9E) modunload(9F)
284 */
285
286 /*
287 * _init(9E):
288 *
289 * Initial, one-time, resource allocation and data initialization.
290 */
291
292 int
293 _init(void)
294 {
|