From 1d3385864417282c378958d7c6c5ff2ebf595864 Mon Sep 17 00:00:00 2001 From: Stanislaw Gruszka Date: Tue, 12 Feb 2008 10:46:32 +0000 Subject: [PATCH] Synchronize with Feral CVS repository: Set PCI-X and PCI-E readahead to what QLogic manuals recommend. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@276 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla_isp/linux/isp_pci.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/qla_isp/linux/isp_pci.c b/qla_isp/linux/isp_pci.c index ffd8d0027..8b39ec49a 100644 --- a/qla_isp/linux/isp_pci.c +++ b/qla_isp/linux/isp_pci.c @@ -1,4 +1,4 @@ -/* $Id: isp_pci.c,v 1.150 2007/12/26 22:37:25 mjacob Exp $ */ +/* $Id: isp_pci.c,v 1.151 2008/01/11 22:41:51 mjacob Exp $ */ /* * Copyright (c) 1997-2007 by Matthew Jacob * All rights reserved. @@ -597,12 +597,14 @@ isplinux_pci_init_one(struct Scsi_Host *host) /* PCI Rev 2.3 changes */ if (pdev->device == PCI_DEVICE_ID_QLOGIC_ISP6312 || pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2322) { + /* enable PCI-INTX */ pci_intx(pdev, 1); } if (pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2422 || pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2432) { int reg; + /* enable PCI-INTX */ pci_intx(pdev, 1); /* @@ -611,12 +613,9 @@ isplinux_pci_init_one(struct Scsi_Host *host) reg = pci_find_capability(pdev, PCI_CAP_ID_PCIX); if (reg) { uint16_t pxcmd; - - reg += 0x2; - pci_read_config_word(pdev, reg, &pxcmd); - pxcmd &= ~PCI_X_CMD_MAX_READ; - pxcmd |= 0x8; - pci_write_config_word(pdev, reg, pxcmd); + pci_read_config_word(pdev, reg + PCI_X_CMD, &pxcmd); + pxcmd |= PCI_X_CMD_MAX_READ; /* 4K READ BURST */ + pci_write_config_word(pdev, reg + PCI_X_CMD, pxcmd); } /* @@ -627,10 +626,10 @@ isplinux_pci_init_one(struct Scsi_Host *host) uint16_t pectl; reg += 0x8; - pci_read_config_word(pdev, reg, &pectl); - pectl &= ~0x7000; - pectl |= 0x4000; - pci_write_config_word(pdev, reg, pectl); + pci_read_config_word(pdev, reg + PCI_EXP_DEVCTL, &pectl); + pectl &= ~PCI_EXP_DEVCTL_READRQ; + pectl |= (5 << 12); /* 4K READ BURST */ + pci_write_config_word(pdev, reg + PCI_EXP_DEVCTL, pectl); } }