diff options
Diffstat (limited to 'drivers/net/sfc/net_driver.h')
-rw-r--r-- | drivers/net/sfc/net_driver.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h index c505482c2520..59f261b4171f 100644 --- a/drivers/net/sfc/net_driver.h +++ b/drivers/net/sfc/net_driver.h | |||
@@ -134,6 +134,8 @@ struct efx_special_buffer { | |||
134 | * Set only on the final fragment of a packet; %NULL for all other | 134 | * Set only on the final fragment of a packet; %NULL for all other |
135 | * fragments. When this fragment completes, then we can free this | 135 | * fragments. When this fragment completes, then we can free this |
136 | * skb. | 136 | * skb. |
137 | * @tsoh: The associated TSO header structure, or %NULL if this | ||
138 | * buffer is not a TSO header. | ||
137 | * @dma_addr: DMA address of the fragment. | 139 | * @dma_addr: DMA address of the fragment. |
138 | * @len: Length of this fragment. | 140 | * @len: Length of this fragment. |
139 | * This field is zero when the queue slot is empty. | 141 | * This field is zero when the queue slot is empty. |
@@ -144,6 +146,7 @@ struct efx_special_buffer { | |||
144 | */ | 146 | */ |
145 | struct efx_tx_buffer { | 147 | struct efx_tx_buffer { |
146 | const struct sk_buff *skb; | 148 | const struct sk_buff *skb; |
149 | struct efx_tso_header *tsoh; | ||
147 | dma_addr_t dma_addr; | 150 | dma_addr_t dma_addr; |
148 | unsigned short len; | 151 | unsigned short len; |
149 | unsigned char continuation; | 152 | unsigned char continuation; |
@@ -187,6 +190,13 @@ struct efx_tx_buffer { | |||
187 | * variable indicates that the queue is full. This is to | 190 | * variable indicates that the queue is full. This is to |
188 | * avoid cache-line ping-pong between the xmit path and the | 191 | * avoid cache-line ping-pong between the xmit path and the |
189 | * completion path. | 192 | * completion path. |
193 | * @tso_headers_free: A list of TSO headers allocated for this TX queue | ||
194 | * that are not in use, and so available for new TSO sends. The list | ||
195 | * is protected by the TX queue lock. | ||
196 | * @tso_bursts: Number of times TSO xmit invoked by kernel | ||
197 | * @tso_long_headers: Number of packets with headers too long for standard | ||
198 | * blocks | ||
199 | * @tso_packets: Number of packets via the TSO xmit path | ||
190 | */ | 200 | */ |
191 | struct efx_tx_queue { | 201 | struct efx_tx_queue { |
192 | /* Members which don't change on the fast path */ | 202 | /* Members which don't change on the fast path */ |
@@ -206,6 +216,10 @@ struct efx_tx_queue { | |||
206 | unsigned int insert_count ____cacheline_aligned_in_smp; | 216 | unsigned int insert_count ____cacheline_aligned_in_smp; |
207 | unsigned int write_count; | 217 | unsigned int write_count; |
208 | unsigned int old_read_count; | 218 | unsigned int old_read_count; |
219 | struct efx_tso_header *tso_headers_free; | ||
220 | unsigned int tso_bursts; | ||
221 | unsigned int tso_long_headers; | ||
222 | unsigned int tso_packets; | ||
209 | }; | 223 | }; |
210 | 224 | ||
211 | /** | 225 | /** |
@@ -434,6 +448,9 @@ struct efx_board { | |||
434 | struct efx_blinker blinker; | 448 | struct efx_blinker blinker; |
435 | }; | 449 | }; |
436 | 450 | ||
451 | #define STRING_TABLE_LOOKUP(val, member) \ | ||
452 | member ## _names[val] | ||
453 | |||
437 | enum efx_int_mode { | 454 | enum efx_int_mode { |
438 | /* Be careful if altering to correct macro below */ | 455 | /* Be careful if altering to correct macro below */ |
439 | EFX_INT_MODE_MSIX = 0, | 456 | EFX_INT_MODE_MSIX = 0, |
@@ -506,6 +523,7 @@ enum efx_fc_type { | |||
506 | * @check_hw: Check hardware | 523 | * @check_hw: Check hardware |
507 | * @reset_xaui: Reset XAUI side of PHY for (software sequenced reset) | 524 | * @reset_xaui: Reset XAUI side of PHY for (software sequenced reset) |
508 | * @mmds: MMD presence mask | 525 | * @mmds: MMD presence mask |
526 | * @loopbacks: Supported loopback modes mask | ||
509 | */ | 527 | */ |
510 | struct efx_phy_operations { | 528 | struct efx_phy_operations { |
511 | int (*init) (struct efx_nic *efx); | 529 | int (*init) (struct efx_nic *efx); |
@@ -515,6 +533,7 @@ struct efx_phy_operations { | |||
515 | int (*check_hw) (struct efx_nic *efx); | 533 | int (*check_hw) (struct efx_nic *efx); |
516 | void (*reset_xaui) (struct efx_nic *efx); | 534 | void (*reset_xaui) (struct efx_nic *efx); |
517 | int mmds; | 535 | int mmds; |
536 | unsigned loopbacks; | ||
518 | }; | 537 | }; |
519 | 538 | ||
520 | /* | 539 | /* |
@@ -653,7 +672,6 @@ union efx_multicast_hash { | |||
653 | * @phy_op: PHY interface | 672 | * @phy_op: PHY interface |
654 | * @phy_data: PHY private data (including PHY-specific stats) | 673 | * @phy_data: PHY private data (including PHY-specific stats) |
655 | * @mii: PHY interface | 674 | * @mii: PHY interface |
656 | * @phy_powered: PHY power state | ||
657 | * @tx_disabled: PHY transmitter turned off | 675 | * @tx_disabled: PHY transmitter turned off |
658 | * @link_up: Link status | 676 | * @link_up: Link status |
659 | * @link_options: Link options (MII/GMII format) | 677 | * @link_options: Link options (MII/GMII format) |
@@ -662,6 +680,9 @@ union efx_multicast_hash { | |||
662 | * @multicast_hash: Multicast hash table | 680 | * @multicast_hash: Multicast hash table |
663 | * @flow_control: Flow control flags - separate RX/TX so can't use link_options | 681 | * @flow_control: Flow control flags - separate RX/TX so can't use link_options |
664 | * @reconfigure_work: work item for dealing with PHY events | 682 | * @reconfigure_work: work item for dealing with PHY events |
683 | * @loopback_mode: Loopback status | ||
684 | * @loopback_modes: Supported loopback mode bitmask | ||
685 | * @loopback_selftest: Offline self-test private state | ||
665 | * | 686 | * |
666 | * The @priv field of the corresponding &struct net_device points to | 687 | * The @priv field of the corresponding &struct net_device points to |
667 | * this. | 688 | * this. |
@@ -721,6 +742,7 @@ struct efx_nic { | |||
721 | struct efx_phy_operations *phy_op; | 742 | struct efx_phy_operations *phy_op; |
722 | void *phy_data; | 743 | void *phy_data; |
723 | struct mii_if_info mii; | 744 | struct mii_if_info mii; |
745 | unsigned tx_disabled; | ||
724 | 746 | ||
725 | int link_up; | 747 | int link_up; |
726 | unsigned int link_options; | 748 | unsigned int link_options; |
@@ -732,6 +754,10 @@ struct efx_nic { | |||
732 | struct work_struct reconfigure_work; | 754 | struct work_struct reconfigure_work; |
733 | 755 | ||
734 | atomic_t rx_reset; | 756 | atomic_t rx_reset; |
757 | enum efx_loopback_mode loopback_mode; | ||
758 | unsigned int loopback_modes; | ||
759 | |||
760 | void *loopback_selftest; | ||
735 | }; | 761 | }; |
736 | 762 | ||
737 | /** | 763 | /** |