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