aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Moore <eric.moore@lsil.com>2007-01-04 22:46:54 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-01-06 10:31:58 -0500
commitf99be43b3024f2dd054f2addd54a318eabee2018 (patch)
tree7032ee5ede603703b36d627836c53a8851407bfd
parent86dd424266530cda55258b2b33d04c23a88b9a9c (diff)
[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>
-rw-r--r--drivers/message/fusion/mptbase.h2
-rw-r--r--drivers/message/fusion/mptsas.c33
-rw-r--r--drivers/message/fusion/mptscsih.c5
3 files changed, 22 insertions, 18 deletions
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h
index a4afad4ecab2..da82de65dbc5 100644
--- a/drivers/message/fusion/mptbase.h
+++ b/drivers/message/fusion/mptbase.h
@@ -1059,7 +1059,7 @@ extern int mpt_stm_index; /* needed by mptstm.c */
1059/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 1059/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
1060#endif /* } __KERNEL__ */ 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#define CAST_U32_TO_PTR(x) ((void *)(u64)x) 1063#define CAST_U32_TO_PTR(x) ((void *)(u64)x)
1064#define CAST_PTR_TO_U32(x) ((u32)(u64)x) 1064#define CAST_PTR_TO_U32(x) ((u32)(u64)x)
1065#else 1065#else
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index 4f0c530e47b0..f49f12515c50 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -245,7 +245,8 @@ static void mptsas_print_device_pg0(SasDevicePage0_t *pg0)
245 printk("Parent Handle=0x%X\n" ,le16_to_cpu(pg0->ParentDevHandle)); 245 printk("Parent Handle=0x%X\n" ,le16_to_cpu(pg0->ParentDevHandle));
246 printk("Enclosure Handle=0x%X\n", le16_to_cpu(pg0->EnclosureHandle)); 246 printk("Enclosure Handle=0x%X\n", le16_to_cpu(pg0->EnclosureHandle));
247 printk("Slot=0x%X\n", le16_to_cpu(pg0->Slot)); 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 printk("Target ID=0x%X\n", pg0->TargetID); 250 printk("Target ID=0x%X\n", pg0->TargetID);
250 printk("Bus=0x%X\n", pg0->Bus); 251 printk("Bus=0x%X\n", pg0->Bus);
251 /* The PhyNum field specifies the PHY number of the parent 252 /* The PhyNum field specifies the PHY number of the parent
@@ -349,9 +350,9 @@ mptsas_port_delete(struct mptsas_portinfo_details * port_details)
349 phy_info = port_info->phy_info; 350 phy_info = port_info->phy_info;
350 351
351 dsaswideprintk((KERN_DEBUG "%s: [%p]: num_phys=%02d " 352 dsaswideprintk((KERN_DEBUG "%s: [%p]: num_phys=%02d "
352 "bitmask=0x%016llX\n", 353 "bitmask=0x%016llX\n", __FUNCTION__, port_details,
353 __FUNCTION__, port_details, port_details->num_phys, 354 port_details->num_phys, (unsigned long long)
354 port_details->phy_bitmask)); 355 port_details->phy_bitmask));
355 356
356 for (i = 0; i < port_info->num_phys; i++, phy_info++) { 357 for (i = 0; i < port_info->num_phys; i++, phy_info++) {
357 if(phy_info->port_details != port_details) 358 if(phy_info->port_details != port_details)
@@ -476,7 +477,7 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
476 for (i = 0 ; i < port_info->num_phys ; i++, phy_info++) { 477 for (i = 0 ; i < port_info->num_phys ; i++, phy_info++) {
477 sas_address = phy_info->attached.sas_address; 478 sas_address = phy_info->attached.sas_address;
478 dsaswideprintk((KERN_DEBUG "phy_id=%d sas_address=0x%018llX\n", 479 dsaswideprintk((KERN_DEBUG "phy_id=%d sas_address=0x%018llX\n",
479 i, sas_address)); 480 i, (unsigned long long)sas_address));
480 if (!sas_address) 481 if (!sas_address)
481 continue; 482 continue;
482 port_details = phy_info->port_details; 483 port_details = phy_info->port_details;
@@ -495,8 +496,8 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
495 (1 << phy_info->phy_id); 496 (1 << phy_info->phy_id);
496 phy_info->sas_port_add_phy=1; 497 phy_info->sas_port_add_phy=1;
497 dsaswideprintk((KERN_DEBUG "\t\tForming port\n\t\t" 498 dsaswideprintk((KERN_DEBUG "\t\tForming port\n\t\t"
498 "phy_id=%d sas_address=0x%018llX\n", 499 "phy_id=%d sas_address=0x%018llX\n",
499 i, sas_address)); 500 i, (unsigned long long)sas_address));
500 phy_info->port_details = port_details; 501 phy_info->port_details = port_details;
501 } 502 }
502 503
@@ -512,8 +513,9 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
512 if (phy_info_cmp->port_details == port_details ) 513 if (phy_info_cmp->port_details == port_details )
513 continue; 514 continue;
514 dsaswideprintk((KERN_DEBUG 515 dsaswideprintk((KERN_DEBUG
515 "\t\tphy_id=%d sas_address=0x%018llX\n", 516 "\t\tphy_id=%d sas_address=0x%018llX\n",
516 j, phy_info_cmp->attached.sas_address)); 517 j, (unsigned long long)
518 phy_info_cmp->attached.sas_address));
517 if (phy_info_cmp->port_details) { 519 if (phy_info_cmp->port_details) {
518 port_details->rphy = 520 port_details->rphy =
519 mptsas_get_rphy(phy_info_cmp); 521 mptsas_get_rphy(phy_info_cmp);
@@ -546,11 +548,10 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
546 if (!port_details) 548 if (!port_details)
547 continue; 549 continue;
548 dsaswideprintk((KERN_DEBUG 550 dsaswideprintk((KERN_DEBUG
549 "%s: [%p]: phy_id=%02d num_phys=%02d " 551 "%s: [%p]: phy_id=%02d num_phys=%02d "
550 "bitmask=0x%016llX\n", 552 "bitmask=0x%016llX\n", __FUNCTION__,
551 __FUNCTION__, 553 port_details, i, port_details->num_phys,
552 port_details, i, port_details->num_phys, 554 (unsigned long long)port_details->phy_bitmask));
553 port_details->phy_bitmask));
554 dsaswideprintk((KERN_DEBUG"\t\tport = %p rphy=%p\n", 555 dsaswideprintk((KERN_DEBUG"\t\tport = %p rphy=%p\n",
555 port_details->port, port_details->rphy)); 556 port_details->port, port_details->rphy));
556 } 557 }
@@ -2079,8 +2080,10 @@ mptsas_persist_clear_table(struct work_struct *work)
2079static void 2080static void
2080mptsas_reprobe_lun(struct scsi_device *sdev, void *data) 2081mptsas_reprobe_lun(struct scsi_device *sdev, void *data)
2081{ 2082{
2083 int rc;
2084
2082 sdev->no_uld_attach = data ? 1 : 0; 2085 sdev->no_uld_attach = data ? 1 : 0;
2083 scsi_device_reprobe(sdev); 2086 rc = scsi_device_reprobe(sdev);
2084} 2087}
2085 2088
2086static void 2089static void
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index 076eb2b573a3..d70cb11de5c9 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -2699,7 +2699,8 @@ mptscsih_initTarget(MPT_SCSI_HOST *hd, VirtTarget *vtarget,
2699 struct scsi_device *sdev) 2699 struct scsi_device *sdev)
2700{ 2700{
2701 dinitprintk((MYIOC_s_INFO_FMT "initTarget bus=%d id=%d lun=%d hd=%p\n", 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 /* Is LUN supported? If so, upper 2 bits will be 0 2705 /* Is LUN supported? If so, upper 2 bits will be 0
2705 * in first byte of inquiry data. 2706 * in first byte of inquiry data.
@@ -2781,7 +2782,7 @@ mptscsih_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtTarget *target,
2781 else { 2782 else {
2782 factor = MPT_ULTRA320; 2783 factor = MPT_ULTRA320;
2783 if (scsi_device_qas(sdev)) { 2784 if (scsi_device_qas(sdev)) {
2784 ddvtprintk((KERN_INFO "Enabling QAS due to byte56=%02x on id=%d!\n", byte56, id)); 2785 ddvtprintk((KERN_INFO "Enabling QAS due to byte56=%02x on id=%d!\n", scsi_device_qas(sdev), id));
2785 noQas = 0; 2786 noQas = 0;
2786 } 2787 }
2787 if (sdev->type == TYPE_TAPE && 2788 if (sdev->type == TYPE_TAPE &&