1/* 2 * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. 3 * All rights reserved 4 * www.brocade.com 5 * 6 * Linux driver for Brocade Fibre Channel Host Bus Adapter. 7 * 8 * This program is free software; you can redistribute it and/or modify it 9 * under the terms of the GNU General Public License (GPL) Version 2 as 10 * published by the Free Software Foundation 11 * 12 * This program is distributed in the hope that it will be useful, but 13 * WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * General Public License for more details. 16 */ 17 18#ifndef __BFA_RPORT_PRIV_H__ 19#define __BFA_RPORT_PRIV_H__ 20 21#include <bfa_svc.h> 22 23#define BFA_RPORT_MIN 4 24 25struct bfa_rport_mod_s { 26 struct bfa_rport_s *rps_list; /* list of rports */ 27 struct list_head rp_free_q; /* free bfa_rports */ 28 struct list_head rp_active_q; /* free bfa_rports */ 29 u16 num_rports; /* number of rports */ 30}; 31 32#define BFA_RPORT_MOD(__bfa) (&(__bfa)->modules.rport_mod) 33 34/** 35 * Convert rport tag to RPORT 36 */ 37#define BFA_RPORT_FROM_TAG(__bfa, _tag) \ 38 (BFA_RPORT_MOD(__bfa)->rps_list + \ 39 ((_tag) & (BFA_RPORT_MOD(__bfa)->num_rports - 1))) 40 41/* 42 * external functions 43 */ 44void bfa_rport_isr(struct bfa_s *bfa, struct bfi_msg_s *msg); 45#endif /* __BFA_RPORT_PRIV_H__ */ 46