Skip to contentSkip to conversation

be2iscsi: fix chip cleanup

SCSI Dan Carpenter 1 participant 1 message Nov 18, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Jayamohan,

My static checker complains about 069adc7b061 "[SCSI] be2iscsi: fix chip cleanup"

drivers/scsi/be2iscsi/be_mgmt.c +2 -2
@@ -202,8 +202,8 @@ int mgmt_epfw_cleanup(struct beiscsi_hba *phba, unsigned short chute)
                           OPCODE_COMMON_ISCSI_CLEANUP, sizeof(*req));
 
        req->chute = chute;
-       req->hdr_ring_id = 0;
-       req->data_ring_id = 0;
+       req->hdr_ring_id = cpu_to_le16(HWI_GET_DEF_HDRQ_ID(phba));
            ^^^^^^^^^^^^
+       req->data_ring_id = cpu_to_le16(HWI_GET_DEF_BUFQ_ID(phba));
            ^^^^^^^^^^^^^
 

These two are only 8 bits so we lose part of the le16 value. My guess is that we can just remove the calls to cpu_to_le16() and save the lower bits, since that what this code does on Intel. But I don't know this subsystem.

In mgmt_open_connection() ->hdr_ring_id is a 16bit field, but we just store a CPU endian HWI_GET_DEF_HDRQ_ID() into it.

regards,
dan carpenter