Skip to contentSkip to conversation

bfa: Brocade BFA FC SCSI driver (bfa)

PATCH New Jing Huang 1 participant 1 message Jul 21, 2009

Subsystems (2)
lore
Share & tools
lore

Jing Huang

author
#0 lore raw

PATCH 2/6 bfa: Brocade BFA FC SCSI driver (bfa)

From: Jing Huang <[email protected]>

This patch contains code to access Brocade Fibre channel HBA firmware/hardware.

---
 bfa_aen.c            |   53 +
 bfa_callback_priv.h  |   57 +
 bfa_cb_ioim_macros.h |  213 ++++
 bfa_cee.c            |  492 ++++++++++
 bfa_core.c           |  402 ++++++++
 bfa_csdebug.c        |   58 +
 bfa_fcpim.c          |  175 +++
 bfa_fcpim_priv.h     |  188 ++++
 bfa_fcport.c         | 1672 +++++++++++++++++++++++++++++++++++
 bfa_fcxp.c           |  782 ++++++++++++++++
 bfa_fcxp_priv.h      |  138 ++
 bfa_fwimg_priv.h     |   31 
 bfa_hw_cb.c          |  142 +++
 bfa_hw_ct.c          |  162 +++
 bfa_intr.c           |  218 ++++
 bfa_intr_priv.h      |  115 ++
 bfa_ioc.c            | 2385 +++++++++++++++++++++++++++++++++++++++++++++++++++
 bfa_ioc.h            |  259 +++++
 bfa_iocfc.c          |  868 ++++++++++++++++++
 bfa_iocfc.h          |  168 +++
 bfa_iocfc_q.c        |   44 
 bfa_ioim.c           | 1311 ++++++++++++++++++++++++++++
 bfa_itnim.c          | 1088 +++++++++++++++++++++++
 bfa_log.c            |  346 +++++++
 bfa_log_module.c     |  451 +++++++++
 bfa_lps.c            |  782 ++++++++++++++++
 bfa_lps_priv.h       |   38 
 bfa_module.c         |   90 +
 bfa_modules_priv.h   |   43 
 bfa_os_inc.h         |  196 ++++
 bfa_port.c           |  460 +++++++++
 bfa_port_priv.h      |   90 +
 bfa_priv.h           |  113 ++
 bfa_rport.c          |  911 +++++++++++++++++++
 bfa_rport_priv.h     |   45 
 bfa_sgpg.c           |  231 ++++
 bfa_sgpg_priv.h      |   79 +
 bfa_sm.c             |   38 
 bfa_timer.c          |   90 +
 bfa_trcmod_priv.h    |   66 +
 bfa_tskim.c          |  689 ++++++++++++++
 bfa_uf.c             |  345 +++++++
 bfa_uf_priv.h        |   47 +
 43 files changed, 16171 insertions(+)
drivers/scsi/bfa/bfa_aen.c +53 -0
diff -urpN orig/drivers/scsi/bfa/bfa_aen.c patch/drivers/scsi/bfa/bfa_aen.c
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c)  2005-2008 Brocade Communications Systems, Inc.
+ * All rights reserved
+ * www.brocade.com
+ *
+ * Linux driver for Brocade Fibre Channel Host Bus Adapter.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License (GPL) Version 2 as
+ * published by the Free Software Foundation
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ */
+
+#include "bfad_drv.h"
+
+static inline u8
+n2b(u8 n)
+{
+	if (n <= 0x09)
+		return (n + '0');
+	else
+		return (n - 0x0a + 'a');
+}
+
+char *
+wwn2str(char *buf, int bufsize, u64 wwn)
+{
+	char *ptr;
+	union {
+	wwn_t           wwn;
+	u8         byte[sizeof(wwn_t)];
+	} w;
+	int i = sizeof(wwn_t);
+
+	ptr = buf + bufsize;
+	*--ptr = '\0';
+	bufsize--;
+
+	w.wwn = wwn;
+	while (i > 0) {
+		i--;
+		*--ptr = n2b(w.byte[i] & 0x0f);
+		*--ptr = n2b((w.byte[i] >> 4) & 0x0f);
+		if (i > 0)
+			*--ptr = ':';
+	}
+
+	return ptr;
+}
drivers/scsi/bfa/bfa_callback_priv.h +57 -0

57 lines not on this page · raw message

drivers/scsi/bfa/bfa_cb_ioim_macros.h +213 -0

213 lines not on this page · raw message

drivers/scsi/bfa/bfa_cee.c +492 -0

