|
@@ -8013,6 +8013,34 @@ int t4_enable_vi(struct adapter *adap, unsigned int mbox, unsigned int viid,
|
|
|
return t4_enable_vi_params(adap, mbox, viid, rx_en, tx_en, 0);
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * t4_enable_pi_params - enable/disable a Port's Virtual Interface
|
|
|
+ * @adap: the adapter
|
|
|
+ * @mbox: mailbox to use for the FW command
|
|
|
+ * @pi: the Port Information structure
|
|
|
+ * @rx_en: 1=enable Rx, 0=disable Rx
|
|
|
+ * @tx_en: 1=enable Tx, 0=disable Tx
|
|
|
+ * @dcb_en: 1=enable delivery of Data Center Bridging messages.
|
|
|
+ *
|
|
|
+ * Enables/disables a Port's Virtual Interface. Note that setting DCB
|
|
|
+ * Enable only makes sense when enabling a Virtual Interface ...
|
|
|
+ * If the Virtual Interface enable/disable operation is successful,
|
|
|
+ * we notify the OS-specific code of a potential Link Status change
|
|
|
+ * via the OS Contract API t4_os_link_changed().
|
|
|
+ */
|
|
|
+int t4_enable_pi_params(struct adapter *adap, unsigned int mbox,
|
|
|
+ struct port_info *pi,
|
|
|
+ bool rx_en, bool tx_en, bool dcb_en)
|
|
|
+{
|
|
|
+ int ret = t4_enable_vi_params(adap, mbox, pi->viid,
|
|
|
+ rx_en, tx_en, dcb_en);
|
|
|
+ if (ret)
|
|
|
+ return ret;
|
|
|
+ t4_os_link_changed(adap, pi->port_id,
|
|
|
+ rx_en && tx_en && pi->link_cfg.link_ok);
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* t4_identify_port - identify a VI's port by blinking its LED
|
|
|
* @adap: the adapter
|