diff options
Diffstat (limited to 'drivers/net/ethernet/cavium/liquidio/octeon_device.h')
| -rw-r--r-- | drivers/net/ethernet/cavium/liquidio/octeon_device.h | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_device.h b/drivers/net/ethernet/cavium/liquidio/octeon_device.h index 91937cc5c1d7..3d01d3602d8f 100644 --- a/drivers/net/ethernet/cavium/liquidio/octeon_device.h +++ b/drivers/net/ethernet/cavium/liquidio/octeon_device.h | |||
| @@ -43,6 +43,13 @@ | |||
| 43 | #define OCTEON_CN23XX_REV_1_1 0x01 | 43 | #define OCTEON_CN23XX_REV_1_1 0x01 |
| 44 | #define OCTEON_CN23XX_REV_2_0 0x80 | 44 | #define OCTEON_CN23XX_REV_2_0 0x80 |
| 45 | 45 | ||
| 46 | /**SubsystemId for the chips */ | ||
| 47 | #define OCTEON_CN2350_10GB_SUBSYS_ID_1 0X3177d | ||
| 48 | #define OCTEON_CN2350_10GB_SUBSYS_ID_2 0X4177d | ||
| 49 | #define OCTEON_CN2360_10GB_SUBSYS_ID 0X5177d | ||
| 50 | #define OCTEON_CN2350_25GB_SUBSYS_ID 0X7177d | ||
| 51 | #define OCTEON_CN2360_25GB_SUBSYS_ID 0X6177d | ||
| 52 | |||
| 46 | /** Endian-swap modes supported by Octeon. */ | 53 | /** Endian-swap modes supported by Octeon. */ |
| 47 | enum octeon_pci_swap_mode { | 54 | enum octeon_pci_swap_mode { |
| 48 | OCTEON_PCI_PASSTHROUGH = 0, | 55 | OCTEON_PCI_PASSTHROUGH = 0, |
| @@ -281,8 +288,17 @@ struct oct_fw_info { | |||
| 281 | */ | 288 | */ |
| 282 | u32 app_mode; | 289 | u32 app_mode; |
| 283 | char liquidio_firmware_version[32]; | 290 | char liquidio_firmware_version[32]; |
| 291 | /* Fields extracted from legacy string 'liquidio_firmware_version' */ | ||
| 292 | struct { | ||
| 293 | u8 maj; | ||
| 294 | u8 min; | ||
| 295 | u8 rev; | ||
| 296 | } ver; | ||
| 284 | }; | 297 | }; |
| 285 | 298 | ||
| 299 | #define OCT_FW_VER(maj, min, rev) \ | ||
| 300 | (((u32)(maj) << 16) | ((u32)(min) << 8) | ((u32)(rev))) | ||
| 301 | |||
| 286 | /* wrappers around work structs */ | 302 | /* wrappers around work structs */ |
| 287 | struct cavium_wk { | 303 | struct cavium_wk { |
| 288 | struct delayed_work work; | 304 | struct delayed_work work; |
| @@ -300,6 +316,8 @@ struct octdev_props { | |||
| 300 | * device pointer (used for OS specific calls). | 316 | * device pointer (used for OS specific calls). |
| 301 | */ | 317 | */ |
| 302 | int rx_on; | 318 | int rx_on; |
| 319 | int fec; | ||
| 320 | int fec_boot; | ||
| 303 | int napi_enabled; | 321 | int napi_enabled; |
| 304 | int gmxport; | 322 | int gmxport; |
| 305 | struct net_device *netdev; | 323 | struct net_device *netdev; |
| @@ -381,6 +399,8 @@ struct octeon_sriov_info { | |||
| 381 | 399 | ||
| 382 | int vf_linkstate[MAX_POSSIBLE_VFS]; | 400 | int vf_linkstate[MAX_POSSIBLE_VFS]; |
| 383 | 401 | ||
| 402 | bool vf_spoofchk[MAX_POSSIBLE_VFS]; | ||
| 403 | |||
| 384 | u64 vf_drv_loaded_mask; | 404 | u64 vf_drv_loaded_mask; |
| 385 | }; | 405 | }; |
| 386 | 406 | ||
| @@ -430,6 +450,8 @@ struct octeon_device { | |||
| 430 | 450 | ||
| 431 | u16 rev_id; | 451 | u16 rev_id; |
| 432 | 452 | ||
| 453 | u32 subsystem_id; | ||
| 454 | |||
| 433 | u16 pf_num; | 455 | u16 pf_num; |
| 434 | 456 | ||
| 435 | u16 vf_num; | 457 | u16 vf_num; |
| @@ -584,6 +606,14 @@ struct octeon_device { | |||
| 584 | struct lio_vf_rep_list vf_rep_list; | 606 | struct lio_vf_rep_list vf_rep_list; |
| 585 | struct devlink *devlink; | 607 | struct devlink *devlink; |
| 586 | enum devlink_eswitch_mode eswitch_mode; | 608 | enum devlink_eswitch_mode eswitch_mode; |
| 609 | |||
| 610 | /* for 25G NIC speed change */ | ||
| 611 | u8 speed_boot; | ||
| 612 | u8 speed_setting; | ||
| 613 | u8 no_speed_setting; | ||
| 614 | |||
| 615 | u32 vfstats_poll; | ||
| 616 | #define LIO_VFSTATS_POLL 10 | ||
| 587 | }; | 617 | }; |
| 588 | 618 | ||
| 589 | #define OCT_DRV_ONLINE 1 | 619 | #define OCT_DRV_ONLINE 1 |
| @@ -867,7 +897,7 @@ void *oct_get_config_info(struct octeon_device *oct, u16 card_type); | |||
| 867 | struct octeon_config *octeon_get_conf(struct octeon_device *oct); | 897 | struct octeon_config *octeon_get_conf(struct octeon_device *oct); |
| 868 | 898 | ||
| 869 | void octeon_free_ioq_vector(struct octeon_device *oct); | 899 | void octeon_free_ioq_vector(struct octeon_device *oct); |
| 870 | int octeon_allocate_ioq_vector(struct octeon_device *oct); | 900 | int octeon_allocate_ioq_vector(struct octeon_device *oct, u32 num_ioqs); |
| 871 | void lio_enable_irq(struct octeon_droq *droq, struct octeon_instr_queue *iq); | 901 | void lio_enable_irq(struct octeon_droq *droq, struct octeon_instr_queue *iq); |
| 872 | 902 | ||
| 873 | /* LiquidIO driver pivate flags */ | 903 | /* LiquidIO driver pivate flags */ |
