From: Matthew Wilcox <willy@debian.org>
To: Gerard Roudier <groudier@free.fr>
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH] C3000 support in sym53c8xx
Date: Thu, 20 Mar 2003 13:41:10 +0000 [thread overview]
Message-ID: <20030320134110.GA14520@parcelfarce.linux.theplanet.co.uk> (raw)
This patch adds support for the HP firmware call pdc_get_initiator().
This is necessary to support the narrow SCSI port on machines such as
the C3000 which use one channel of the 896 in narrow mode and one in
wide mode. The only way to figure this out is to ask firmware how it's
configured.
diff -urN --exclude-from=/tmp/dont26845.2827 ../prev/linux-2.5/drivers/scsi/sym53c8xx.c linux-2.5/drivers/scsi/sym53c8xx.c
--- ../prev/linux-2.5/drivers/scsi/sym53c8xx.c Tue Mar 18 09:41:09 2003
+++ linux-2.5/drivers/scsi/sym53c8xx.c Wed Mar 5 14:17:53 2003
@@ -4901,6 +4901,11 @@
u_long period;
int i;
+#ifdef CONFIG_PARISC
+ char scsi_mode = -1;
+ struct hardware_path hwpath;
+#endif
+
/*
** Wide ?
*/
@@ -4972,6 +4977,31 @@
*/
period = (4 * div_10M[0] + np->clock_khz - 1) / np->clock_khz;
+
+#ifdef CONFIG_PARISC
+ /* Host firmware (PDC) keeps a table for crippling SCSI capabilities.
+ * Many newer machines export one channel of 53c896 chip
+ * as SE, 50-pin HD. Also used for Multi-initiator SCSI clusters
+ * to set the SCSI Initiator ID.
+ */
+ get_pci_node_path(np->pdev, &hwpath);
+ if (pdc_get_initiator(&hwpath, &np->myaddr, &period, &np->maxwide, &scsi_mode))
+ {
+ if (np->maxwide)
+ np->features |= FE_WIDE;
+ if (scsi_mode >= 0) {
+ /* C3000 PDC reports period/mode */
+ driver_setup.diff_support = 0;
+ switch(scsi_mode) {
+ case 0: np->scsi_mode = SMODE_SE; break;
+ case 1: np->scsi_mode = SMODE_HVD; break;
+ case 2: np->scsi_mode = SMODE_LVD; break;
+ default: break;
+ }
+ }
+ }
+#endif
+
if (period <= 250) np->minsync = 10;
else if (period <= 303) np->minsync = 11;
else if (period <= 500) np->minsync = 12;
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
reply other threads:[~2003-03-20 13:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030320134110.GA14520@parcelfarce.linux.theplanet.co.uk \
--to=willy@debian.org \
--cc=groudier@free.fr \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox