]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
scsi: be2iscsi: Set WRB invalid bit for SkyHawk
authorJitendra Bhivare <jitendra.bhivare@broadcom.com>
Tue, 13 Dec 2016 10:25:57 +0000 (15:55 +0530)
committerDhaval Giani <dhaval.giani@oracle.com>
Wed, 8 Mar 2017 00:55:45 +0000 (19:55 -0500)
Orabug: 25655127

invalid bit in WRB indicates to FW that IO was invalidated before WRB
was fetched from host memory.

For SkyHawk, this invalid bit in WRB is at a different offset.
Use amap_iscsi_wrb_v2 to mark invalid bit for SkyHawk.

Signed-off-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
drivers/scsi/be2iscsi/be_main.c
drivers/scsi/be2iscsi/be_main.h

index cfdb7b7e760f8f5be1953e5f10146c7f3d5db76a..4fc419580210df676f75ec61d598f05ea447291b 100644 (file)
@@ -243,8 +243,13 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
        beiscsi_conn = conn->dd_data;
        phba = beiscsi_conn->phba;
        /* mark WRB invalid which have been not processed by FW yet */
-       AMAP_SET_BITS(struct amap_iscsi_wrb, invld,
-                     abrt_io_task->pwrb_handle->pwrb, 1);
+       if (is_chip_be2_be3r(phba)) {
+               AMAP_SET_BITS(struct amap_iscsi_wrb, invld,
+                             abrt_io_task->pwrb_handle->pwrb, 1);
+       } else {
+               AMAP_SET_BITS(struct amap_iscsi_wrb_v2, invld,
+                             abrt_io_task->pwrb_handle->pwrb, 1);
+       }
        inv_tbl.cid = beiscsi_conn->beiscsi_conn_cid;
        inv_tbl.icd = abrt_io_task->psgl_handle->sgl_index;
        spin_unlock_bh(&session->back_lock);
@@ -320,9 +325,13 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc)
                __iscsi_get_task(task);
                io_task = task->dd_data;
                /* mark WRB invalid which have been not processed by FW yet */
-               AMAP_SET_BITS(struct amap_iscsi_wrb, invld,
-                             io_task->pwrb_handle->pwrb,
-                             1);
+               if (is_chip_be2_be3r(phba)) {
+                       AMAP_SET_BITS(struct amap_iscsi_wrb, invld,
+                                     io_task->pwrb_handle->pwrb, 1);
+               } else {
+                       AMAP_SET_BITS(struct amap_iscsi_wrb_v2, invld,
+                                     io_task->pwrb_handle->pwrb, 1);
+               }
 
                inv_tbl->tbl[nents].cid = beiscsi_conn->beiscsi_conn_cid;
                inv_tbl->tbl[nents].icd = io_task->psgl_handle->sgl_index;
index 72b66edfc99d3834dcbc8f2e4ed17133d15159b5..7a907278b8b3885933fe970563e22c2f13e7ea64 100644 (file)
@@ -840,7 +840,7 @@ struct amap_iscsi_wrb_v2 {
        u8 diff_enbl;   /* DWORD 11 */
        u8 u_run;       /* DWORD 11 */
        u8 o_run;       /* DWORD 11 */
-       u8 invalid;     /* DWORD 11 */
+       u8 invld;     /* DWORD 11 */
        u8 dsp;         /* DWORD 11 */
        u8 dmsg;        /* DWORD 11 */
        u8 rsvd4;       /* DWORD 11 */