GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / drivers / scsi / bfa / bfa_fcs_port.c
blob3c27788cd527f6b0e639f14e12351d22988cc22e
1 /*
2 * Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
3 * All rights reserved
4 * www.brocade.com
6 * Linux driver for Brocade Fibre Channel Host Bus Adapter.
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
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.
18 /**
19 * bfa_fcs_pport.c BFA FCS PPORT ( physical port)
22 #include <fcs/bfa_fcs.h>
23 #include <bfa_svc.h>
24 #include <fcs/bfa_fcs_fabric.h>
25 #include "fcs_trcmod.h"
26 #include "fcs.h"
27 #include "fcs_fabric.h"
28 #include "fcs_port.h"
30 BFA_TRC_FILE(FCS, PPORT);
32 static void
33 bfa_fcs_pport_event_handler(void *cbarg, bfa_pport_event_t event)
35 struct bfa_fcs_s *fcs = cbarg;
37 bfa_trc(fcs, event);
39 switch (event) {
40 case BFA_PPORT_LINKUP:
41 bfa_fcs_fabric_link_up(&fcs->fabric);
42 break;
44 case BFA_PPORT_LINKDOWN:
45 bfa_fcs_fabric_link_down(&fcs->fabric);
46 break;
48 case BFA_PPORT_TRUNK_LINKDOWN:
49 bfa_assert(0);
50 break;
52 default:
53 bfa_assert(0);
57 void
58 bfa_fcs_pport_attach(struct bfa_fcs_s *fcs)
60 bfa_fcport_event_register(fcs->bfa, bfa_fcs_pport_event_handler, fcs);