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

Commit d6b9ccbb authored by Hannes Reinecke's avatar Hannes Reinecke Committed by James Bottomley
Browse files

[SCSI] aic79xx: Print out signalling



This is a cross-port of a similar patch for aic7xxx;
only it's a bit simpler here as we don't support HVD
and all controller actually implement this register.
I hope.

Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 9080063f
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -2694,7 +2694,25 @@ static void ahd_linux_set_hold_mcs(struct scsi_target *starget, int hold)
	ahd_unlock(ahd, &flags);
}

static void ahd_linux_get_signalling(struct Scsi_Host *shost)
{
	struct ahd_softc *ahd = *(struct ahd_softc **)shost->hostdata;
	unsigned long flags;
	u8 mode;

	ahd_lock(ahd, &flags);
	ahd_pause(ahd);
	mode = ahd_inb(ahd, SBLKCTL);
	ahd_unpause(ahd);
	ahd_unlock(ahd, &flags);

	if (mode & ENAB40)
		spi_signalling(shost) = SPI_SIGNAL_LVD;
	else if (mode & ENAB20)
		spi_signalling(shost) = SPI_SIGNAL_SE;
	else
		spi_signalling(shost) = SPI_SIGNAL_UNKNOWN;
}

static struct spi_function_template ahd_linux_transport_functions = {
	.set_offset	= ahd_linux_set_offset,
@@ -2719,6 +2737,7 @@ static struct spi_function_template ahd_linux_transport_functions = {
	.show_pcomp_en	= 1,
	.set_hold_mcs	= ahd_linux_set_hold_mcs,
	.show_hold_mcs	= 1,
	.get_signalling = ahd_linux_get_signalling,
};

static int __init