Patch from Gal Rosen <galr@storwize.com>:
authorvlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Thu, 28 Aug 2008 15:48:35 +0000 (15:48 +0000)
committervlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Thu, 28 Aug 2008 15:48:35 +0000 (15:48 +0000)
Mailbox is 16 bits, and the shift should be of 2 bytes (16 bits) not 2 bits, and 1 byte not 1 bit

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@492 d57e44dd-8a1f-0410-8b47-8ef2f437770f

qla2x00t/qla2x00-target/qla2x00t.c

index 448ba2e..0f98e06 100644 (file)
@@ -1970,9 +1970,9 @@ static void q2t_async_event(uint16_t code, scsi_qla_host_t *ha, uint16_t *mailbo
 #endif
                break;
        case MBA_RSCN_UPDATE:
-               TRACE_MGMT_DBG("RSCN Update (%x) N_Port %#06x (fmt %x)",
-                     code, ((mailbox[1]&0xF)<<2)|le16_to_cpu(mailbox[2]),
-                     (mailbox[1]&0xF0)>>1);
+               TRACE_MGMT_DBG("RSCN Update (%x) N_Port %#06x (fmt %x)", code,
+                       ((mailbox[1] & 0xFF) << 16) | le16_to_cpu(mailbox[2]),
+                       (mailbox[1] & 0xFF00) >> 8);
                break;
 
        case MBA_PORT_UPDATE:           /* Port database update occurred */