linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: [SCSI] be2iscsi: fix chip cleanup
@ 2011-11-18  7:57 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2011-11-18  7:57 UTC (permalink / raw)
  To: Jayamohan Kallickal; +Cc: Mike Christie, linux-scsi

[-- Attachment #1: Type: text/plain, Size: 1013 bytes --]

Hi Jayamohan,

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

--- a/drivers/scsi/be2iscsi/be_mgmt.c
+++ b/drivers/scsi/be2iscsi/be_mgmt.c
@@ -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


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-18  7:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-18  7:57 [SCSI] be2iscsi: fix chip cleanup Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).