scsi: cxgb4i: add support for IEEE_8021QAZ_APP_SEL_STREAM selector [Linux 5.3]

This Linux kernel change "scsi: cxgb4i: add support for IEEE_8021QAZ_APP_SEL_STREAM selector" is included in the Linux 5.3 release. This change is authored by Varun Prakash <varun [at] chelsio.com> on Mon Jun 17 18:46:26 2019 +0530. The commit for this change in Linux stable tree is 152e30f (patch).

scsi: cxgb4i: add support for IEEE_8021QAZ_APP_SEL_STREAM selector

IEEE_8021QAZ_APP_SEL_STREAM is a valid selector for iSCSI connections, so
add code to use IEEE_8021QAZ_APP_SEL_STREAM selector to get priority mask.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

There are 9 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
index 124f334..0e767e6 100644
--- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
+++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
@@ -1665,8 +1665,12 @@ static u8 get_iscsi_dcb_priority(struct net_device *ndev)
        return 0;

    if (caps & DCB_CAP_DCBX_VER_IEEE) {
-       iscsi_dcb_app.selector = IEEE_8021QAZ_APP_SEL_ANY;
+       iscsi_dcb_app.selector = IEEE_8021QAZ_APP_SEL_STREAM;
        rv = dcb_ieee_getapp_mask(ndev, &iscsi_dcb_app);
+       if (!rv) {
+           iscsi_dcb_app.selector = IEEE_8021QAZ_APP_SEL_ANY;
+           rv = dcb_ieee_getapp_mask(ndev, &iscsi_dcb_app);
+       }
    } else if (caps & DCB_CAP_DCBX_VER_CEE) {
        iscsi_dcb_app.selector = DCB_APP_IDTYPE_PORTNUM;
        rv = dcb_getapp(ndev, &iscsi_dcb_app);
@@ -2251,7 +2255,8 @@ static int t4_uld_state_change(void *handle, enum cxgb4_state state)
    u8 priority;

    if (iscsi_app->dcbx & DCB_CAP_DCBX_VER_IEEE) {
-       if (iscsi_app->app.selector != IEEE_8021QAZ_APP_SEL_ANY)
+       if ((iscsi_app->app.selector != IEEE_8021QAZ_APP_SEL_STREAM) &&
+           (iscsi_app->app.selector != IEEE_8021QAZ_APP_SEL_ANY))
            return NOTIFY_DONE;

        priority = iscsi_app->app.priority;

Leave a Reply

Your email address will not be published. Required fields are marked *