ispvar.h (285146) | ispvar.h (285154) |
---|---|
1/* $FreeBSD: head/sys/dev/isp/ispvar.h 285146 2015-07-04 18:38:46Z mav $ */ | 1/* $FreeBSD: head/sys/dev/isp/ispvar.h 285154 2015-07-05 02:09:46Z mav $ */ |
2/*- 3 * Copyright (c) 1997-2009 by Matthew Jacob 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * --- 329 unchanged lines hidden (view full) --- 339/* 340 * FC Port Database entry. 341 * 342 * It has a handle that the f/w uses to address commands to a device. 343 * This handle's value may be assigned by the firmware (e.g., for local loop 344 * devices) or by the driver (e.g., for fabric devices). 345 * 346 * It has a state. If the state if VALID, that means that we've logged into | 2/*- 3 * Copyright (c) 1997-2009 by Matthew Jacob 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * --- 329 unchanged lines hidden (view full) --- 339/* 340 * FC Port Database entry. 341 * 342 * It has a handle that the f/w uses to address commands to a device. 343 * This handle's value may be assigned by the firmware (e.g., for local loop 344 * devices) or by the driver (e.g., for fabric devices). 345 * 346 * It has a state. If the state if VALID, that means that we've logged into |
347 * the device. We also *may* have a initiator map index entry. This is a value 348 * from 0..MAX_FC_TARG that is used to index into the isp_dev_map array. If 349 * the value therein is non-zero, then that value minus one is used to index 350 * into the Port Database to find the handle for forming commands. There is 351 * back-index minus one value within to Port Database entry that tells us 352 * which entry in isp_dev_map points to us (to avoid searching). | 347 * the device. |
353 * 354 * Local loop devices the firmware automatically performs PLOGI on for us 355 * (which is why that handle is imposed upon us). Fabric devices we assign 356 * a handle to and perform the PLOGI on. 357 * 358 * When a PORT DATABASE CHANGED asynchronous event occurs, we mark all VALID 359 * entries as PROBATIONAL. This allows us, if policy says to, just keep track 360 * of devices whose handles change but are otherwise the same device (and --- 29 unchanged lines hidden (view full) --- 390 * This is the handle that the firmware needs in order for us to 391 * send commands to the device. For pre-24XX cards, this would be 392 * the 'loopid'. 393 */ 394 uint16_t handle; 395 396 /* 397 * The dev_map_idx, if nonzero, is the system virtual target ID (+1) | 348 * 349 * Local loop devices the firmware automatically performs PLOGI on for us 350 * (which is why that handle is imposed upon us). Fabric devices we assign 351 * a handle to and perform the PLOGI on. 352 * 353 * When a PORT DATABASE CHANGED asynchronous event occurs, we mark all VALID 354 * entries as PROBATIONAL. This allows us, if policy says to, just keep track 355 * of devices whose handles change but are otherwise the same device (and --- 29 unchanged lines hidden (view full) --- 385 * This is the handle that the firmware needs in order for us to 386 * send commands to the device. For pre-24XX cards, this would be 387 * the 'loopid'. 388 */ 389 uint16_t handle; 390 391 /* 392 * The dev_map_idx, if nonzero, is the system virtual target ID (+1) |
398 * as a cross-reference with the isp_dev_map. | |
399 * 400 * A device is 'autologin' if the firmware automatically logs into 401 * it (re-logins as needed). Basically, local private loop devices. 402 * 403 * PRLI word 3 parameters contains role as well as other things. 404 * 405 * The state is the current state of this entry. 406 * --- 79 unchanged lines hidden (view full) --- 486 uint64_t isp_wwnn_nvram; 487 uint64_t isp_wwpn_nvram; 488 489 /* 490 * Our Port Data Base 491 */ 492 fcportdb_t portdb[MAX_FC_TARG]; 493 | 393 * 394 * A device is 'autologin' if the firmware automatically logs into 395 * it (re-logins as needed). Basically, local private loop devices. 396 * 397 * PRLI word 3 parameters contains role as well as other things. 398 * 399 * The state is the current state of this entry. 400 * --- 79 unchanged lines hidden (view full) --- 480 uint64_t isp_wwnn_nvram; 481 uint64_t isp_wwpn_nvram; 482 483 /* 484 * Our Port Data Base 485 */ 486 fcportdb_t portdb[MAX_FC_TARG]; 487 |
494 /* 495 * This maps system virtual 'target' id to a portdb entry. 496 * 497 * The mapping function is to take any non-zero entry and 498 * subtract one to get the portdb index. This means that 499 * entries which are zero are unmapped (i.e., don't exist). 500 */ 501 uint16_t isp_dev_map[MAX_FC_TARG]; 502 | |
503#ifdef ISP_TARGET_MODE 504 /* 505 * This maps N-Port Handle to portdb entry so we 506 * don't have to search for every incoming command. 507 * 508 * The mapping function is to take any non-zero entry and 509 * subtract one to get the portdb index. This means that 510 * entries which are zero are unmapped (i.e., don't exist). --- 694 unchanged lines hidden --- | 488#ifdef ISP_TARGET_MODE 489 /* 490 * This maps N-Port Handle to portdb entry so we 491 * don't have to search for every incoming command. 492 * 493 * The mapping function is to take any non-zero entry and 494 * subtract one to get the portdb index. This means that 495 * entries which are zero are unmapped (i.e., don't exist). --- 694 unchanged lines hidden --- |