From: Jeff Garzik <jeff@garzik.org>
To: Andrew Morton <akpm@linux-foundation.org>, linux-scsi@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/5] SCSI/initio PCI DMA fix
Date: Sun, 27 May 2007 10:53:57 -0400 [thread overview]
Message-ID: <20070527145357.GA17085@havoc.gtf.org> (raw)
In-Reply-To: <20070527145200.GA17017@havoc.gtf.org>
The 'pci_dev' member of HCS is referenced during PCI DMA, but never
actually assigned a value. Let's give it a useful value.
Has this driver been broken since PCI DMA support was added in Oct 2003?
Signed-off-by: Jeff Garzik <jeff@garzik.org>
a5eec1873b5934de70c589ad0f4596f78c4d0dd3
diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c
index 7e7635c..8951494 100644
--- a/drivers/scsi/initio.c
+++ b/drivers/scsi/initio.c
@@ -583,7 +583,8 @@ void tul_read_eeprom(WORD CurBase)
} /* read_eeprom */
static int Addi91u_into_Adapter_table(WORD wBIOS, WORD wBASE, BYTE bInterrupt,
- BYTE bBus, BYTE bDevice)
+ BYTE bBus, BYTE bDevice,
+ struct pci_dev *pci_dev)
{
int i, j;
@@ -609,6 +610,7 @@ static int Addi91u_into_Adapter_table(WORD wBIOS, WORD wBASE, BYTE bInterrupt,
i91u_adpt[i].ADPT_BIOS = wBIOS;
i91u_adpt[i].ADPT_Bus = bBus;
i91u_adpt[i].ADPT_Device = bDevice;
+ i91u_adpt[i].pci_dev = pci_dev;
return 0;
}
return 1;
@@ -642,6 +644,7 @@ static void tul_stop_bm(HCS * pCurHcb)
/***************************************************************************/
static void get_tulipPCIConfig(HCS * pCurHcb, int ch_idx)
{
+ pCurHcb->pci_dev = i91u_adpt[ch_idx].pci_dev;
pCurHcb->HCS_Base = i91u_adpt[ch_idx].ADPT_BASE; /* Supply base address */
pCurHcb->HCS_BIOS = i91u_adpt[ch_idx].ADPT_BIOS; /* Supply BIOS address */
pCurHcb->HCS_Intr = i91u_adpt[ch_idx].ADPT_INTR; /* Supply interrupt line */
@@ -2789,7 +2792,8 @@ static int tul_NewReturnNumberOfAdapters(void)
(pDev->resource[0].start),
pDev->irq,
pDev->bus->number,
- (pDev->devfn >> 3)
+ (pDev->devfn >> 3),
+ pDev
) == 0)
iAdapters++;
}
diff --git a/drivers/scsi/initio.h b/drivers/scsi/initio.h
index acb67a4..dcd42e2 100644
--- a/drivers/scsi/initio.h
+++ b/drivers/scsi/initio.h
@@ -529,6 +529,7 @@ typedef struct I91u_Adpt_Struc {
UBYTE ADPT_Bus; /* 2 */
UBYTE ADPT_Device; /* 3 */
UBYTE ADPT_INTR; /* 4 */
+ struct pci_dev *pci_dev;
} INI_ADPT_STRUCT;
next prev parent reply other threads:[~2007-05-27 14:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-27 14:52 [PATCH 0/5] SCSI/initio fixes, cleanups, PCI API support Jeff Garzik
2007-05-27 14:53 ` Jeff Garzik [this message]
2007-05-27 14:55 ` [PATCH 2/5] SCSI/initio pci_dev, pci_dev->irq simplifications Jeff Garzik
2007-05-27 14:57 ` [PATCH 3/5] SCSI/initio minor cleanups Jeff Garzik
2007-05-27 14:58 ` [PATCH 4/5] SCSI/initio PCI dev init factorization Jeff Garzik
2007-05-27 14:59 ` [PATCH 5/5] SCSI/initio conversion to PCI driver API Jeff Garzik
2007-05-27 15:03 ` Jeff Garzik
2007-05-27 15:12 ` James Bottomley
2007-05-27 15:45 ` Jeff Garzik
2007-05-27 15:48 ` Alan Cox
2007-05-27 15:47 ` [PATCH 0/5] SCSI/initio fixes, cleanups, PCI API support Alan Cox
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=20070527145357.GA17085@havoc.gtf.org \
--to=jeff@garzik.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--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