~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise-security

« back to all changes in this revision

Viewing changes to drivers/net/ethernet/cisco/enic/vnic_resource.h

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati
  • Date: 2011-12-06 15:56:07 UTC
  • Revision ID: package-import@ubuntu.com-20111206155607-pcf44kv5fmhk564f
Tags: 3.2.0-1401.1
[ Paolo Pisati ]

* Rebased on top of Ubuntu-3.2.0-3.8
* Tilt-tracking @ ef2487af4bb15bdd0689631774b5a5e3a59f74e2
* Delete debian.ti-omap4/control, it shoudln't be tracked
* Fix architecture spelling (s/armel/armhf/)
* [Config] Update configs following 3.2 import
* [Config] Fix compilation: disable CODA and ARCH_OMAP3
* [Config] Fix compilation: disable Ethernet Faraday
* Update series to precise

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2008-2010 Cisco Systems, Inc.  All rights reserved.
 
3
 * Copyright 2007 Nuova Systems, Inc.  All rights reserved.
 
4
 *
 
5
 * This program is free software; you may redistribute it and/or modify
 
6
 * it under the terms of the GNU General Public License as published by
 
7
 * the Free Software Foundation; version 2 of the License.
 
8
 *
 
9
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 
10
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 
11
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 
12
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 
13
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 
14
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 
15
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 
16
 * SOFTWARE.
 
17
 *
 
18
 */
 
19
 
 
20
#ifndef _VNIC_RESOURCE_H_
 
21
#define _VNIC_RESOURCE_H_
 
22
 
 
23
#define VNIC_RES_MAGIC          0x766E6963L     /* 'vnic' */
 
24
#define VNIC_RES_VERSION        0x00000000L
 
25
#define MGMTVNIC_MAGIC          0x544d474dL     /* 'MGMT' */
 
26
#define MGMTVNIC_VERSION        0x00000000L
 
27
 
 
28
/* The MAC address assigned to the CFG vNIC is fixed. */
 
29
#define MGMTVNIC_MAC            { 0x02, 0x00, 0x54, 0x4d, 0x47, 0x4d }
 
30
 
 
31
/* vNIC resource types */
 
32
enum vnic_res_type {
 
33
        RES_TYPE_EOL,                   /* End-of-list */
 
34
        RES_TYPE_WQ,                    /* Work queues */
 
35
        RES_TYPE_RQ,                    /* Receive queues */
 
36
        RES_TYPE_CQ,                    /* Completion queues */
 
37
        RES_TYPE_RSVD1,
 
38
        RES_TYPE_NIC_CFG,               /* Enet NIC config registers */
 
39
        RES_TYPE_RSVD2,
 
40
        RES_TYPE_RSVD3,
 
41
        RES_TYPE_RSVD4,
 
42
        RES_TYPE_RSVD5,
 
43
        RES_TYPE_INTR_CTRL,             /* Interrupt ctrl table */
 
44
        RES_TYPE_INTR_TABLE,            /* MSI/MSI-X Interrupt table */
 
45
        RES_TYPE_INTR_PBA,              /* MSI/MSI-X PBA table */
 
46
        RES_TYPE_INTR_PBA_LEGACY,       /* Legacy intr status */
 
47
        RES_TYPE_RSVD6,
 
48
        RES_TYPE_RSVD7,
 
49
        RES_TYPE_DEVCMD,                /* Device command region */
 
50
        RES_TYPE_PASS_THRU_PAGE,        /* Pass-thru page */
 
51
 
 
52
        RES_TYPE_MAX,                   /* Count of resource types */
 
53
};
 
54
 
 
55
struct vnic_resource_header {
 
56
        u32 magic;
 
57
        u32 version;
 
58
};
 
59
 
 
60
struct mgmt_barmap_hdr {
 
61
        u32 magic;                      /* magic number */
 
62
        u32 version;                    /* header format version */
 
63
        u16 lif;                        /* loopback lif for mgmt frames */
 
64
        u16 pci_slot;                   /* installed pci slot */
 
65
        char serial[16];                /* card serial number */
 
66
};
 
67
 
 
68
struct vnic_resource {
 
69
        u8 type;
 
70
        u8 bar;
 
71
        u8 pad[2];
 
72
        u32 bar_offset;
 
73
        u32 count;
 
74
};
 
75
 
 
76
#endif /* _VNIC_RESOURCE_H_ */