MPT - fix all compiler warnings
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 16 Aug 2009 02:10:58 +0000 (19:10 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 16 Aug 2009 02:10:58 +0000 (19:10 -0700)
sys/dev/disk/mpt/mpt.c
sys/dev/disk/mpt/mpt.h
sys/dev/disk/mpt/mpt_cam.c
sys/dev/disk/mpt/mpt_debug.c

index bd453d7..7730016 100644 (file)
@@ -336,7 +336,8 @@ mpt_stdready(struct mpt_softc *mpt)
 int
 mpt_stdevent(struct mpt_softc *mpt, request_t *req, MSG_EVENT_NOTIFY_REPLY *msg)
 {
-       mpt_lprt(mpt, MPT_PRT_DEBUG, "mpt_stdevent: 0x%x\n", msg->Event & 0xFF);
+       mpt_lprt(mpt, MPT_PRT_DEBUG, "mpt_stdevent: 0x%lx\n",
+                msg->Event & 0xFF);
        /* Event was not for us. */
        return (0);
 }
@@ -560,13 +561,15 @@ mpt_event_reply_handler(struct mpt_softc *mpt, request_t *req,
                        mpt_lprt(mpt, MPT_PRT_INFO,
                                "No Handlers For Any Event Notify Frames. "
                                "Event %#x (ACK %sequired).\n",
-                               msg->Event, msg->AckRequired? "r" : "not r");
+                               (unsigned)msg->Event,
+                               msg->AckRequired? "r" : "not r");
                } else if (handled == 0) {
                        mpt_lprt(mpt,
                                msg->AckRequired? MPT_PRT_WARN : MPT_PRT_INFO,
                                "Unhandled Event Notify Frame. Event %#x "
                                "(ACK %sequired).\n",
-                               msg->Event, msg->AckRequired? "r" : "not r");
+                               (unsigned)msg->Event,
+                               msg->AckRequired? "r" : "not r");
                }
 
                if (msg->AckRequired) {
@@ -649,7 +652,7 @@ mpt_core_event(struct mpt_softc *mpt, request_t *req,
               MSG_EVENT_NOTIFY_REPLY *msg)
 {
        mpt_lprt(mpt, MPT_PRT_DEBUG, "mpt_core_event: 0x%x\n",
-                 msg->Event & 0xFF);
+                 (unsigned)(msg->Event & 0xFF));
        switch(msg->Event & 0xFF) {
        case MPI_EVENT_NONE:
                break;
@@ -659,10 +662,10 @@ mpt_core_event(struct mpt_softc *mpt, request_t *req,
 
                /* Some error occured that LSI wants logged */
                mpt_prt(mpt, "EvtLogData: IOCLogInfo: 0x%08x\n",
-                       msg->IOCLogInfo);
+                       (unsigned)msg->IOCLogInfo);
                mpt_prt(mpt, "\tEvtLogData: Event Data:");
                for (i = 0; i < msg->EventDataLength; i++)
-                       mpt_prtc(mpt, "  %08x", msg->Data[i]);
+                       mpt_prtc(mpt, "  %08x", (unsigned)msg->Data[i]);
                mpt_prtc(mpt, "\n");
                break;
        }
@@ -2561,7 +2564,7 @@ mpt_configure_ioc(struct mpt_softc *mpt, int tn, int needreset)
            mpt->ioc_facts.MaxChainDepth);
        mpt_lprt(mpt, MPT_PRT_DEBUG, "IOCFACTS: Num Ports %d, FWImageSize %d, "
            "Flags=%#x\n", mpt->ioc_facts.NumberOfPorts,
-           mpt->ioc_facts.FWImageSize, mpt->ioc_facts.Flags);
+           (int)mpt->ioc_facts.FWImageSize, mpt->ioc_facts.Flags);
 
        len = mpt->ioc_facts.NumberOfPorts * sizeof (MSG_PORT_FACTS_REPLY);
        mpt->port_facts = kmalloc(len, M_DEVBUF, M_NOWAIT | M_ZERO);
