All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/4] aic79xx: set precompensation
@ 2006-10-23 13:24 Hannes Reinecke
  0 siblings, 0 replies; only message in thread
From: Hannes Reinecke @ 2006-10-23 13:24 UTC (permalink / raw)
  To: James Bottomley; +Cc: SCSI Mailing List

[-- Attachment #1: Type: text/plain, Size: 261 bytes --]

Hi all,

we really should update the IOCELL chip whenever we change the 
precompensation.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke			hare@suse.de
SuSE Linux Products GmbH		S390 & zSeries
Maxfeldstraße 5				+49 911 74053 688
90409 Nürnberg				http://www.suse.de

[-- Attachment #2: 0002-aic79xx-Set-precompensation-correctly.txt --]
[-- Type: text/plain, Size: 1298 bytes --]

From: Hannes Reinecke <hare@suse.de>
Date: Mon Oct 23 11:02:57 2006 +0200
Subject: aic79xx: Set precompensation correctly

aic79xx has a special 'iocell' chip which handles the precompensation.
If it's set via DV we should make sure to set the chip correctly, too.

Signed-off-by: Hannes Reinecke <hare@suse.de>

---

 drivers/scsi/aic7xxx/aic79xx_osm.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

2f3de401cc38fa20f861470c035a7d088bc23ede
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
index f8e6048..d5375db 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
@@ -2634,8 +2634,22 @@ #ifdef AHD_DEBUG
 		       pcomp ? "Enable" : "Disable");
 #endif
 
-	if (pcomp)
+	if (pcomp) {
+		uint8_t precomp;
+
+		if (ahd->unit < ARRAY_SIZE(aic79xx_iocell_info)) {
+			struct ahd_linux_iocell_opts *iocell_opts;
+
+			iocell_opts = &aic79xx_iocell_info[ahd->unit];
+			precomp = iocell_opts->precomp;
+		} else {
+			precomp = AIC79XX_DEFAULT_PRECOMP;
+		}
 		ppr_options |= MSG_EXT_PPR_PCOMP_EN;
+		AHD_SET_PRECOMP(ahd, precomp);
+	} else {
+		AHD_SET_PRECOMP(ahd, 0);
+	}
 
 	ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
 			    starget->channel + 'A', ROLE_INITIATOR);
-- 
1.3.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-10-23 13:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-23 13:24 [PATCH 2/4] aic79xx: set precompensation Hannes Reinecke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.