igb.h (441fc6fdb47ae739eeda625dce5b069941a54db3) igb.h (e428893b7d0aecd0ca627c439e7420334824f764)
1/*******************************************************************************
2
3 Intel(R) Gigabit Ethernet Linux driver
4 Copyright(c) 2007-2012 Intel Corporation.
5
6 This program is free software; you can redistribute it and/or modify it
7 under the terms and conditions of the GNU General Public License,
8 version 2, as published by the Free Software Foundation.

--- 294 unchanged lines hidden (view full) ---

303 return ring->count + ring->next_to_clean - ring->next_to_use - 1;
304}
305
306struct igb_i2c_client_list {
307 struct i2c_client *client;
308 struct igb_i2c_client_list *next;
309};
310
1/*******************************************************************************
2
3 Intel(R) Gigabit Ethernet Linux driver
4 Copyright(c) 2007-2012 Intel Corporation.
5
6 This program is free software; you can redistribute it and/or modify it
7 under the terms and conditions of the GNU General Public License,
8 version 2, as published by the Free Software Foundation.

--- 294 unchanged lines hidden (view full) ---

303 return ring->count + ring->next_to_clean - ring->next_to_use - 1;
304}
305
306struct igb_i2c_client_list {
307 struct i2c_client *client;
308 struct igb_i2c_client_list *next;
309};
310
311#ifdef CONFIG_IGB_HWMON
312
313#define IGB_HWMON_TYPE_LOC 0
314#define IGB_HWMON_TYPE_TEMP 1
315#define IGB_HWMON_TYPE_CAUTION 2
316#define IGB_HWMON_TYPE_MAX 3
317
318struct hwmon_attr {
319 struct device_attribute dev_attr;
320 struct e1000_hw *hw;
321 struct e1000_thermal_diode_data *sensor;
322 char name[12];
323 };
324
325struct hwmon_buff {
326 struct device *device;
327 struct hwmon_attr *hwmon_list;
328 unsigned int n_hwmon;
329 };
330#endif
331
311/* board specific private data structure */
312struct igb_adapter {
313 unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
314
315 struct net_device *netdev;
316
317 unsigned long state;
318 unsigned int flags;

--- 74 unchanged lines hidden (view full) ---

393 struct delayed_work ptp_overflow_work;
394 struct work_struct ptp_tx_work;
395 struct sk_buff *ptp_tx_skb;
396 spinlock_t tmreg_lock;
397 struct cyclecounter cc;
398 struct timecounter tc;
399
400 char fw_version[32];
332/* board specific private data structure */
333struct igb_adapter {
334 unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
335
336 struct net_device *netdev;
337
338 unsigned long state;
339 unsigned int flags;

--- 74 unchanged lines hidden (view full) ---

414 struct delayed_work ptp_overflow_work;
415 struct work_struct ptp_tx_work;
416 struct sk_buff *ptp_tx_skb;
417 spinlock_t tmreg_lock;
418 struct cyclecounter cc;
419 struct timecounter tc;
420
421 char fw_version[32];
422#ifdef CONFIG_IGB_HWMON
423 struct hwmon_buff igb_hwmon_buff;
424 bool ets;
425#endif
401 struct i2c_algo_bit_data i2c_algo;
402 struct i2c_adapter i2c_adap;
403 struct igb_i2c_client_list *i2c_clients;
404};
405
406#define IGB_FLAG_HAS_MSI (1 << 0)
407#define IGB_FLAG_DCA_ENABLED (1 << 1)
408#define IGB_FLAG_QUAD_PORT_A (1 << 2)

--- 62 unchanged lines hidden (view full) ---

471{
472 if (igb_test_staterr(rx_desc, E1000_RXDADV_STAT_TS) &&
473 !igb_test_staterr(rx_desc, E1000_RXDADV_STAT_TSIP))
474 igb_ptp_rx_rgtstamp(q_vector, skb);
475}
476
477extern int igb_ptp_hwtstamp_ioctl(struct net_device *netdev,
478 struct ifreq *ifr, int cmd);
426 struct i2c_algo_bit_data i2c_algo;
427 struct i2c_adapter i2c_adap;
428 struct igb_i2c_client_list *i2c_clients;
429};
430
431#define IGB_FLAG_HAS_MSI (1 << 0)
432#define IGB_FLAG_DCA_ENABLED (1 << 1)
433#define IGB_FLAG_QUAD_PORT_A (1 << 2)

--- 62 unchanged lines hidden (view full) ---

496{
497 if (igb_test_staterr(rx_desc, E1000_RXDADV_STAT_TS) &&
498 !igb_test_staterr(rx_desc, E1000_RXDADV_STAT_TSIP))
499 igb_ptp_rx_rgtstamp(q_vector, skb);
500}
501
502extern int igb_ptp_hwtstamp_ioctl(struct net_device *netdev,
503 struct ifreq *ifr, int cmd);
504#ifdef CONFIG_IGB_HWMON
505extern void igb_sysfs_exit(struct igb_adapter *adapter);
506extern int igb_sysfs_init(struct igb_adapter *adapter);
507#endif
479static inline s32 igb_reset_phy(struct e1000_hw *hw)
480{
481 if (hw->phy.ops.reset)
482 return hw->phy.ops.reset(hw);
483
484 return 0;
485}
486

--- 30 unchanged lines hidden ---
508static inline s32 igb_reset_phy(struct e1000_hw *hw)
509{
510 if (hw->phy.ops.reset)
511 return hw->phy.ops.reset(hw);
512
513 return 0;
514}
515

--- 30 unchanged lines hidden ---