From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 10849 invoked from network); 17 Mar 2000 05:20:39 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 17 Mar 2000 05:20:39 -0000 Received: from piglet.twiddle.net (piglet.twiddle.net [207.104.6.26]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id AAA19271 for ; Fri, 17 Mar 2000 00:20:38 -0500 Received: (from rth@localhost) by piglet.twiddle.net (8.9.3/8.9.3) id VAA02074; Thu, 16 Mar 2000 21:20:37 -0800 Date: Thu, 16 Mar 2000 21:20:37 -0800 From: Richard Henderson To: axp-list@redhat.com, linux-alpha@vger.rutgers.edu, torvalds@transmeta.com Subject: Re: 2.3.99-pre1 axp misc patch Message-ID: <20000316212037.A2037@twiddle.net> References: <20000316113907.A889@twiddle.net> <20000316152112.A15342@skull.piratehaven.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MGYHOYXEY6WxJCY8" X-Mailer: Mutt 1.0pre3us In-Reply-To: <20000316152112.A15342@skull.piratehaven.org> --MGYHOYXEY6WxJCY8 Content-Type: text/plain; charset=us-ascii On Thu, Mar 16, 2000 at 03:21:12PM -0800, Brian Pomerantz wrote: > I was still unable to compile this. First I was bombing with an error > in include/asm/delay.h where it was trying to dereference a pointer of > unknown type in the cpu_data array. Bother. Here's a fix for it. > Then I came across the NCR driver which bombed. The macro INB_OFF(o) > is trying to reference the member 'base_io' in variable np which is of type > 'struct ncb *' and doesn't have this member in its definition. Yes, I saw this too. I worked around it, but it appears that something else is wrong because it doesn't pass cache tests. I was able to the get old 53c7,8xx driver working though... r~ --MGYHOYXEY6WxJCY8 Content-Type: text/plain; charset=us-ascii Content-Description: d-2399-delay Content-Disposition: attachment; filename=zz diff -rup linux/include/asm-alpha/delay.h 2.3.99-2-2/include/asm-alpha/delay.h --- linux/include/asm-alpha/delay.h Thu Mar 16 19:31:28 2000 +++ 2.3.99-2-2/include/asm-alpha/delay.h Thu Mar 16 19:46:47 2000 @@ -31,21 +31,16 @@ __delay(int loops) } extern __inline__ void -udelay(unsigned long usecs) +__udelay(unsigned long usecs, unsigned long lps) { - unsigned long lps; + usecs *= ((1UL << 32) / 1000000) * lps; + __delay((long)usecs >> 32); +} #ifdef __SMP__ - lps = cpu_data[smp_processor_id()].loops_per_sec; +#define udelay(u) __udelay((u), cpu_data[smp_processor_id()].loops_per_sec) #else - lps = loops_per_sec; +#define udelay(u) __udelay((u), loops_per_sec); #endif - - /* Compute (usecs * 2**32 / 10**6) * loops_per_sec / 2**32. */ - - usecs *= 0x10c6; /* 2^32 / 10^6 */ - usecs *= lps; - __delay((long)usecs >> 32); -} #endif /* defined(__ALPHA_DELAY_H) */ --MGYHOYXEY6WxJCY8 Content-Type: text/plain; charset=us-ascii Content-Description: d-2399-oldncr Content-Disposition: attachment; filename=zzz --- linux/drivers/scsi/53c7,8xx.c Tue Nov 23 10:29:15 1999 +++ 2.3.99-1/drivers/scsi/53c7,8xx.c Thu Mar 16 14:34:14 2000 @@ -1396,7 +1396,7 @@ ncr_pci_init (Scsi_Host_Template *tpnt, int i, irq; struct pci_dev *pdev = pci_find_slot(bus, device_fn); - printk("scsi-ncr53c7,8xx : at PCI bus %d, device %d, function %d\n", + printk("scsi-ncr53c7,8xx : at PCI bus %d, device %d, function %d\n", bus, (int) (device_fn & 0xf8) >> 3, (int) device_fn & 7); @@ -1406,10 +1406,8 @@ ncr_pci_init (Scsi_Host_Template *tpnt, return -1; } - if ((error = pcibios_read_config_word (bus, device_fn, PCI_COMMAND, - &command)) || - (error = pcibios_read_config_byte (bus, device_fn, PCI_CLASS_REVISION, - &revision))) { + if ((error = pci_read_config_word (pdev, PCI_COMMAND, &command)) || + (error = pci_read_config_byte (pdev, PCI_CLASS_REVISION, &revision))) { printk ("scsi-ncr53c7,8xx : error %d not initializing due to error reading configuration space\n" " perhaps you specified an incorrect PCI bus, device, or function.\n", error); return -1; @@ -1451,24 +1449,21 @@ ncr_pci_init (Scsi_Host_Template *tpnt, */ if (command & PCI_COMMAND_IO) { - if ((io_port & 3) != 1) { - printk ("scsi-ncr53c7,8xx : disabling I/O mapping since base address 0 (0x%x)\n" - " bits 0..1 indicate a non-IO mapping\n", - (unsigned) io_port); + if (!(pdev->resource[0].flags & IORESOURCE_IO)) { + printk ("scsi-ncr53c7,8xx : disabling I/O mapping since base " + "address 0\n contains a non-IO mapping\n"); 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) { - printk("scsi-ncr53c7,8xx : disabling memory mapping since base address 1\n" - " contains a non-memory mapping\n"); + if (!(pdev->resource[1].flags & IORESOURCE_MEM)) { + printk("scsi-ncr53c7,8xx : disabling memory mapping since base " + "address 1\n contains a non-memory mapping\n"); base = 0; - } else - base &= PCI_BASE_ADDRESS_MEM_MASK; + } } else { base = 0; } --MGYHOYXEY6WxJCY8--