Commit a9075dec authored by Steve French's avatar Steve French

Merge bk://linux.bkbits.net/linux-2.5

into hostme.bitkeeper.com:/repos/c/cifs/linux-2.5cifs
parents 837f8c82 51af77db
S2IO Technologies XFrame 10 Gig adapter.
-------------------------------------------
I. Module loadable parameters.
When loaded as a module, the driver provides a host of Module loadable
parameters, so the device can be tuned as per the users needs.
A list of the Module params is given below.
(i) ring_num: This can be used to program the number of
receive rings used in the driver.
(ii) ring_len: This defines the number of descriptors each ring
can have. There can be a maximum of 8 rings.
(iii) frame_len: This is an array of size 8. Using this we can
set the maximum size of the received frame that can
be steered into the corrsponding receive ring.
(iv) fifo_num: This defines the number of Tx FIFOs thats used in
the driver.
(v) fifo_len: Each element defines the number of
Tx descriptors that can be associated with each
corresponding FIFO. There are a maximum of 8 FIFOs.
(vi) tx_prio: This is a bool, if module is loaded with a non-zero
value for tx_prio multi FIFO scheme is activated.
(vii) rx_prio: This is a bool, if module is loaded with a non-zero
value for tx_prio multi RING scheme is activated.
(viii) latency_timer: The value given against this param will be
loaded into the latency timer register in PCI Config
space, else the register is left with its reset value.
II. Performance tuning.
By changing a few sysctl parameters.
Copy the following lines into a file and run the following command,
"sysctl -p <file_name>"
### IPV4 specific settings
net.ipv4.tcp_timestamps = 0 # turns TCP timestamp support off, default 1, reduces CPU use
net.ipv4.tcp_sack = 0 # turn SACK support off, default on
# on systems with a VERY fast bus -> memory interface this is the big gainer
net.ipv4.tcp_rmem = 10000000 10000000 10000000 # sets min/default/max TCP read buffer, default 4096 87380 174760
net.ipv4.tcp_wmem = 10000000 10000000 10000000 # sets min/pressure/max TCP write buffer, default 4096 16384 131072
net.ipv4.tcp_mem = 10000000 10000000 10000000 # sets min/pressure/max TCP buffer space, default 31744 32256 32768
### CORE settings (mostly for socket and UDP effect)
net.core.rmem_max = 524287 # maximum receive socket buffer size, default 131071
net.core.wmem_max = 524287 # maximum send socket buffer size, default 131071
net.core.rmem_default = 524287 # default receive socket buffer size, default 65535
net.core.wmem_default = 524287 # default send socket buffer size, default 65535
net.core.optmem_max = 524287 # maximum amount of option memory buffers, default 10240
net.core.netdev_max_backlog = 300000 # number of unprocessed input packets before kernel starts dropping them, default 300
---End of performance tuning file---
...@@ -113,6 +113,12 @@ M: jgarzik@pobox.com ...@@ -113,6 +113,12 @@ M: jgarzik@pobox.com
W: http://sourceforge.net/projects/gkernel/ W: http://sourceforge.net/projects/gkernel/
S: Maintained S: Maintained
8169 10/100/1000 GIGABIT ETHERNET DRIVER
P: Francois Romieu
M: romieu@fr.zoreil.com
L: netdev@oss.sgi.com
S: Maintained
8250/16?50 (AND CLONE UARTS) SERIAL DRIVER 8250/16?50 (AND CLONE UARTS) SERIAL DRIVER
P: Russell King P: Russell King
M: rmk+serial@arm.linux.org.uk M: rmk+serial@arm.linux.org.uk
......
...@@ -290,9 +290,11 @@ config GART_IOMMU ...@@ -290,9 +290,11 @@ config GART_IOMMU
Normally the kernel will take the right choice by itself. Normally the kernel will take the right choice by itself.
If unsure say Y If unsure say Y
# need this always enabled with GART_IOMMU for the VIA workaround
config SWIOTLB config SWIOTLB
select GART_IOMMU bool
bool "Software IOTLB support" depends on GART_IOMMU
default y
config DUMMY_IOMMU config DUMMY_IOMMU
bool bool
......
...@@ -24,8 +24,10 @@ CONFIG_STANDALONE=y ...@@ -24,8 +24,10 @@ CONFIG_STANDALONE=y
# #
CONFIG_SWAP=y CONFIG_SWAP=y
CONFIG_SYSVIPC=y CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
# CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y CONFIG_SYSCTL=y
# CONFIG_AUDIT is not set
CONFIG_LOG_BUF_SHIFT=18 CONFIG_LOG_BUF_SHIFT=18
# CONFIG_HOTPLUG is not set # CONFIG_HOTPLUG is not set
CONFIG_IKCONFIG=y CONFIG_IKCONFIG=y
...@@ -37,6 +39,7 @@ CONFIG_EPOLL=y ...@@ -37,6 +39,7 @@ CONFIG_EPOLL=y
CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
# #
...@@ -83,7 +86,6 @@ CONFIG_X86_MCE=y ...@@ -83,7 +86,6 @@ CONFIG_X86_MCE=y
# #
CONFIG_PM=y CONFIG_PM=y
CONFIG_SOFTWARE_SUSPEND=y CONFIG_SOFTWARE_SUSPEND=y
# CONFIG_PM_DISK is not set
# #
# ACPI (Advanced Configuration and Power Interface) Support # ACPI (Advanced Configuration and Power Interface) Support
...@@ -107,7 +109,6 @@ CONFIG_ACPI_EC=y ...@@ -107,7 +109,6 @@ CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y CONFIG_ACPI_SYSTEM=y
# CONFIG_X86_PM_TIMER is not set
# #
# CPU Frequency scaling # CPU Frequency scaling
...@@ -281,6 +282,8 @@ CONFIG_SCSI_SATA=y ...@@ -281,6 +282,8 @@ CONFIG_SCSI_SATA=y
# CONFIG_SCSI_SATA_SVW is not set # CONFIG_SCSI_SATA_SVW is not set
CONFIG_SCSI_ATA_PIIX=y CONFIG_SCSI_ATA_PIIX=y
# CONFIG_SCSI_SATA_PROMISE is not set # CONFIG_SCSI_SATA_PROMISE is not set
# CONFIG_SCSI_SATA_SIL is not set
# CONFIG_SCSI_SATA_SIS is not set
CONFIG_SCSI_SATA_VIA=y CONFIG_SCSI_SATA_VIA=y
# CONFIG_SCSI_SATA_VITESSE is not set # CONFIG_SCSI_SATA_VITESSE is not set
# CONFIG_SCSI_BUSLOGIC is not set # CONFIG_SCSI_BUSLOGIC is not set
...@@ -350,7 +353,6 @@ CONFIG_IP_MULTICAST=y ...@@ -350,7 +353,6 @@ CONFIG_IP_MULTICAST=y
# CONFIG_NET_IPGRE is not set # CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set # CONFIG_IP_MROUTE is not set
# CONFIG_ARPD is not set # CONFIG_ARPD is not set
# CONFIG_INET_ECN is not set
# CONFIG_SYN_COOKIES is not set # CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set # CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set # CONFIG_INET_ESP is not set
...@@ -368,7 +370,6 @@ CONFIG_IPV6=y ...@@ -368,7 +370,6 @@ CONFIG_IPV6=y
# #
# SCTP Configuration (EXPERIMENTAL) # SCTP Configuration (EXPERIMENTAL)
# #
CONFIG_IPV6_SCTP__=y
# CONFIG_IP_SCTP is not set # CONFIG_IP_SCTP is not set
# CONFIG_ATM is not set # CONFIG_ATM is not set
# CONFIG_VLAN_8021Q is not set # CONFIG_VLAN_8021Q is not set
...@@ -605,7 +606,7 @@ CONFIG_RTC=y ...@@ -605,7 +606,7 @@ CONFIG_RTC=y
# #
CONFIG_AGP=y CONFIG_AGP=y
CONFIG_AGP_AMD64=y CONFIG_AGP_AMD64=y
CONFIG_AGP_INTEL=y # CONFIG_AGP_INTEL_MCH is not set
# CONFIG_DRM is not set # CONFIG_DRM is not set
# CONFIG_MWAVE is not set # CONFIG_MWAVE is not set
CONFIG_RAW_DRIVER=y CONFIG_RAW_DRIVER=y
...@@ -691,6 +692,11 @@ CONFIG_SOUND_ICH=y ...@@ -691,6 +692,11 @@ CONFIG_SOUND_ICH=y
# #
# CONFIG_USB_GADGET is not set # CONFIG_USB_GADGET is not set
#
# Firmware Drivers
#
# CONFIG_EDD is not set
# #
# File systems # File systems
# #
...@@ -736,6 +742,7 @@ CONFIG_ISO9660_FS=y ...@@ -736,6 +742,7 @@ CONFIG_ISO9660_FS=y
# #
CONFIG_PROC_FS=y CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y CONFIG_PROC_KCORE=y
CONFIG_SYSFS=y
# CONFIG_DEVFS_FS is not set # CONFIG_DEVFS_FS is not set
# CONFIG_DEVPTS_FS_XATTR is not set # CONFIG_DEVPTS_FS_XATTR is not set
CONFIG_TMPFS=y CONFIG_TMPFS=y
......
...@@ -250,12 +250,14 @@ void __init check_ioapic(void) ...@@ -250,12 +250,14 @@ void __init check_ioapic(void)
vendor &= 0xffff; vendor &= 0xffff;
switch (vendor) { switch (vendor) {
case PCI_VENDOR_ID_VIA: case PCI_VENDOR_ID_VIA:
#ifdef CONFIG_GART_IOMMU
if (end_pfn >= (0xffffffff>>PAGE_SHIFT) && if (end_pfn >= (0xffffffff>>PAGE_SHIFT) &&
!iommu_aperture_allowed) { !iommu_aperture_allowed) {
printk(KERN_INFO printk(KERN_INFO
"Looks like a VIA chipset. Disabling IOMMU. Overwrite with \"iommu=allowed\"\n"); "Looks like a VIA chipset. Disabling IOMMU. Overwrite with \"iommu=allowed\"\n");
iommu_aperture_disabled = 1; iommu_aperture_disabled = 1;
} }
#endif
/* FALL THROUGH */ /* FALL THROUGH */
case PCI_VENDOR_ID_NVIDIA: case PCI_VENDOR_ID_NVIDIA:
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
......
...@@ -85,7 +85,7 @@ static void print_mce(struct mce *m) ...@@ -85,7 +85,7 @@ static void print_mce(struct mce *m)
if (m->addr) if (m->addr)
printk("ADDR %Lx ", m->addr); printk("ADDR %Lx ", m->addr);
if (m->misc) if (m->misc)
printk("MISC %Lx ", m->addr); printk("MISC %Lx ", m->misc);
printk("\n"); printk("\n");
} }
...@@ -160,7 +160,7 @@ void do_machine_check(struct pt_regs * regs, long error_code) ...@@ -160,7 +160,7 @@ void do_machine_check(struct pt_regs * regs, long error_code)
if (m.status & MCI_STATUS_MISCV) if (m.status & MCI_STATUS_MISCV)
rdmsrl(MSR_IA32_MC0_MISC + i*4, m.misc); rdmsrl(MSR_IA32_MC0_MISC + i*4, m.misc);
if (m.status & MCI_STATUS_ADDRV) if (m.status & MCI_STATUS_ADDRV)
rdmsrl(MSR_IA32_MC0_MISC + i*4, m.addr); rdmsrl(MSR_IA32_MC0_ADDR + i*4, m.addr);
rdtscll(m.tsc); rdtscll(m.tsc);
wrmsrl(MSR_IA32_MC0_STATUS + i*4, 0); wrmsrl(MSR_IA32_MC0_STATUS + i*4, 0);
......
...@@ -607,9 +607,6 @@ int pci_dma_supported(struct pci_dev *dev, u64 mask) ...@@ -607,9 +607,6 @@ int pci_dma_supported(struct pci_dev *dev, u64 mask)
return 0; return 0;
} }
if (no_iommu && (mask < (end_pfn << PAGE_SHIFT)) && !swiotlb)
return 0;
return 1; return 1;
} }
......
...@@ -103,91 +103,115 @@ char command_line[COMMAND_LINE_SIZE]; ...@@ -103,91 +103,115 @@ char command_line[COMMAND_LINE_SIZE];
char saved_command_line[COMMAND_LINE_SIZE]; char saved_command_line[COMMAND_LINE_SIZE];
struct resource standard_io_resources[] = { struct resource standard_io_resources[] = {
{ "dma1", 0x00, 0x1f, IORESOURCE_BUSY }, { "dma1", 0x00, 0x1f, IORESOURCE_BUSY | IORESOURCE_IO },
{ "pic1", 0x20, 0x21, IORESOURCE_BUSY }, { "pic1", 0x20, 0x21, IORESOURCE_BUSY | IORESOURCE_IO },
{ "timer", 0x40, 0x5f, IORESOURCE_BUSY }, { "timer", 0x40, 0x5f, IORESOURCE_BUSY | IORESOURCE_IO },
{ "keyboard", 0x60, 0x6f, IORESOURCE_BUSY }, { "keyboard", 0x60, 0x6f, IORESOURCE_BUSY | IORESOURCE_IO },
{ "dma page reg", 0x80, 0x8f, IORESOURCE_BUSY }, { "dma page reg", 0x80, 0x8f, IORESOURCE_BUSY | IORESOURCE_IO },
{ "pic2", 0xa0, 0xa1, IORESOURCE_BUSY }, { "pic2", 0xa0, 0xa1, IORESOURCE_BUSY | IORESOURCE_IO },
{ "dma2", 0xc0, 0xdf, IORESOURCE_BUSY }, { "dma2", 0xc0, 0xdf, IORESOURCE_BUSY | IORESOURCE_IO },
{ "fpu", 0xf0, 0xff, IORESOURCE_BUSY } { "fpu", 0xf0, 0xff, IORESOURCE_BUSY | IORESOURCE_IO }
}; };
#define STANDARD_IO_RESOURCES (sizeof(standard_io_resources)/sizeof(struct resource)) #define STANDARD_IO_RESOURCES \
(sizeof standard_io_resources / sizeof standard_io_resources[0])
struct resource code_resource = { "Kernel code", 0x100000, 0 }; struct resource code_resource = { "Kernel code", 0x100000, 0, IORESOURCE_MEM };
struct resource data_resource = { "Kernel data", 0, 0 }; struct resource data_resource = { "Kernel data", 0, 0, IORESOURCE_MEM };
struct resource vram_resource = { "Video RAM area", 0xa0000, 0xbffff, IORESOURCE_BUSY }; struct resource vram_resource = { "Video RAM area", 0xa0000, 0xbffff, IORESOURCE_BUSY | IORESOURCE_MEM };
/* System ROM resources */ #define IORESOURCE_ROM (IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM)
#define MAXROMS 6
static struct resource rom_resources[MAXROMS] = { static struct resource system_rom_resource = { "System ROM", 0xf0000, 0xfffff, IORESOURCE_ROM };
{ "System ROM", 0xF0000, 0xFFFFF, IORESOURCE_BUSY }, static struct resource extension_rom_resource = { "Extension ROM", 0xe0000, 0xeffff, IORESOURCE_ROM };
{ "Video ROM", 0xc0000, 0xc7fff, IORESOURCE_BUSY }
static struct resource adapter_rom_resources[] = {
{ "Adapter ROM", 0xc8000, 0, IORESOURCE_ROM },
{ "Adapter ROM", 0, 0, IORESOURCE_ROM },
{ "Adapter ROM", 0, 0, IORESOURCE_ROM },
{ "Adapter ROM", 0, 0, IORESOURCE_ROM },
{ "Adapter ROM", 0, 0, IORESOURCE_ROM },
{ "Adapter ROM", 0, 0, IORESOURCE_ROM }
}; };
#define ADAPTER_ROM_RESOURCES \
(sizeof adapter_rom_resources / sizeof adapter_rom_resources[0])
static struct resource video_rom_resource = { "Video ROM", 0xc0000, 0xc7fff, IORESOURCE_ROM };
#define romsignature(x) (*(unsigned short *)(x) == 0xaa55) #define romsignature(x) (*(unsigned short *)(x) == 0xaa55)
static void __init probe_roms(void) static int __init checksum(unsigned char *rom, unsigned long length)
{ {
int roms = 1; unsigned char *p, sum = 0;
unsigned long base;
unsigned char *romstart;
request_resource(&iomem_resource, rom_resources+0); for (p = rom; p < rom + length; p++)
sum += *p;
return sum == 0;
}
/* Video ROM is standard at C000:0000 - C7FF:0000, check signature */ static void __init probe_roms(void)
for (base = 0xC0000; base < 0xE0000; base += 2048) { {
romstart = isa_bus_to_virt(base); unsigned long start, length, upper;
if (!romsignature(romstart)) unsigned char *rom;
int i;
/* video rom */
upper = adapter_rom_resources[0].start;
for (start = video_rom_resource.start; start < upper; start += 2048) {
rom = isa_bus_to_virt(start);
if (!romsignature(rom))
continue; continue;
request_resource(&iomem_resource, rom_resources + roms);
roms++;
break;
}
/* Extension roms at C800:0000 - DFFF:0000 */ video_rom_resource.start = start;
for (base = 0xC8000; base < 0xE0000; base += 2048) {
unsigned long length;
romstart = isa_bus_to_virt(base); /* 0 < length <= 0x7f * 512, historically */
if (!romsignature(romstart)) length = rom[2] * 512;
continue;
length = romstart[2] * 512; /* if checksum okay, trust length byte */
if (length) { if (length && checksum(rom, length))
unsigned int i; video_rom_resource.end = start + length - 1;
unsigned char chksum;
request_resource(&iomem_resource, &video_rom_resource);
chksum = 0; break;
for (i = 0; i < length; i++)
chksum += romstart[i];
/* Good checksum? */
if (!chksum) {
rom_resources[roms].start = base;
rom_resources[roms].end = base + length - 1;
rom_resources[roms].name = "Extension ROM";
rom_resources[roms].flags = IORESOURCE_BUSY;
request_resource(&iomem_resource, rom_resources + roms);
roms++;
if (roms >= MAXROMS)
return;
} }
start = (video_rom_resource.end + 1 + 2047) & ~2047UL;
if (start < upper)
start = upper;
/* system rom */
request_resource(&iomem_resource, &system_rom_resource);
upper = system_rom_resource.start;
/* check for extension rom (ignore length byte!) */
rom = isa_bus_to_virt(extension_rom_resource.start);
if (romsignature(rom)) {
length = extension_rom_resource.end - extension_rom_resource.start + 1;
if (checksum(rom, length)) {
request_resource(&iomem_resource, &extension_rom_resource);
upper = extension_rom_resource.start;
} }
} }
/* Final check for motherboard extension rom at E000:0000 */ /* check for adapter roms on 2k boundaries */
base = 0xE0000; for (i = 0; i < ADAPTER_ROM_RESOURCES && start < upper; start += 2048) {
romstart = isa_bus_to_virt(base); rom = isa_bus_to_virt(start);
if (!romsignature(rom))
continue;
/* 0 < length <= 0x7f * 512, historically */
length = rom[2] * 512;
/* but accept any length that fits if checksum okay */
if (!length || start + length > upper || !checksum(rom, length))
continue;
if (romsignature(romstart)) { adapter_rom_resources[i].start = start;
rom_resources[roms].start = base; adapter_rom_resources[i].end = start + length - 1;
rom_resources[roms].end = base + 65535; request_resource(&iomem_resource, &adapter_rom_resources[i]);
rom_resources[roms].name = "Extension ROM";
rom_resources[roms].flags = IORESOURCE_BUSY;
request_resource(&iomem_resource, rom_resources + roms); start = adapter_rom_resources[i++].end & ~2047UL;
} }
} }
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <asm/mtrr.h> #include <asm/mtrr.h>
#include <asm/proto.h> #include <asm/proto.h>
#include <asm/mman.h> #include <asm/mman.h>
#include <asm/numa.h>
char x86_boot_params[2048] __initdata = {0,}; char x86_boot_params[2048] __initdata = {0,};
...@@ -329,4 +330,8 @@ void __init cpu_init (void) ...@@ -329,4 +330,8 @@ void __init cpu_init (void)
set_debug(0UL, 7); set_debug(0UL, 7);
fpu_init(); fpu_init();
#ifdef CONFIG_NUMA
numa_add_cpu(cpu);
#endif
} }
...@@ -811,6 +811,8 @@ static void __init smp_boot_cpus(unsigned int max_cpus) ...@@ -811,6 +811,8 @@ static void __init smp_boot_cpus(unsigned int max_cpus)
if (GET_APIC_ID(apic_read(APIC_ID)) != boot_cpu_id) if (GET_APIC_ID(apic_read(APIC_ID)) != boot_cpu_id)
BUG(); BUG();
x86_cpu_to_apicid[0] = boot_cpu_id;
/* /*
* Now scan the CPU present map and fire up the other CPUs. * Now scan the CPU present map and fire up the other CPUs.
*/ */
......
...@@ -208,13 +208,6 @@ EXPORT_SYMBOL(init_level4_pgt); ...@@ -208,13 +208,6 @@ EXPORT_SYMBOL(init_level4_pgt);
extern unsigned long __supported_pte_mask; extern unsigned long __supported_pte_mask;
EXPORT_SYMBOL(__supported_pte_mask); EXPORT_SYMBOL(__supported_pte_mask);
#ifdef CONFIG_DISCONTIGMEM
EXPORT_SYMBOL(memnode_shift);
EXPORT_SYMBOL(memnodemap);
EXPORT_SYMBOL(node_data);
EXPORT_SYMBOL(fake_node);
#endif
EXPORT_SYMBOL(clear_page); EXPORT_SYMBOL(clear_page);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
......
...@@ -48,7 +48,6 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end) ...@@ -48,7 +48,6 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end)
int nodeid, i, nb; int nodeid, i, nb;
int found = 0; int found = 0;
u32 reg; u32 reg;
int rr;
nb = find_northbridge(); nb = find_northbridge();
if (nb < 0) if (nb < 0)
...@@ -91,7 +90,7 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end) ...@@ -91,7 +90,7 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end)
nodeid, (base>>8)&3, (limit>>8) & 3); nodeid, (base>>8)&3, (limit>>8) & 3);
return -1; return -1;
} }
if ((1UL << nodeid) & nodes_present) { if (node_online(nodeid)) {
printk(KERN_INFO "Node %d already present. Skipping\n", printk(KERN_INFO "Node %d already present. Skipping\n",
nodeid); nodeid);
continue; continue;
...@@ -152,28 +151,13 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end) ...@@ -152,28 +151,13 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end)
printk(KERN_INFO "Using node hash shift of %d\n", memnode_shift); printk(KERN_INFO "Using node hash shift of %d\n", memnode_shift);
for (i = 0; i < MAXNODE; i++) { for (i = 0; i < MAXNODE; i++) {
if (nodes[i].start != nodes[i].end) if (nodes[i].start != nodes[i].end) {
/* assume 1:1 NODE:CPU */
cpu_to_node[i] = i;
setup_node_bootmem(i, nodes[i].start, nodes[i].end); setup_node_bootmem(i, nodes[i].start, nodes[i].end);
} }
/* There are unfortunately some poorly designed mainboards around
that only connect memory to a single CPU. This breaks the 1:1 cpu->node
mapping. To avoid this fill in the mapping for all possible
CPUs, as the number of CPUs is not known yet.
We round robin the existing nodes. */
rr = 0;
for (i = 0; i < MAXNODE; i++) {
if (nodes_present & (1UL<<i))
continue;
if ((nodes_present >> rr) == 0)
rr = 0;
rr = ffz(~nodes_present >> rr);
node_data[i] = node_data[rr];
rr++;
} }
if (found == 1) numa_init_array();
fake_node = 1;
return 0; return 0;
} }
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <linux/bootmem.h> #include <linux/bootmem.h>
#include <linux/mmzone.h> #include <linux/mmzone.h>
#include <linux/ctype.h> #include <linux/ctype.h>
#include <linux/module.h>
#include <asm/e820.h> #include <asm/e820.h>
#include <asm/proto.h> #include <asm/proto.h>
#include <asm/dma.h> #include <asm/dma.h>
...@@ -24,6 +25,9 @@ bootmem_data_t plat_node_bdata[MAX_NUMNODES]; ...@@ -24,6 +25,9 @@ bootmem_data_t plat_node_bdata[MAX_NUMNODES];
int memnode_shift; int memnode_shift;
u8 memnodemap[NODEMAPSIZE]; u8 memnodemap[NODEMAPSIZE];
unsigned char cpu_to_node[NR_CPUS];
cpumask_t node_to_cpumask[MAXNODE];
static int numa_off __initdata; static int numa_off __initdata;
unsigned long nodes_present; unsigned long nodes_present;
...@@ -105,7 +109,6 @@ void __init setup_node_bootmem(int nodeid, unsigned long start, unsigned long en ...@@ -105,7 +109,6 @@ void __init setup_node_bootmem(int nodeid, unsigned long start, unsigned long en
reserve_bootmem_node(NODE_DATA(nodeid), bootmap_start, bootmap_pages<<PAGE_SHIFT); reserve_bootmem_node(NODE_DATA(nodeid), bootmap_start, bootmap_pages<<PAGE_SHIFT);
if (nodeid + 1 > numnodes) if (nodeid + 1 > numnodes)
numnodes = nodeid + 1; numnodes = nodeid + 1;
nodes_present |= (1UL << nodeid);
node_set_online(nodeid); node_set_online(nodeid);
} }
...@@ -136,13 +139,36 @@ void __init setup_node_zones(int nodeid) ...@@ -136,13 +139,36 @@ void __init setup_node_zones(int nodeid)
start_pfn, NULL); start_pfn, NULL);
} }
int fake_node; void __init numa_init_array(void)
{
int rr, i;
/* There are unfortunately some poorly designed mainboards around
that only connect memory to a single CPU. This breaks the 1:1 cpu->node
mapping. To avoid this fill in the mapping for all possible
CPUs, as the number of CPUs is not known yet.
We round robin the existing nodes. */
rr = 0;
for (i = 0; i < MAXNODE; i++) {
if (node_online(i))
continue;
rr = find_next_bit(node_online_map, MAX_NUMNODES, rr);
if (rr == MAX_NUMNODES)
rr = find_first_bit(node_online_map, MAX_NUMNODES);
node_data[i] = node_data[rr];
cpu_to_node[i] = rr;
rr++;
}
set_bit(0, &node_to_cpumask[cpu_to_node(0)]);
}
int __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn) void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn)
{ {
int i;
#ifdef CONFIG_K8_NUMA #ifdef CONFIG_K8_NUMA
if (!numa_off && !k8_scan_nodes(start_pfn<<PAGE_SHIFT, end_pfn<<PAGE_SHIFT)) if (!numa_off && !k8_scan_nodes(start_pfn<<PAGE_SHIFT, end_pfn<<PAGE_SHIFT))
return 0; return;
#endif #endif
printk(KERN_INFO "%s\n", printk(KERN_INFO "%s\n",
numa_off ? "NUMA turned off" : "No NUMA configuration found"); numa_off ? "NUMA turned off" : "No NUMA configuration found");
...@@ -151,12 +177,20 @@ int __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn) ...@@ -151,12 +177,20 @@ int __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn)
start_pfn << PAGE_SHIFT, start_pfn << PAGE_SHIFT,
end_pfn << PAGE_SHIFT); end_pfn << PAGE_SHIFT);
/* setup dummy node covering all memory */ /* setup dummy node covering all memory */
fake_node = 1;
memnode_shift = 63; memnode_shift = 63;
memnodemap[0] = 0; memnodemap[0] = 0;
numnodes = 1; numnodes = 1;
for (i = 0; i < NR_CPUS; i++)
cpu_to_node[i] = 0;
node_to_cpumask[0] = 1;
setup_node_bootmem(0, start_pfn<<PAGE_SHIFT, end_pfn<<PAGE_SHIFT); setup_node_bootmem(0, start_pfn<<PAGE_SHIFT, end_pfn<<PAGE_SHIFT);
return -1; }
__init void numa_add_cpu(int cpu)
{
/* BP is initialized elsewhere */
if (cpu)
set_bit(cpu, &node_to_cpumask[cpu_to_node(cpu)]);
} }
unsigned long __init numa_free_all_bootmem(void) unsigned long __init numa_free_all_bootmem(void)
...@@ -185,4 +219,8 @@ __init int numa_setup(char *opt) ...@@ -185,4 +219,8 @@ __init int numa_setup(char *opt)
return 1; return 1;
} }
EXPORT_SYMBOL(cpu_to_node);
EXPORT_SYMBOL(node_to_cpumask);
EXPORT_SYMBOL(memnode_shift);
EXPORT_SYMBOL(memnodemap);
EXPORT_SYMBOL(node_data);
...@@ -1068,7 +1068,8 @@ static inline int idedisk_supports_hpa(const struct hd_driveid *id) ...@@ -1068,7 +1068,8 @@ static inline int idedisk_supports_hpa(const struct hd_driveid *id)
*/ */
static inline int idedisk_supports_lba48(const struct hd_driveid *id) static inline int idedisk_supports_lba48(const struct hd_driveid *id)
{ {
return (id->command_set_2 & 0x0400) && (id->cfs_enable_2 & 0x0400); return (id->command_set_2 & 0x0400) && (id->cfs_enable_2 & 0x0400)
&& id->lba_capacity_2;
} }
static inline void idedisk_check_hpa(ide_drive_t *drive) static inline void idedisk_check_hpa(ide_drive_t *drive)
......
...@@ -1574,6 +1574,7 @@ int generic_ide_ioctl(struct block_device *bdev, unsigned int cmd, ...@@ -1574,6 +1574,7 @@ int generic_ide_ioctl(struct block_device *bdev, unsigned int cmd,
if (!capable(CAP_SYS_RAWIO)) return -EACCES; if (!capable(CAP_SYS_RAWIO)) return -EACCES;
if (copy_from_user(args, (void *)arg, 3 * sizeof(int))) if (copy_from_user(args, (void *)arg, 3 * sizeof(int)))
return -EFAULT; return -EFAULT;
memset(&hw, 0, sizeof(hw));
ide_init_hwif_ports(&hw, (unsigned long) args[0], ide_init_hwif_ports(&hw, (unsigned long) args[0],
(unsigned long) args[1], NULL); (unsigned long) args[1], NULL);
hw.irq = args[2]; hw.irq = args[2];
......
...@@ -213,6 +213,7 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) ...@@ -213,6 +213,7 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
static int idecs_register(unsigned long io, unsigned long ctl, unsigned long irq) static int idecs_register(unsigned long io, unsigned long ctl, unsigned long irq)
{ {
hw_regs_t hw; hw_regs_t hw;
memset(&hw, 0, sizeof(hw));
ide_init_hwif_ports(&hw, io, ctl, NULL); ide_init_hwif_ports(&hw, io, ctl, NULL);
hw.irq = irq; hw.irq = irq;
hw.chipset = ide_pci; hw.chipset = ide_pci;
......
...@@ -107,7 +107,7 @@ static int hpt366_get_info (char *buffer, char **addr, off_t offset, int count) ...@@ -107,7 +107,7 @@ static int hpt366_get_info (char *buffer, char **addr, off_t offset, int count)
" %s\n", " %s\n",
(c0 & 0x80) ? "no" : "yes", (c0 & 0x80) ? "no" : "yes",
(c1 & 0x80) ? "no" : "yes"); (c1 & 0x80) ? "no" : "yes");
#if 0
if (hpt_minimum_revision(dev, 3)) { if (hpt_minimum_revision(dev, 3)) {
u8 cbl; u8 cbl;
cbl = inb(iobase + 0x7b); cbl = inb(iobase + 0x7b);
...@@ -120,7 +120,7 @@ static int hpt366_get_info (char *buffer, char **addr, off_t offset, int count) ...@@ -120,7 +120,7 @@ static int hpt366_get_info (char *buffer, char **addr, off_t offset, int count)
(cbl & 0x01) ? 33 : 66); (cbl & 0x01) ? 33 : 66);
p += sprintf(p, "\n"); p += sprintf(p, "\n");
} }
#endif
p += sprintf(p, "--------------- drive0 --------- drive1 " p += sprintf(p, "--------------- drive0 --------- drive1 "
"------- drive0 ---------- drive1 -------\n"); "------- drive0 ---------- drive1 -------\n");
p += sprintf(p, "DMA capable: %s %s" p += sprintf(p, "DMA capable: %s %s"
......
...@@ -204,8 +204,7 @@ zoran_write_proc (struct file *file, ...@@ -204,8 +204,7 @@ zoran_write_proc (struct file *file,
char *line, *ldelim, *varname, *svar, *tdelim; char *line, *ldelim, *varname, *svar, *tdelim;
struct zoran *zr; struct zoran *zr;
/* Random maximum */ if (count > 32768) /* Stupidity filter */
if (count > 256)
return -EINVAL; return -EINVAL;
zr = (struct zoran *) data; zr = (struct zoran *) data;
......
This diff is collapsed.
...@@ -1962,16 +1962,6 @@ config R8169 ...@@ -1962,16 +1962,6 @@ config R8169
To compile this driver as a module, choose M here: the module To compile this driver as a module, choose M here: the module
will be called r8169. This is recommended. will be called r8169. This is recommended.
config SIS190
tristate "SiS190 gigabit ethernet support (EXPERIMENTAL)"
depends on PCI && EXPERIMENTAL
select CRC32
---help---
Say Y here if you have a SiS 190 PCI Gigabit Ethernet adapter.
To compile this driver as a module, choose M here: the module
will be called sis190. This is recommended.
config SK98LIN config SK98LIN
tristate "Marvell Yukon Chipset / SysKonnect SK-98xx Support" tristate "Marvell Yukon Chipset / SysKonnect SK-98xx Support"
depends on PCI depends on PCI
...@@ -2101,6 +2091,18 @@ config IXGB_NAPI ...@@ -2101,6 +2091,18 @@ config IXGB_NAPI
bool "Use Rx Polling (NAPI) (EXPERIMENTAL)" bool "Use Rx Polling (NAPI) (EXPERIMENTAL)"
depends on IXGB && EXPERIMENTAL depends on IXGB && EXPERIMENTAL
config S2IO
tristate "S2IO 10Gbe XFrame NIC"
depends on PCI
---help---
This driver supports the 10Gbe XFrame NIC of S2IO.
For help regarding driver compilation, installation and
tuning please look into ~/drivers/net/s2io/README.txt.
config S2IO_NAPI
bool "Use Rx Polling (NAPI) (EXPERIMENTAL)"
depends on S2IO && EXPERIMENTAL
endmenu endmenu
......
...@@ -41,7 +41,6 @@ obj-$(CONFIG_EEPRO100) += eepro100.o ...@@ -41,7 +41,6 @@ obj-$(CONFIG_EEPRO100) += eepro100.o
obj-$(CONFIG_E100) += e100.o obj-$(CONFIG_E100) += e100.o
obj-$(CONFIG_TLAN) += tlan.o obj-$(CONFIG_TLAN) += tlan.o
obj-$(CONFIG_EPIC100) += epic100.o obj-$(CONFIG_EPIC100) += epic100.o
obj-$(CONFIG_SIS190) += sis190.o
obj-$(CONFIG_SIS900) += sis900.o obj-$(CONFIG_SIS900) += sis900.o
obj-$(CONFIG_YELLOWFIN) += yellowfin.o obj-$(CONFIG_YELLOWFIN) += yellowfin.o
obj-$(CONFIG_ACENIC) += acenic.o obj-$(CONFIG_ACENIC) += acenic.o
...@@ -176,6 +175,7 @@ obj-$(CONFIG_DL2K) += dl2k.o ...@@ -176,6 +175,7 @@ obj-$(CONFIG_DL2K) += dl2k.o
obj-$(CONFIG_R8169) += r8169.o obj-$(CONFIG_R8169) += r8169.o
obj-$(CONFIG_AMD8111_ETH) += amd8111e.o obj-$(CONFIG_AMD8111_ETH) += amd8111e.o
obj-$(CONFIG_IBMVETH) += ibmveth.o obj-$(CONFIG_IBMVETH) += ibmveth.o
obj-$(CONFIG_S2IO) += s2io.o
obj-$(CONFIG_ARM) += arm/ obj-$(CONFIG_ARM) += arm/
obj-$(CONFIG_NET_FC) += fc/ obj-$(CONFIG_NET_FC) += fc/
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
* *
* Copyright (C) 2002 David S. Miller (davem@redhat.com) * Copyright (C) 2002 David S. Miller (davem@redhat.com)
* Fixed by Pekka Pietikainen (pp@ee.oulu.fi) * Fixed by Pekka Pietikainen (pp@ee.oulu.fi)
*
* Distribute under GPL.
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -25,8 +27,8 @@ ...@@ -25,8 +27,8 @@
#define DRV_MODULE_NAME "b44" #define DRV_MODULE_NAME "b44"
#define PFX DRV_MODULE_NAME ": " #define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "0.92" #define DRV_MODULE_VERSION "0.93"
#define DRV_MODULE_RELDATE "Nov 4, 2003" #define DRV_MODULE_RELDATE "Mar, 2004"
#define B44_DEF_MSG_ENABLE \ #define B44_DEF_MSG_ENABLE \
(NETIF_MSG_DRV | \ (NETIF_MSG_DRV | \
...@@ -83,6 +85,10 @@ static int b44_debug = -1; /* -1 == use B44_DEF_MSG_ENABLE as value */ ...@@ -83,6 +85,10 @@ static int b44_debug = -1; /* -1 == use B44_DEF_MSG_ENABLE as value */
static struct pci_device_id b44_pci_tbl[] = { static struct pci_device_id b44_pci_tbl[] = {
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_BCM4401, { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_BCM4401,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_BCM4401B0,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_BCM4401B1,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
{ } /* terminate list with empty entry */ { } /* terminate list with empty entry */
}; };
...@@ -1178,7 +1184,6 @@ static int b44_init_hw(struct b44 *bp) ...@@ -1178,7 +1184,6 @@ static int b44_init_hw(struct b44 *bp)
{ {
u32 val; u32 val;
b44_disable_ints(bp);
b44_chip_reset(bp); b44_chip_reset(bp);
b44_phy_reset(bp); b44_phy_reset(bp);
b44_setup_phy(bp); b44_setup_phy(bp);
......
#ifndef _B44_H #ifndef _B44_H
#define _B44_H #define _B44_H
/* Register layout. */ /* Register layout. (These correspond to struct _bcmenettregs in bcm4400.) */
#define B44_DEVCTRL 0x0000UL /* Device Control */ #define B44_DEVCTRL 0x0000UL /* Device Control */
#define DEVCTRL_MPM 0x00000040 /* Magic Packet PME Enable (B0 only) */
#define DEVCTRL_PFE 0x00000080 /* Pattern Filtering Enable */ #define DEVCTRL_PFE 0x00000080 /* Pattern Filtering Enable */
#define DEVCTRL_IPP 0x00000400 /* Internal EPHY Present */ #define DEVCTRL_IPP 0x00000400 /* Internal EPHY Present */
#define DEVCTRL_EPR 0x00008000 /* EPHY Reset */ #define DEVCTRL_EPR 0x00008000 /* EPHY Reset */
...@@ -24,6 +25,7 @@ ...@@ -24,6 +25,7 @@
#define WKUP_LEN_P3_SHIFT 24 #define WKUP_LEN_P3_SHIFT 24
#define WKUP_LEN_D3 0x80000000 #define WKUP_LEN_D3 0x80000000
#define B44_ISTAT 0x0020UL /* Interrupt Status */ #define B44_ISTAT 0x0020UL /* Interrupt Status */
#define ISTAT_LS 0x00000020 /* Link Change (B0 only) */
#define ISTAT_PME 0x00000040 /* Power Management Event */ #define ISTAT_PME 0x00000040 /* Power Management Event */
#define ISTAT_TO 0x00000080 /* General Purpose Timeout */ #define ISTAT_TO 0x00000080 /* General Purpose Timeout */
#define ISTAT_DSCE 0x00000400 /* Descriptor Error */ #define ISTAT_DSCE 0x00000400 /* Descriptor Error */
...@@ -41,6 +43,8 @@ ...@@ -41,6 +43,8 @@
#define B44_IMASK 0x0024UL /* Interrupt Mask */ #define B44_IMASK 0x0024UL /* Interrupt Mask */
#define IMASK_DEF (ISTAT_ERRORS | ISTAT_TO | ISTAT_RX | ISTAT_TX) #define IMASK_DEF (ISTAT_ERRORS | ISTAT_TO | ISTAT_RX | ISTAT_TX)
#define B44_GPTIMER 0x0028UL /* General Purpose Timer */ #define B44_GPTIMER 0x0028UL /* General Purpose Timer */
#define B44_ADDR_LO 0x0088UL /* ENET Address Lo (B0 only) */
#define B44_ADDR_HI 0x008CUL /* ENET Address Hi (B0 only) */
#define B44_FILT_ADDR 0x0090UL /* ENET Filter Address */ #define B44_FILT_ADDR 0x0090UL /* ENET Filter Address */
#define B44_FILT_DATA 0x0094UL /* ENET Filter Data */ #define B44_FILT_DATA 0x0094UL /* ENET Filter Data */
#define B44_TXBURST 0x00A0UL /* TX Max Burst Length */ #define B44_TXBURST 0x00A0UL /* TX Max Burst Length */
......
...@@ -353,6 +353,7 @@ e1000_ethtool_geeprom(struct e1000_adapter *adapter, ...@@ -353,6 +353,7 @@ e1000_ethtool_geeprom(struct e1000_adapter *adapter,
struct e1000_hw *hw = &adapter->hw; struct e1000_hw *hw = &adapter->hw;
int first_word, last_word; int first_word, last_word;
int ret_val = 0; int ret_val = 0;
uint16_t i;
if(eeprom->len == 0) { if(eeprom->len == 0) {
ret_val = -EINVAL; ret_val = -EINVAL;
...@@ -377,12 +378,16 @@ e1000_ethtool_geeprom(struct e1000_adapter *adapter, ...@@ -377,12 +378,16 @@ e1000_ethtool_geeprom(struct e1000_adapter *adapter,
last_word - first_word + 1, last_word - first_word + 1,
eeprom_buff); eeprom_buff);
else { else {
uint16_t i;
for (i = 0; i < last_word - first_word + 1; i++) for (i = 0; i < last_word - first_word + 1; i++)
if((ret_val = e1000_read_eeprom(hw, first_word + i, 1, if((ret_val = e1000_read_eeprom(hw, first_word + i, 1,
&eeprom_buff[i]))) &eeprom_buff[i])))
break; break;
} }
/* Device's eeprom is always little-endian, word addressable */
for (i = 0; i < last_word - first_word + 1; i++)
le16_to_cpus(&eeprom_buff[i]);
geeprom_error: geeprom_error:
return ret_val; return ret_val;
} }
...@@ -395,6 +400,7 @@ e1000_ethtool_seeprom(struct e1000_adapter *adapter, ...@@ -395,6 +400,7 @@ e1000_ethtool_seeprom(struct e1000_adapter *adapter,
uint16_t *eeprom_buff; uint16_t *eeprom_buff;
void *ptr; void *ptr;
int max_len, first_word, last_word, ret_val = 0; int max_len, first_word, last_word, ret_val = 0;
uint16_t i;
if(eeprom->len == 0) if(eeprom->len == 0)
return -EOPNOTSUPP; return -EOPNOTSUPP;
...@@ -428,11 +434,19 @@ e1000_ethtool_seeprom(struct e1000_adapter *adapter, ...@@ -428,11 +434,19 @@ e1000_ethtool_seeprom(struct e1000_adapter *adapter,
ret_val = e1000_read_eeprom(hw, last_word, 1, ret_val = e1000_read_eeprom(hw, last_word, 1,
&eeprom_buff[last_word - first_word]); &eeprom_buff[last_word - first_word]);
} }
/* Device's eeprom is always little-endian, word addressable */
for (i = 0; i < last_word - first_word + 1; i++)
le16_to_cpus(&eeprom_buff[i]);
if((ret_val != 0) || copy_from_user(ptr, user_data, eeprom->len)) { if((ret_val != 0) || copy_from_user(ptr, user_data, eeprom->len)) {
ret_val = -EFAULT; ret_val = -EFAULT;
goto seeprom_error; goto seeprom_error;
} }
for (i = 0; i < last_word - first_word + 1; i++)
eeprom_buff[i] = cpu_to_le16(eeprom_buff[i]);
ret_val = e1000_write_eeprom(hw, first_word, ret_val = e1000_write_eeprom(hw, first_word,
last_word - first_word + 1, eeprom_buff); last_word - first_word + 1, eeprom_buff);
...@@ -474,12 +488,14 @@ e1000_ethtool_sring(struct e1000_adapter *adapter, ...@@ -474,12 +488,14 @@ e1000_ethtool_sring(struct e1000_adapter *adapter,
e1000_mac_type mac_type = adapter->hw.mac_type; e1000_mac_type mac_type = adapter->hw.mac_type;
struct e1000_desc_ring *txdr = &adapter->tx_ring; struct e1000_desc_ring *txdr = &adapter->tx_ring;
struct e1000_desc_ring *rxdr = &adapter->rx_ring; struct e1000_desc_ring *rxdr = &adapter->rx_ring;
struct e1000_desc_ring tx_old, tx_new;
struct e1000_desc_ring rx_old, rx_new;
if(netif_running(adapter->netdev)) { tx_old = adapter->tx_ring;
rx_old = adapter->rx_ring;
if(netif_running(adapter->netdev))
e1000_down(adapter); e1000_down(adapter);
e1000_free_rx_resources(adapter);
e1000_free_tx_resources(adapter);
}
rxdr->count = max(ring->rx_pending,(uint32_t)E1000_MIN_RXD); rxdr->count = max(ring->rx_pending,(uint32_t)E1000_MIN_RXD);
rxdr->count = min(rxdr->count,(uint32_t)(mac_type < e1000_82544 ? rxdr->count = min(rxdr->count,(uint32_t)(mac_type < e1000_82544 ?
...@@ -492,21 +508,33 @@ e1000_ethtool_sring(struct e1000_adapter *adapter, ...@@ -492,21 +508,33 @@ e1000_ethtool_sring(struct e1000_adapter *adapter,
E1000_ROUNDUP(txdr->count, REQ_TX_DESCRIPTOR_MULTIPLE); E1000_ROUNDUP(txdr->count, REQ_TX_DESCRIPTOR_MULTIPLE);
if(netif_running(adapter->netdev)) { if(netif_running(adapter->netdev)) {
/* try to get new resources before deleting old */
if((err = e1000_setup_rx_resources(adapter))) if((err = e1000_setup_rx_resources(adapter)))
goto err_setup_rx; goto err_setup_rx;
if((err = e1000_setup_tx_resources(adapter))) if((err = e1000_setup_tx_resources(adapter)))
goto err_setup_tx; goto err_setup_tx;
/* save the new, restore the old in order to free it,
* then restore the new back again */
rx_new = adapter->rx_ring;
tx_new = adapter->tx_ring;
adapter->rx_ring = rx_old;
adapter->tx_ring = tx_old;
e1000_free_rx_resources(adapter);
e1000_free_tx_resources(adapter);
adapter->rx_ring = rx_new;
adapter->tx_ring = tx_new;
if((err = e1000_up(adapter))) if((err = e1000_up(adapter)))
goto err_up; return err;
} }
return 0; return 0;
err_up:
e1000_free_tx_resources(adapter);
err_setup_tx: err_setup_tx:
e1000_free_rx_resources(adapter); e1000_free_rx_resources(adapter);
err_setup_rx: err_setup_rx:
e1000_reset(adapter); adapter->rx_ring = rx_old;
adapter->tx_ring = tx_old;
e1000_up(adapter);
return err; return err;
} }
......
This diff is collapsed.
...@@ -369,6 +369,9 @@ int32_t e1000_set_d3_lplu_state(struct e1000_hw *hw, boolean_t active); ...@@ -369,6 +369,9 @@ int32_t e1000_set_d3_lplu_state(struct e1000_hw *hw, boolean_t active);
#define E1000_82542_2_0_REV_ID 2 #define E1000_82542_2_0_REV_ID 2
#define E1000_82542_2_1_REV_ID 3 #define E1000_82542_2_1_REV_ID 3
#define E1000_REVISION_0 0
#define E1000_REVISION_1 1
#define E1000_REVISION_2 2
#define SPEED_10 10 #define SPEED_10 10
#define SPEED_100 100 #define SPEED_100 100
...@@ -763,6 +766,7 @@ struct e1000_ffvt_entry { ...@@ -763,6 +766,7 @@ struct e1000_ffvt_entry {
#define E1000_WUPL 0x05900 /* Wakeup Packet Length - RW */ #define E1000_WUPL 0x05900 /* Wakeup Packet Length - RW */
#define E1000_WUPM 0x05A00 /* Wakeup Packet Memory - RO A */ #define E1000_WUPM 0x05A00 /* Wakeup Packet Memory - RO A */
#define E1000_FFLT 0x05F00 /* Flexible Filter Length Table - RW Array */ #define E1000_FFLT 0x05F00 /* Flexible Filter Length Table - RW Array */
#define E1000_HOST_IF 0x08800 /* Host Interface */
#define E1000_FFMT 0x09000 /* Flexible Filter Mask Table - RW Array */ #define E1000_FFMT 0x09000 /* Flexible Filter Mask Table - RW Array */
#define E1000_FFVT 0x09800 /* Flexible Filter Value Table - RW Array */ #define E1000_FFVT 0x09800 /* Flexible Filter Value Table - RW Array */
...@@ -899,6 +903,7 @@ struct e1000_ffvt_entry { ...@@ -899,6 +903,7 @@ struct e1000_ffvt_entry {
#define E1000_82542_TDFT 0x08018 #define E1000_82542_TDFT 0x08018
#define E1000_82542_FFMT E1000_FFMT #define E1000_82542_FFMT E1000_FFMT
#define E1000_82542_FFVT E1000_FFVT #define E1000_82542_FFVT E1000_FFVT
#define E1000_82542_HOST_IF E1000_HOST_IF
/* Statistics counters collected by the MAC */ /* Statistics counters collected by the MAC */
struct e1000_hw_stats { struct e1000_hw_stats {
...@@ -1434,6 +1439,10 @@ struct e1000_hw { ...@@ -1434,6 +1439,10 @@ struct e1000_hw {
#define E1000_MANC_TCO_RESET 0x00010000 /* TCO Reset Occurred */ #define E1000_MANC_TCO_RESET 0x00010000 /* TCO Reset Occurred */
#define E1000_MANC_RCV_TCO_EN 0x00020000 /* Receive TCO Packets Enabled */ #define E1000_MANC_RCV_TCO_EN 0x00020000 /* Receive TCO Packets Enabled */
#define E1000_MANC_REPORT_STATUS 0x00040000 /* Status Reporting Enabled */ #define E1000_MANC_REPORT_STATUS 0x00040000 /* Status Reporting Enabled */
#define E1000_MANC_EN_MAC_ADDR_FILTER 0x00100000 /* Enable MAC address
* filtering */
#define E1000_MANC_EN_MNG2HOST 0x00200000 /* Enable MNG packets to host
* memory */
#define E1000_MANC_SMB_REQ 0x01000000 /* SMBus Request */ #define E1000_MANC_SMB_REQ 0x01000000 /* SMBus Request */
#define E1000_MANC_SMB_GNT 0x02000000 /* SMBus Grant */ #define E1000_MANC_SMB_GNT 0x02000000 /* SMBus Grant */
#define E1000_MANC_SMB_CLK_IN 0x04000000 /* SMBus Clock In */ #define E1000_MANC_SMB_CLK_IN 0x04000000 /* SMBus Clock In */
...@@ -1480,6 +1489,7 @@ struct e1000_hw { ...@@ -1480,6 +1489,7 @@ struct e1000_hw {
#define EEPROM_COMPAT 0x0003 #define EEPROM_COMPAT 0x0003
#define EEPROM_ID_LED_SETTINGS 0x0004 #define EEPROM_ID_LED_SETTINGS 0x0004
#define EEPROM_SERDES_AMPLITUDE 0x0006 /* For SERDES output amplitude adjustment. */ #define EEPROM_SERDES_AMPLITUDE 0x0006 /* For SERDES output amplitude adjustment. */
#define EEPROM_PHY_CLASS_WORD 0x0007
#define EEPROM_INIT_CONTROL1_REG 0x000A #define EEPROM_INIT_CONTROL1_REG 0x000A
#define EEPROM_INIT_CONTROL2_REG 0x000F #define EEPROM_INIT_CONTROL2_REG 0x000F
#define EEPROM_INIT_CONTROL3_PORT_B 0x0014 #define EEPROM_INIT_CONTROL3_PORT_B 0x0014
...@@ -1513,6 +1523,9 @@ struct e1000_hw { ...@@ -1513,6 +1523,9 @@ struct e1000_hw {
/* Mask bits for SERDES amplitude adjustment in Word 6 of the EEPROM */ /* Mask bits for SERDES amplitude adjustment in Word 6 of the EEPROM */
#define EEPROM_SERDES_AMPLITUDE_MASK 0x000F #define EEPROM_SERDES_AMPLITUDE_MASK 0x000F
/* Mask bit for PHY class in Word 7 of the EEPROM */
#define EEPROM_PHY_CLASS_A 0x8000
/* Mask bits for fields in Word 0x0a of the EEPROM */ /* Mask bits for fields in Word 0x0a of the EEPROM */
#define EEPROM_WORD0A_ILOS 0x0010 #define EEPROM_WORD0A_ILOS 0x0010
#define EEPROM_WORD0A_SWDPIO 0x01E0 #define EEPROM_WORD0A_SWDPIO 0x01E0
......
...@@ -30,7 +30,33 @@ ...@@ -30,7 +30,33 @@
/* Change Log /* Change Log
* *
* 5.2.30.1 1/29/03 * 5.2.39 3/12/04
* o Added support to read/write eeprom data in proper order.
* By default device eeprom is always little-endian, word
* addressable
* o Disable TSO as the default for the driver until hangs
* reported against non-IA acrhs can be root-caused.
* o Back out the CSA fix for 82547 as it continues to cause
* systems lock-ups with production systems.
* o Fixed FC high/low water mark values to actually be in the
* range of the Rx FIFO area. It was a math error.
* [Dainis Jonitis (dainis_jonitis@exigengroup.lv)]
* o Handle failure to get new resources when doing ethtool
* ring paramater changes. Previously, driver would free old,
* but fails to allocate new, causing problems. Now, driver
* allocates new, and if sucessful, frees old.
* o Changed collision threshold from 16 to 15 to comply with IEEE
* spec.
* o Toggle chip-select when checking ready status on SPI eeproms.
* o Put PHY into class A mode to pass IEEE tests on some designs.
* Designs with EEPROM word 0x7, bit 15 set will have their PHYs
* set to class A mode, rather than the default class AB.
* o Handle failures of register_netdev. Stephen Hemminger
* [shemminger@osdl.org].
* o updated README & MAN pages, number of Transmit/Receive
* descriptors may be denied depending on system resources.
*
* 5.2.30 1/14/03
* o Set VLAN filtering to IEEE 802.1Q after reset so we don't break * o Set VLAN filtering to IEEE 802.1Q after reset so we don't break
* SoL connections that use VLANs. * SoL connections that use VLANs.
* o Allow 1000/Full setting for AutoNeg param for Fiber connections * o Allow 1000/Full setting for AutoNeg param for Fiber connections
...@@ -45,30 +71,11 @@ ...@@ -45,30 +71,11 @@
* o Added ethtool RINGPARAM support. * o Added ethtool RINGPARAM support.
* *
* 5.2.22 10/15/03 * 5.2.22 10/15/03
* o Bug fix: SERDES devices might be connected to a back-plane
* switch that doesn't support auto-neg, so add the capability
* to force 1000/Full. Also, since forcing 1000/Full, sample
* RxSynchronize bit to detect link state.
* o Bug fix: Flow control settings for hi/lo watermark didn't
* consider changes in the Rx FIFO size, which could occur with
* Jumbo Frames or with the reduced FIFO in 82547.
* o Better propagation of error codes. [Janice Girouard
* (janiceg@us.ibm.com)].
* o Bug fix: hang under heavy Tx stress when running out of Tx
* descriptors; wasn't clearing context descriptor when backing
* out of send because of no-resource condition.
* o Bug fix: check netif_running in dev->poll so we don't have to
* hang in dev->close until all polls are finished. [Robert
* Ollson (robert.olsson@data.slu.se)].
* o Revert TxDescriptor ring size back to 256 since change to 1024
* wasn't accepted into the kernel.
*
* 5.2.16 8/8/03
*/ */
char e1000_driver_name[] = "e1000"; char e1000_driver_name[] = "e1000";
char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver"; char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver";
char e1000_driver_version[] = "5.2.30.1-k2"; char e1000_driver_version[] = "5.2.39-k2";
char e1000_copyright[] = "Copyright (c) 1999-2004 Intel Corporation."; char e1000_copyright[] = "Copyright (c) 1999-2004 Intel Corporation.";
/* e1000_pci_tbl - PCI Device ID Table /* e1000_pci_tbl - PCI Device ID Table
...@@ -1661,7 +1668,7 @@ e1000_tx_map(struct e1000_adapter *adapter, struct sk_buff *skb, ...@@ -1661,7 +1668,7 @@ e1000_tx_map(struct e1000_adapter *adapter, struct sk_buff *skb,
* we mapped the skb, but because of all the workarounds * we mapped the skb, but because of all the workarounds
* (above), it's too difficult to predict how many we're * (above), it's too difficult to predict how many we're
* going to need.*/ * going to need.*/
i = adapter->tx_ring.next_to_use; i = tx_ring->next_to_use;
if(i == first) { if(i == first) {
/* Cleanup after e1000_tx_[csum|tso] scribbling /* Cleanup after e1000_tx_[csum|tso] scribbling
...@@ -1686,7 +1693,7 @@ e1000_tx_map(struct e1000_adapter *adapter, struct sk_buff *skb, ...@@ -1686,7 +1693,7 @@ e1000_tx_map(struct e1000_adapter *adapter, struct sk_buff *skb,
if(++i == tx_ring->count) i = 0; if(++i == tx_ring->count) i = 0;
} }
adapter->tx_ring.next_to_use = first; tx_ring->next_to_use = first;
return 0; return 0;
} }
...@@ -1694,7 +1701,7 @@ e1000_tx_map(struct e1000_adapter *adapter, struct sk_buff *skb, ...@@ -1694,7 +1701,7 @@ e1000_tx_map(struct e1000_adapter *adapter, struct sk_buff *skb,
i = (i == 0) ? tx_ring->count - 1 : i - 1; i = (i == 0) ? tx_ring->count - 1 : i - 1;
tx_ring->buffer_info[i].skb = skb; tx_ring->buffer_info[i].skb = skb;
tx_ring->buffer_info[first].next_to_watch = i; tx_ring->buffer_info[first].next_to_watch = i;
return count; return count;
} }
......
...@@ -107,7 +107,7 @@ E1000_PARAM(Duplex, "Duplex setting"); ...@@ -107,7 +107,7 @@ E1000_PARAM(Duplex, "Duplex setting");
/* Auto-negotiation Advertisement Override /* Auto-negotiation Advertisement Override
* *
* Valid Range: 0x01-0x0F, 0x20-0x2F * Valid Range: 0x01-0x0F, 0x20-0x2F (copper); 0x20 (fiber)
* *
* The AutoNeg value is a bit mask describing which speed and duplex * The AutoNeg value is a bit mask describing which speed and duplex
* combinations should be advertised during auto-negotiation. * combinations should be advertised during auto-negotiation.
...@@ -117,7 +117,7 @@ E1000_PARAM(Duplex, "Duplex setting"); ...@@ -117,7 +117,7 @@ E1000_PARAM(Duplex, "Duplex setting");
* Speed (Mbps) N/A N/A 1000 N/A 100 100 10 10 * Speed (Mbps) N/A N/A 1000 N/A 100 100 10 10
* Duplex Full Full Half Full Half * Duplex Full Full Half Full Half
* *
* Default Value: 0x2F * Default Value: 0x2F (copper); 0x20 (fiber)
*/ */
E1000_PARAM(AutoNeg, "Advertised auto-negotiation setting"); E1000_PARAM(AutoNeg, "Advertised auto-negotiation setting");
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -159,10 +159,16 @@ void comet_timer(unsigned long data) ...@@ -159,10 +159,16 @@ void comet_timer(unsigned long data)
if (tulip_debug > 1) if (tulip_debug > 1)
printk(KERN_DEBUG "%s: Comet link status %4.4x partner capability " printk(KERN_DEBUG "%s: Comet link status %4.4x partner capability "
"%4.4x.\n", "%4.4x.\n",
dev->name, inl(ioaddr + 0xB8), inl(ioaddr + 0xC8)); dev->name,
tulip_mdio_read(dev, tp->phys[0], 1),
tulip_mdio_read(dev, tp->phys[0], 5));
/* mod_timer synchronizes us with potential add_timer calls /* mod_timer synchronizes us with potential add_timer calls
* from interrupts. * from interrupts.
*/ */
if (tulip_check_duplex(dev) < 0)
{ netif_carrier_off(dev); }
else
{ netif_carrier_on(dev); }
mod_timer(&tp->timer, RUN_AT(next_tick)); mod_timer(&tp->timer, RUN_AT(next_tick));
} }
...@@ -178,7 +178,7 @@ struct tulip_chip_table tulip_tbl[] = { ...@@ -178,7 +178,7 @@ struct tulip_chip_table tulip_tbl[] = {
/* COMET */ /* COMET */
{ "ADMtek Comet", 256, 0x0001abef, { "ADMtek Comet", 256, 0x0001abef,
MC_HASH_ONLY | COMET_MAC_ADDR, comet_timer }, HAS_MII | MC_HASH_ONLY | COMET_MAC_ADDR, comet_timer },
/* COMPEX9881 */ /* COMPEX9881 */
{ "Compex 9881 PMAC", 128, 0x0001ebef, { "Compex 9881 PMAC", 128, 0x0001ebef,
......
...@@ -1606,11 +1606,9 @@ static int ext3_add_nondir(handle_t *handle, ...@@ -1606,11 +1606,9 @@ static int ext3_add_nondir(handle_t *handle,
{ {
int err = ext3_add_entry(handle, dentry, inode); int err = ext3_add_entry(handle, dentry, inode);
if (!err) { if (!err) {
err = ext3_mark_inode_dirty(handle, inode); ext3_mark_inode_dirty(handle, inode);
if (!err) { d_instantiate(dentry, inode);
d_instantiate(dentry, inode); return 0;
return 0;
}
} }
ext3_dec_count(handle, inode); ext3_dec_count(handle, inode);
iput(inode); iput(inode);
......
...@@ -321,7 +321,6 @@ int journal_write_metadata_buffer(transaction_t *transaction, ...@@ -321,7 +321,6 @@ int journal_write_metadata_buffer(transaction_t *transaction,
} }
mapped_data = kmap_atomic(new_page, KM_USER0); mapped_data = kmap_atomic(new_page, KM_USER0);
/* /*
* Check for escaping * Check for escaping
*/ */
...@@ -330,6 +329,7 @@ int journal_write_metadata_buffer(transaction_t *transaction, ...@@ -330,6 +329,7 @@ int journal_write_metadata_buffer(transaction_t *transaction,
need_copy_out = 1; need_copy_out = 1;
do_escape = 1; do_escape = 1;
} }
kunmap_atomic(mapped_data, KM_USER0);
/* /*
* Do we need to do a data copy? * Do we need to do a data copy?
...@@ -337,7 +337,6 @@ int journal_write_metadata_buffer(transaction_t *transaction, ...@@ -337,7 +337,6 @@ int journal_write_metadata_buffer(transaction_t *transaction,
if (need_copy_out && !done_copy_out) { if (need_copy_out && !done_copy_out) {
char *tmp; char *tmp;
kunmap_atomic(mapped_data, KM_USER0);
jbd_unlock_bh_state(bh_in); jbd_unlock_bh_state(bh_in);
tmp = jbd_rep_kmalloc(bh_in->b_size, GFP_NOFS); tmp = jbd_rep_kmalloc(bh_in->b_size, GFP_NOFS);
jbd_lock_bh_state(bh_in); jbd_lock_bh_state(bh_in);
...@@ -349,10 +348,8 @@ int journal_write_metadata_buffer(transaction_t *transaction, ...@@ -349,10 +348,8 @@ int journal_write_metadata_buffer(transaction_t *transaction,
jh_in->b_frozen_data = tmp; jh_in->b_frozen_data = tmp;
mapped_data = kmap_atomic(new_page, KM_USER0); mapped_data = kmap_atomic(new_page, KM_USER0);
memcpy(tmp, mapped_data + new_offset, jh2bh(jh_in)->b_size); memcpy(tmp, mapped_data + new_offset, jh2bh(jh_in)->b_size);
kunmap_atomic(mapped_data, KM_USER0);
/* If we get to this path, we'll always need the new
address kmapped so that we can clear the escaped
magic number below. */
new_page = virt_to_page(tmp); new_page = virt_to_page(tmp);
new_offset = offset_in_page(tmp); new_offset = offset_in_page(tmp);
done_copy_out = 1; done_copy_out = 1;
...@@ -362,9 +359,11 @@ int journal_write_metadata_buffer(transaction_t *transaction, ...@@ -362,9 +359,11 @@ int journal_write_metadata_buffer(transaction_t *transaction,
* Did we need to do an escaping? Now we've done all the * Did we need to do an escaping? Now we've done all the
* copying, we can finally do so. * copying, we can finally do so.
*/ */
if (do_escape) if (do_escape) {
mapped_data = kmap_atomic(new_page, KM_USER0);
*((unsigned int *)(mapped_data + new_offset)) = 0; *((unsigned int *)(mapped_data + new_offset)) = 0;
kunmap_atomic(mapped_data, KM_USER0); kunmap_atomic(mapped_data, KM_USER0);
}
/* keep subsequent assertions sane */ /* keep subsequent assertions sane */
new_bh->b_state = 0; new_bh->b_state = 0;
......
/* #include <asm-generic/hdreg.h>
* linux/include/asm-alpha/hdreg.h
*
* Copyright (C) 1994-1996 Linus Torvalds & authors
*/
#ifndef __ASMalpha_HDREG_H
#define __ASMalpha_HDREG_H
typedef unsigned long ide_ioreg_t;
#endif /* __ASMalpha_HDREG_H */
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#define MAX_HWIFS CONFIG_IDE_MAX_HWIFS #define MAX_HWIFS CONFIG_IDE_MAX_HWIFS
#endif #endif
static __inline__ int ide_default_irq(ide_ioreg_t base) static inline int ide_default_irq(unsigned long base)
{ {
switch (base) { switch (base) {
case 0x1f0: return 14; case 0x1f0: return 14;
...@@ -31,7 +31,7 @@ static __inline__ int ide_default_irq(ide_ioreg_t base) ...@@ -31,7 +31,7 @@ static __inline__ int ide_default_irq(ide_ioreg_t base)
} }
} }
static __inline__ ide_ioreg_t ide_default_io_base(int index) static inline unsigned long ide_default_io_base(int index)
{ {
switch (index) { switch (index) {
case 0: return 0x1f0; case 0: return 0x1f0;
...@@ -43,9 +43,10 @@ static __inline__ ide_ioreg_t ide_default_io_base(int index) ...@@ -43,9 +43,10 @@ static __inline__ ide_ioreg_t ide_default_io_base(int index)
} }
} }
static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq) static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg = data_port; unsigned long reg = data_port;
int i; int i;
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
......
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
* Set up a hw structure for a specified data port, control port and IRQ. * Set up a hw structure for a specified data port, control port and IRQ.
* This should follow whatever the default interface uses. * This should follow whatever the default interface uses.
*/ */
static __inline__ void static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg = data_port; unsigned long reg = data_port;
int i; int i;
memset(hw, 0, sizeof(*hw)); memset(hw, 0, sizeof(*hw));
......
...@@ -16,17 +16,17 @@ ...@@ -16,17 +16,17 @@
* Set up a hw structure for a specified data port, control port and IRQ. * Set up a hw structure for a specified data port, control port and IRQ.
* This should follow whatever the default interface uses. * This should follow whatever the default interface uses.
*/ */
static __inline__ void static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg = (ide_ioreg_t) data_port; unsigned long reg = data_port;
int i; int i;
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
hw->io_ports[i] = reg; hw->io_ports[i] = reg;
reg += 1; reg += 1;
} }
hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port; hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
if (irq) if (irq)
*irq = 0; *irq = 0;
} }
......
...@@ -18,23 +18,21 @@ ...@@ -18,23 +18,21 @@
* Set up a hw structure for a specified data port, control port and IRQ. * Set up a hw structure for a specified data port, control port and IRQ.
* This should follow whatever the default interface uses. * This should follow whatever the default interface uses.
*/ */
static __inline__ void static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg; unsigned long reg = data_port;
int i; int i;
int regincr = 1; int regincr = 1;
memset(hw, 0, sizeof(*hw)); memset(hw, 0, sizeof(*hw));
reg = (ide_ioreg_t)data_port;
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
hw->io_ports[i] = reg; hw->io_ports[i] = reg;
reg += regincr; reg += regincr;
} }
hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port; hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
if (irq) *irq = 0; if (irq) *irq = 0;
} }
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
* Set up a hw structure for a specified data port, control port and IRQ. * Set up a hw structure for a specified data port, control port and IRQ.
* This should follow whatever the default interface uses. * This should follow whatever the default interface uses.
*/ */
static __inline__ void static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) unsigned long ctrl_port, int *irq)
{ {
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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