[SCSI] fusion: power pc and miscellaneous bug fixs

* Endian fix's for warnings found in ppc environment.
* Fix compile time warning when calling scsi_device_reprobe, where
in newer kernels this API expects its return value to be examined.
* Fix compile errors when debug messages are enabled.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>

authored by Eric Moore and committed by James Bottomley f99be43b 86dd4242

+22 -18
+1 -1
drivers/message/fusion/mptbase.h
··· 1059 1059 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 1060 1060 #endif /* } __KERNEL__ */ 1061 1061 1062 - #if defined(__alpha__) || defined(__sparc_v9__) || defined(__ia64__) || defined(__x86_64__) 1062 + #if defined(__alpha__) || defined(__sparc_v9__) || defined(__ia64__) || defined(__x86_64__) || defined(__powerpc__) 1063 1063 #define CAST_U32_TO_PTR(x) ((void *)(u64)x) 1064 1064 #define CAST_PTR_TO_U32(x) ((u32)(u64)x) 1065 1065 #else
+18 -15
drivers/message/fusion/mptsas.c
··· 245 245 printk("Parent Handle=0x%X\n" ,le16_to_cpu(pg0->ParentDevHandle)); 246 246 printk("Enclosure Handle=0x%X\n", le16_to_cpu(pg0->EnclosureHandle)); 247 247 printk("Slot=0x%X\n", le16_to_cpu(pg0->Slot)); 248 - printk("SAS Address=0x%llX\n", le64_to_cpu(sas_address)); 248 + printk("SAS Address=0x%llX\n", (unsigned long long) 249 + le64_to_cpu(sas_address)); 249 250 printk("Target ID=0x%X\n", pg0->TargetID); 250 251 printk("Bus=0x%X\n", pg0->Bus); 251 252 /* The PhyNum field specifies the PHY number of the parent ··· 350 349 phy_info = port_info->phy_info; 351 350 352 351 dsaswideprintk((KERN_DEBUG "%s: [%p]: num_phys=%02d " 353 - "bitmask=0x%016llX\n", 354 - __FUNCTION__, port_details, port_details->num_phys, 355 - port_details->phy_bitmask)); 352 + "bitmask=0x%016llX\n", __FUNCTION__, port_details, 353 + port_details->num_phys, (unsigned long long) 354 + port_details->phy_bitmask)); 356 355 357 356 for (i = 0; i < port_info->num_phys; i++, phy_info++) { 358 357 if(phy_info->port_details != port_details) ··· 477 476 for (i = 0 ; i < port_info->num_phys ; i++, phy_info++) { 478 477 sas_address = phy_info->attached.sas_address; 479 478 dsaswideprintk((KERN_DEBUG "phy_id=%d sas_address=0x%018llX\n", 480 - i, sas_address)); 479 + i, (unsigned long long)sas_address)); 481 480 if (!sas_address) 482 481 continue; 483 482 port_details = phy_info->port_details; ··· 496 495 (1 << phy_info->phy_id); 497 496 phy_info->sas_port_add_phy=1; 498 497 dsaswideprintk((KERN_DEBUG "\t\tForming port\n\t\t" 499 - "phy_id=%d sas_address=0x%018llX\n", 500 - i, sas_address)); 498 + "phy_id=%d sas_address=0x%018llX\n", 499 + i, (unsigned long long)sas_address)); 501 500 phy_info->port_details = port_details; 502 501 } 503 502 ··· 513 512 if (phy_info_cmp->port_details == port_details ) 514 513 continue; 515 514 dsaswideprintk((KERN_DEBUG 516 - "\t\tphy_id=%d sas_address=0x%018llX\n", 517 - j, phy_info_cmp->attached.sas_address)); 515 + "\t\tphy_id=%d sas_address=0x%018llX\n", 516 + j, (unsigned long long) 517 + phy_info_cmp->attached.sas_address)); 518 518 if (phy_info_cmp->port_details) { 519 519 port_details->rphy = 520 520 mptsas_get_rphy(phy_info_cmp); ··· 548 546 if (!port_details) 549 547 continue; 550 548 dsaswideprintk((KERN_DEBUG 551 - "%s: [%p]: phy_id=%02d num_phys=%02d " 552 - "bitmask=0x%016llX\n", 553 - __FUNCTION__, 554 - port_details, i, port_details->num_phys, 555 - port_details->phy_bitmask)); 549 + "%s: [%p]: phy_id=%02d num_phys=%02d " 550 + "bitmask=0x%016llX\n", __FUNCTION__, 551 + port_details, i, port_details->num_phys, 552 + (unsigned long long)port_details->phy_bitmask)); 556 553 dsaswideprintk((KERN_DEBUG"\t\tport = %p rphy=%p\n", 557 554 port_details->port, port_details->rphy)); 558 555 } ··· 2080 2079 static void 2081 2080 mptsas_reprobe_lun(struct scsi_device *sdev, void *data) 2082 2081 { 2082 + int rc; 2083 + 2083 2084 sdev->no_uld_attach = data ? 1 : 0; 2084 - scsi_device_reprobe(sdev); 2085 + rc = scsi_device_reprobe(sdev); 2085 2086 } 2086 2087 2087 2088 static void
+3 -2
drivers/message/fusion/mptscsih.c
··· 2699 2699 struct scsi_device *sdev) 2700 2700 { 2701 2701 dinitprintk((MYIOC_s_INFO_FMT "initTarget bus=%d id=%d lun=%d hd=%p\n", 2702 - hd->ioc->name, vtarget->bus_id, vtarget->target_id, lun, hd)); 2702 + hd->ioc->name, vtarget->bus_id, vtarget->target_id, 2703 + sdev->lun, hd)); 2703 2704 2704 2705 /* Is LUN supported? If so, upper 2 bits will be 0 2705 2706 * in first byte of inquiry data. ··· 2782 2781 else { 2783 2782 factor = MPT_ULTRA320; 2784 2783 if (scsi_device_qas(sdev)) { 2785 - ddvtprintk((KERN_INFO "Enabling QAS due to byte56=%02x on id=%d!\n", byte56, id)); 2784 + ddvtprintk((KERN_INFO "Enabling QAS due to byte56=%02x on id=%d!\n", scsi_device_qas(sdev), id)); 2786 2785 noQas = 0; 2787 2786 } 2788 2787 if (sdev->type == TYPE_TAPE &&