lkml.org 
[lkml]   [1999]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: PATCH: was Re: 2.3.13 pci_namedevice compile error
Date
From
> With this patch applied I could compile the kernel, but the result 
> fails to initialize my 53c810 adapter.
>
> With 2.3.13 + Alans patch I get:
>
> ncr53c8xx: at PCI bus 0, device 18, function 0
> ncr53c8xx: disabling I/O mapping since base address 0 (0xe1000000)
> bits 0..1 indicate a non-IO mapping
> ncr53c8xx: not initializing, both I/O and memory mappings disabled

Try adding this patch on top of the other one (I dont have an NCR controller
to try this so you can try it 8))

--- drivers/scsi/ncr53c8xx.c~ Fri Aug 6 01:23:13 1999
+++ drivers/scsi/ncr53c8xx.c Thu Aug 12 20:26:01 1999
@@ -9576,10 +9576,12 @@
*/

static int __init
-pci_get_base_address(struct pci_dev *pdev, int index, u_long *base)
+pci_get_base_address(struct pci_dev *pdev, int index, u_long *base, u_long *flags)
{
- *base = pdev->resource[++index].start;
- return index;
+ *base = pdev->resource[index].start;
+ if(flags)
+ *flags = pdev->resource[index].flags;
+ return ++index;
}

/*
@@ -9601,7 +9603,7 @@
#else
uchar irq;
#endif
- ulong base, base_2, io_port;
+ ulong base, base_2, io_port, io_flag, base_flag;
int i;
#ifdef SCSI_NCR_NVRAM_SUPPORT
ncr_nvram *nvram = device->nvram;
@@ -9619,9 +9621,9 @@
device_id = pdev->device;
irq = pdev->irq;
i = 0;
- i = pci_get_base_address(pdev, i, &io_port);
- i = pci_get_base_address(pdev, i, &base);
- (void) pci_get_base_address(pdev, i, &base_2);
+ i = pci_get_base_address(pdev, i, &io_port, &io_flag);
+ i = pci_get_base_address(pdev, i, &base, &base_flag);
+ (void) pci_get_base_address(pdev, i, &base_2, NULL);
#else
pcibios_read_config_word(bus, device_fn, PCI_VENDOR_ID, &vendor_id);
pcibios_read_config_word(bus, device_fn, PCI_DEVICE_ID, &device_id);
@@ -9809,19 +9811,17 @@
* Check availability of IO space, memory space and master capability.
*/
if (command & PCI_COMMAND_IO) {
- if ((io_port & 3) != 1) {
+ if ((io_flag & 3) != 1) {
printk("ncr53c8xx: disabling I/O mapping since base address 0 (0x%x)\n"
" bits 0..1 indicate a non-IO mapping\n", (int) io_port);
io_port = 0;
}
- else
- io_port &= PCI_BASE_ADDRESS_IO_MASK;
}
else
io_port = 0;

if (command & PCI_COMMAND_MEMORY) {
- if ((base & PCI_BASE_ADDRESS_SPACE) != PCI_BASE_ADDRESS_SPACE_MEMORY) {
+ if ((base_flag & PCI_BASE_ADDRESS_SPACE) != PCI_BASE_ADDRESS_SPACE_MEMORY) {
printk("ncr53c8xx: disabling memory mapping since base address 1\n"
" contains a non-memory mapping\n");
base = 0;
@@ -9836,8 +9836,6 @@
printk("ncr53c8xx: not initializing, both I/O and memory mappings disabled\n");
return -1;
}
-
- base_2 &= PCI_BASE_ADDRESS_MEM_MASK;

if (io_port && check_region (io_port, 128)) {
#ifdef __sparc__
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.587 / U:1.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site