This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / scsi / lpfc / lpfc_mem.h
1 /*******************************************************************
2  * This file is part of the Emulex Linux Device Driver for         *
3  * Enterprise Fibre Channel Host Bus Adapters.                     *
4  * Refer to the README file included with this package for         *
5  * driver version and adapter support.                             *
6  * Copyright (C) 2004 Emulex Corporation.                          *
7  * www.emulex.com                                                  *
8  *                                                                 *
9  * This program is free software; you can redistribute it and/or   *
10  * modify it under the terms of the GNU General Public License     *
11  * as published by the Free Software Foundation; either version 2  *
12  * of the License, or (at your option) any later version.          *
13  *                                                                 *
14  * This program is distributed in the hope that it will be useful, *
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of  *
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   *
17  * GNU General Public License for more details, a copy of which    *
18  * can be found in the file COPYING included with this package.    *
19  *******************************************************************/
20
21 /*
22  * $Id: lpfc_mem.h 1.21 2004/09/22 19:40:07EDT sf_support Exp  $
23  */
24
25 #ifndef _H_LPFC_MEM
26 #define _H_LPFC_MEM
27
28
29 struct lpfc_dmabuf {
30         struct list_head list;
31         void *virt;             /* virtual address ptr */
32         dma_addr_t phys;        /* mapped address */
33 };
34 struct lpfc_dmabufext {
35         struct lpfc_dmabuf dma;
36         uint32_t size;
37         uint32_t flag;
38         struct list_head list;
39         uint32_t uniqueid;
40         uint32_t data;
41 };
42 typedef struct lpfc_dmabufext DMABUFEXT_t;
43
44 struct lpfc_dma_pool {
45         struct lpfc_dmabuf   *elements;
46         uint32_t    max_count;
47         uint32_t    current_count;
48 };
49
50
51 #define MEM_PRI             0x100       /* Priority bit: set to exceed low
52                                            water */
53 #define LPFC_MBUF_POOL_SIZE     64      /* max elements in MBUF safety pool */
54 #define LPFC_MEM_POOL_SIZE      64      /* max elements in non DMA safety
55                                            pool */
56 #endif                          /* _H_LPFC_MEM */