14d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray/* 2a02d44a02bd2b3f3848f30e335adc3c076b3f905Divy Le Ray * Copyright (C) 2006-2008 Chelsio Communications. All rights reserved. 34d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * 44d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * This software is available to you under a choice of one of two 54d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * licenses. You may choose to be licensed under the terms of the GNU 64d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * General Public License (GPL) Version 2, available from the file 74d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * COPYING in the main directory of this source tree, or the 84d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * OpenIB.org BSD license below: 94d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * 104d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * Redistribution and use in source and binary forms, with or 114d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * without modification, are permitted provided that the following 124d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * conditions are met: 134d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * 144d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * - Redistributions of source code must retain the above 154d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * copyright notice, this list of conditions and the following 164d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * disclaimer. 174d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * 184d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * - Redistributions in binary form must reproduce the above 194d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * copyright notice, this list of conditions and the following 204d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * disclaimer in the documentation and/or other materials 214d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * provided with the distribution. 224d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * 234d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 244d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 254d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 264d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 274d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 284d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 294d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 304d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray * SOFTWARE. 314d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray */ 324d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray#ifndef _T3CDEV_H_ 334d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray#define _T3CDEV_H_ 344d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray 354d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray#include <linux/list.h> 3660063497a95e716c9a689af3be2687d261f115b4Arun Sharma#include <linux/atomic.h> 374d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray#include <linux/netdevice.h> 384d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray#include <linux/proc_fs.h> 394d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray#include <linux/skbuff.h> 404d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray#include <net/neighbour.h> 414d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray 424d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray#define T3CNAMSIZ 16 434d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray 444d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Raystruct cxgb3_client; 454d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray 464d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Rayenum t3ctype { 474d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray T3A = 0, 488f85cd7fefa3d01c4e05aac1cb198733336cf44bDivy Le Ray T3B, 498f85cd7fefa3d01c4e05aac1cb198733336cf44bDivy Le Ray T3C, 504d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray}; 514d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray 524d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Raystruct t3cdev { 534d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray char name[T3CNAMSIZ]; /* T3C device name */ 544d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray enum t3ctype type; 554d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray struct list_head ofld_dev_list; /* for list linking */ 564d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray struct net_device *lldev; /* LL dev associated with T3C messages */ 574d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray struct proc_dir_entry *proc_dir; /* root of proc dir for this T3C */ 584d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray int (*send)(struct t3cdev *dev, struct sk_buff *skb); 594d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray int (*recv)(struct t3cdev *dev, struct sk_buff **skb, int n); 604d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray int (*ctl)(struct t3cdev *dev, unsigned int req, void *data); 614d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray void (*neigh_update)(struct t3cdev *dev, struct neighbour *neigh); 624d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray void *priv; /* driver private data */ 634d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray void *l2opt; /* optional layer 2 data */ 644d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray void *l3opt; /* optional layer 3 data */ 654d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray void *l4opt; /* optional layer 4 data */ 664d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray void *ulp; /* ulp stuff */ 679439f749441f3a7c2c8ef9e32b698cfe9ed60f48Karen Xie void *ulp_iscsi; /* ulp iscsi */ 684d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray}; 694d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray 704d22de3e6cc4a09c369b504cd8bcde3385a974cdDivy Le Ray#endif /* _T3CDEV_H_ */ 71