index 375ea09..3a22e7e 100644 (file)
@@ -829,9 +829,9 @@ mpt_assign_serno(struct mpt_softc *mpt, request_t *req)
 #define MPT_IFLAGS              0
 #define MPT_LOCK(mpt)           crit_enter()
 #define MPT_UNLOCK(mpt)         crit_exit()
-#define MPT_LOCK_SETUP
-#define MPT_LOCK_DESTROY
-#define MPT_LOCK_ASSERT
+#define MPT_LOCK_SETUP(mpt)    do { } while(0)
+#define MPT_LOCK_DESTROY(mpt)  do { } while(0)
+#define MPT_LOCK_ASSERT(mpt)   do { } while(0)
 #define        MPTLOCK_2_CAMLOCK       MPT_UNLOCK
 #define        CAMLOCK_2_MPTLOCK       MPT_LOCK
 #define splx(s)
index 56dae25..78c4d47 100644 (file)
@@ -468,11 +468,11 @@ mpt_read_config_info_fc(struct mpt_softc *mpt)
        mpt_lprt(mpt, MPT_PRT_INFO,
            "FC Port Page 0: Topology <%s> WWNN 0x%08x%08x WWPN 0x%08x%08x "
            "Speed %u-Gbit\n", topology,
-           mpt->mpt_fcport_page0.WWNN.High,
-           mpt->mpt_fcport_page0.WWNN.Low,
-           mpt->mpt_fcport_page0.WWPN.High,
-           mpt->mpt_fcport_page0.WWPN.Low,
-           mpt->mpt_fcport_speed);
+           (unsigned)mpt->mpt_fcport_page0.WWNN.High,
+           (unsigned)mpt->mpt_fcport_page0.WWNN.Low,
+           (unsigned)mpt->mpt_fcport_page0.WWPN.High,
+           (unsigned)mpt->mpt_fcport_page0.WWPN.Low,
+           (unsigned)mpt->mpt_fcport_speed);
 #if __FreeBSD_version >= 500000
        MPT_UNLOCK(mpt);
        {
@@ -983,8 +983,8 @@ mpt_read_config_info_spi(struct mpt_softc *mpt)
                mpt2host_config_page_scsi_port_0(&mpt->mpt_port_page0);
                mpt_lprt(mpt, MPT_PRT_NEGOTIATION,
                    "SPI Port Page 0: Capabilities %x PhysicalInterface %x\n",
-                   mpt->mpt_port_page0.Capabilities,
-                   mpt->mpt_port_page0.PhysicalInterface);
+                   (unsigned)mpt->mpt_port_page0.Capabilities,
+                   (unsigned)mpt->mpt_port_page0.PhysicalInterface);
        }
 
        rv = mpt_read_cur_cfg_page(mpt, 0, &mpt->mpt_port_page1.Header,
@@ -995,8 +995,8 @@ mpt_read_config_info_spi(struct mpt_softc *mpt)
                mpt2host_config_page_scsi_port_1(&mpt->mpt_port_page1);
                mpt_lprt(mpt, MPT_PRT_DEBUG,
                    "SPI Port Page 1: Configuration %x OnBusTimerValue %x\n",
-                   mpt->mpt_port_page1.Configuration,
-                   mpt->mpt_port_page1.OnBusTimerValue);
+                   (unsigned)mpt->mpt_port_page1.Configuration,
+                   (unsigned)mpt->mpt_port_page1.OnBusTimerValue);
        }
 
        rv = mpt_read_cur_cfg_page(mpt, 0, &mpt->mpt_port_page2.Header,
@@ -1006,8 +1006,8 @@ mpt_read_config_info_spi(struct mpt_softc *mpt)
        } else {
                mpt_lprt(mpt, MPT_PRT_NEGOTIATION,
                    "Port Page 2: Flags %x Settings %x\n",
-                   mpt->mpt_port_page2.PortFlags,
-                   mpt->mpt_port_page2.PortSettings);
+                   (unsigned)mpt->mpt_port_page2.PortFlags,
+                   (unsigned)mpt->mpt_port_page2.PortSettings);
                mpt2host_config_page_scsi_port_2(&mpt->mpt_port_page2);
                for (i = 0; i < 16; i++) {
                        mpt_lprt(mpt, MPT_PRT_NEGOTIATION,
@@ -1030,8 +1030,9 @@ mpt_read_config_info_spi(struct mpt_softc *mpt)
                mpt2host_config_page_scsi_device_0(&mpt->mpt_dev_page0[i]);
                mpt_lprt(mpt, MPT_PRT_NEGOTIATION,
                    "target %d page 0: Negotiated Params %x Information %x\n",
-                   i, mpt->mpt_dev_page0[i].NegotiatedParameters,
-                   mpt->mpt_dev_page0[i].Information);
+                   i,
+                   (unsigned)mpt->mpt_dev_page0[i].NegotiatedParameters,
+                   (unsigned)mpt->mpt_dev_page0[i].Information);
 
                rv = mpt_read_cur_cfg_page(mpt, i,
                    &mpt->mpt_dev_page1[i].Header, sizeof(*mpt->mpt_dev_page1),
@@ -1044,8 +1045,9 @@ mpt_read_config_info_spi(struct mpt_softc *mpt)
                mpt2host_config_page_scsi_device_1(&mpt->mpt_dev_page1[i]);
                mpt_lprt(mpt, MPT_PRT_NEGOTIATION,
                    "target %d page 1: Requested Params %x Configuration %x\n",
-                   i, mpt->mpt_dev_page1[i].RequestedParameters,
-                   mpt->mpt_dev_page1[i].Configuration);
+                   i,
+                   (unsigned)mpt->mpt_dev_page1[i].RequestedParameters,
+                   (unsigned)mpt->mpt_dev_page1[i].Configuration);
        }
        return (0);
 }
