aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/atl1c/atl1c.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/atl1c/atl1c.h')
-rw-r--r--drivers/net/atl1c/atl1c.h44
1 files changed, 37 insertions, 7 deletions
diff --git a/drivers/net/atl1c/atl1c.h b/drivers/net/atl1c/atl1c.h
index 2a1120ad2e74..84ae905bf732 100644
--- a/drivers/net/atl1c/atl1c.h
+++ b/drivers/net/atl1c/atl1c.h
@@ -313,6 +313,9 @@ enum atl1c_rss_type {
313enum atl1c_nic_type { 313enum atl1c_nic_type {
314 athr_l1c = 0, 314 athr_l1c = 0,
315 athr_l2c = 1, 315 athr_l2c = 1,
316 athr_l2c_b,
317 athr_l2c_b2,
318 athr_l1d,
316}; 319};
317 320
318enum atl1c_trans_queue { 321enum atl1c_trans_queue {
@@ -426,8 +429,12 @@ struct atl1c_hw {
426#define ATL1C_ASPM_L1_SUPPORT 0x0100 429#define ATL1C_ASPM_L1_SUPPORT 0x0100
427#define ATL1C_ASPM_CTRL_MON 0x0200 430#define ATL1C_ASPM_CTRL_MON 0x0200
428#define ATL1C_HIB_DISABLE 0x0400 431#define ATL1C_HIB_DISABLE 0x0400
429#define ATL1C_LINK_CAP_1000M 0x0800 432#define ATL1C_APS_MODE_ENABLE 0x0800
430#define ATL1C_FPGA_VERSION 0x8000 433#define ATL1C_LINK_EXT_SYNC 0x1000
434#define ATL1C_CLK_GATING_EN 0x2000
435#define ATL1C_FPGA_VERSION 0x8000
436 u16 link_cap_flags;
437#define ATL1C_LINK_CAP_1000M 0x0001
431 u16 cmb_tpd; 438 u16 cmb_tpd;
432 u16 cmb_rrd; 439 u16 cmb_rrd;
433 u16 cmb_rx_timer; /* 2us resolution */ 440 u16 cmb_rx_timer; /* 2us resolution */
@@ -470,12 +477,33 @@ struct atl1c_ring_header {
470struct atl1c_buffer { 477struct atl1c_buffer {
471 struct sk_buff *skb; /* socket buffer */ 478 struct sk_buff *skb; /* socket buffer */
472 u16 length; /* rx buffer length */ 479 u16 length; /* rx buffer length */
473 u16 state; /* state of buffer */ 480 u16 flags; /* information of buffer */
474#define ATL1_BUFFER_FREE 0 481#define ATL1C_BUFFER_FREE 0x0001
475#define ATL1_BUFFER_BUSY 1 482#define ATL1C_BUFFER_BUSY 0x0002
483#define ATL1C_BUFFER_STATE_MASK 0x0003
484
485#define ATL1C_PCIMAP_SINGLE 0x0004
486#define ATL1C_PCIMAP_PAGE 0x0008
487#define ATL1C_PCIMAP_TYPE_MASK 0x000C
488
489#define ATL1C_PCIMAP_TODEVICE 0x0010
490#define ATL1C_PCIMAP_FROMDEVICE 0x0020
491#define ATL1C_PCIMAP_DIRECTION_MASK 0x0030
476 dma_addr_t dma; 492 dma_addr_t dma;
477}; 493};
478 494
495#define ATL1C_SET_BUFFER_STATE(buff, state) do { \
496 ((buff)->flags) &= ~ATL1C_BUFFER_STATE_MASK; \
497 ((buff)->flags) |= (state); \
498 } while (0)
499
500#define ATL1C_SET_PCIMAP_TYPE(buff, type, direction) do { \
501 ((buff)->flags) &= ~ATL1C_PCIMAP_TYPE_MASK; \
502 ((buff)->flags) |= (type); \
503 ((buff)->flags) &= ~ATL1C_PCIMAP_DIRECTION_MASK; \
504 ((buff)->flags) |= (direction); \
505 } while (0)
506
479/* transimit packet descriptor (tpd) ring */ 507/* transimit packet descriptor (tpd) ring */
480struct atl1c_tpd_ring { 508struct atl1c_tpd_ring {
481 void *desc; /* descriptor ring virtual address */ 509 void *desc; /* descriptor ring virtual address */
@@ -534,6 +562,9 @@ struct atl1c_adapter {
534#define __AT_TESTING 0x0001 562#define __AT_TESTING 0x0001
535#define __AT_RESETTING 0x0002 563#define __AT_RESETTING 0x0002
536#define __AT_DOWN 0x0003 564#define __AT_DOWN 0x0003
565 u8 work_event;
566#define ATL1C_WORK_EVENT_RESET 0x01
567#define ATL1C_WORK_EVENT_LINK_CHANGE 0x02
537 u32 msg_enable; 568 u32 msg_enable;
538 569
539 bool have_msi; 570 bool have_msi;
@@ -545,8 +576,7 @@ struct atl1c_adapter {
545 spinlock_t tx_lock; 576 spinlock_t tx_lock;
546 atomic_t irq_sem; 577 atomic_t irq_sem;
547 578
548 struct work_struct reset_task; 579 struct work_struct common_task;
549 struct work_struct link_chg_task;
550 struct timer_list watchdog_timer; 580 struct timer_list watchdog_timer;
551 struct timer_list phy_config_timer; 581 struct timer_list phy_config_timer;
552 582