Commit 525d0ca1 authored by Bryan O'Sullivan's avatar Bryan O'Sullivan Committed by Roland Dreier

IB/ipath: support new QLogic product naming scheme

This patch only renames files, fixes product names, and updates
comments.
Signed-off-by: default avatarBryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 092260b8
...@@ -10,7 +10,8 @@ ib_ipath-y := \ ...@@ -10,7 +10,8 @@ ib_ipath-y := \
ipath_eeprom.o \ ipath_eeprom.o \
ipath_file_ops.o \ ipath_file_ops.o \
ipath_fs.o \ ipath_fs.o \
ipath_ht400.o \ ipath_iba6110.o \
ipath_iba6120.o \
ipath_init_chip.o \ ipath_init_chip.o \
ipath_intr.o \ ipath_intr.o \
ipath_keys.o \ ipath_keys.o \
...@@ -18,7 +19,6 @@ ib_ipath-y := \ ...@@ -18,7 +19,6 @@ ib_ipath-y := \
ipath_mad.o \ ipath_mad.o \
ipath_mmap.o \ ipath_mmap.o \
ipath_mr.o \ ipath_mr.o \
ipath_pe800.o \
ipath_qp.o \ ipath_qp.o \
ipath_rc.o \ ipath_rc.o \
ipath_ruc.o \ ipath_ruc.o \
......
...@@ -401,10 +401,10 @@ static int __devinit ipath_init_one(struct pci_dev *pdev, ...@@ -401,10 +401,10 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
/* setup the chip-specific functions, as early as possible. */ /* setup the chip-specific functions, as early as possible. */
switch (ent->device) { switch (ent->device) {
case PCI_DEVICE_ID_INFINIPATH_HT: case PCI_DEVICE_ID_INFINIPATH_HT:
ipath_init_ht400_funcs(dd); ipath_init_iba6110_funcs(dd);
break; break;
case PCI_DEVICE_ID_INFINIPATH_PE800: case PCI_DEVICE_ID_INFINIPATH_PE800:
ipath_init_pe800_funcs(dd); ipath_init_iba6120_funcs(dd);
break; break;
default: default:
ipath_dev_err(dd, "Found unknown QLogic deviceid 0x%x, " ipath_dev_err(dd, "Found unknown QLogic deviceid 0x%x, "
...@@ -969,7 +969,8 @@ reloop: ...@@ -969,7 +969,8 @@ reloop:
*/ */
if (l == hdrqtail || (i && !(i&0xf))) { if (l == hdrqtail || (i && !(i&0xf))) {
u64 lval; u64 lval;
if (l == hdrqtail) /* PE-800 interrupt only on last */ if (l == hdrqtail)
/* request IBA6120 interrupt only on last */
lval = dd->ipath_rhdrhead_intr_off | l; lval = dd->ipath_rhdrhead_intr_off | l;
else else
lval = l; lval = l;
...@@ -983,7 +984,7 @@ reloop: ...@@ -983,7 +984,7 @@ reloop:
} }
if (!dd->ipath_rhdrhead_intr_off && !reloop) { if (!dd->ipath_rhdrhead_intr_off && !reloop) {
/* HT-400 workaround; we can have a race clearing chip /* IBA6110 workaround; we can have a race clearing chip
* interrupt with another interrupt about to be delivered, * interrupt with another interrupt about to be delivered,
* and can clear it before it is delivered on the GPIO * and can clear it before it is delivered on the GPIO
* workaround. By doing the extra check here for the * workaround. By doing the extra check here for the
......
...@@ -1110,7 +1110,7 @@ static int ipath_mmap(struct file *fp, struct vm_area_struct *vma) ...@@ -1110,7 +1110,7 @@ static int ipath_mmap(struct file *fp, struct vm_area_struct *vma)
ret = mmap_rcvegrbufs(vma, pd); ret = mmap_rcvegrbufs(vma, pd);
else if (pgaddr == (u64) pd->port_rcvhdrq_phys) { else if (pgaddr == (u64) pd->port_rcvhdrq_phys) {
/* /*
* The rcvhdrq itself; readonly except on HT-400 (so have * The rcvhdrq itself; readonly except on HT (so have
* to allow writable mapping), multiple pages, contiguous * to allow writable mapping), multiple pages, contiguous
* from an i/o perspective. * from an i/o perspective.
*/ */
...@@ -1298,14 +1298,14 @@ static int find_best_unit(struct file *fp) ...@@ -1298,14 +1298,14 @@ static int find_best_unit(struct file *fp)
* This code is present to allow a knowledgeable person to * This code is present to allow a knowledgeable person to
* specify the layout of processes to processors before opening * specify the layout of processes to processors before opening
* this driver, and then we'll assign the process to the "closest" * this driver, and then we'll assign the process to the "closest"
* HT-400 to that processor (we assume reasonable connectivity, * InfiniPath chip to that processor (we assume reasonable connectivity,
* for now). This code assumes that if affinity has been set * for now). This code assumes that if affinity has been set
* before this point, that at most one cpu is set; for now this * before this point, that at most one cpu is set; for now this
* is reasonable. I check for both cpus_empty() and cpus_full(), * is reasonable. I check for both cpus_empty() and cpus_full(),
* in case some kernel variant sets none of the bits when no * in case some kernel variant sets none of the bits when no
* affinity is set. 2.6.11 and 12 kernels have all present * affinity is set. 2.6.11 and 12 kernels have all present
* cpus set. Some day we'll have to fix it up further to handle * cpus set. Some day we'll have to fix it up further to handle
* a cpu subset. This algorithm fails for two HT-400's connected * a cpu subset. This algorithm fails for two HT chips connected
* in tunnel fashion. Eventually this needs real topology * in tunnel fashion. Eventually this needs real topology
* information. There may be some issues with dual core numbering * information. There may be some issues with dual core numbering
* as well. This needs more work prior to release. * as well. This needs more work prior to release.
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
/* /*
* This file contains all of the code that is specific to the InfiniPath * This file contains all of the code that is specific to the InfiniPath
* HT-400 chip. * HT chip.
*/ */
#include <linux/pci.h> #include <linux/pci.h>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#include "ipath_registers.h" #include "ipath_registers.h"
/* /*
* This lists the InfiniPath HT400 registers, in the actual chip layout. * This lists the InfiniPath registers, in the actual chip layout.
* This structure should never be directly accessed. * This structure should never be directly accessed.
* *
* The names are in InterCap form because they're taken straight from * The names are in InterCap form because they're taken straight from
...@@ -537,7 +537,7 @@ static void ipath_ht_handle_hwerrors(struct ipath_devdata *dd, char *msg, ...@@ -537,7 +537,7 @@ static void ipath_ht_handle_hwerrors(struct ipath_devdata *dd, char *msg,
if (hwerrs & INFINIPATH_HWE_HTCMISCERR7) if (hwerrs & INFINIPATH_HWE_HTCMISCERR7)
strlcat(msg, "[HT core Misc7]", msgl); strlcat(msg, "[HT core Misc7]", msgl);
if (hwerrs & INFINIPATH_HWE_MEMBISTFAILED) { if (hwerrs & INFINIPATH_HWE_MEMBISTFAILED) {
strlcat(msg, "[Memory BIST test failed, HT-400 unusable]", strlcat(msg, "[Memory BIST test failed, InfiniPath hardware unusable]",
msgl); msgl);
/* ignore from now on, so disable until driver reloaded */ /* ignore from now on, so disable until driver reloaded */
dd->ipath_hwerrmask &= ~INFINIPATH_HWE_MEMBISTFAILED; dd->ipath_hwerrmask &= ~INFINIPATH_HWE_MEMBISTFAILED;
...@@ -553,7 +553,7 @@ static void ipath_ht_handle_hwerrors(struct ipath_devdata *dd, char *msg, ...@@ -553,7 +553,7 @@ static void ipath_ht_handle_hwerrors(struct ipath_devdata *dd, char *msg,
if (hwerrs & _IPATH_PLL_FAIL) { if (hwerrs & _IPATH_PLL_FAIL) {
snprintf(bitsmsg, sizeof bitsmsg, snprintf(bitsmsg, sizeof bitsmsg,
"[PLL failed (%llx), HT-400 unusable]", "[PLL failed (%llx), InfiniPath hardware unusable]",
(unsigned long long) (hwerrs & _IPATH_PLL_FAIL)); (unsigned long long) (hwerrs & _IPATH_PLL_FAIL));
strlcat(msg, bitsmsg, msgl); strlcat(msg, bitsmsg, msgl);
/* ignore from now on, so disable until driver reloaded */ /* ignore from now on, so disable until driver reloaded */
...@@ -610,18 +610,18 @@ static int ipath_ht_boardname(struct ipath_devdata *dd, char *name, ...@@ -610,18 +610,18 @@ static int ipath_ht_boardname(struct ipath_devdata *dd, char *name,
break; break;
case 5: case 5:
/* /*
* HT-460 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.
*/ */
n = "InfiniPath_HT-460"; n = "InfiniPath_QHT7040";
break; break;
case 6: case 6:
n = "OEM_Board_3"; n = "OEM_Board_3";
break; break;
case 7: case 7:
/* HT-460 small form factor production board */ /* small form factor production board */
n = "InfiniPath_HT-465"; n = "InfiniPath_QHT7140";
break; break;
case 8: case 8:
n = "LS/X-1"; n = "LS/X-1";
...@@ -633,7 +633,7 @@ static int ipath_ht_boardname(struct ipath_devdata *dd, char *name, ...@@ -633,7 +633,7 @@ static int ipath_ht_boardname(struct ipath_devdata *dd, char *name,
n = "OEM_Board_2"; n = "OEM_Board_2";
break; break;
case 11: case 11:
n = "InfiniPath_HT-470"; n = "InfiniPath_HT-470"; /* obsoleted */
break; break;
case 12: case 12:
n = "OEM_Board_4"; n = "OEM_Board_4";
...@@ -641,7 +641,7 @@ static int ipath_ht_boardname(struct ipath_devdata *dd, char *name, ...@@ -641,7 +641,7 @@ static int ipath_ht_boardname(struct ipath_devdata *dd, char *name,
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_HT-4xx_%u", snprintf(name, namelen, "Unknown_InfiniPath_QHT7xxx_%u",
boardrev); boardrev);
break; break;
} }
...@@ -650,11 +650,10 @@ static int ipath_ht_boardname(struct ipath_devdata *dd, char *name, ...@@ -650,11 +650,10 @@ static int ipath_ht_boardname(struct ipath_devdata *dd, char *name,
if (dd->ipath_majrev != 3 || (dd->ipath_minrev < 2 || dd->ipath_minrev > 3)) { if (dd->ipath_majrev != 3 || (dd->ipath_minrev < 2 || dd->ipath_minrev > 3)) {
/* /*
* This version of the driver only supports the HT-400 * This version of the driver only supports Rev 3.2 and 3.3
* Rev 3.2
*/ */
ipath_dev_err(dd, ipath_dev_err(dd,
"Unsupported HT-400 revision %u.%u!\n", "Unsupported InfiniPath hardware revision %u.%u!\n",
dd->ipath_majrev, dd->ipath_minrev); dd->ipath_majrev, dd->ipath_minrev);
ret = 1; ret = 1;
goto bail; goto bail;
...@@ -738,7 +737,7 @@ static void ipath_check_htlink(struct ipath_devdata *dd) ...@@ -738,7 +737,7 @@ static void ipath_check_htlink(struct ipath_devdata *dd)
static int ipath_setup_ht_reset(struct ipath_devdata *dd) static int ipath_setup_ht_reset(struct ipath_devdata *dd)
{ {
ipath_dbg("No reset possible for HT-400\n"); ipath_dbg("No reset possible for this InfiniPath hardware\n");
return 0; return 0;
} }
...@@ -925,7 +924,7 @@ static int set_int_handler(struct ipath_devdata *dd, struct pci_dev *pdev, ...@@ -925,7 +924,7 @@ static int set_int_handler(struct ipath_devdata *dd, struct pci_dev *pdev,
/* /*
* kernels with CONFIG_PCI_MSI set the vector in the irq field of * kernels with CONFIG_PCI_MSI set the vector in the irq field of
* struct pci_device, so we use that to program the HT-400 internal * struct pci_device, so we use that to program the internal
* interrupt register (not config space) with that value. The BIOS * interrupt register (not config space) with that value. The BIOS
* must still have done the basic MSI setup. * must still have done the basic MSI setup.
*/ */
...@@ -1013,7 +1012,7 @@ bail: ...@@ -1013,7 +1012,7 @@ bail:
* @dd: the infinipath device * @dd: the infinipath device
* *
* Called during driver unload. * Called during driver unload.
* This is currently a nop for the HT-400, not for all chips * This is currently a nop for the HT chip, not for all chips
*/ */
static void ipath_setup_ht_cleanup(struct ipath_devdata *dd) static void ipath_setup_ht_cleanup(struct ipath_devdata *dd)
{ {
...@@ -1470,7 +1469,7 @@ static int ipath_ht_early_init(struct ipath_devdata *dd) ...@@ -1470,7 +1469,7 @@ static int ipath_ht_early_init(struct ipath_devdata *dd)
dd->ipath_rcvhdrsize = IPATH_DFLT_RCVHDRSIZE; dd->ipath_rcvhdrsize = IPATH_DFLT_RCVHDRSIZE;
/* /*
* For HT-400, we allocate a somewhat overly large eager buffer, * For HT, we allocate a somewhat overly large eager buffer,
* such that we can guarantee that we can receive the largest * such that we can guarantee that we can receive the largest
* packet that we can send out. To truly support a 4KB MTU, * packet that we can send out. To truly support a 4KB MTU,
* we need to bump this to a large value. To date, other than * we need to bump this to a large value. To date, other than
...@@ -1531,7 +1530,7 @@ static int ipath_ht_early_init(struct ipath_devdata *dd) ...@@ -1531,7 +1530,7 @@ static int ipath_ht_early_init(struct ipath_devdata *dd)
if(dd->ipath_boardrev == 5 && dd->ipath_serial[0] == '1' && if(dd->ipath_boardrev == 5 && dd->ipath_serial[0] == '1' &&
dd->ipath_serial[1] == '2' && dd->ipath_serial[2] == '8') { dd->ipath_serial[1] == '2' && dd->ipath_serial[2] == '8') {
/* /*
* Later production HT-460 has same changes as HT-465, so * Later production QHT7040 has same changes as QHT7140, so
* 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.
*/ */
...@@ -1560,13 +1559,13 @@ static int ipath_ht_get_base_info(struct ipath_portdata *pd, void *kbase) ...@@ -1560,13 +1559,13 @@ static int ipath_ht_get_base_info(struct ipath_portdata *pd, void *kbase)
} }
/** /**
* ipath_init_ht400_funcs - set up the chip-specific function pointers * ipath_init_iba6110_funcs - set up the chip-specific function pointers
* @dd: the infinipath device * @dd: the infinipath device
* *
* This is global, and is called directly at init to set up the * This is global, and is called directly at init to set up the
* chip-specific function pointers for later use. * chip-specific function pointers for later use.
*/ */
void ipath_init_ht400_funcs(struct ipath_devdata *dd) void ipath_init_iba6110_funcs(struct ipath_devdata *dd)
{ {
dd->ipath_f_intrsetup = ipath_ht_intconfig; dd->ipath_f_intrsetup = ipath_ht_intconfig;
dd->ipath_f_bus = ipath_setup_ht_config; dd->ipath_f_bus = ipath_setup_ht_config;
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
*/ */
/* /*
* This file contains all of the code that is specific to the * This file contains all of the code that is specific to the
* InfiniPath PE-800 chip. * InfiniPath PCIe chip.
*/ */
#include <linux/interrupt.h> #include <linux/interrupt.h>
...@@ -45,9 +45,9 @@ ...@@ -45,9 +45,9 @@
/* /*
* This file contains all the chip-specific register information and * This file contains all the chip-specific register information and
* access functions for the QLogic InfiniPath PE800, the PCI-Express chip. * access functions for the QLogic InfiniPath PCI-Express chip.
* *
* This lists the InfiniPath PE800 registers, in the actual chip layout. * This lists the InfiniPath registers, in the actual chip layout.
* This structure should never be directly accessed. * This structure should never be directly accessed.
*/ */
struct _infinipath_do_not_use_kernel_regs { struct _infinipath_do_not_use_kernel_regs {
...@@ -213,7 +213,6 @@ static const struct ipath_kregs ipath_pe_kregs = { ...@@ -213,7 +213,6 @@ static const struct ipath_kregs ipath_pe_kregs = {
.kr_rcvhdraddr = IPATH_KREG_OFFSET(RcvHdrAddr0), .kr_rcvhdraddr = IPATH_KREG_OFFSET(RcvHdrAddr0),
.kr_rcvhdrtailaddr = IPATH_KREG_OFFSET(RcvHdrTailAddr0), .kr_rcvhdrtailaddr = IPATH_KREG_OFFSET(RcvHdrTailAddr0),
/* This group is pe-800-specific; and used only in this file */
/* The rcvpktled register controls one of the debug port signals, so /* The rcvpktled register controls one of the debug port signals, so
* a packet activity LED can be connected to it. */ * a packet activity LED can be connected to it. */
.kr_rcvpktledcnt = IPATH_KREG_OFFSET(RcvPktLEDCnt), .kr_rcvpktledcnt = IPATH_KREG_OFFSET(RcvPktLEDCnt),
...@@ -388,7 +387,7 @@ static void ipath_pe_handle_hwerrors(struct ipath_devdata *dd, char *msg, ...@@ -388,7 +387,7 @@ static void ipath_pe_handle_hwerrors(struct ipath_devdata *dd, char *msg,
*msg = '\0'; *msg = '\0';
if (hwerrs & INFINIPATH_HWE_MEMBISTFAILED) { if (hwerrs & INFINIPATH_HWE_MEMBISTFAILED) {
strlcat(msg, "[Memory BIST test failed, PE-800 unusable]", strlcat(msg, "[Memory BIST test failed, InfiniPath hardware unusable]",
msgl); msgl);
/* ignore from now on, so disable until driver reloaded */ /* ignore from now on, so disable until driver reloaded */
*dd->ipath_statusp |= IPATH_STATUS_HWERROR; *dd->ipath_statusp |= IPATH_STATUS_HWERROR;
...@@ -433,7 +432,7 @@ static void ipath_pe_handle_hwerrors(struct ipath_devdata *dd, char *msg, ...@@ -433,7 +432,7 @@ static void ipath_pe_handle_hwerrors(struct ipath_devdata *dd, char *msg,
if (hwerrs & _IPATH_PLL_FAIL) { if (hwerrs & _IPATH_PLL_FAIL) {
snprintf(bitsmsg, sizeof bitsmsg, snprintf(bitsmsg, sizeof bitsmsg,
"[PLL failed (%llx), PE-800 unusable]", "[PLL failed (%llx), InfiniPath hardware unusable]",
(unsigned long long) hwerrs & _IPATH_PLL_FAIL); (unsigned long long) hwerrs & _IPATH_PLL_FAIL);
strlcat(msg, bitsmsg, msgl); strlcat(msg, bitsmsg, msgl);
/* ignore from now on, so disable until driver reloaded */ /* ignore from now on, so disable until driver reloaded */
...@@ -511,22 +510,25 @@ static int ipath_pe_boardname(struct ipath_devdata *dd, char *name, ...@@ -511,22 +510,25 @@ static int ipath_pe_boardname(struct ipath_devdata *dd, char *name,
n = "InfiniPath_Emulation"; n = "InfiniPath_Emulation";
break; break;
case 1: case 1:
n = "InfiniPath_PE-800-Bringup"; n = "InfiniPath_QLE7140-Bringup";
break; break;
case 2: case 2:
n = "InfiniPath_PE-880"; n = "InfiniPath_QLE7140";
break; break;
case 3: case 3:
n = "InfiniPath_PE-850"; n = "InfiniPath_QMI7140";
break; break;
case 4: case 4:
n = "InfiniPath_PE-860"; n = "InfiniPath_QEM7140";
break;
case 5:
n = "InfiniPath_QMH7140";
break; break;
default: default:
ipath_dev_err(dd, ipath_dev_err(dd,
"Don't yet know about board with ID %u\n", "Don't yet know about board with ID %u\n",
boardrev); boardrev);
snprintf(name, namelen, "Unknown_InfiniPath_PE-8xx_%u", snprintf(name, namelen, "Unknown_InfiniPath_PCIe_%u",
boardrev); boardrev);
break; break;
} }
...@@ -534,7 +536,7 @@ static int ipath_pe_boardname(struct ipath_devdata *dd, char *name, ...@@ -534,7 +536,7 @@ static int ipath_pe_boardname(struct ipath_devdata *dd, char *name,
snprintf(name, namelen, "%s", n); snprintf(name, namelen, "%s", n);
if (dd->ipath_majrev != 4 || !dd->ipath_minrev || dd->ipath_minrev>2) { if (dd->ipath_majrev != 4 || !dd->ipath_minrev || dd->ipath_minrev>2) {
ipath_dev_err(dd, "Unsupported PE-800 revision %u.%u!\n", ipath_dev_err(dd, "Unsupported InfiniPath hardware revision %u.%u!\n",
dd->ipath_majrev, dd->ipath_minrev); dd->ipath_majrev, dd->ipath_minrev);
ret = 1; ret = 1;
} else } else
...@@ -705,7 +707,7 @@ static void ipath_pe_quiet_serdes(struct ipath_devdata *dd) ...@@ -705,7 +707,7 @@ static void ipath_pe_quiet_serdes(struct ipath_devdata *dd)
ipath_write_kreg(dd, dd->ipath_kregs->kr_serdesconfig0, val); ipath_write_kreg(dd, dd->ipath_kregs->kr_serdesconfig0, val);
} }
/* this is not yet needed on the PE800, so just return 0. */ /* this is not yet needed on this chip, so just return 0. */
static int ipath_pe_intconfig(struct ipath_devdata *dd) static int ipath_pe_intconfig(struct ipath_devdata *dd)
{ {
return 0; return 0;
...@@ -759,8 +761,8 @@ static void ipath_setup_pe_setextled(struct ipath_devdata *dd, u64 lst, ...@@ -759,8 +761,8 @@ static void ipath_setup_pe_setextled(struct ipath_devdata *dd, u64 lst,
* *
* This is called during driver unload. * This is called during driver unload.
* We do the pci_disable_msi here, not in generic code, because it * We do the pci_disable_msi here, not in generic code, because it
* isn't used for the HT-400. If we do end up needing pci_enable_msi * isn't used for the HT chips. If we do end up needing pci_enable_msi
* at some point in the future for HT-400, we'll move the call back * at some point in the future for HT, we'll move the call back
* into the main init_one code. * into the main init_one code.
*/ */
static void ipath_setup_pe_cleanup(struct ipath_devdata *dd) static void ipath_setup_pe_cleanup(struct ipath_devdata *dd)
...@@ -780,10 +782,10 @@ static void ipath_setup_pe_cleanup(struct ipath_devdata *dd) ...@@ -780,10 +782,10 @@ static void ipath_setup_pe_cleanup(struct ipath_devdata *dd)
* late in 2.6.16). * late in 2.6.16).
* All that can be done is to edit the kernel source to remove the quirk * All that can be done is to edit the kernel source to remove the quirk
* check until that is fixed. * check until that is fixed.
* We do not need to call enable_msi() for our HyperTransport chip (HT-400), * We do not need to call enable_msi() for our HyperTransport chip,
* even those it uses MSI, and we want to avoid the quirk warning, so * even though it uses MSI, and we want to avoid the quirk warning, so
* So we call enable_msi only for the PE-800. If we do end up needing * So we call enable_msi only for PCIe. If we do end up needing
* pci_enable_msi at some point in the future for HT-400, we'll move the * pci_enable_msi at some point in the future for HT, we'll move the
* call back into the main init_one code. * call back into the main init_one code.
* We save the msi lo and hi values, so we can restore them after * We save the msi lo and hi values, so we can restore them after
* chip reset (the kernel PCI infrastructure doesn't yet handle that * chip reset (the kernel PCI infrastructure doesn't yet handle that
...@@ -971,8 +973,7 @@ static int ipath_setup_pe_reset(struct ipath_devdata *dd) ...@@ -971,8 +973,7 @@ static int ipath_setup_pe_reset(struct ipath_devdata *dd)
int ret; int ret;
/* Use ERROR so it shows up in logs, etc. */ /* Use ERROR so it shows up in logs, etc. */
ipath_dev_err(dd, "Resetting PE-800 unit %u\n", ipath_dev_err(dd, "Resetting InfiniPath unit %u\n", dd->ipath_unit);
dd->ipath_unit);
/* keep chip from being accessed in a few places */ /* keep chip from being accessed in a few places */
dd->ipath_flags &= ~(IPATH_INITTED|IPATH_PRESENT); dd->ipath_flags &= ~(IPATH_INITTED|IPATH_PRESENT);
val = dd->ipath_control | INFINIPATH_C_RESET; val = dd->ipath_control | INFINIPATH_C_RESET;
...@@ -1078,7 +1079,7 @@ static void ipath_pe_put_tid(struct ipath_devdata *dd, u64 __iomem *tidptr, ...@@ -1078,7 +1079,7 @@ static void ipath_pe_put_tid(struct ipath_devdata *dd, u64 __iomem *tidptr,
* @port: the port * @port: the port
* *
* clear all TID entries for a port, expected and eager. * clear all TID entries for a port, expected and eager.
* Used from ipath_close(). On PE800, TIDs are only 32 bits, * Used from ipath_close(). On this chip, TIDs are only 32 bits,
* not 64, but they are still on 64 bit boundaries, so tidbase * not 64, but they are still on 64 bit boundaries, so tidbase
* is declared as u64 * for the pointer math, even though we write 32 bits * is declared as u64 * for the pointer math, even though we write 32 bits
*/ */
...@@ -1148,9 +1149,9 @@ static int ipath_pe_early_init(struct ipath_devdata *dd) ...@@ -1148,9 +1149,9 @@ static int ipath_pe_early_init(struct ipath_devdata *dd)
dd->ipath_flags |= IPATH_4BYTE_TID; dd->ipath_flags |= IPATH_4BYTE_TID;
/* /*
* For openib, we need to be able to handle an IB header of 96 bytes * For openfabrics, we need to be able to handle an IB header of
* or 24 dwords. HT-400 has arbitrary sized receive buffers, so we * 24 dwords. HT chip has arbitrary sized receive buffers, so we
* made them the same size as the PIO buffers. The PE-800 does not * made them the same size as the PIO buffers. This chip does not
* handle arbitrary size buffers, so we need the header large enough * handle arbitrary size buffers, so we need the header large enough
* to handle largest IB header, but still have room for a 2KB MTU * to handle largest IB header, but still have room for a 2KB MTU
* standard IB packet. * standard IB packet.
...@@ -1158,11 +1159,10 @@ static int ipath_pe_early_init(struct ipath_devdata *dd) ...@@ -1158,11 +1159,10 @@ static int ipath_pe_early_init(struct ipath_devdata *dd)
dd->ipath_rcvhdrentsize = 24; dd->ipath_rcvhdrentsize = 24;
dd->ipath_rcvhdrsize = IPATH_DFLT_RCVHDRSIZE; dd->ipath_rcvhdrsize = IPATH_DFLT_RCVHDRSIZE;
/* For HT-400, we allocate a somewhat overly large eager buffer, /*
* such that we can guarantee that we can receive the largest packet * To truly support a 4KB MTU (for usermode), we need to
* that we can send out. To truly support a 4KB MTU, we need to * bump this to a larger value. For now, we use them for
* bump this to a larger value. We'll do this when I get around to * the kernel only.
* testing 4KB sends on the PE-800, which I have not yet done.
*/ */
dd->ipath_rcvegrbufsize = 2048; dd->ipath_rcvegrbufsize = 2048;
/* /*
...@@ -1175,9 +1175,9 @@ static int ipath_pe_early_init(struct ipath_devdata *dd) ...@@ -1175,9 +1175,9 @@ static int ipath_pe_early_init(struct ipath_devdata *dd)
dd->ipath_init_ibmaxlen = dd->ipath_ibmaxlen; dd->ipath_init_ibmaxlen = dd->ipath_ibmaxlen;
/* /*
* For PE-800, we can request a receive interrupt for 1 or * We can request a receive interrupt for 1 or
* more packets from current offset. For now, we set this * more packets from current offset. For now, we set this
* up for a single packet, to match the HT-400 behavior. * up for a single packet.
*/ */
dd->ipath_rhdrhead_intr_off = 1ULL<<32; dd->ipath_rhdrhead_intr_off = 1ULL<<32;
...@@ -1216,13 +1216,13 @@ static int ipath_pe_get_base_info(struct ipath_portdata *pd, void *kbase) ...@@ -1216,13 +1216,13 @@ static int ipath_pe_get_base_info(struct ipath_portdata *pd, void *kbase)
} }
/** /**
* ipath_init_pe800_funcs - set up the chip-specific function pointers * ipath_init_iba6120_funcs - set up the chip-specific function pointers
* @dd: the infinipath device * @dd: the infinipath device
* *
* This is global, and is called directly at init to set up the * This is global, and is called directly at init to set up the
* chip-specific function pointers for later use. * chip-specific function pointers for later use.
*/ */
void ipath_init_pe800_funcs(struct ipath_devdata *dd) void ipath_init_iba6120_funcs(struct ipath_devdata *dd)
{ {
dd->ipath_f_intrsetup = ipath_pe_intconfig; dd->ipath_f_intrsetup = ipath_pe_intconfig;
dd->ipath_f_bus = ipath_setup_pe_config; dd->ipath_f_bus = ipath_setup_pe_config;
......
...@@ -236,7 +236,7 @@ struct ipath_devdata { ...@@ -236,7 +236,7 @@ struct ipath_devdata {
u64 ipath_tidtemplate; u64 ipath_tidtemplate;
/* value to write to free TIDs */ /* value to write to free TIDs */
u64 ipath_tidinvalid; u64 ipath_tidinvalid;
/* PE-800 rcv interrupt setup */ /* IBA6120 rcv interrupt setup */
u64 ipath_rhdrhead_intr_off; u64 ipath_rhdrhead_intr_off;
/* size of memory at ipath_kregbase */ /* size of memory at ipath_kregbase */
...@@ -621,10 +621,8 @@ void ipath_free_data(struct ipath_portdata *dd); ...@@ -621,10 +621,8 @@ void ipath_free_data(struct ipath_portdata *dd);
int ipath_waitfor_mdio_cmdready(struct ipath_devdata *); int ipath_waitfor_mdio_cmdready(struct ipath_devdata *);
int ipath_waitfor_complete(struct ipath_devdata *, ipath_kreg, u64, u64 *); int ipath_waitfor_complete(struct ipath_devdata *, ipath_kreg, u64, u64 *);
u32 __iomem *ipath_getpiobuf(struct ipath_devdata *, u32 *); u32 __iomem *ipath_getpiobuf(struct ipath_devdata *, u32 *);
/* init PE-800-specific func */ void ipath_init_iba6120_funcs(struct ipath_devdata *);
void ipath_init_pe800_funcs(struct ipath_devdata *); void ipath_init_iba6110_funcs(struct ipath_devdata *);
/* init HT-400-specific func */
void ipath_init_ht400_funcs(struct ipath_devdata *);
void ipath_get_eeprom_info(struct ipath_devdata *); void ipath_get_eeprom_info(struct ipath_devdata *);
u64 ipath_snap_cntr(struct ipath_devdata *, ipath_creg); u64 ipath_snap_cntr(struct ipath_devdata *, ipath_creg);
......
...@@ -36,8 +36,7 @@ ...@@ -36,8 +36,7 @@
/* /*
* This file should only be included by kernel source, and by the diags. It * This file should only be included by kernel source, and by the diags. It
* defines the registers, and their contents, for the InfiniPath HT-400 * defines the registers, and their contents, for InfiniPath chips.
* chip.
*/ */
/* /*
...@@ -286,7 +285,7 @@ ...@@ -286,7 +285,7 @@
#define INFINIPATH_RT_ADDR_MASK 0xFFFFFFFFFFULL /* 40 bits valid */ #define INFINIPATH_RT_ADDR_MASK 0xFFFFFFFFFFULL /* 40 bits valid */
/* TID entries (memory), HT400-only */ /* TID entries (memory), HT-only */
#define INFINIPATH_RT_VALID 0x8000000000000000ULL #define INFINIPATH_RT_VALID 0x8000000000000000ULL
#define INFINIPATH_RT_ADDR_SHIFT 0 #define INFINIPATH_RT_ADDR_SHIFT 0
#define INFINIPATH_RT_BUFSIZE_MASK 0x3FFF #define INFINIPATH_RT_BUFSIZE_MASK 0x3FFF
......
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