@@ -1068,7 +1070,9 @@ mpt_set_initial_config_spi(struct mpt_softc *mpt)
                CONFIG_PAGE_SCSI_PORT_1 tmp;
 
                mpt_prt(mpt, "SPI Port Page 1 Config value bad (%x)- should "
-                   "be %x\n", mpt->mpt_port_page1.Configuration, pp1val);
+                            "be %x\n",
+                       (unsigned)mpt->mpt_port_page1.Configuration,
+                       (unsigned)pp1val);
                tmp = mpt->mpt_port_page1;
                tmp.Configuration = pp1val;
                host2mpt_config_page_scsi_port_1(&tmp);
@@ -2244,11 +2248,9 @@ mpt_start(struct cam_sim *sim, union ccb *ccb)
                                 * one or more physical address ranges.
                                 */
                                int error;
-                               int s = splsoftvm();
                                error = bus_dmamap_load(mpt->buffer_dmat,
                                    req->dmap, csio->data_ptr, csio->dxfer_len,
                                    cb, req, 0);
-                               splx(s);
                                if (error == EINPROGRESS) {
                                        /*
                                         * So as to maintain ordering,
@@ -2571,7 +2573,7 @@ mpt_cam_event(struct mpt_softc *mpt, request_t *req,
                break;
        default:
                mpt_lprt(mpt, MPT_PRT_WARN, "mpt_cam_event: 0x%x\n",
-                   msg->Event & 0xFF);
+                        (unsigned)msg->Event & 0xFF);
                return (0);
        }
        return (1);
@@ -3783,8 +3785,10 @@ mpt_get_spi_settings(struct mpt_softc *mpt, struct ccb_trans_settings *cts)
 
                MPTLOCK_2_CAMLOCK(mpt);
                mpt_lprt(mpt, MPT_PRT_DEBUG,
-                   "mpt_get_spi_settings[%d]: current NP %x Info %x\n", tgt,
-                   tmp.NegotiatedParameters, tmp.Information);
+                   "mpt_get_spi_settings[%d]: current NP %x Info %x\n",
+                   tgt,
+                   (unsigned)tmp.NegotiatedParameters,
+                   (unsigned)tmp.Information);
                dval |= (tmp.NegotiatedParameters & MPI_SCSIDEVPAGE0_NP_WIDE) ?
                    DP_WIDE : DP_NARROW;
                dval |= (mpt->mpt_disc_enable & (1 << tgt)) ?
@@ -3908,7 +3912,8 @@ mpt_update_spi_config(struct mpt_softc *mpt, int tgt)
 
        mpt_lprt(mpt, MPT_PRT_NEGOTIATION,
            "mpt_update_spi_config[%d].page1: Requested Params 0x%08x\n",
-           tgt, mpt->mpt_dev_page1[tgt].RequestedParameters);
+           tgt,
+           (unsigned)mpt->mpt_dev_page1[tgt].RequestedParameters);
        tmp = mpt->mpt_dev_page1[tgt];
        host2mpt_config_page_scsi_device_1(&tmp);
        rv = mpt_write_cur_cfg_page(mpt, tgt,
@@ -4037,8 +4042,10 @@ mpt_scsi_send_tmf(struct mpt_softc *mpt, u_int type, u_int flags,
        tmf_req->TaskMsgContext = abort_ctx;
 
        mpt_lprt(mpt, MPT_PRT_DEBUG,
-           "Issuing TMF %p:%u with MsgContext of 0x%x\n", mpt->tmf_req,
-           mpt->tmf_req->serno, tmf_req->MsgContext);
+           "Issuing TMF %p:%u with MsgContext of 0x%x\n",
+           mpt->tmf_req,
+           (unsigned)mpt->tmf_req->serno,
+           (unsigned)tmf_req->MsgContext);
        if (mpt->verbose > MPT_PRT_DEBUG) {
                mpt_print_request(tmf_req);
        }
@@ -4545,11 +4552,9 @@ mpt_target_start_io(struct mpt_softc *mpt, union ccb *ccb)
                if ((ccb->ccb_h.flags & CAM_SCATTER_VALID) == 0) {
                        if ((ccb->ccb_h.flags & CAM_DATA_PHYS) == 0) {
                                int error;
-                               int s = splsoftvm();
                                error = bus_dmamap_load(mpt->buffer_dmat,
                                    req->dmap, csio->data_ptr, csio->dxfer_len,
                                    cb, req, 0);
-                               splx(s);
                                if (error == EINPROGRESS) {
                                        xpt_freeze_simq(mpt->sim, 1);
                                        ccb->ccb_h.status |= CAM_RELEASE_SIMQ;
index cf39fb3..ef7cf0b 100644 (file)
@@ -359,10 +359,10 @@ mpt_print_reply_hdr(MSG_DEFAULT_REPLY *msg)
 {
        kprintf("%s Reply @ %p\n", mpt_ioc_function(msg->Function), msg);
        kprintf("\tIOC Status    %s\n", mpt_ioc_status(msg->IOCStatus));
-       kprintf("\tIOCLogInfo    0x%08x\n", msg->IOCLogInfo);
+       kprintf("\tIOCLogInfo    0x%08x\n", (unsigned)msg->IOCLogInfo);
        kprintf("\tMsgLength     0x%02x\n", msg->MsgLength);
        kprintf("\tMsgFlags      0x%02x\n", msg->MsgFlags);
-       kprintf("\tMsgContext    0x%08x\n", msg->MsgContext);
+       kprintf("\tMsgContext    0x%08x\n", (unsigned)msg->MsgContext);
 }
 
 static void
@@ -385,18 +385,19 @@ mpt_print_ioc_facts(MSG_IOC_FACTS_REPLY *msg)
        kprintf("\tFlags         %d\n",         msg->Flags);
        kprintf("\tReplyQueueDepth %d\n",       msg->ReplyQueueDepth);
        kprintf("\tReqFrameSize  0x%04x\n",     msg->RequestFrameSize);
-       kprintf("\tFW Version    0x%08x\n",     msg->FWVersion.Word);
+       kprintf("\tFW Version    0x%08x\n",     (unsigned)msg->FWVersion.Word);
        kprintf("\tProduct ID    0x%04x\n",     msg->ProductID);
        kprintf("\tCredits       0x%04x\n",     msg->GlobalCredits);
        kprintf("\tPorts         %d\n",         msg->NumberOfPorts);
        kprintf("\tEventState    0x%02x\n",     msg->EventState);
-       kprintf("\tHostMFA_HA    0x%08x\n",     msg->CurrentHostMfaHighAddr);
+       kprintf("\tHostMFA_HA    0x%08x\n",
+               (unsigned)msg->CurrentHostMfaHighAddr);
        kprintf("\tSenseBuf_HA   0x%08x\n",
-           msg->CurrentSenseBufferHighAddr);
+               (unsigned)msg->CurrentSenseBufferHighAddr);
        kprintf("\tRepFrameSize  0x%04x\n",     msg->CurReplyFrameSize);
        kprintf("\tMaxDevices    0x%02x\n",     msg->MaxDevices);
        kprintf("\tMaxBuses      0x%02x\n",     msg->MaxBuses);
-       kprintf("\tFWImageSize   0x%04x\n",     msg->FWImageSize);
+       kprintf("\tFWImageSize   0x%04x\n",     (unsigned)msg->FWImageSize);
 }
 
 static void
@@ -415,9 +416,9 @@ mpt_print_scsi_io_reply(MSG_SCSI_IO_REPLY *msg)
        kprintf("\tCDBLength     %d\n", msg->CDBLength);
        kprintf("\tSCSI Status:  %s\n", mpt_scsi_status(msg->SCSIStatus));
        kprintf("\tSCSI State:   %s\n", mpt_scsi_state(msg->SCSIState));
-       kprintf("\tTransferCnt   0x%04x\n", msg->TransferCount);
-       kprintf("\tSenseCnt      0x%04x\n", msg->SenseCount);
-       kprintf("\tResponseInfo  0x%08x\n", msg->ResponseInfo);
+       kprintf("\tTransferCnt   0x%04x\n", (unsigned)msg->TransferCount);
+       kprintf("\tSenseCnt      0x%04x\n", (unsigned)msg->SenseCount);
+       kprintf("\tResponseInfo  0x%08x\n", (unsigned)msg->ResponseInfo);
 }
 
 
@@ -427,50 +428,51 @@ mpt_print_event_notice(MSG_EVENT_NOTIFY_REPLY *msg)
 {
        mpt_print_reply_hdr((MSG_DEFAULT_REPLY *)msg);
        kprintf("\tEvent:        %s\n", mpt_ioc_event(msg->Event));
-       kprintf("\tEventContext  0x%04x\n", msg->EventContext);
+       kprintf("\tEventContext  0x%04x\n", (unsigned)msg->EventContext);
        kprintf("\tAckRequired     %d\n", msg->AckRequired);
        kprintf("\tEventDataLength %d\n", msg->EventDataLength);
        kprintf("\tContinuation    %d\n", msg->MsgFlags & 0x80);
        switch(msg->Event) {
        case MPI_EVENT_LOG_DATA:
-               kprintf("\tEvtLogData:   0x%04x\n", msg->Data[0]);
+               kprintf("\tEvtLogData:   0x%04x\n",
+                       (unsigned)msg->Data[0]);
                break;
 
        case MPI_EVENT_UNIT_ATTENTION:
                kprintf("\tTargetID:     0x%04x\n",
-                       msg->Data[0] & 0xff);
+                       (unsigned)msg->Data[0] & 0xff);
                kprintf("\tBus:          0x%04x\n",
-                       (msg->Data[0] >> 8) & 0xff);
+                       (unsigned)(msg->Data[0] >> 8) & 0xff);
                break;
 
        case MPI_EVENT_IOC_BUS_RESET:
        case MPI_EVENT_EXT_BUS_RESET:
        case MPI_EVENT_RESCAN:
-               kprintf("\tPort:           %d\n",
+               kprintf("\tPort:           %lu\n",
                        (msg->Data[0] >> 8) & 0xff);
                break;
 
        case MPI_EVENT_LINK_STATUS_CHANGE:
-               kprintf("\tLinkState:    %d\n",
+               kprintf("\tLinkState:    %lu\n",
                        msg->Data[0] & 0xff);
-               kprintf("\tPort:         %d\n",
+               kprintf("\tPort:         %lu\n",
                        (msg->Data[1] >> 8) & 0xff);
                break;
 
        case MPI_EVENT_LOOP_STATE_CHANGE:
-               kprintf("\tType:         %d\n",
+               kprintf("\tType:         %lu\n",
                        (msg->Data[0] >> 16) & 0xff);
-               kprintf("\tChar3:      0x%02x\n",
+               kprintf("\tChar3:      0x%02lx\n",
                        (msg->Data[0] >> 8) & 0xff);
-               kprintf("\tChar4:      0x%02x\n",
+               kprintf("\tChar4:      0x%02lx\n",
                        (msg->Data[0]     ) & 0xff);
-               kprintf("\tPort:         %d\n",
+               kprintf("\tPort:         %lu\n",
                        (msg->Data[1] >> 8) & 0xff);
                break;
 
        case MPI_EVENT_LOGOUT:
-               kprintf("\tN_PortId:   0x%04x\n", msg->Data[0]);
-               kprintf("\tPort:         %d\n",
+               kprintf("\tN_PortId:   0x%04lx\n", msg->Data[0]);
+               kprintf("\tPort:         %lu\n",
                        (msg->Data[1] >> 8) & 0xff);
                break;
        }
@@ -513,8 +515,8 @@ mpt_print_request_hdr(MSG_REQUEST_HEADER *req)
 {
        kprintf("%s @ %p\n", mpt_ioc_function(req->Function), req);
        kprintf("\tChain Offset  0x%02x\n", req->ChainOffset);
-       kprintf("\tMsgFlags      0x%02x\n", req->MsgFlags);
-       kprintf("\tMsgContext    0x%08x\n", req->MsgContext);
+       kprintf("\tMsgFlags      0x%02x\n", (unsigned)req->MsgFlags);
+       kprintf("\tMsgContext    0x%08x\n", (unsigned)req->MsgContext);
 }
 
 void
@@ -529,7 +531,7 @@ mpt_print_scsi_io_request(MSG_SCSI_IO_REQUEST *orig_msg)
        kprintf("\tTargetID            %d\n", msg->TargetID);
        kprintf("\tSenseBufferLength   %d\n", msg->SenseBufferLength);
        kprintf("\tLUN:              0x%0x\n", msg->LUN[1]);
-       kprintf("\tControl           0x%08x ", msg->Control);
+       kprintf("\tControl           0x%08x ", (unsigned)msg->Control);
 #define MPI_PRINT_FIELD(x)                                             \
        case MPI_SCSIIO_CONTROL_ ## x :                                 \
                kprintf(" " #x " ");                                    \
@@ -558,8 +560,8 @@ mpt_print_scsi_io_request(MSG_SCSI_IO_REQUEST *orig_msg)
        kprintf("\n");
 #undef MPI_PRINT_FIELD
 
-       kprintf("\tDataLength\t0x%08x\n", msg->DataLength);
-       kprintf("\tSenseBufAddr\t0x%08x\n", msg->SenseBufferLowAddr);
+       kprintf("\tDataLength\t0x%08x\n", (unsigned)msg->DataLength);
+       kprintf("\tSenseBufAddr\t0x%08x\n", (unsigned)msg->SenseBufferLowAddr);
        kprintf("\tCDB[0:%d]\t", msg->CDBLength);
        for (i = 0; i < msg->CDBLength; i++)
                kprintf("%02x ", msg->CDB[i]);
@@ -578,7 +580,7 @@ mpt_print_scsi_tmf_request(MSG_SCSI_TASK_MGMT *msg)
        mpt_print_request_hdr((MSG_REQUEST_HEADER *)msg);
        kprintf("\tLun             0x%02x\n", msg->LUN[1]);
        kprintf("\tTaskType        %s\n", mpt_scsi_tm_type(msg->TaskType));
-       kprintf("\tTaskMsgContext  0x%08x\n", msg->TaskMsgContext);
+       kprintf("\tTaskMsgContext  0x%08x\n", (unsigned)msg->TaskMsgContext);
 }
 
 
@@ -589,10 +591,10 @@ mpt_print_scsi_target_assist_request(PTR_MSG_TARGET_ASSIST_REQUEST msg)
        kprintf("\tStatusCode    0x%02x\n", msg->StatusCode);
        kprintf("\tTargetAssist  0x%02x\n", msg->TargetAssistFlags);
        kprintf("\tQueueTag      0x%04x\n", msg->QueueTag);
-       kprintf("\tReplyWord     0x%08x\n", msg->ReplyWord);
+       kprintf("\tReplyWord     0x%08x\n", (unsigned)msg->ReplyWord);
        kprintf("\tLun           0x%02x\n", msg->LUN[1]);
-       kprintf("\tRelativeOff   0x%08x\n", msg->RelativeOffset);
-       kprintf("\tDataLength    0x%08x\n", msg->DataLength);
+       kprintf("\tRelativeOff   0x%08x\n", (unsigned)msg->RelativeOffset);
+       kprintf("\tDataLength    0x%08x\n", (unsigned)msg->DataLength);
        mpt_dump_sgl(msg->SGL, 0);
 }
 
@@ -604,7 +606,7 @@ mpt_print_scsi_target_status_send_request(MSG_TARGET_STATUS_SEND_REQUEST *msg)
        kprintf("\tStatusCode    0x%02x\n", msg->StatusCode);
        kprintf("\tStatusFlags   0x%02x\n", msg->StatusFlags);
        kprintf("\tQueueTag      0x%04x\n", msg->QueueTag);
-       kprintf("\tReplyWord     0x%08x\n", msg->ReplyWord);
+       kprintf("\tReplyWord     0x%08x\n", (unsigned)msg->ReplyWord);
        kprintf("\tLun           0x%02x\n", msg->LUN[1]);
        x.u.Simple = msg->StatusDataSGE;
        mpt_dump_sgl(&x, 0);
@@ -743,12 +745,16 @@ mpt_dump_sgl(SGE_IO_UNION *su, int offset)
                        if (flags & MPI_SGE_FLAGS_64_BIT_ADDRESSING) {
                                SGE_SIMPLE64 *se64 = (SGE_SIMPLE64 *)se;
                                kprintf("SE64 %p: Addr=0x%08x%08x FlagsLength"
-                                   "=0x%0x\n", se64, se64->Address.High,
-                                   se64->Address.Low, se64->FlagsLength);
+                                   "=0x%0x\n", se64,
+                                   (unsigned)se64->Address.High,
+                                   (unsigned)se64->Address.Low,
+                                   (unsigned)se64->FlagsLength);
                                nxtaddr = se64 + 1;
                        } else {
                                kprintf("SE32 %p: Addr=0x%0x FlagsLength=0x%0x"
-                                   "\n", se, se->Address, se->FlagsLength);
+                                   "\n", se,
+                                   (unsigned)se->Address,
+                                   (unsigned)se->FlagsLength);
                        }
                        kprintf(" ");
                        break;
@@ -757,15 +763,20 @@ mpt_dump_sgl(SGE_IO_UNION *su, int offset)
                                SGE_CHAIN64 *ce64 = (SGE_CHAIN64 *) se;
                                kprintf("CE64 %p: Addr=0x%08x%08x NxtChnO=0x%x "
                                    "Flgs=0x%x Len=0x%0x\n", ce64,
-                                   ce64->Address.High, ce64->Address.Low,
+                                   (unsigned)ce64->Address.High,
+                                   (unsigned)ce64->Address.Low,
                                    ce64->NextChainOffset,
-                                   ce64->Flags, ce64->Length);
+                                   (unsigned)ce64->Flags,
+                                   (unsigned)ce64->Length);
                                nxtaddr = ce64 + 1;
                        } else {
                                SGE_CHAIN32 *ce = (SGE_CHAIN32 *) se;
                                kprintf("CE32 %p: Addr=0x%0x NxtChnO=0x%x "
-                                   " Flgs=0x%x Len=0x%0x\n", ce, ce->Address,
-                                   ce->NextChainOffset, ce->Flags, ce->Length);
+                                   " Flgs=0x%x Len=0x%0x\n", ce,
+                                   (unsigned)ce->Address,
+                                   ce->NextChainOffset,
+                                   ce->Flags,
+                                   ce->Length);
                        }
                        flags = 0;
                        break;