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

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

[SCSI] fusion: spi bus reset when driver loads



This patch is for spi.  This issues bus reset when driver
loads. Handling cases when initator has negotiated for packetized,
and target negotiated for non-packetized; effectly this bus reset
is getting both target and initiator on the same sheet of music.

Signed-off-by: default avatarEric Moore <Eric.Moore@lsil.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent eb221849
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -4598,6 +4598,14 @@ mpt_GetScsiPortSettings(MPT_ADAPTER *ioc, int portnum)
				SCSIPortPage2_t *pPP2 = (SCSIPortPage2_t  *) pbuf;
				MpiDeviceInfo_t	*pdevice = NULL;

				/*
				 * Save "Set to Avoid SCSI Bus Resets" flag
				 */
				ioc->spi_data.bus_reset =
				    (le32_to_cpu(pPP2->PortFlags) &
			        MPI_SCSIPORTPAGE2_PORT_FLAGS_AVOID_SCSI_RESET) ?
				    0 : 1 ;

				/* Save the Port Page 2 data
				 * (reformat into a 32bit quantity)
				 */
+9 −1
Original line number Diff line number Diff line
@@ -384,6 +384,14 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
		goto out_mptspi_probe;
	}

	/*
	 * issue internal bus reset
	 */
	if (ioc->spi_data.bus_reset)
		mptscsih_TMHandler(hd,
		    MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS,
		    0, 0, 0, 0, 5);

	scsi_scan_host(sh);
	return 0;