Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  1. #ifndef _GPXE_ISCSI_H
  2. #define _GPXE_ISCSI_H
  3. /** @file
  4. *
  5. * iSCSI protocol
  6. *
  7. */
  8. #include <stdint.h>
  9. #include <gpxe/stream.h>
  10. #include <gpxe/async.h>
  11. #include <gpxe/scsi.h>
  12. #include <gpxe/chap.h>
  13. /** Default iSCSI port */
  14. #define ISCSI_PORT 3260
  15. /**
  16. * iSCSI segment lengths
  17. *
  18. * iSCSI uses an icky structure with one one-byte field (a dword
  19. * count) and one three-byte field (a byte count). This structure,
  20. * and the accompanying macros, relieve some of the pain.
  21. */
  22. union iscsi_segment_lengths {
  23. struct {
  24. /** The AHS length (measured in dwords) */
  25. uint8_t ahs_len;
  26. /** The data length (measured in bytes), in network
  27. * byte order
  28. */
  29. uint8_t data_len[3];
  30. } bytes;
  31. /** Ths data length (measured in bytes), in network byte
  32. * order, with ahs_len as the first byte.
  33. */
  34. uint32_t ahs_and_data_len;
  35. };
  36. /** The length of the additional header segment, in dwords */
  37. #define ISCSI_AHS_LEN( segment_lengths ) \
  38. ( (segment_lengths).bytes.ahs_len )
  39. /** The length of the data segment, in bytes, excluding any padding */
  40. #define ISCSI_DATA_LEN( segment_lengths ) \
  41. ( ntohl ( (segment_lengths).ahs_and_data_len ) & 0xffffff )
  42. /** The padding of the data segment, in bytes */
  43. #define ISCSI_DATA_PAD_LEN( segment_lengths ) \
  44. ( ( 0 - (segment_lengths).bytes.data_len[2] ) & 0x03 )
  45. /** Set additional header and data segment lengths */
  46. #define ISCSI_SET_LENGTHS( segment_lengths, ahs_len, data_len ) do { \
  47. (segment_lengths).ahs_and_data_len = \
  48. htonl ( data_len | ( ahs_len << 24 ) ); \
  49. } while ( 0 )
  50. /**
  51. * iSCSI basic header segment common fields
  52. *
  53. */
  54. struct iscsi_bhs_common {
  55. /** Opcode */
  56. uint8_t opcode;
  57. /** Flags */
  58. uint8_t flags;
  59. /** Fields specific to the PDU type */
  60. uint8_t other_a[2];
  61. /** Segment lengths */
  62. union iscsi_segment_lengths lengths;
  63. /** Fields specific to the PDU type */
  64. uint8_t other_b[8];
  65. /** Initiator Task Tag */
  66. uint32_t itt;
  67. /** Fields specific to the PDU type */
  68. uint8_t other_c[28];
  69. };
  70. /** Opcode mask */
  71. #define ISCSI_OPCODE_MASK 0x3f
  72. /** Immediate delivery */
  73. #define ISCSI_FLAG_IMMEDIATE 0x40
  74. /** Final PDU of a sequence */
  75. #define ISCSI_FLAG_FINAL 0x80
  76. /**
  77. * iSCSI basic header segment common request fields
  78. *
  79. */
  80. struct iscsi_bhs_common_response {
  81. /** Opcode */
  82. uint8_t opcode;
  83. /** Flags */
  84. uint8_t flags;
  85. /** Fields specific to the PDU type */
  86. uint8_t other_a[2];
  87. /** Segment lengths */
  88. union iscsi_segment_lengths lengths;
  89. /** Fields specific to the PDU type */
  90. uint8_t other_b[8];
  91. /** Initiator Task Tag */
  92. uint32_t itt;
  93. /** Fields specific to the PDU type */
  94. uint8_t other_c[4];
  95. /** Status sequence number */
  96. uint32_t statsn;
  97. /** Expected command sequence number */
  98. uint32_t expcmdsn;
  99. /** Fields specific to the PDU type */
  100. uint8_t other_d[16];
  101. };
  102. /**
  103. * iSCSI login request basic header segment
  104. *
  105. */
  106. struct iscsi_bhs_login_request {
  107. /** Opcode */
  108. uint8_t opcode;
  109. /** Flags */
  110. uint8_t flags;
  111. /** Maximum supported version number */
  112. uint8_t version_max;
  113. /** Minimum supported version number */
  114. uint8_t version_min;
  115. /** Segment lengths */
  116. union iscsi_segment_lengths lengths;
  117. /** Initiator session ID (IANA format) enterprise number and flags */
  118. uint32_t isid_iana_en;
  119. /** Initiator session ID (IANA format) qualifier */
  120. uint16_t isid_iana_qual;
  121. /** Target session identifying handle */
  122. uint16_t tsih;
  123. /** Initiator Task Tag */
  124. uint32_t itt;
  125. /** Connection ID */
  126. uint16_t cid;
  127. /** Reserved */
  128. uint16_t reserved_a;
  129. /** Command sequence number */
  130. uint32_t cmdsn;
  131. /** Expected status sequence number */
  132. uint32_t expstatsn;
  133. /** Reserved */
  134. uint8_t reserved_b[16];
  135. };
  136. /** Login request opcode */
  137. #define ISCSI_OPCODE_LOGIN_REQUEST 0x03
  138. /** Willingness to transition to next stage */
  139. #define ISCSI_LOGIN_FLAG_TRANSITION 0x80
  140. /** Key=value pairs continued in subsequent request */
  141. #define ISCSI_LOGIN_FLAG_CONTINUE 0x40
  142. /* Current stage values and mask */
  143. #define ISCSI_LOGIN_CSG_MASK 0x0c
  144. #define ISCSI_LOGIN_CSG_SECURITY_NEGOTIATION 0x00
  145. #define ISCSI_LOGIN_CSG_OPERATIONAL_NEGOTIATION 0x04
  146. #define ISCSI_LOGIN_CSG_FULL_FEATURE_PHASE 0x0c
  147. /* Next stage values and mask */
  148. #define ISCSI_LOGIN_NSG_MASK 0x03
  149. #define ISCSI_LOGIN_NSG_SECURITY_NEGOTIATION 0x00
  150. #define ISCSI_LOGIN_NSG_OPERATIONAL_NEGOTIATION 0x01
  151. #define ISCSI_LOGIN_NSG_FULL_FEATURE_PHASE 0x03
  152. /** ISID IANA format marker */
  153. #define ISCSI_ISID_IANA 0x40000000
  154. /** Fen Systems Ltd. IANA enterprise number
  155. *
  156. * Permission is hereby granted to use Fen Systems Ltd.'s IANA
  157. * enterprise number with this iSCSI implementation.
  158. */
  159. #define IANA_EN_FEN_SYSTEMS 10019
  160. /**
  161. * iSCSI login response basic header segment
  162. *
  163. */
  164. struct iscsi_bhs_login_response {
  165. /** Opcode */
  166. uint8_t opcode;
  167. /** Flags */
  168. uint8_t flags;
  169. /** Maximum supported version number */
  170. uint8_t version_max;
  171. /** Minimum supported version number */
  172. uint8_t version_min;
  173. /** Segment lengths */
  174. union iscsi_segment_lengths lengths;
  175. /** Initiator session ID (IANA format) enterprise number and flags */
  176. uint32_t isid_iana_en;
  177. /** Initiator session ID (IANA format) qualifier */
  178. uint16_t isid_iana_qual;
  179. /** Target session identifying handle */
  180. uint16_t tsih;
  181. /** Initiator Task Tag */
  182. uint32_t itt;
  183. /** Reserved */
  184. uint32_t reserved_a;
  185. /** Status sequence number */
  186. uint32_t statsn;
  187. /** Expected command sequence number */
  188. uint32_t expcmdsn;
  189. /** Maximum command sequence number */
  190. uint32_t maxcmdsn;
  191. /** Status class */
  192. uint8_t status_class;
  193. /** Status detail */
  194. uint8_t status_detail;
  195. /** Reserved */
  196. uint8_t reserved_b[10];
  197. };
  198. /** Login response opcode */
  199. #define ISCSI_OPCODE_LOGIN_RESPONSE 0x23
  200. /* Login response status codes */
  201. #define ISCSI_STATUS_SUCCESS 0x00
  202. #define ISCSI_STATUS_REDIRECT 0x01
  203. #define ISCSI_STATUS_INITIATOR_ERROR 0x02
  204. #define ISCSI_STATUS_TARGET_ERROR 0x03
  205. /**
  206. * iSCSI SCSI command basic header segment
  207. *
  208. */
  209. struct iscsi_bhs_scsi_command {
  210. /** Opcode */
  211. uint8_t opcode;
  212. /** Flags */
  213. uint8_t flags;
  214. /** Reserved */
  215. uint16_t reserved_a;
  216. /** Segment lengths */
  217. union iscsi_segment_lengths lengths;
  218. /** SCSI Logical Unit Number */
  219. uint64_t lun;
  220. /** Initiator Task Tag */
  221. uint32_t itt;
  222. /** Expected data transfer length */
  223. uint32_t exp_len;
  224. /** Command sequence number */
  225. uint32_t cmdsn;
  226. /** Expected status sequence number */
  227. uint32_t expstatsn;
  228. /** SCSI Command Descriptor Block (CDB) */
  229. union scsi_cdb cdb;
  230. };
  231. /** SCSI command opcode */
  232. #define ISCSI_OPCODE_SCSI_COMMAND 0x01
  233. /** Command will read data */
  234. #define ISCSI_COMMAND_FLAG_READ 0x40
  235. /** Command will write data */
  236. #define ISCSI_COMMAND_FLAG_WRITE 0x20
  237. /* Task attributes */
  238. #define ISCSI_COMMAND_ATTR_UNTAGGED 0x00
  239. #define ISCSI_COMMAND_ATTR_SIMPLE 0x01
  240. #define ISCSI_COMMAND_ATTR_ORDERED 0x02
  241. #define ISCSI_COMMAND_ATTR_HEAD_OF_QUEUE 0x03
  242. #define ISCSI_COMMAND_ATTR_ACA 0x04
  243. /**
  244. * iSCSI SCSI response basic header segment
  245. *
  246. */
  247. struct iscsi_bhs_scsi_response {
  248. /** Opcode */
  249. uint8_t opcode;
  250. /** Flags */
  251. uint8_t flags;
  252. /** Response code */
  253. uint8_t response;
  254. /** SCSI status code */
  255. uint8_t status;
  256. /** Segment lengths */
  257. union iscsi_segment_lengths lengths;
  258. /** Reserved */
  259. uint8_t reserved_a[8];
  260. /** Initiator Task Tag */
  261. uint32_t itt;
  262. /** SNACK tag */
  263. uint32_t snack;
  264. /** Status sequence number */
  265. uint32_t statsn;
  266. /** Expected command sequence number */
  267. uint32_t expcmdsn;
  268. /** Maximum command sequence number */
  269. uint32_t maxcmdsn;
  270. /** Expected data sequence number */
  271. uint32_t expdatasn;
  272. /** Reserved */
  273. uint8_t reserved_b[8];
  274. };
  275. /** SCSI response opcode */
  276. #define ISCSI_OPCODE_SCSI_RESPONSE 0x21
  277. /** SCSI command completed at target */
  278. #define ISCSI_RESPONSE_COMMAND_COMPLETE 0x00
  279. /** SCSI target failure */
  280. #define ISCSI_RESPONSE_TARGET_FAILURE 0x01
  281. /** SCSI sense response code offset
  282. *
  283. * The SCSI response may contain unsolicited sense data in the data
  284. * segment. If it does, this is the offset to the sense response code
  285. * byte, which is the only byte we care about.
  286. */
  287. #define ISCSI_SENSE_RESPONSE_CODE_OFFSET 2
  288. /**
  289. * iSCSI data-in basic header segment
  290. *
  291. */
  292. struct iscsi_bhs_data_in {
  293. /** Opcode */
  294. uint8_t opcode;
  295. /** Flags */
  296. uint8_t flags;
  297. /** Reserved */
  298. uint8_t reserved_a;
  299. /** SCSI status code */
  300. uint8_t status;
  301. /** Segment lengths */
  302. union iscsi_segment_lengths lengths;
  303. /** Logical Unit Number */
  304. uint64_t lun;
  305. /** Initiator Task Tag */
  306. uint32_t itt;
  307. /** Target Transfer Tag */
  308. uint32_t ttt;
  309. /** Status sequence number */
  310. uint32_t statsn;
  311. /** Expected command sequence number */
  312. uint32_t expcmdsn;
  313. /** Maximum command sequence number */
  314. uint32_t maxcmdsn;
  315. /** Data sequence number */
  316. uint32_t datasn;
  317. /** Buffer offset */
  318. uint32_t offset;
  319. /** Residual count */
  320. uint32_t residual_count;
  321. };
  322. /** Data-in opcode */
  323. #define ISCSI_OPCODE_DATA_IN 0x25
  324. /** Data requires acknowledgement */
  325. #define ISCSI_DATA_FLAG_ACKNOWLEDGE 0x40
  326. /** Data overflow occurred */
  327. #define ISCSI_DATA_FLAG_OVERFLOW 0x04
  328. /** Data underflow occurred */
  329. #define ISCSI_DATA_FLAG_UNDERFLOW 0x02
  330. /** SCSI status code and overflow/underflow flags are valid */
  331. #define ISCSI_DATA_FLAG_STATUS 0x01
  332. /**
  333. * iSCSI data-out basic header segment
  334. *
  335. */
  336. struct iscsi_bhs_data_out {
  337. /** Opcode */
  338. uint8_t opcode;
  339. /** Flags */
  340. uint8_t flags;
  341. /** Reserved */
  342. uint16_t reserved_a;
  343. /** Segment lengths */
  344. union iscsi_segment_lengths lengths;
  345. /** Logical Unit Number */
  346. uint64_t lun;
  347. /** Initiator Task Tag */
  348. uint32_t itt;
  349. /** Target Transfer Tag */
  350. uint32_t ttt;
  351. /** Reserved */
  352. uint32_t reserved_b;
  353. /** Expected status sequence number */
  354. uint32_t expstatsn;
  355. /** Reserved */
  356. uint32_t reserved_c;
  357. /** Data sequence number */
  358. uint32_t datasn;
  359. /** Buffer offset */
  360. uint32_t offset;
  361. /** Reserved */
  362. uint32_t reserved_d;
  363. };
  364. /** Data-out opcode */
  365. #define ISCSI_OPCODE_DATA_OUT 0x05
  366. /**
  367. * iSCSI request to transfer basic header segment
  368. *
  369. */
  370. struct iscsi_bhs_r2t {
  371. /** Opcode */
  372. uint8_t opcode;
  373. /** Flags */
  374. uint8_t flags;
  375. /** Reserved */
  376. uint16_t reserved_a;
  377. /** Segment lengths */
  378. union iscsi_segment_lengths lengths;
  379. /** Logical Unit Number */
  380. uint64_t lun;
  381. /** Initiator Task Tag */
  382. uint32_t itt;
  383. /** Target Transfer Tag */
  384. uint32_t ttt;
  385. /** Status sequence number */
  386. uint32_t statsn;
  387. /** Expected command sequence number */
  388. uint32_t expcmdsn;
  389. /** Maximum command sequence number */
  390. uint32_t maxcmdsn;
  391. /** R2T sequence number */
  392. uint32_t r2tsn;
  393. /** Buffer offset */
  394. uint32_t offset;
  395. /** Desired data transfer length */
  396. uint32_t len;
  397. };
  398. /** R2T opcode */
  399. #define ISCSI_OPCODE_R2T 0x31
  400. /**
  401. * An iSCSI basic header segment
  402. */
  403. union iscsi_bhs {
  404. struct iscsi_bhs_common common;
  405. struct iscsi_bhs_common_response common_response;
  406. struct iscsi_bhs_login_request login_request;
  407. struct iscsi_bhs_login_response login_response;
  408. struct iscsi_bhs_scsi_command scsi_command;
  409. struct iscsi_bhs_scsi_response scsi_response;
  410. struct iscsi_bhs_data_in data_in;
  411. struct iscsi_bhs_data_out data_out;
  412. struct iscsi_bhs_r2t r2t;
  413. unsigned char bytes[ sizeof ( struct iscsi_bhs_common ) ];
  414. };
  415. /** State of an iSCSI TX engine */
  416. enum iscsi_tx_state {
  417. /** Nothing to send */
  418. ISCSI_TX_IDLE = 0,
  419. /** Sending the basic header segment */
  420. ISCSI_TX_BHS,
  421. /** Sending the additional header segment */
  422. ISCSI_TX_AHS,
  423. /** Sending the data segment */
  424. ISCSI_TX_DATA,
  425. /** Sending the data segment padding */
  426. ISCSI_TX_DATA_PADDING,
  427. };
  428. /** State of an iSCSI RX engine */
  429. enum iscsi_rx_state {
  430. /** Receiving the basic header segment */
  431. ISCSI_RX_BHS = 0,
  432. /** Receiving the additional header segment */
  433. ISCSI_RX_AHS,
  434. /** Receiving the data segment */
  435. ISCSI_RX_DATA,
  436. /** Receiving the data segment padding */
  437. ISCSI_RX_DATA_PADDING,
  438. };
  439. /** An iSCSI session */
  440. struct iscsi_session {
  441. /** Initiator IQN */
  442. const char *initiator_iqn;
  443. /** Target address */
  444. struct sockaddr target;
  445. /** Target IQN */
  446. const char *target_iqn;
  447. /** Logical Unit Number (LUN) */
  448. uint64_t lun;
  449. /** Username */
  450. const char *username;
  451. /** Password */
  452. const char *password;
  453. /** Stream application for this session */
  454. struct stream_application stream;
  455. /** Session status
  456. *
  457. * This is the bitwise-OR of zero or more ISCSI_STATUS_XXX
  458. * constants.
  459. */
  460. int status;
  461. /** Retry count
  462. *
  463. * Number of times that the connection has been retried.
  464. * Reset upon a successful connection.
  465. */
  466. int retry_count;
  467. /** CHAP challenge/response */
  468. struct chap_challenge chap;
  469. /** Target session identifying handle
  470. *
  471. * This is assigned by the target when we first log in, and
  472. * must be reused on subsequent login attempts.
  473. */
  474. uint16_t tsih;
  475. /** Initiator task tag
  476. *
  477. * This is the tag of the current command. It is incremented
  478. * whenever a new command is started.
  479. */
  480. uint32_t itt;
  481. /** Target transfer tag
  482. *
  483. * This is the tag attached to a sequence of data-out PDUs in
  484. * response to an R2T.
  485. */
  486. uint32_t ttt;
  487. /**
  488. * Transfer offset
  489. *
  490. * This is the offset for an in-progress sequence of data-out
  491. * PDUs in response to an R2T.
  492. */
  493. uint32_t transfer_offset;
  494. /**
  495. * Transfer length
  496. *
  497. * This is the length for an in-progress sequence of data-out
  498. * PDUs in response to an R2T.
  499. */
  500. uint32_t transfer_len;
  501. /** Command sequence number
  502. *
  503. * This is the sequence number of the current command, used to
  504. * fill out the CmdSN field in iSCSI request PDUs. It is
  505. * updated with the value of the ExpCmdSN field whenever we
  506. * receive an iSCSI response PDU containing such a field.
  507. */
  508. uint32_t cmdsn;
  509. /** Status sequence number
  510. *
  511. * This is the most recent status sequence number present in
  512. * the StatSN field of an iSCSI response PDU containing such a
  513. * field. Whenever we send an iSCSI request PDU, we fill out
  514. * the ExpStatSN field with this value plus one.
  515. */
  516. uint32_t statsn;
  517. /** Basic header segment for current TX PDU */
  518. union iscsi_bhs tx_bhs;
  519. /** State of the TX engine */
  520. enum iscsi_tx_state tx_state;
  521. /** Byte offset within the current TX state */
  522. size_t tx_offset;
  523. /** Length of the current TX state */
  524. size_t tx_len;
  525. /** Basic header segment for current RX PDU */
  526. union iscsi_bhs rx_bhs;
  527. /** State of the RX engine */
  528. enum iscsi_rx_state rx_state;
  529. /** Byte offset within the current RX state */
  530. size_t rx_offset;
  531. /** Length of the current RX state */
  532. size_t rx_len;
  533. /** Buffer for received data (not always used) */
  534. void *rx_buffer;
  535. /** Current SCSI command
  536. *
  537. * Set to NULL when command is complete.
  538. */
  539. struct scsi_command *command;
  540. /** Asynchronous operation for the current iSCSI operation */
  541. struct async async;
  542. /** Instant return code
  543. *
  544. * Set to a non-zero value if all requests should return
  545. * immediately. This can be used to e.g. avoid retrying
  546. * logins that are doomed to fail authentication.
  547. */
  548. int instant_rc;
  549. };
  550. /** iSCSI session is currently in the security negotiation phase */
  551. #define ISCSI_STATUS_SECURITY_NEGOTIATION_PHASE \
  552. ( ISCSI_LOGIN_CSG_SECURITY_NEGOTIATION | \
  553. ISCSI_LOGIN_NSG_OPERATIONAL_NEGOTIATION )
  554. /** iSCSI session is currently in the operational parameter
  555. * negotiation phase
  556. */
  557. #define ISCSI_STATUS_OPERATIONAL_NEGOTIATION_PHASE \
  558. ( ISCSI_LOGIN_CSG_OPERATIONAL_NEGOTIATION | \
  559. ISCSI_LOGIN_NSG_FULL_FEATURE_PHASE )
  560. /** iSCSI session is currently in the full feature phase */
  561. #define ISCSI_STATUS_FULL_FEATURE_PHASE ISCSI_LOGIN_CSG_FULL_FEATURE_PHASE
  562. /** Mask for all iSCSI session phases */
  563. #define ISCSI_STATUS_PHASE_MASK ( ISCSI_LOGIN_CSG_MASK | ISCSI_LOGIN_NSG_MASK )
  564. /** iSCSI session needs to send the initial security negotiation strings */
  565. #define ISCSI_STATUS_STRINGS_SECURITY 0x0100
  566. /** iSCSI session needs to send the CHAP_A string */
  567. #define ISCSI_STATUS_STRINGS_CHAP_ALGORITHM 0x0200
  568. /** iSCSI session needs to send the CHAP response */
  569. #define ISCSI_STATUS_STRINGS_CHAP_RESPONSE 0x0400
  570. /** iSCSI session needs to send the operational negotiation strings */
  571. #define ISCSI_STATUS_STRINGS_OPERATIONAL 0x0800
  572. /** Mask for all iSCSI "needs to send" flags */
  573. #define ISCSI_STATUS_STRINGS_MASK 0xff00
  574. /** Maximum number of retries at connecting */
  575. #define ISCSI_MAX_RETRIES 2
  576. extern int iscsi_issue ( struct iscsi_session *iscsi,
  577. struct scsi_command *command,
  578. struct async *parent );
  579. extern void iscsi_shutdown ( struct iscsi_session *iscsi );
  580. /** An iSCSI device */
  581. struct iscsi_device {
  582. /** SCSI device interface */
  583. struct scsi_device scsi;
  584. /** iSCSI protocol instance */
  585. struct iscsi_session iscsi;
  586. };
  587. extern int init_iscsidev ( struct iscsi_device *iscsidev );
  588. extern void fini_iscsidev ( struct iscsi_device *iscsidev );
  589. #endif /* _GPXE_ISCSI_H */