Deleted Added
full compact
cxgb_adapter.h (209840) cxgb_adapter.h (209841)
1/**************************************************************************
2
3Copyright (c) 2007-2009, Chelsio Inc.
4All rights reserved.
5
6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met:
8

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

20LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26POSSIBILITY OF SUCH DAMAGE.
27
1/**************************************************************************
2
3Copyright (c) 2007-2009, Chelsio Inc.
4All rights reserved.
5
6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met:
8

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

20LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26POSSIBILITY OF SUCH DAMAGE.
27
28$FreeBSD: head/sys/dev/cxgb/cxgb_adapter.h 209840 2010-07-09 00:36:35Z np $
28$FreeBSD: head/sys/dev/cxgb/cxgb_adapter.h 209841 2010-07-09 00:38:00Z np $
29
30***************************************************************************/
31
32
33#ifndef _CXGB_ADAPTER_H_
34#define _CXGB_ADAPTER_H_
35
36#include <sys/lock.h>

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

101 uint32_t port_id;
102 uint32_t tx_chan;
103 uint32_t txpkt_intf;
104 uint32_t first_qset;
105 uint32_t nqsets;
106 int link_fault;
107
108 uint8_t hw_addr[ETHER_ADDR_LEN];
29
30***************************************************************************/
31
32
33#ifndef _CXGB_ADAPTER_H_
34#define _CXGB_ADAPTER_H_
35
36#include <sys/lock.h>

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

101 uint32_t port_id;
102 uint32_t tx_chan;
103 uint32_t txpkt_intf;
104 uint32_t first_qset;
105 uint32_t nqsets;
106 int link_fault;
107
108 uint8_t hw_addr[ETHER_ADDR_LEN];
109 struct callout link_check_ch;
110 struct task link_check_task;
109 struct task timer_reclaim_task;
110 struct cdev *port_cdev;
111
112#define PORT_LOCK_NAME_LEN 32
113#define PORT_NAME_LEN 32
114 char lockbuf[PORT_LOCK_NAME_LEN];
115 char namebuf[PORT_NAME_LEN];
116} __aligned(L1_CACHE_BYTES);

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

489adap2pinfo(struct adapter *adap, int idx)
490{
491 return &adap->port[idx];
492}
493
494int t3_os_find_pci_capability(adapter_t *adapter, int cap);
495int t3_os_pci_save_state(struct adapter *adapter);
496int t3_os_pci_restore_state(struct adapter *adapter);
111 struct task timer_reclaim_task;
112 struct cdev *port_cdev;
113
114#define PORT_LOCK_NAME_LEN 32
115#define PORT_NAME_LEN 32
116 char lockbuf[PORT_LOCK_NAME_LEN];
117 char namebuf[PORT_NAME_LEN];
118} __aligned(L1_CACHE_BYTES);

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

491adap2pinfo(struct adapter *adap, int idx)
492{
493 return &adap->port[idx];
494}
495
496int t3_os_find_pci_capability(adapter_t *adapter, int cap);
497int t3_os_pci_save_state(struct adapter *adapter);
498int t3_os_pci_restore_state(struct adapter *adapter);
499void t3_os_link_intr(struct port_info *);
497void t3_os_link_changed(adapter_t *adapter, int port_id, int link_status,
498 int speed, int duplex, int fc, int mac_was_reset);
499void t3_os_phymod_changed(struct adapter *adap, int port_id);
500void t3_sge_err_intr_handler(adapter_t *adapter);
501int t3_offload_tx(struct t3cdev *, struct mbuf *);
502void t3_os_set_hw_addr(adapter_t *adapter, int port_idx, u8 hw_addr[]);
503int t3_mgmt_tx(adapter_t *adap, struct mbuf *m);
504

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

522void t3_rx_eth(struct adapter *adap, struct sge_rspq *rq, struct mbuf *m, int ethpad);
523
524void t3_add_attach_sysctls(adapter_t *sc);
525void t3_add_configured_sysctls(adapter_t *sc);
526int t3_get_desc(const struct sge_qset *qs, unsigned int qnum, unsigned int idx,
527 unsigned char *data);
528void t3_update_qset_coalesce(struct sge_qset *qs, const struct qset_params *p);
529
500void t3_os_link_changed(adapter_t *adapter, int port_id, int link_status,
501 int speed, int duplex, int fc, int mac_was_reset);
502void t3_os_phymod_changed(struct adapter *adap, int port_id);
503void t3_sge_err_intr_handler(adapter_t *adapter);
504int t3_offload_tx(struct t3cdev *, struct mbuf *);
505void t3_os_set_hw_addr(adapter_t *adapter, int port_idx, u8 hw_addr[]);
506int t3_mgmt_tx(adapter_t *adap, struct mbuf *m);
507

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

525void t3_rx_eth(struct adapter *adap, struct sge_rspq *rq, struct mbuf *m, int ethpad);
526
527void t3_add_attach_sysctls(adapter_t *sc);
528void t3_add_configured_sysctls(adapter_t *sc);
529int t3_get_desc(const struct sge_qset *qs, unsigned int qnum, unsigned int idx,
530 unsigned char *data);
531void t3_update_qset_coalesce(struct sge_qset *qs, const struct qset_params *p);
532
530#define CXGB_TICKS(a) ((a)->params.linkpoll_period ? \
531 (hz * (a)->params.linkpoll_period) / 10 : \
532 (a)->params.stats_update_period * hz)
533
534/*
535 * XXX figure out how we can return this to being private to sge
536 */
537#define desc_reclaimable(q) ((int)((q)->processed - (q)->cleaned - TX_MAX_DESC))
538
539#define container_of(p, stype, field) ((stype *)(((uint8_t *)(p)) - offsetof(stype, field)))
540
541static __inline struct sge_qset *

--- 36 unchanged lines hidden ---
533/*
534 * XXX figure out how we can return this to being private to sge
535 */
536#define desc_reclaimable(q) ((int)((q)->processed - (q)->cleaned - TX_MAX_DESC))
537
538#define container_of(p, stype, field) ((stype *)(((uint8_t *)(p)) - offsetof(stype, field)))
539
540static __inline struct sge_qset *

--- 36 unchanged lines hidden ---