Commit 322bd920 authored by Matthew Wilcox's avatar Matthew Wilcox Committed by James Bottomley

[PATCH] C3000 support in sym53c8xx

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.
parent b2936d3a
...@@ -4901,6 +4901,11 @@ static int __init ncr_prepare_setting(ncb_p np, ncr_nvram *nvram) ...@@ -4901,6 +4901,11 @@ static int __init ncr_prepare_setting(ncb_p np, ncr_nvram *nvram)
u_long period; u_long period;
int i; int i;
#ifdef CONFIG_PARISC
char scsi_mode = -1;
struct hardware_path hwpath;
#endif
/* /*
** Wide ? ** Wide ?
*/ */
...@@ -4972,6 +4977,31 @@ static int __init ncr_prepare_setting(ncb_p np, ncr_nvram *nvram) ...@@ -4972,6 +4977,31 @@ static int __init ncr_prepare_setting(ncb_p np, ncr_nvram *nvram)
*/ */
period = (4 * div_10M[0] + np->clock_khz - 1) / np->clock_khz; 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; if (period <= 250) np->minsync = 10;
else if (period <= 303) np->minsync = 11; else if (period <= 303) np->minsync = 11;
else if (period <= 500) np->minsync = 12; else if (period <= 500) np->minsync = 12;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment