All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Cc: Mike Christie <michaelc@cs.wisc.edu>, linux-scsi@vger.kernel.org
Subject: re: [SCSI] be2iscsi: fix chip cleanup
Date: Fri, 18 Nov 2011 10:57:00 +0300	[thread overview]
Message-ID: <20111118075659.GE4349@mwanda> (raw)

[-- 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 --]

                 reply	other threads:[~2011-11-18  7:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111118075659.GE4349@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=jayamohan.kallickal@emulex.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.