Skip to content

Commit f99be43

Browse files
Eric MooreJames Bottomley
authored andcommitted
[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>
1 parent 86dd424 commit f99be43

File tree

3 files changed

+22
-18
lines changed

3 files changed

+22
-18
lines changed

drivers/message/fusion/mptbase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ extern int mpt_stm_index; /* needed by mptstm.c */
10591059
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
10601060
#endif /* } __KERNEL__ */
10611061

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__)
10631063
#define CAST_U32_TO_PTR(x) ((void *)(u64)x)
10641064
#define CAST_PTR_TO_U32(x) ((u32)(u64)x)
10651065
#else

drivers/message/fusion/mptsas.c

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ static void mptsas_print_device_pg0(SasDevicePage0_t *pg0)
245245
printk("Parent Handle=0x%X\n" ,le16_to_cpu(pg0->ParentDevHandle));
246246
printk("Enclosure Handle=0x%X\n", le16_to_cpu(pg0->EnclosureHandle));
247247
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));
249250
printk("Target ID=0x%X\n", pg0->TargetID);
250251
printk("Bus=0x%X\n", pg0->Bus);
251252
/* The PhyNum field specifies the PHY number of the parent
@@ -349,9 +350,9 @@ mptsas_port_delete(struct mptsas_portinfo_details * port_details)
349350
phy_info = port_info->phy_info;
350351

351352
dsaswideprintk((KERN_DEBUG "%s: [%p]: num_phys=%02d "
352-
"bitmask=0x%016llX\n",
353-
__FUNCTION__, port_details, port_details->num_phys,
354-
port_details->phy_bitmask));
353+
"bitmask=0x%016llX\n", __FUNCTION__, port_details,
354+
port_details->num_phys, (unsigned long long)
355+
port_details->phy_bitmask));
355356

356357
for (i = 0; i < port_info->num_phys; i++, phy_info++) {
357358
if(phy_info->port_details != port_details)
@@ -476,7 +477,7 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
476477
for (i = 0 ; i < port_info->num_phys ; i++, phy_info++) {
477478
sas_address = phy_info->attached.sas_address;
478479
dsaswideprintk((KERN_DEBUG "phy_id=%d sas_address=0x%018llX\n",
479-
i, sas_address));
480+
i, (unsigned long long)sas_address));
480481
if (!sas_address)
481482
continue;
482483
port_details = phy_info->port_details;
@@ -495,8 +496,8 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
495496
(1 << phy_info->phy_id);
496497
phy_info->sas_port_add_phy=1;
497498
dsaswideprintk((KERN_DEBUG "\t\tForming port\n\t\t"
498-
"phy_id=%d sas_address=0x%018llX\n",
499-
i, sas_address));
499+
"phy_id=%d sas_address=0x%018llX\n",
500+
i, (unsigned long long)sas_address));
500501
phy_info->port_details = port_details;
501502
}
502503

@@ -512,8 +513,9 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
512513
if (phy_info_cmp->port_details == port_details )
513514
continue;
514515
dsaswideprintk((KERN_DEBUG
515-
"\t\tphy_id=%d sas_address=0x%018llX\n",
516-
j, phy_info_cmp->attached.sas_address));
516+
"\t\tphy_id=%d sas_address=0x%018llX\n",
517+
j, (unsigned long long)
518+
phy_info_cmp->attached.sas_address));
517519
if (phy_info_cmp->port_details) {
518520
port_details->rphy =
519521
mptsas_get_rphy(phy_info_cmp);
@@ -546,11 +548,10 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
546548
if (!port_details)
547549
continue;
548550
dsaswideprintk((KERN_DEBUG
549-
"%s: [%p]: phy_id=%02d num_phys=%02d "
550-
"bitmask=0x%016llX\n",
551-
__FUNCTION__,
552-
port_details, i, port_details->num_phys,
553-
port_details->phy_bitmask));
551+
"%s: [%p]: phy_id=%02d num_phys=%02d "
552+
"bitmask=0x%016llX\n", __FUNCTION__,
553+
port_details, i, port_details->num_phys,
554+
(unsigned long long)port_details->phy_bitmask));
554555
dsaswideprintk((KERN_DEBUG"\t\tport = %p rphy=%p\n",
555556
port_details->port, port_details->rphy));
556557
}
@@ -2079,8 +2080,10 @@ mptsas_persist_clear_table(struct work_struct *work)
20792080
static void
20802081
mptsas_reprobe_lun(struct scsi_device *sdev, void *data)
20812082
{
2083+
int rc;
2084+
20822085
sdev->no_uld_attach = data ? 1 : 0;
2083-
scsi_device_reprobe(sdev);
2086+
rc = scsi_device_reprobe(sdev);
20842087
}
20852088

20862089
static void

drivers/message/fusion/mptscsih.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2699,7 +2699,8 @@ mptscsih_initTarget(MPT_SCSI_HOST *hd, VirtTarget *vtarget,
26992699
struct scsi_device *sdev)
27002700
{
27012701
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));
27032704

27042705
/* Is LUN supported? If so, upper 2 bits will be 0
27052706
* in first byte of inquiry data.
@@ -2781,7 +2782,7 @@ mptscsih_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtTarget *target,
27812782
else {
27822783
factor = MPT_ULTRA320;
27832784
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));
27852786
noQas = 0;
27862787
}
27872788
if (sdev->type == TYPE_TAPE &&

0 commit comments

Comments
 (0)