492 lines not on this page · raw message

drivers/scsi/bfa/bfa_core.c +402 -0

402 lines not on this page · raw message

drivers/scsi/bfa/bfa_csdebug.c +58 -0

58 lines not on this page · raw message

drivers/scsi/bfa/bfa_fcpim.c +175 -0

175 lines not on this page · raw message

drivers/scsi/bfa/bfa_fcpim_priv.h +188 -0

188 lines not on this page · raw message

drivers/scsi/bfa/bfa_fcport.c +1672 -0

1,362 lines not on this page · raw message

drivers/scsi/bfa/bfa_fcxp.c +782 -0

782 lines not on this page · raw message

drivers/scsi/bfa/bfa_fcxp_priv.h +138 -0

138 lines not on this page · raw message

drivers/scsi/bfa/bfa_fwimg_priv.h +31 -0
diff -urpN orig/drivers/scsi/bfa/bfa_fwimg_priv.h patch/drivers/scsi/bfa/bfa_fwimg_priv.h

Lines of this file are not shown. View the raw message.

drivers/scsi/bfa/bfa_hw_cb.c +142 -0

142 lines not on this page · raw message

drivers/scsi/bfa/bfa_hw_ct.c +162 -0

162 lines not on this page · raw message

drivers/scsi/bfa/bfa_intr.c +218 -0

218 lines not on this page · raw message

drivers/scsi/bfa/bfa_intr_priv.h +115 -0

115 lines not on this page · raw message

drivers/scsi/bfa/bfa_ioc.c +2385 -0

2,385 lines not on this page · raw message

drivers/scsi/bfa/bfa_ioc.h +259 -0

259 lines not on this page · raw message

drivers/scsi/bfa/bfa_iocfc.c +868 -0

868 lines not on this page · raw message

drivers/scsi/bfa/bfa_iocfc.h +168 -0

168 lines not on this page · raw message

drivers/scsi/bfa/bfa_iocfc_q.c +44 -0

44 lines not on this page · raw message

drivers/scsi/bfa/bfa_ioim.c +1311 -0

1,311 lines not on this page · raw message

drivers/scsi/bfa/bfa_itnim.c +1088 -0

1,088 lines not on this page · raw message

drivers/scsi/bfa/bfa_log.c +346 -0

346 lines not on this page · raw message

drivers/scsi/bfa/bfa_log_module.c +451 -0

451 lines not on this page · raw message

drivers/scsi/bfa/bfa_lps.c +782 -0

782 lines not on this page · raw message

drivers/scsi/bfa/bfa_lps_priv.h +38 -0
diff -urpN orig/drivers/scsi/bfa/bfa_lps_priv.h patch/drivers/scsi/bfa/bfa_lps_priv.h

Lines of this file are not shown. View the raw message.

drivers/scsi/bfa/bfa_module.c +90 -0

90 lines not on this page · raw message

drivers/scsi/bfa/bfa_modules_priv.h +43 -0

43 lines not on this page · raw message

drivers/scsi/bfa/bfa_os_inc.h +196 -0

196 lines not on this page · raw message

drivers/scsi/bfa/bfa_port.c +460 -0

460 lines not on this page · raw message

drivers/scsi/bfa/bfa_port_priv.h +90 -0

90 lines not on this page · raw message

drivers/scsi/bfa/bfa_priv.h +113 -0

113 lines not on this page · raw message

drivers/scsi/bfa/bfa_rport.c +911 -0

911 lines not on this page · raw message

drivers/scsi/bfa/bfa_rport_priv.h +45 -0

45 lines not on this page · raw message

drivers/scsi/bfa/bfa_sgpg.c +231 -0

231 lines not on this page · raw message

drivers/scsi/bfa/bfa_sgpg_priv.h +79 -0

79 lines not on this page · raw message

drivers/scsi/bfa/bfa_sm.c +38 -0
diff -urpN orig/drivers/scsi/bfa/bfa_sm.c patch/drivers/scsi/bfa/bfa_sm.c

Lines of this file are not shown. View the raw message.

drivers/scsi/bfa/bfa_timer.c +90 -0

90 lines not on this page · raw message

drivers/scsi/bfa/bfa_trcmod_priv.h +66 -0

66 lines not on this page · raw message

drivers/scsi/bfa/bfa_tskim.c +689 -0

689 lines not on this page · raw message

drivers/scsi/bfa/bfa_uf.c +345 -0

345 lines not on this page · raw message

drivers/scsi/bfa/bfa_uf_priv.h +47 -0

47 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.