Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f99be43b authored by Eric Moore's avatar Eric Moore Committed by James Bottomley
Browse files

[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: default avatarEric Moore <Eric.Moore@lsi.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 86dd4242
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1059,7 +1059,7 @@ extern int mpt_stm_index; /* needed by mptstm.c */
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#endif		/* } __KERNEL__ */

#if defined(__alpha__) || defined(__sparc_v9__) || defined(__ia64__) || defined(__x86_64__)
#if defined(__alpha__) || defined(__sparc_v9__) || defined(__ia64__) || defined(__x86_64__) || defined(__powerpc__)
#define CAST_U32_TO_PTR(x)	((void *)(u64)x)
#define CAST_PTR_TO_U32(x)	((u32)(u64)x)
#else
+18 −15
Original line number Diff line number Diff line
@@ -245,7 +245,8 @@ static void mptsas_print_device_pg0(SasDevicePage0_t *pg0)
	printk("Parent Handle=0x%X\n" ,le16_to_cpu(pg0->ParentDevHandle));
	printk("Enclosure Handle=0x%X\n", le16_to_cpu(pg0->EnclosureHandle));
	printk("Slot=0x%X\n", le16_to_cpu(pg0->Slot));
	printk("SAS Address=0x%llX\n", le64_to_cpu(sas_address));
	printk("SAS Address=0x%llX\n", (unsigned long long)
	    le64_to_cpu(sas_address));
	printk("Target ID=0x%X\n", pg0->TargetID);
	printk("Bus=0x%X\n", pg0->Bus);
	/* The PhyNum field specifies the PHY number of the parent
@@ -349,8 +350,8 @@ mptsas_port_delete(struct mptsas_portinfo_details * port_details)
	phy_info = port_info->phy_info;

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

	for (i = 0; i < port_info->num_phys; i++, phy_info++) {
@@ -476,7 +477,7 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
	for (i = 0 ; i < port_info->num_phys ; i++, phy_info++) {
		sas_address = phy_info->attached.sas_address;
		dsaswideprintk((KERN_DEBUG "phy_id=%d sas_address=0x%018llX\n",
			i, sas_address));
		    i, (unsigned long long)sas_address));
		if (!sas_address)
			continue;
		port_details = phy_info->port_details;
@@ -496,7 +497,7 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
			phy_info->sas_port_add_phy=1;
			dsaswideprintk((KERN_DEBUG "\t\tForming port\n\t\t"
			    "phy_id=%d sas_address=0x%018llX\n",
				i, sas_address));
			    i, (unsigned long long)sas_address));
			phy_info->port_details = port_details;
		}

@@ -513,7 +514,8 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
				continue;
			dsaswideprintk((KERN_DEBUG
			    "\t\tphy_id=%d sas_address=0x%018llX\n",
				j, phy_info_cmp->attached.sas_address));
			    j, (unsigned long long)
			    phy_info_cmp->attached.sas_address));
			if (phy_info_cmp->port_details) {
				port_details->rphy =
				    mptsas_get_rphy(phy_info_cmp);
@@ -547,10 +549,9 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
			continue;
		dsaswideprintk((KERN_DEBUG
		    "%s: [%p]: phy_id=%02d num_phys=%02d "
		    	"bitmask=0x%016llX\n",
			__FUNCTION__,
		    "bitmask=0x%016llX\n", __FUNCTION__,
		    port_details, i, port_details->num_phys,
			port_details->phy_bitmask));
		    (unsigned long long)port_details->phy_bitmask));
		dsaswideprintk((KERN_DEBUG"\t\tport = %p rphy=%p\n",
			port_details->port, port_details->rphy));
	}
@@ -2079,8 +2080,10 @@ mptsas_persist_clear_table(struct work_struct *work)
static void
mptsas_reprobe_lun(struct scsi_device *sdev, void *data)
{
	int rc;

	sdev->no_uld_attach = data ? 1 : 0;
	scsi_device_reprobe(sdev);
	rc = scsi_device_reprobe(sdev);
}

static void
+3 −2
Original line number Diff line number Diff line
@@ -2699,7 +2699,8 @@ mptscsih_initTarget(MPT_SCSI_HOST *hd, VirtTarget *vtarget,
		    struct scsi_device *sdev)
{
	dinitprintk((MYIOC_s_INFO_FMT "initTarget bus=%d id=%d lun=%d hd=%p\n",
		hd->ioc->name, vtarget->bus_id, vtarget->target_id, lun, hd));
		hd->ioc->name, vtarget->bus_id, vtarget->target_id,
		sdev->lun, hd));

	/* Is LUN supported? If so, upper 2 bits will be 0
	* in first byte of inquiry data.
@@ -2781,7 +2782,7 @@ mptscsih_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtTarget *target,
				else {
					factor = MPT_ULTRA320;
					if (scsi_device_qas(sdev)) {
						ddvtprintk((KERN_INFO "Enabling QAS due to byte56=%02x on id=%d!\n", byte56, id));
						ddvtprintk((KERN_INFO "Enabling QAS due to byte56=%02x on id=%d!\n", scsi_device_qas(sdev), id));
						noQas = 0;
					}
					if (sdev->type == TYPE_TAPE &&