IB/ipath: Fix QHT7040 serial number check

Remove all the OEM and bringup boards, and complain and fail
initialization if one is found.  QHT7040 with GPIO rework (128ywwuuuu)
is OK, older 112ywwuuuu is no longer supported). The check that had been
added was failing both the 112 and 128 series.

Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
Dave Olson 2007-08-16 18:10:43 -07:00 committed by Roland Dreier
parent 20bed34314
commit aa7c79abd1
1 changed files with 15 additions and 29 deletions

View File

@ -631,56 +631,35 @@ static int ipath_ht_boardname(struct ipath_devdata *dd, char *name,
{ {
char *n = NULL; char *n = NULL;
u8 boardrev = dd->ipath_boardrev; u8 boardrev = dd->ipath_boardrev;
int ret; int ret = 0;
switch (boardrev) { switch (boardrev) {
case 4: /* Ponderosa is one of the bringup boards */
n = "Ponderosa";
break;
case 5: case 5:
/* /*
* original production board; two production levels, with * original production board; two production levels, with
* different serial number ranges. See ipath_ht_early_init() for * different serial number ranges. See ipath_ht_early_init() for
* case where we enable IPATH_GPIO_INTR for later serial # range. * case where we enable IPATH_GPIO_INTR for later serial # range.
* Original 112* serial number is no longer supported.
*/ */
n = "InfiniPath_QHT7040"; n = "InfiniPath_QHT7040";
break; break;
case 6:
n = "OEM_Board_3";
break;
case 7: case 7:
/* small form factor production board */ /* small form factor production board */
n = "InfiniPath_QHT7140"; n = "InfiniPath_QHT7140";
break; break;
case 8:
n = "LS/X-1";
break;
case 9: /* Comstock bringup test board */
n = "Comstock";
break;
case 10:
n = "OEM_Board_2";
break;
case 11:
n = "InfiniPath_HT-470"; /* obsoleted */
break;
case 12:
n = "OEM_Board_4";
break;
default: /* don't know, just print the number */ default: /* don't know, just print the number */
ipath_dev_err(dd, "Don't yet know about board " ipath_dev_err(dd, "Don't yet know about board "
"with ID %u\n", boardrev); "with ID %u\n", boardrev);
snprintf(name, namelen, "Unknown_InfiniPath_QHT7xxx_%u", snprintf(name, namelen, "Unknown_InfiniPath_QHT7xxx_%u",
boardrev); boardrev);
ret = 1;
break; break;
} }
if (n) if (n)
snprintf(name, namelen, "%s", n); snprintf(name, namelen, "%s", n);
if (dd->ipath_boardrev != 6 && dd->ipath_boardrev != 7 && if (ret) {
dd->ipath_boardrev != 11) {
ipath_dev_err(dd, "Unsupported InfiniPath board %s!\n", name); ipath_dev_err(dd, "Unsupported InfiniPath board %s!\n", name);
ret = 1;
goto bail; goto bail;
} }
if (dd->ipath_majrev != 3 || (dd->ipath_minrev < 2 || if (dd->ipath_majrev != 3 || (dd->ipath_minrev < 2 ||
@ -1554,10 +1533,17 @@ static int ipath_ht_early_init(struct ipath_devdata *dd)
* can use GPIO interrupts. They have serial #'s starting * can use GPIO interrupts. They have serial #'s starting
* with 128, rather than 112. * with 128, rather than 112.
*/ */
dd->ipath_flags |= IPATH_GPIO_INTR; if (dd->ipath_serial[0] == '1' &&
} else dd->ipath_serial[1] == '2' &&
ipath_dev_err(dd, "Unsupported InfiniPath serial " dd->ipath_serial[2] == '8')
"number %.16s!\n", dd->ipath_serial); dd->ipath_flags |= IPATH_GPIO_INTR;
else {
ipath_dev_err(dd, "Unsupported InfiniPath board "
"(serial number %.16s)!\n",
dd->ipath_serial);
return 1;
}
}
if (dd->ipath_minrev >= 4) { if (dd->ipath_minrev >= 4) {
/* Rev4+ reports extra errors via internal GPIO pins */ /* Rev4+ reports extra errors via internal GPIO pins */