Commit 7053dfab authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] move 53c7,8xx to pci_ not pcibios

parent f8c4e50d
...@@ -1153,7 +1153,6 @@ NCR53c7x0_init (struct Scsi_Host *host) { ...@@ -1153,7 +1153,6 @@ NCR53c7x0_init (struct Scsi_Host *host) {
/* /*
* Function : static int normal_init(Scsi_Host_Template *tpnt, int board, * Function : static int normal_init(Scsi_Host_Template *tpnt, int board,
* int chip, u32 base, int io_port, int irq, int dma, int pcivalid, * int chip, u32 base, int io_port, int irq, int dma, int pcivalid,
* unsigned char pci_bus, unsigned char pci_device_fn,
* struct pci_dev *pci_dev, long long options); * struct pci_dev *pci_dev, long long options);
* *
* Purpose : initializes a NCR53c7,8x0 based on base addresses, * Purpose : initializes a NCR53c7,8x0 based on base addresses,
...@@ -1161,7 +1160,7 @@ NCR53c7x0_init (struct Scsi_Host *host) { ...@@ -1161,7 +1160,7 @@ NCR53c7x0_init (struct Scsi_Host *host) {
* *
* Useful where a new NCR chip is backwards compatible with * Useful where a new NCR chip is backwards compatible with
* a supported chip, but the DEVICE ID has changed so it * a supported chip, but the DEVICE ID has changed so it
* doesn't show up when the autoprobe does a pcibios_find_device. * doesn't show up when the autoprobe does a pci_find_device.
* *
* Inputs : tpnt - Template for this SCSI adapter, board - board level * Inputs : tpnt - Template for this SCSI adapter, board - board level
* product, chip - 810, 820, or 825, bus - PCI bus, device_fn - * product, chip - 810, 820, or 825, bus - PCI bus, device_fn -
...@@ -1174,7 +1173,6 @@ NCR53c7x0_init (struct Scsi_Host *host) { ...@@ -1174,7 +1173,6 @@ NCR53c7x0_init (struct Scsi_Host *host) {
static int __init static int __init
normal_init (Scsi_Host_Template *tpnt, int board, int chip, normal_init (Scsi_Host_Template *tpnt, int board, int chip,
u32 base, int io_port, int irq, int dma, int pci_valid, u32 base, int io_port, int irq, int dma, int pci_valid,
unsigned char pci_bus, unsigned char pci_device_fn,
struct pci_dev *pci_dev, long long options) struct pci_dev *pci_dev, long long options)
{ {
struct Scsi_Host *instance; struct Scsi_Host *instance;
...@@ -1275,8 +1273,7 @@ normal_init (Scsi_Host_Template *tpnt, int board, int chip, ...@@ -1275,8 +1273,7 @@ normal_init (Scsi_Host_Template *tpnt, int board, int chip,
hostdata->board = board; hostdata->board = board;
hostdata->chip = chip; hostdata->chip = chip;
if ((hostdata->pci_valid = pci_valid)) { if ((hostdata->pci_valid = pci_valid)) {
hostdata->pci_bus = pci_bus; hostdata->pci_dev = pci_dev;
hostdata->pci_device_fn = pci_device_fn;
} }
/* /*
...@@ -1377,7 +1374,7 @@ normal_init (Scsi_Host_Template *tpnt, int board, int chip, ...@@ -1377,7 +1374,7 @@ normal_init (Scsi_Host_Template *tpnt, int board, int chip,
* *
* Useful where a new NCR chip is backwards compatible with * Useful where a new NCR chip is backwards compatible with
* a supported chip, but the DEVICE ID has changed so it * a supported chip, but the DEVICE ID has changed so it
* doesn't show up when the autoprobe does a pcibios_find_device. * doesn't show up when the autoprobe does a pci_find_device.
* *
* Inputs : tpnt - Template for this SCSI adapter, board - board level * Inputs : tpnt - Template for this SCSI adapter, board - board level
* product, chip - 810, 820, or 825, bus - PCI bus, device_fn - * product, chip - 810, 820, or 825, bus - PCI bus, device_fn -
...@@ -1511,7 +1508,7 @@ ncr_pci_init (Scsi_Host_Template *tpnt, int board, int chip, ...@@ -1511,7 +1508,7 @@ ncr_pci_init (Scsi_Host_Template *tpnt, int board, int chip,
} }
return normal_init (tpnt, board, chip, (int) base, io_port, return normal_init (tpnt, board, chip, (int) base, io_port,
(int) irq, DMA_NONE, 1, bus, device_fn, pdev, options); (int) irq, DMA_NONE, 1, pdev, options);
} }
...@@ -5085,8 +5082,7 @@ intr_bf (struct Scsi_Host *host, struct NCR53c7x0_cmd *cmd) { ...@@ -5085,8 +5082,7 @@ intr_bf (struct Scsi_Host *host, struct NCR53c7x0_cmd *cmd) {
if ((hostdata->chip / 100) == 8) { if ((hostdata->chip / 100) == 8) {
save_flags (flags); save_flags (flags);
cli(); cli();
tmp = pcibios_read_config_word (hostdata->pci_bus, tmp = pci_read_config_word (hostdata->pcidev, PCI_STATUS, &pci_status);
hostdata->pci_device_fn, PCI_STATUS, &pci_status);
restore_flags (flags); restore_flags (flags);
if (tmp == PCIBIOS_SUCCESSFUL) { if (tmp == PCIBIOS_SUCCESSFUL) {
if (pci_status & PCI_STATUS_REC_TARGET_ABORT) { if (pci_status & PCI_STATUS_REC_TARGET_ABORT) {
......
...@@ -1159,12 +1159,12 @@ struct NCR53c7x0_hostdata { ...@@ -1159,12 +1159,12 @@ struct NCR53c7x0_hostdata {
700-66, rest are last three 700-66, rest are last three
digits of part number */ digits of part number */
/* /*
* PCI bus, device, function, only for NCR53c8x0 chips. * PCI device, only for NCR53c8x0 chips.
* pci_valid indicates that the PCI configuration information * pci_valid indicates that the PCI configuration information
* is valid, and we can twiddle MAX_LAT, etc. as recommended * is valid, and we can twiddle MAX_LAT, etc. as recommended
* for maximum performance in the NCR documentation. * for maximum performance in the NCR documentation.
*/ */
unsigned char pci_bus, pci_device_fn; struct pci_dev *pci_dev;
unsigned pci_valid:1; unsigned pci_valid:1;
u32 *dsp; /* dsp to restart with after u32 *dsp; /* dsp to restart with after
......
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