emlxs_fct.c (8f23e9fa) emlxs_fct.c (a3170057)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at

--- 8 unchanged lines hidden (view full) ---

17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22/*
23 * Copyright (c) 2004-2012 Emulex. All rights reserved.
24 * Use is subject to license terms.
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at

--- 8 unchanged lines hidden (view full) ---

17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22/*
23 * Copyright (c) 2004-2012 Emulex. All rights reserved.
24 * Use is subject to license terms.
25 * Copyright 2020 RackTop Systems, Inc.
25 */
26
27#include <emlxs.h>
28
29#ifdef SFCT_SUPPORT
30
31
32/* Required for EMLXS_CONTEXT in EMLXS_MSGF calls */

--- 1333 unchanged lines hidden (view full) ---

1366static void
1367emlxs_fct_populate_hba_details(fct_local_port_t *fct_port,
1368 fct_port_attrs_t *port_attrs)
1369{
1370 emlxs_port_t *port = (emlxs_port_t *)fct_port->port_fca_private;
1371 emlxs_hba_t *hba = HBA;
1372 emlxs_vpd_t *vpd = &VPD;
1373
26 */
27
28#include <emlxs.h>
29
30#ifdef SFCT_SUPPORT
31
32
33/* Required for EMLXS_CONTEXT in EMLXS_MSGF calls */

--- 1333 unchanged lines hidden (view full) ---

1367static void
1368emlxs_fct_populate_hba_details(fct_local_port_t *fct_port,
1369 fct_port_attrs_t *port_attrs)
1370{
1371 emlxs_port_t *port = (emlxs_port_t *)fct_port->port_fca_private;
1372 emlxs_hba_t *hba = HBA;
1373 emlxs_vpd_t *vpd = &VPD;
1374
1374 (void) strncpy(port_attrs->manufacturer, "Emulex",
1375 (void) strncpy(port_attrs->manufacturer,
1376 hba->model_info.manufacturer,
1375 (sizeof (port_attrs->manufacturer)-1));
1376 (void) strncpy(port_attrs->serial_number, vpd->serial_num,
1377 (sizeof (port_attrs->serial_number)-1));
1378 (void) strncpy(port_attrs->model, hba->model_info.model,
1379 (sizeof (port_attrs->model)-1));
1380 (void) strncpy(port_attrs->model_description,
1381 hba->model_info.model_desc,
1382 (sizeof (port_attrs->model_description)-1));

--- 7 unchanged lines hidden (view full) ---

1390 (void) strncpy(port_attrs->option_rom_version, vpd->fcode_version,
1391 (sizeof (port_attrs->option_rom_version)-1));
1392 (void) snprintf(port_attrs->firmware_version,
1393 (sizeof (port_attrs->firmware_version)-1),
1394 "%s (%s)", vpd->fw_version,
1395 vpd->fw_label);
1396 (void) strncpy(port_attrs->driver_name, DRIVER_NAME,
1397 (sizeof (port_attrs->driver_name)-1));
1377 (sizeof (port_attrs->manufacturer)-1));
1378 (void) strncpy(port_attrs->serial_number, vpd->serial_num,
1379 (sizeof (port_attrs->serial_number)-1));
1380 (void) strncpy(port_attrs->model, hba->model_info.model,
1381 (sizeof (port_attrs->model)-1));
1382 (void) strncpy(port_attrs->model_description,
1383 hba->model_info.model_desc,
1384 (sizeof (port_attrs->model_description)-1));

--- 7 unchanged lines hidden (view full) ---

1392 (void) strncpy(port_attrs->option_rom_version, vpd->fcode_version,
1393 (sizeof (port_attrs->option_rom_version)-1));
1394 (void) snprintf(port_attrs->firmware_version,
1395 (sizeof (port_attrs->firmware_version)-1),
1396 "%s (%s)", vpd->fw_version,
1397 vpd->fw_label);
1398 (void) strncpy(port_attrs->driver_name, DRIVER_NAME,
1399 (sizeof (port_attrs->driver_name)-1));
1398 port_attrs->vendor_specific_id =
1399 ((hba->model_info.device_id << 16) | PCI_VENDOR_ID_EMULEX);
1400 port_attrs->vendor_specific_id = (hba->model_info.device_id << 16) |
1401 hba->model_info.vendor_id;
1400 port_attrs->supported_cos = LE_SWAP32(FC_NS_CLASS3);
1401
1402 port_attrs->max_frame_size = FF_FRAME_SIZE;
1403
1402 port_attrs->supported_cos = LE_SWAP32(FC_NS_CLASS3);
1403
1404 port_attrs->max_frame_size = FF_FRAME_SIZE;
1405
1406 if (vpd->link_speed & LMT_32GB_CAPABLE) {
1407 port_attrs->supported_speed |= PORT_SPEED_32G;
1408 }
1404 if (vpd->link_speed & LMT_16GB_CAPABLE) {
1405 port_attrs->supported_speed |= PORT_SPEED_16G;
1406 }
1407 if (vpd->link_speed & LMT_10GB_CAPABLE) {
1408 port_attrs->supported_speed |= PORT_SPEED_10G;
1409 }
1410 if (vpd->link_speed & LMT_8GB_CAPABLE) {
1411 port_attrs->supported_speed |= PORT_SPEED_8G;

--- 589 unchanged lines hidden (view full) ---

2001 link->port_speed = PORT_SPEED_8G;
2002 break;
2003 case LA_10GHZ_LINK:
2004 link->port_speed = PORT_SPEED_10G;
2005 break;
2006 case LA_16GHZ_LINK:
2007 link->port_speed = PORT_SPEED_16G;
2008 break;
1409 if (vpd->link_speed & LMT_16GB_CAPABLE) {
1410 port_attrs->supported_speed |= PORT_SPEED_16G;
1411 }
1412 if (vpd->link_speed & LMT_10GB_CAPABLE) {
1413 port_attrs->supported_speed |= PORT_SPEED_10G;
1414 }
1415 if (vpd->link_speed & LMT_8GB_CAPABLE) {
1416 port_attrs->supported_speed |= PORT_SPEED_8G;

--- 589 unchanged lines hidden (view full) ---

2006 link->port_speed = PORT_SPEED_8G;
2007 break;
2008 case LA_10GHZ_LINK:
2009 link->port_speed = PORT_SPEED_10G;
2010 break;
2011 case LA_16GHZ_LINK:
2012 link->port_speed = PORT_SPEED_16G;
2013 break;
2014 case LA_32GHZ_LINK:
2015 link->port_speed = PORT_SPEED_32G;
2016 break;
2009 default:
2010 link->port_speed = PORT_SPEED_UNKNOWN;
2011 break;
2012 }
2013
2014 link->portid = port->did;
2015 link->port_no_fct_flogi = 0;
2016 link->port_fca_flogi_done = 0;

--- 3398 unchanged lines hidden ---
2017 default:
2018 link->port_speed = PORT_SPEED_UNKNOWN;
2019 break;
2020 }
2021
2022 link->portid = port->did;
2023 link->port_no_fct_flogi = 0;
2024 link->port_fca_flogi_done = 0;

--- 3398 unchanged lines hidden ---