diff options
author | Krishna Gudipati <kgudipat@brocade.com> | 2011-06-24 23:22:28 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-06-29 17:56:05 -0400 |
commit | 1a4d8e1bd81c018f7b8c7622066d5cfead59b38a (patch) | |
tree | 52ec78c60131cf3d861929e1f90d84e8acd0a429 /drivers/scsi/bfa/bfa_defs.h | |
parent | ea9582d721a0d711fb046a25f5e94dcbbc5be410 (diff) |
[SCSI] bfa: Enable ASIC block configuration and query.
- Added ASIC block configuration APIs:
- to create/delete/update the physical functions
- to do adapter/port mode configuration
- to query the current ASIC block configuration.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bfa/bfa_defs.h')
-rw-r--r-- | drivers/scsi/bfa/bfa_defs.h | 71 |
1 files changed, 70 insertions, 1 deletions
diff --git a/drivers/scsi/bfa/bfa_defs.h b/drivers/scsi/bfa/bfa_defs.h index 08ab60c4760f..cced5874cb55 100644 --- a/drivers/scsi/bfa/bfa_defs.h +++ b/drivers/scsi/bfa/bfa_defs.h | |||
@@ -329,7 +329,10 @@ struct bfa_ioc_attr_s { | |||
329 | struct bfa_ioc_driver_attr_s driver_attr; /* driver attr */ | 329 | struct bfa_ioc_driver_attr_s driver_attr; /* driver attr */ |
330 | struct bfa_ioc_pci_attr_s pci_attr; | 330 | struct bfa_ioc_pci_attr_s pci_attr; |
331 | u8 port_id; /* port number */ | 331 | u8 port_id; /* port number */ |
332 | u8 rsvd[7]; /* 64bit align */ | 332 | u8 port_mode; /* bfa_mode_s */ |
333 | u8 cap_bm; /* capability */ | ||
334 | u8 port_mode_cfg; /* bfa_mode_s */ | ||
335 | u8 rsvd[4]; /* 64bit align */ | ||
333 | }; | 336 | }; |
334 | 337 | ||
335 | /* | 338 | /* |
@@ -352,6 +355,16 @@ struct bfa_ioc_attr_s { | |||
352 | #define BFA_MFG_IC_FC 0x01 | 355 | #define BFA_MFG_IC_FC 0x01 |
353 | #define BFA_MFG_IC_ETH 0x02 | 356 | #define BFA_MFG_IC_ETH 0x02 |
354 | 357 | ||
358 | /* | ||
359 | * Adapter capability mask definition | ||
360 | */ | ||
361 | #define BFA_CM_HBA 0x01 | ||
362 | #define BFA_CM_CNA 0x02 | ||
363 | #define BFA_CM_NIC 0x04 | ||
364 | #define BFA_CM_FC16G 0x08 | ||
365 | #define BFA_CM_SRIOV 0x10 | ||
366 | #define BFA_CM_MEZZ 0x20 | ||
367 | |||
355 | #pragma pack(1) | 368 | #pragma pack(1) |
356 | 369 | ||
357 | /* | 370 | /* |
@@ -418,6 +431,9 @@ enum { | |||
418 | */ | 431 | */ |
419 | enum { | 432 | enum { |
420 | BFA_PCI_FCOE_SSDEVICE_ID = 0x14, | 433 | BFA_PCI_FCOE_SSDEVICE_ID = 0x14, |
434 | BFA_PCI_CT2_SSID_FCoE = 0x22, | ||
435 | BFA_PCI_CT2_SSID_ETH = 0x23, | ||
436 | BFA_PCI_CT2_SSID_FC = 0x24, | ||
421 | }; | 437 | }; |
422 | 438 | ||
423 | /* | 439 | /* |
@@ -485,4 +501,57 @@ struct bfa_boot_pbc_s { | |||
485 | struct bfa_boot_bootlun_s pblun[BFA_PREBOOT_BOOTLUN_MAX]; | 501 | struct bfa_boot_bootlun_s pblun[BFA_PREBOOT_BOOTLUN_MAX]; |
486 | }; | 502 | }; |
487 | 503 | ||
504 | /* | ||
505 | * ASIC block configuration related structures | ||
506 | */ | ||
507 | #define BFA_ABLK_MAX_PORTS 2 | ||
508 | #define BFA_ABLK_MAX_PFS 16 | ||
509 | #define BFA_ABLK_MAX 2 | ||
510 | |||
511 | #pragma pack(1) | ||
512 | enum bfa_mode_s { | ||
513 | BFA_MODE_HBA = 1, | ||
514 | BFA_MODE_CNA = 2, | ||
515 | BFA_MODE_NIC = 3 | ||
516 | }; | ||
517 | |||
518 | struct bfa_adapter_cfg_mode_s { | ||
519 | u16 max_pf; | ||
520 | u16 max_vf; | ||
521 | enum bfa_mode_s mode; | ||
522 | }; | ||
523 | |||
524 | struct bfa_ablk_cfg_pf_s { | ||
525 | u16 pers; | ||
526 | u8 port_id; | ||
527 | u8 optrom; | ||
528 | u8 valid; | ||
529 | u8 sriov; | ||
530 | u8 max_vfs; | ||
531 | u8 rsvd[1]; | ||
532 | u16 num_qpairs; | ||
533 | u16 num_vectors; | ||
534 | u32 bw; | ||
535 | }; | ||
536 | |||
537 | struct bfa_ablk_cfg_port_s { | ||
538 | u8 mode; | ||
539 | u8 type; | ||
540 | u8 max_pfs; | ||
541 | u8 rsvd[5]; | ||
542 | }; | ||
543 | |||
544 | struct bfa_ablk_cfg_inst_s { | ||
545 | u8 nports; | ||
546 | u8 max_pfs; | ||
547 | u8 rsvd[6]; | ||
548 | struct bfa_ablk_cfg_pf_s pf_cfg[BFA_ABLK_MAX_PFS]; | ||
549 | struct bfa_ablk_cfg_port_s port_cfg[BFA_ABLK_MAX_PORTS]; | ||
550 | }; | ||
551 | |||
552 | struct bfa_ablk_cfg_s { | ||
553 | struct bfa_ablk_cfg_inst_s inst[BFA_ABLK_MAX]; | ||
554 | }; | ||
555 | #pragma pack() | ||
556 | |||
488 | #endif /* __BFA_DEFS_H__ */ | 557 | #endif /* __BFA_DEFS_H__ */ |