diff -Nur mpt-status-1.2.0-RC5/mpt-status.c mpt-status-1.2.0-RC6/mpt-status.c --- mpt-status-1.2.0-RC5/mpt-status.c 2006-04-27 00:04:21.000000000 +0200 +++ mpt-status-1.2.0-RC6/mpt-status.c 2006-04-27 23:12:53.000000000 +0200 @@ -478,6 +478,10 @@ // ioc_unit handler ConfigRequest->Header.PageNumber = ioc_unit; //orig: ConfigRequest->PageAddress = cpu_to_le32((bus << 8) | 0); + printf("DEBUG: cpu_to_le32=%d htonl=%d ntohl=%d\n", + cpu_to_le32((bus << 8) | 0), + htonl((bus << 8) | 0), + ntohl((bus << 8) | 0)); ConfigRequest->PageAddress = bus; status = read_page2(MPT_FLAGS_KEEP_MEM); @@ -504,6 +508,10 @@ id = 0; // volume id: only one volume for now (vol_ids) //orig: ConfigRequest->PageAddress = cpu_to_le32((bus << 8) | id); /* Something is fishy here */ + printf("DEBUG: cpu_to_le32=%d htonl=%d ntohl=%d\n", + cpu_to_le32(bus | id), + htonl(bus | id), + ntohl(bus | id)); ConfigRequest->PageAddress = bus | id; status = read_page2(MPT_FLAGS_KEEP_MEM); pRVP0 = (RaidVolumePage0_t *) mpiBlkPtr->dataInBufPtr; @@ -731,7 +739,6 @@ uint numBytes; int ii; uint tot_blks, blks_left; - uint tot_blks2, blks_left2; int status; numBytes = (sizeof(MpiRaidActionRequest_t) - sizeof(SGE_IO_UNION)) @@ -749,7 +756,7 @@ pRequest->Action = MPI_RAID_ACTION_INDICATOR_STRUCT; pRequest->Function = MPI_FUNCTION_RAID_ACTION; pRequest->MsgContext = -1; - pRequest->ActionDataWord = cpu_to_le32(0); /* action data is 0 */ + pRequest->ActionDataWord = 0; /* action data is 0 */ printf("Resync Information:\n"); for (ii = 0; ii < count; ii++ ) { @@ -761,16 +768,10 @@ uint *pdata = (uint *) mpiBlkPtr->replyFrameBufPtr; printf("DEBUG: *pdata=%d\n", *pdata); pdata += 6; - tot_blks2 = cpu_to_le32(*pdata); - tot_blks = htonl(*pdata); - printf("DEBUG: tot_blks=%d tot_blks2=%d\n", - tot_blks, tot_blks2); + tot_blks = *pdata; pdata++; pdata++; - blks_left2 = cpu_to_le32(*pdata); - blks_left = htonl(*pdata); - printf("DEBUG: blks_left=%d blks_left2=%d\n", - blks_left, blks_left2); + blks_left = *pdata; pdata++; blks_done = tot_blks - blks_left; printf("\tPhys Disk %d on Volume %d:\n\t\t0x%x of 0x%x Remaining,",