/* bnx2i_sysfs.c: QLogic NetXtreme II iSCSI driver. * * Copyright (c) 2004 - 2013 Broadcom Corporation * Copyright (c) 2014, QLogic Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation. * * Written by: Anil Veerabhadrappa (anilgv@broadcom.com) * Previously Maintained by: Eddie Wai (eddie.wai@broadcom.com) * Maintained by: QLogic-Storage-Upstream@qlogic.com
*/
/** * bnx2i_show_sq_info - return(s currently configured send queue (SQ) size * @dev: device pointer * @attr: device attribute (unused) * @buf: buffer to return current SQ size parameter * * Returns current SQ size parameter, this paramater determines the number * outstanding iSCSI commands supported on a connection
*/ static ssize_t bnx2i_show_sq_info(struct device *dev, struct device_attribute *attr, char *buf)
{ struct bnx2i_hba *hba = bnx2i_dev_to_hba(dev);
return sprintf(buf, "0x%x\n", hba->max_sqes);
}
/** * bnx2i_set_sq_info - update send queue (SQ) size parameter * @dev: device pointer * @attr: device attribute (unused) * @buf: buffer to return current SQ size parameter * @count: parameter buffer size * * Interface for user to change shared queue size allocated for each conn * Must be within SQ limits and a power of 2. For the latter this is needed * because of how libiscsi preallocates tasks.
*/ static ssize_t bnx2i_set_sq_info(struct device *dev, struct device_attribute *attr, constchar *buf, size_t count)
{ struct bnx2i_hba *hba = bnx2i_dev_to_hba(dev);
u32 val; int max_sq_size;
if (hba->ofld_conns_active) goto skip_config;
if (test_bit(BNX2I_NX2_DEV_57710, &hba->cnic_dev_type))
max_sq_size = BNX2I_5770X_SQ_WQES_MAX; else
max_sq_size = BNX2I_570X_SQ_WQES_MAX;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.