Commit 6300f690 authored by Anton Altaparmakov's avatar Anton Altaparmakov

Merge cantab.net:/home/src/bklinux-2.6

into cantab.net:/home/src/ntfs-2.6
parents 1a217bc9 8754a8e2
This diff is collapsed.
Linux* Base Driver for the Intel(R) PRO/100 Family of Adapters
==============================================================
November 19, 2002
March 15, 2004
Contents
......@@ -9,9 +9,6 @@ Contents
- In This Release
- Supported Adapters
- Command Line Parameters
- CPU Cycle Saver
- Additional Configurations
- Support
......@@ -19,64 +16,13 @@ In This Release
===============
This file describes the Linux* Base Driver for the Intel(R) PRO/100 Family of
Adapters, version 2.2.x. This driver includes support for Itanium(TM)-based
Adapters, version 3.x.x. This driver includes support for Itanium(TM)-based
systems.
Supported Adapters
==================
The following Intel network adapters are compatible with the drivers
in this release:
Controller Adapter Name Board IDs
---------- ------------ ---------
82558 PRO/100+ PCI Adapter 668081-xxx, 689661-xxx
82558 PRO/100+ Management Adapter 691334-xxx, 701738-xxx,
721383-xxx
82558 PRO/100+ Dual Port Server Adapter 714303-xxx, 711269-xxx,
A28276-xxx
82558 PRO/100+ PCI Server Adapter 710550-xxx
82550 PRO/100 S Server Adapter 752438-xxx (82550)
82559 A56831-xxx, A10563-xxx,
A12171-xxx, A12321-xxx,
A12320-xxx, A12170-xxx
748568-xxx (82559)
748565-xxx (82559)
82550 PRO/100 S Desktop Adapter 751767-xxx (82550)
82559 748592-xxx, A12167-xxx,
A12318-xxx, A12317-xxx,
A12165-xxx
748569-xxx (82559)
82559 PRO/100+ Server Adapter 729757-xxx
82559 PRO/100 S Management Adapter 748566-xxx, 748564-xxx
82550 PRO/100 S Dual Port Server Adapter A56831-xxx
82551 PRO/100 M Desktop Adapter A80897-xxx
PRO/100 S Advanced Management Adapter 747842-xxx, 745171-xxx
CNR PRO/100 VE Desktop Adapter A10386-xxx, A10725-xxx,
A23801-xxx, A19716-xxx
PRO/100 VM Desktop Adapter A14323-xxx, A19725-xxx,
A23801-xxx, A22220-xxx,
A23796-xxx
To verify that your adapter is supported, find the board ID number on the
adapter. Look for a label that has a barcode and a number in the format
A12345-001. Match this to the list of numbers above.
......@@ -91,143 +37,6 @@ For the latest Intel PRO/100 network driver for Linux, see:
http://downloadfinder.intel.com/scripts-df/support_intel.asp
Command Line Parameters
=======================
If the driver is built as a module, the following optional parameters are
used by entering them on the command line with the modprobe or insmod command
using this syntax:
modprobe e100 [<option>=<VAL1>,<VAL2>,...]
insmod e100 [<option>=<VAL1>,<VAL2>,...]
For example, with two Intel PRO/100 PCI adapters, entering:
modprobe e100 TxDescriptors=32,128
loads the e100 driver with 32 TX resources for the first adapter and 128 TX
resources for the second adapter. This configuration favors the second
adapter. The driver supports up to 16 network adapters concurrently.
The default value for each parameter is generally the recommended setting,
unless otherwise noted.
NOTE: Giving any command line option the value "-1" causes the driver to use
the appropriate default value for that option, as if no value was
specified.
BundleMax
Valid Range: 1-65535
Default Value: 6
This parameter holds the maximum number of small packets (less than 128
bytes) in a bundle. Suggested values range from 2 to 10. See "CPU Cycle
Saver."
BundleSmallFr
Valid Range: 0-1 (0=off, 1=on)
Default Value: 0
The value 1 (on) causes small packets (less than 128 bytes) to be bundled.
See "CPU Cycle Saver."
e100_speed_duplex
Valid Range: 0-4 (1=10half;2=10full;3=100half;4=100full)
Default Value: 0
The default value of 0 sets the adapter to auto-negotiate. Other values
set the adapter to forced speed and duplex.
Example usage: insmod e100.o e100_speed_duplex=4,4 (for two adapters)
flow_control
Valid Range: 0-1 (0=off, 1=on)
Default Value: 0
This parameter controls the automatic generation(Tx) and response(Rx) to
Ethernet PAUSE frames. flow_control should NOT be set to 1 when the
adapter is connected to an interface that does not support Ethernet PAUSE
frames and when the e100_speed_duplex parameter is NOT set to zero.
IntDelay
Valid Range: 0-65535 (0=off)
Default Value: 1536
This parameter holds the number of time units (in adapter terminology)
until the adapter generates an interrupt. The recommended value for
IntDelay is 1536 (upon initialization). Suggested values range from
512 to 2048. See "CPU Cycle Saver."
IFS
Valid Range: 0-1 (0=off, 1=on)
Default Value: 1
Inter Frame Spacing (IFS) aims to reduce the number of Ethernet frame
collisions by altering the time between frame transmissions. When IFS is
enabled the driver tries to find an optimal IFS value. It is used only at
half duplex.
RxDescriptors
Valid Range: 8-1024
Default Value: 64
This parameter defines the number of receive descriptors allocated by
the driver. Increasing this value allows the driver to buffer more
incoming packets before the driver is required to service an interrupt.
The maximum value for Itanium-based systems is 64.
TxDescriptors
Valid Range: 19-1024
Default Value: 64
This value is the number of transmit descriptors allocated by the driver.
Increasing this value allows the protocol stack to queue more transmits at
the driver level. The maximum value for Itanium-based systems is 64.
ucode
Valid Range: 0-1 (0=off, 1=on)
Default Value: 0 for 82558-based adapters
1 for 82559, 82550, and 82551-based adapters
On uploads the micro code to the adapter, which enables CPU Cycle Saver.
See the section "CPU Cycle Saver" below.
Example usage: insmod e100.o ucode=1
Not available on 82557-based adapters.
XsumRX
Valid Range: 0-1 (0=off, 1=on)
Default Value: 1
On allows Rx checksum offloading for TCP/UDP packets. Requires that the
hardware support this feature.
Not available on 82557 and 82558-based adapters.
CPU Cycle Saver
================
CPU Cycle Saver reduces CPU utilization by reducing the number of interrupts
that the adapter generates.
When CPU Cycle Saver is turned off, the adapter generates one interrupt for
every frame that is received. This means that the operating system stops what
it is doing and switches to the network driver in order to process the
receive.
When CPU Cycle Saver is on, the adapter does not generate an interrupt for
every frame it receives. Instead, it waits until it receives several frames
before generating an interrupt. This reduces the amount of time spent
switching to and from the driver.
CPU Cycle Saver consists of these arguments: IntDelay, BundleMax and
BundleSmallFr. When IntDelay is increased, the adapter waits longer for
frames to arrive before generating the interrupt. By increasing BundleMax,
the network adapter waits for the number of small frames (less than 128 bytes)
specified to arrive before generating the interrupt. When BundleSmallFr is
disabled, the adapter does not bundle small packets. Such small packets are
often, but not always, control packets that are better served immediately;
therefore, BundleSmallFr is disabled by default.
For most users, it is recommended that CPU Cycle Saver be used with the
default values specified in the Command Line Parameters section. However, in
some cases, performance problems may occur with CPU Cycle Saver. If such
problems are observed, we recommend turning off this feature by setting
ucode=0.
Support
=======
......
......@@ -250,7 +250,7 @@ xpram shows up under sys/ as 'xpram'.
-----------
The netiucv driver creates an attribute 'connection' under
bus/iucv/drivers/NETIUCV. Piping to this attibute creates a new netiucv
bus/iucv/drivers/netiucv. Piping to this attibute creates a new netiucv
connection to the specified host.
Netiucv connections show up under devices/iucv/ as "netiucv<ifnum>". The interface
......
......@@ -317,9 +317,6 @@ CONFIG_SERIAL_CONSOLE=y
#
CONFIG_I2C=y
CONFIG_I2C_ALGOBIT=y
# CONFIG_I2C_PHILIPSPAR is not set
# CONFIG_I2C_ELV is not set
# CONFIG_I2C_VELLEMAN is not set
# CONFIG_I2C_ALGOPCF is not set
CONFIG_I2C_CHARDEV=y
......
......@@ -690,9 +690,6 @@ CONFIG_UNIX98_PTY_COUNT=256
#
CONFIG_I2C=m
CONFIG_I2C_ALGOBIT=m
# CONFIG_I2C_PHILIPSPAR is not set
CONFIG_I2C_ELV=m
CONFIG_I2C_VELLEMAN=m
# CONFIG_I2C_BIT_SA1100_GPIO is not set
CONFIG_I2C_ALGOPCF=m
CONFIG_I2C_ELEKTOR=m
......@@ -735,7 +732,6 @@ CONFIG_SOFT_WATCHDOG=m
CONFIG_SA1100_WATCHDOG=m
# CONFIG_EUROTECH_WDT is not set
# CONFIG_IB700_WDT is not set
# CONFIG_I810_TCO is not set
# CONFIG_MIXCOMWD is not set
# CONFIG_60XX_WDT is not set
# CONFIG_W83877F_WDT is not set
......
......@@ -573,7 +573,6 @@ CONFIG_WATCHDOG=y
CONFIG_SA1100_WATCHDOG=m
# CONFIG_EUROTECH_WDT is not set
# CONFIG_IB700_WDT is not set
# CONFIG_I810_TCO is not set
# CONFIG_MIXCOMWD is not set
# CONFIG_SCx200_WDT is not set
# CONFIG_60XX_WDT is not set
......
......@@ -340,9 +340,6 @@ CONFIG_PRINTER=y
#
CONFIG_I2C=y
CONFIG_I2C_ALGOBIT=y
# CONFIG_I2C_PHILIPSPAR is not set
# CONFIG_I2C_ELV is not set
# CONFIG_I2C_VELLEMAN is not set
# CONFIG_I2C_ALGOPCF is not set
# CONFIG_I2C_CHARDEV is not set
......
......@@ -475,7 +475,6 @@ CONFIG_SOFT_WATCHDOG=y
# CONFIG_ADVANTECH_WDT is not set
# CONFIG_60XX_WDT is not set
# CONFIG_MIXCOMWD is not set
# CONFIG_I810_TCO is not set
# CONFIG_MACHZ_WDT is not set
# CONFIG_INTEL_RNG is not set
# CONFIG_NVRAM is not set
......
......@@ -525,7 +525,6 @@ CONFIG_SOFT_WATCHDOG=y
# CONFIG_ACQUIRE_WDT is not set
# CONFIG_60XX_WDT is not set
# CONFIG_MIXCOMWD is not set
# CONFIG_I810_TCO is not set
CONFIG_21285_WATCHDOG=m
CONFIG_977_WATCHDOG=m
CONFIG_DS1620=y
......
......@@ -500,8 +500,6 @@ CONFIG_UNIX98_PTY_COUNT=32
#
CONFIG_I2C=y
CONFIG_I2C_ALGOBIT=y
# CONFIG_I2C_ELV is not set
# CONFIG_I2C_VELLEMAN is not set
# CONFIG_SCx200_ACB is not set
CONFIG_I2C_BIT_SA1100_GPIO=y
# CONFIG_I2C_ALGOPCF is not set
......@@ -536,7 +534,6 @@ CONFIG_WATCHDOG=y
CONFIG_SA1100_WATCHDOG=m
# CONFIG_EUROTECH_WDT is not set
# CONFIG_IB700_WDT is not set
# CONFIG_I810_TCO is not set
# CONFIG_MIXCOMWD is not set
# CONFIG_SCx200_WDT is not set
# CONFIG_60XX_WDT is not set
......
......@@ -617,7 +617,6 @@ CONFIG_WATCHDOG=y
CONFIG_977_WATCHDOG=y
# CONFIG_EUROTECH_WDT is not set
# CONFIG_IB700_WDT is not set
# CONFIG_I810_TCO is not set
# CONFIG_MIXCOMWD is not set
# CONFIG_SCx200_WDT is not set
# CONFIG_60XX_WDT is not set
......
......@@ -506,9 +506,6 @@ CONFIG_UNIX98_PTY_COUNT=32
#
CONFIG_I2C=y
CONFIG_I2C_ALGOBIT=y
# CONFIG_I2C_PHILIPSPAR is not set
# CONFIG_I2C_ELV is not set
# CONFIG_I2C_VELLEMAN is not set
# CONFIG_I2C_ASSABET is not set
CONFIG_I2C_PFS168=y
# CONFIG_I2C_ALGOPCF is not set
......
......@@ -506,9 +506,6 @@ CONFIG_UNIX98_PTY_COUNT=32
#
CONFIG_I2C=y
CONFIG_I2C_ALGOBIT=y
# CONFIG_I2C_PHILIPSPAR is not set
# CONFIG_I2C_ELV is not set
# CONFIG_I2C_VELLEMAN is not set
# CONFIG_I2C_ASSABET is not set
CONFIG_I2C_PFS168=y
# CONFIG_I2C_ALGOPCF is not set
......
......@@ -507,9 +507,6 @@ CONFIG_UNIX98_PTY_COUNT=32
#
CONFIG_I2C=y
CONFIG_I2C_ALGOBIT=y
# CONFIG_I2C_PHILIPSPAR is not set
# CONFIG_I2C_ELV is not set
# CONFIG_I2C_VELLEMAN is not set
# CONFIG_I2C_ASSABET is not set
# CONFIG_I2C_ALGOPCF is not set
CONFIG_I2C_CHARDEV=y
......
......@@ -506,9 +506,6 @@ CONFIG_UNIX98_PTY_COUNT=32
#
CONFIG_I2C=y
CONFIG_I2C_ALGOBIT=y
# CONFIG_I2C_PHILIPSPAR is not set
# CONFIG_I2C_ELV is not set
# CONFIG_I2C_VELLEMAN is not set
# CONFIG_I2C_ASSABET is not set
CONFIG_I2C_PFS168=y
# CONFIG_I2C_ALGOPCF is not set
......
......@@ -462,9 +462,6 @@ CONFIG_PRINTER=m
#
CONFIG_I2C=y
CONFIG_I2C_ALGOBIT=y
# CONFIG_I2C_PHILIPSPAR is not set
# CONFIG_I2C_ELV is not set
# CONFIG_I2C_VELLEMAN is not set
# CONFIG_SCx200_ACB is not set
# CONFIG_I2C_ALGOPCF is not set
CONFIG_I2C_CHARDEV=y
......
......@@ -476,7 +476,6 @@ CONFIG_WATCHDOG=y
CONFIG_SA1100_WATCHDOG=y
# CONFIG_EUROTECH_WDT is not set
# CONFIG_IB700_WDT is not set
# CONFIG_I810_TCO is not set
# CONFIG_MIXCOMWD is not set
# CONFIG_60XX_WDT is not set
# CONFIG_W83877F_WDT is not set
......
......@@ -624,9 +624,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
#
CONFIG_I2C=m
CONFIG_I2C_ALGOBIT=m
# CONFIG_I2C_PHILIPSPAR is not set
# CONFIG_I2C_ELV is not set
# CONFIG_I2C_VELLEMAN is not set
# CONFIG_SCx200_I2C is not set
# CONFIG_SCx200_ACB is not set
# CONFIG_I2C_BIT_SA1100_GPIO is not set
......
......@@ -185,9 +185,6 @@ CONFIG_SOUND_GAMEPORT=y
#
CONFIG_I2C=y
CONFIG_I2C_ALGOBIT=y
# CONFIG_I2C_PHILIPSPAR is not set
# CONFIG_I2C_ELV is not set
# CONFIG_I2C_VELLEMAN is not set
CONFIG_I2C_ALGOPCF=y
# CONFIG_I2C_ELEKTOR is not set
CONFIG_I2C_CHARDEV=y
......
......@@ -66,7 +66,6 @@ CONFIG_MPENTIUM4=y
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
# CONFIG_MELAN is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP2 is not set
......@@ -141,7 +140,6 @@ CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y
# CONFIG_ACPI_RELAXED_AML is not set
# CONFIG_X86_PM_TIMER is not set
#
......
/*
* Code for the vsyscall page. This version uses the old int $0x80 method.
*
* NOTE:
* 1) __kernel_vsyscall _must_ be first in this page.
* 2) there are alignment constraints on this stub, see vsyscall-sigreturn.S
* for details.
*/
.text
......
......@@ -2,8 +2,8 @@
* Common code for the sigreturn entry points on the vsyscall page.
* So far this code is the same for both int80 and sysenter versions.
* This file is #include'd by vsyscall-*.S to define them after the
* vsyscall entry point. The addresses we get for these entry points
* by doing ".balign 32" must match in both versions of the page.
* vsyscall entry point. The kernel assumes that the addresses of these
* routines are constant for all vsyscall implementations.
*/
#include <asm/unistd.h>
......@@ -15,7 +15,7 @@
*/
.text
.balign 32
.org __kernel_vsyscall+32
.globl __kernel_sigreturn
.type __kernel_sigreturn,@function
__kernel_sigreturn:
......
/*
* Code for the vsyscall page. This version uses the sysenter instruction.
*
* NOTE:
* 1) __kernel_vsyscall _must_ be first in this page.
* 2) there are alignment constraints on this stub, see vsyscall-sigreturn.S
* for details.
*/
.text
......
......@@ -105,7 +105,6 @@ CONFIG_ACPI_BUS=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y
# CONFIG_ACPI_RELAXED_AML is not set
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCI_LEGACY_PROC=y
......@@ -239,7 +238,6 @@ CONFIG_MD_RAID1=m
CONFIG_MD_RAID5=m
CONFIG_MD_MULTIPATH=m
CONFIG_BLK_DEV_DM=m
CONFIG_DM_IOCTL_V4=y
#
# Fusion MPT device support
......
......@@ -101,7 +101,6 @@ CONFIG_ACPI_BUS=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y
# CONFIG_ACPI_RELAXED_AML is not set
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCI_LEGACY_PROC=y
......@@ -619,7 +618,6 @@ CONFIG_I2C_ALGOPCF=y
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_ELV is not set
# CONFIG_I2C_I801 is not set
# CONFIG_I2C_I810 is not set
# CONFIG_I2C_ISA is not set
......@@ -631,7 +629,6 @@ CONFIG_I2C_ALGOPCF=y
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_VELLEMAN is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set
# CONFIG_I2C_VOODOO3 is not set
......
......@@ -323,7 +323,6 @@ CONFIG_MD_RAID5=m
# CONFIG_MD_RAID6 is not set
CONFIG_MD_MULTIPATH=m
CONFIG_BLK_DEV_DM=m
CONFIG_DM_IOCTL_V4=y
#
# Fusion MPT device support
......
......@@ -114,7 +114,7 @@ zimageinitrd-$(CONFIG_SPRUCE) := zImage.initrd-TREE
misc-$(CONFIG_SPRUCE) += misc-spruce.o
# SMP images should have a '.smp' suffix.
end-$(CONFIG_SMP) += .smp
end-$(CONFIG_SMP) := $(end-y).smp
# This is a treeboot that needs init functions until the
# boot rom is sorted out (i.e. this is short lived)
......
......@@ -219,6 +219,8 @@ void write_prep_partition(int in, int out)
pe.number_of_sectors = cpu_to_le32(2*18*80-1);
#endif /* __i386__ */
memcpy(&block[0x1BE], &pe, sizeof(pe));
write( out, block, sizeof(block) );
write( out, entry, sizeof(*entry) );
write( out, length, sizeof(*length) );
......
......@@ -400,7 +400,6 @@ CONFIG_WATCHDOG=y
# CONFIG_ADVANTECH_WDT is not set
# CONFIG_EUROTECH_WDT is not set
# CONFIG_IB700_WDT is not set
# CONFIG_I810_TCO is not set
# CONFIG_MIXCOMWD is not set
# CONFIG_SCx200_WDT is not set
# CONFIG_60XX_WDT is not set
......
......@@ -366,7 +366,6 @@ CONFIG_WATCHDOG=y
# CONFIG_ADVANTECH_WDT is not set
# CONFIG_EUROTECH_WDT is not set
# CONFIG_IB700_WDT is not set
# CONFIG_I810_TCO is not set
# CONFIG_MIXCOMWD is not set
# CONFIG_SCx200_WDT is not set
# CONFIG_60XX_WDT is not set
......
......@@ -177,7 +177,6 @@ CONFIG_MD_RAID1=y
CONFIG_MD_RAID5=y
# CONFIG_MD_MULTIPATH is not set
CONFIG_BLK_DEV_DM=y
CONFIG_DM_IOCTL_V4=y
#
# ATA/ATAPI/MFM/RLL support
......@@ -622,13 +621,11 @@ CONFIG_I2C_ALGOPCF=y
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_ELV is not set
# CONFIG_I2C_I801 is not set
# CONFIG_I2C_I810 is not set
# CONFIG_I2C_ISA is not set
# CONFIG_I2C_KEYWEST is not set
# CONFIG_I2C_NFORCE2 is not set
# CONFIG_I2C_PHILIPSPAR is not set
# CONFIG_I2C_PIIX4 is not set
# CONFIG_I2C_PROSAVAGE is not set
# CONFIG_I2C_SAVAGE4 is not set
......@@ -636,7 +633,6 @@ CONFIG_I2C_ALGOPCF=y
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_VELLEMAN is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set
# CONFIG_I2C_VOODOO3 is not set
......
......@@ -436,7 +436,6 @@ CONFIG_WATCHDOG=y
# CONFIG_ADVANTECH_WDT is not set
# CONFIG_EUROTECH_WDT is not set
# CONFIG_IB700_WDT is not set
# CONFIG_I810_TCO is not set
# CONFIG_MIXCOMWD is not set
# CONFIG_SCx200_WDT is not set
# CONFIG_60XX_WDT is not set
......
......@@ -145,7 +145,7 @@ void consistent_sync(void *vaddr, size_t size, int direction)
switch (direction) {
case DMA_NONE:
BUG();
case DMA_FROMDEVICE: /* invalidate only */
case DMA_FROM_DEVICE: /* invalidate only */
invalidate_dcache_range(start, end);
break;
case DMA_TODEVICE: /* writeback only */
......
......@@ -44,8 +44,8 @@ indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
cfg_type = 1;
PCI_CFG_OUT(hose->cfg_addr,
(0x80000000 | ((dev->bus->number - hose->bus_offset) << 16)
| (dev->devfn << 8) | ((offset & 0xfc) | cfg_type)));
(0x80000000 | ((bus->number - hose->bus_offset) << 16)
| (devfn << 8) | ((offset & 0xfc) | cfg_type)));
/*
* Note: the caller has already checked that offset is
......@@ -83,8 +83,8 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
cfg_type = 1;
PCI_CFG_OUT(hose->cfg_addr,
(0x80000000 | ((dev->bus->number - hose->bus_offset) << 16)
| (dev->devfn << 8) | ((offset & 0xfc) | cfg_type)));
(0x80000000 | ((bus->number - hose->bus_offset) << 16)
| (devfn << 8) | ((offset & 0xfc) | cfg_type)));
/*
* Note: the caller has already checked that offset is
......
......@@ -174,14 +174,12 @@ config NUMA
depends on DISCONTIGMEM
config PREEMPT
bool
bool "Preemptible Kernel"
depends on BROKEN
help
This option reduces the latency of the kernel when reacting to
real-time or interactive events by allowing a low priority process to
be preempted even if it is in kernel mode executing a system call.
Unfortunately the kernel code has some race conditions if both
CONFIG_SMP and CONFIG_PREEMPT are enabled, so this option is
currently disabled if you are building an SMP kernel.
Say Y here if you are building a kernel for a desktop, embedded
or real-time system. Say N if you are unsure.
......
......@@ -278,7 +278,6 @@ CONFIG_MD_RAID5=y
# CONFIG_MD_RAID6 is not set
# CONFIG_MD_MULTIPATH is not set
CONFIG_BLK_DEV_DM=y
CONFIG_DM_IOCTL_V4=y
# CONFIG_DM_CRYPT is not set
#
......@@ -613,7 +612,6 @@ CONFIG_I2C_ALGOBIT=y
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_ELV is not set
# CONFIG_I2C_I801 is not set
# CONFIG_I2C_I810 is not set
# CONFIG_I2C_ISA is not set
......@@ -626,7 +624,6 @@ CONFIG_I2C_KEYWEST=y
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_VELLEMAN is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set
# CONFIG_I2C_VOODOO3 is not set
......
......@@ -679,7 +679,6 @@ CONFIG_I2C_ALGOBIT=y
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_ELV is not set
# CONFIG_I2C_I801 is not set
# CONFIG_I2C_I810 is not set
# CONFIG_I2C_ISA is not set
......@@ -691,7 +690,6 @@ CONFIG_I2C_ALGOBIT=y
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_VELLEMAN is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set
# CONFIG_I2C_VOODOO3 is not set
......
......@@ -679,7 +679,6 @@ CONFIG_I2C_ALGOBIT=y
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_ELV is not set
# CONFIG_I2C_I801 is not set
# CONFIG_I2C_I810 is not set
# CONFIG_I2C_ISA is not set
......@@ -691,7 +690,6 @@ CONFIG_I2C_ALGOBIT=y
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_VELLEMAN is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set
# CONFIG_I2C_VOODOO3 is not set
......
......@@ -20,7 +20,7 @@ unsigned long find_next_zero_bit(unsigned long *addr, unsigned long size,
offset &= 63UL;
if (offset) {
tmp = *(p++);
tmp |= ~0UL >> (64-offset);
tmp |= ~0UL >> (64 - offset);
if (size < 64)
goto found_first;
if (~tmp)
......@@ -41,10 +41,11 @@ unsigned long find_next_zero_bit(unsigned long *addr, unsigned long size,
found_first:
tmp |= ~0UL << size;
if (tmp == ~0UL) /* Are any bits zero? */
return result + size; /* Nope. */
return result + size; /* Nope. */
found_middle:
return result + ffz(tmp);
}
EXPORT_SYMBOL(find_next_zero_bit);
unsigned long find_next_bit(unsigned long *addr, unsigned long size,
......@@ -80,18 +81,19 @@ unsigned long find_next_bit(unsigned long *addr, unsigned long size,
found_first:
tmp &= (~0UL >> (64 - size));
if (tmp == 0UL) /* Are any bits set? */
return result + size; /* Nope. */
if (tmp == 0UL) /* Are any bits set? */
return result + size; /* Nope. */
found_middle:
return result + __ffs(tmp);
}
EXPORT_SYMBOL(find_next_bit);
static inline unsigned int ext2_ilog2(unsigned int x)
{
int lz;
asm("cntlzw %0,%1" : "=r" (lz) : "r" (x));
asm("cntlzw %0,%1": "=r"(lz):"r"(x));
return 31 - lz;
}
......@@ -107,38 +109,39 @@ static inline unsigned int ext2_ffz(unsigned int x)
unsigned long find_next_zero_le_bit(unsigned long *addr, unsigned long size,
unsigned long offset)
{
unsigned int *p = ((unsigned int *) addr) + (offset >> 5);
unsigned int result = offset & ~31;
unsigned int tmp;
unsigned int *p = ((unsigned int *)addr) + (offset >> 5);
unsigned int result = offset & ~31;
unsigned int tmp;
if (offset >= size)
return size;
size -= result;
offset &= 31;
if (offset) {
tmp = cpu_to_le32p(p++);
tmp |= ~0U >> (32-offset); /* bug or feature ? */
if (size < 32)
goto found_first;
if (tmp != ~0)
goto found_middle;
size -= 32;
result += 32;
}
while (size >= 32) {
if ((tmp = cpu_to_le32p(p++)) != ~0)
goto found_middle;
result += 32;
size -= 32;
}
if (!size)
return result;
tmp = cpu_to_le32p(p);
if (offset >= size)
return size;
size -= result;
offset &= 31;
if (offset) {
tmp = cpu_to_le32p(p++);
tmp |= ~0U >> (32 - offset); /* bug or feature ? */
if (size < 32)
goto found_first;
if (tmp != ~0)
goto found_middle;
size -= 32;
result += 32;
}
while (size >= 32) {
if ((tmp = cpu_to_le32p(p++)) != ~0)
goto found_middle;
result += 32;
size -= 32;
}
if (!size)
return result;
tmp = cpu_to_le32p(p);
found_first:
tmp |= ~0 << size;
if (tmp == ~0) /* Are any bits zero? */
return result + size; /* Nope. */
tmp |= ~0 << size;
if (tmp == ~0) /* Are any bits zero? */
return result + size; /* Nope. */
found_middle:
return result + ext2_ffz(tmp);
return result + ext2_ffz(tmp);
}
EXPORT_SYMBOL(find_next_zero_le_bit);
......@@ -173,7 +173,8 @@ Commands:\n\
S print special registers\n\
t print backtrace\n\
T Enable/Disable PPCDBG flags\n\
x exit monitor\n\
x exit monitor and recover\n\
X exit monitor and dont recover\n\
u dump segment table or SLB\n\
? help\n"
"\
......@@ -340,6 +341,9 @@ xmon(struct pt_regs *excp)
#endif /* CONFIG_SMP */
set_msrd(msr); /* restore interrupt enable */
if (cmd == 'X')
return 0;
return 1;
}
......@@ -559,6 +563,7 @@ cmds(struct pt_regs *excp)
break;
case 's':
case 'x':
case 'X':
case EOF:
return cmd;
case '?':
......
......@@ -95,24 +95,11 @@ config SMP
Even if you don't know what to do here, say Y.
config NR_CPUS
int "Maximum number of CPUs (2-32)"
range 2 32
depends on SMP && ARCH_S390X = 'n'
default "32"
help
This allows you to specify the maximum number of CPUs which this
kernel will support. The maximum supported value is 32 and the
minimum value which makes sense is 2.
This is purely to save memory - each supported CPU adds
approximately eight kilobytes to the kernel image.
config NR_CPUS
int "Maximum number of CPUs (2-64)"
range 2 64
depends on SMP && ARCH_S390X
default "64"
depends on SMP
default "32"
help
This allows you to specify the maximum number of CPUs which this
kernel will support. The maximum supported value is 64 and the
......
......@@ -233,8 +233,8 @@ static int appldata_diag(char record_nr, u16 function, unsigned long buffer,
.buffer_addr = virt_to_phys((void *) buffer)
};
if (!MACHINE_IS_VM)
return -ENOSYS;
if (!MACHINE_IS_VM)
return -ENOSYS;
ry = -1;
asm volatile(
"diag %1,%0,0xDC\n\t"
......@@ -336,9 +336,9 @@ appldata_interval_handler(ctl_table *ctl, int write, struct file *filp,
P_ERROR("Timer CPU interval has to be > 0!\n");
return -EINVAL;
}
per_cpu_interval = (u64) (interval*1000 / num_online_cpus()) * TOD_MICRO;
spin_lock(&appldata_timer_lock);
per_cpu_interval = (u64) (interval*1000 / num_online_cpus()) * TOD_MICRO;
appldata_interval = interval;
if (appldata_timer_active) {
for (i = 0; i < num_online_cpus(); i++) {
......@@ -395,6 +395,10 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,
spin_lock_bh(&appldata_ops_lock);
if ((buf[0] == '1') && (ops->active == 0)) {
if (!try_module_get(ops->owner)) {
spin_unlock_bh(&appldata_ops_lock);
return -ENODEV;
}
ops->active = 1;
ops->callback(ops->data); // init record
rc = appldata_diag(ops->record_nr,
......@@ -403,6 +407,7 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,
if (rc != 0) {
P_ERROR("START DIAG 0xDC for %s failed, "
"return code: %d\n", ops->name, rc);
module_put(ops->owner);
ops->active = 0;
} else {
P_INFO("Monitoring %s data enabled, "
......@@ -419,6 +424,7 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,
P_INFO("Monitoring %s data disabled, "
"DIAG 0xDC stopped.\n", ops->name);
}
module_put(ops->owner);
}
spin_unlock_bh(&appldata_ops_lock);
out:
......@@ -440,30 +446,26 @@ int appldata_register_ops(struct appldata_ops *ops)
{
struct list_head *lh;
struct appldata_ops *tmp_ops;
int rc, i;
int i;
rc = 0;
i = 0;
if ((ops->size > APPLDATA_MAX_REC_SIZE) ||
(ops->size < 0)){
P_ERROR("Invalid size of %s record = %i, maximum = %i!\n",
ops->name, ops->size, APPLDATA_MAX_REC_SIZE);
rc = -ENOMEM;
goto out;
return -ENOMEM;
}
if ((ops->ctl_nr == CTL_APPLDATA) ||
(ops->ctl_nr == CTL_APPLDATA_TIMER) ||
(ops->ctl_nr == CTL_APPLDATA_INTERVAL)) {
P_ERROR("ctl_nr %i already in use!\n", ops->ctl_nr);
rc = -EBUSY;
goto out;
return -EBUSY;
}
ops->ctl_table = kmalloc(4*sizeof(struct ctl_table), GFP_KERNEL);
if (ops->ctl_table == NULL) {
P_ERROR("Not enough memory for %s ctl_table!\n", ops->name);
rc = -ENOMEM;
goto out;
return -ENOMEM;
}
memset(ops->ctl_table, 0, 4*sizeof(struct ctl_table));
......@@ -477,18 +479,16 @@ int appldata_register_ops(struct appldata_ops *ops)
ops->ctl_nr);
if (strncmp(tmp_ops->name, ops->name,
APPLDATA_PROC_NAME_LENGTH) == 0) {
spin_unlock_bh(&appldata_ops_lock);
P_ERROR("Name \"%s\" already registered!\n", ops->name);
kfree(ops->ctl_table);
rc = -EBUSY;
goto out;
spin_unlock_bh(&appldata_ops_lock);
return -EBUSY;
}
if (tmp_ops->ctl_nr == ops->ctl_nr) {
spin_unlock_bh(&appldata_ops_lock);
P_ERROR("ctl_nr %i already registered!\n", ops->ctl_nr);
kfree(ops->ctl_table);
rc = -EBUSY;
goto out;
spin_unlock_bh(&appldata_ops_lock);
return -EBUSY;
}
}
list_add(&ops->list, &appldata_ops_list);
......@@ -512,9 +512,9 @@ int appldata_register_ops(struct appldata_ops *ops)
ops->sysctl_header = register_sysctl_table(ops->ctl_table,1);
ops->ctl_table[2].de->owner = ops->owner;
P_INFO("%s-ops registered!\n", ops->name);
out:
return rc;
return 0;
}
/*
......@@ -524,26 +524,11 @@ int appldata_register_ops(struct appldata_ops *ops)
*/
void appldata_unregister_ops(struct appldata_ops *ops)
{
int rc;
unregister_sysctl_table(ops->sysctl_header);
kfree(ops->ctl_table);
if (ops->active == 1) {
ops->active = 0;
rc = appldata_diag(ops->record_nr, APPLDATA_STOP_REC,
(unsigned long) ops->data, ops->size);
if (rc != 0) {
P_ERROR("STOP DIAG 0xDC for %s failed, "
"return code: %d\n", ops->name, rc);
} else {
P_INFO("Monitoring %s data disabled, "
"DIAG 0xDC stopped.\n", ops->name);
}
}
spin_lock_bh(&appldata_ops_lock);
list_del(&ops->list);
spin_unlock_bh(&appldata_ops_lock);
unregister_sysctl_table(ops->sysctl_header);
kfree(ops->ctl_table);
P_INFO("%s-ops unregistered!\n", ops->name);
}
/********************** module-ops management <END> **************************/
......
......@@ -22,6 +22,10 @@ int main(void)
DEFINE(__THREAD_ksp, offsetof(struct task_struct, thread.ksp),);
DEFINE(__THREAD_per, offsetof(struct task_struct, thread.per_info),);
BLANK();
DEFINE(__PER_atmid, offsetof(per_struct, lowcore.words.perc_atmid),);
DEFINE(__PER_address, offsetof(per_struct, lowcore.words.address),);
DEFINE(__PER_access_id, offsetof(per_struct, lowcore.words.access_id),);
BLANK();
DEFINE(__TI_task, offsetof(struct thread_info, task),);
DEFINE(__TI_domain, offsetof(struct thread_info, exec_domain),);
DEFINE(__TI_flags, offsetof(struct thread_info, flags),);
......
......@@ -828,11 +828,6 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat *statbuf)
return err;
}
asmlinkage int sys32_sysfs(int option, u32 arg1, u32 arg2)
{
return sys_sysfs(option, arg1, arg2);
}
struct ncp_mount_data32 {
int version;
unsigned int ncp_fd;
......@@ -1718,33 +1713,6 @@ asmlinkage int sys32_settimeofday(struct compat_timeval *tv, struct timezone *tz
return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL);
}
asmlinkage int sys32_utimes(char __user *filename,
struct compat_timeval __user *tvs)
{
char *kfilename;
struct timeval ktvs[2];
mm_segment_t old_fs;
int ret;
kfilename = getname(filename);
ret = PTR_ERR(kfilename);
if (!IS_ERR(kfilename)) {
if (tvs) {
if (get_tv32(&ktvs[0], tvs) ||
get_tv32(&ktvs[1], 1+tvs))
return -EFAULT;
}
old_fs = get_fs();
set_fs(KERNEL_DS);
ret = sys_utimes(kfilename, &ktvs[0]);
set_fs(old_fs);
putname(kfilename);
}
return ret;
}
/* These are here just in case some old sparc32 binary calls it. */
asmlinkage int sys32_pause(void)
{
......@@ -1753,17 +1721,6 @@ asmlinkage int sys32_pause(void)
return -ERESTARTNOHAND;
}
asmlinkage int sys32_prctl(int option, u32 arg2, u32 arg3, u32 arg4, u32 arg5)
{
return sys_prctl(option,
(unsigned long) arg2,
(unsigned long) arg3,
(unsigned long) arg4,
(unsigned long) arg5);
}
asmlinkage compat_ssize_t sys32_pread64(unsigned int fd, char *ubuf,
compat_size_t count, u32 poshi, u32 poslo)
{
......@@ -1897,13 +1854,6 @@ asmlinkage int sys32_adjtimex(struct timex32 *utp)
return ret;
}
asmlinkage int sys_setpriority32(u32 which, u32 who, u32 niceval)
{
return sys_setpriority((int) which,
(int) who,
(int) niceval);
}
struct __sysctl_args32 {
u32 name;
int nlen;
......
......@@ -144,6 +144,11 @@ typedef struct
PSW32_MASK_IO | PSW32_MASK_EXT | PSW32_MASK_MCHECK | \
PSW32_MASK_PSTATE)
#define PSW32_MASK_MERGE(CURRENT,NEW) \
(((CURRENT) & ~(PSW32_MASK_CC|PSW32_MASK_PM)) | \
((NEW) & (PSW32_MASK_CC|PSW32_MASK_PM)))
typedef struct
{
_psw_t32 psw;
......
......@@ -53,8 +53,6 @@ typedef struct
asmlinkage int FASTCALL(do_signal(struct pt_regs *regs, sigset_t *oldset));
int do_signal32(struct pt_regs *regs, sigset_t *oldset);
int copy_siginfo_to_user32(siginfo_t32 *to, siginfo_t *from)
{
int err;
......@@ -123,7 +121,7 @@ sys32_sigsuspend(struct pt_regs * regs,int history0, int history1, old_sigset_t
while (1) {
set_current_state(TASK_INTERRUPTIBLE);
schedule();
if (do_signal32(regs, &saveset))
if (do_signal(regs, &saveset))
return -EINTR;
}
}
......@@ -158,7 +156,7 @@ sys32_rt_sigsuspend(struct pt_regs * regs,compat_sigset_t *unewset, size_t sigse
while (1) {
set_current_state(TASK_INTERRUPTIBLE);
schedule();
if (do_signal32(regs, &saveset))
if (do_signal(regs, &saveset))
return -EINTR;
}
}
......@@ -294,8 +292,8 @@ static int save_sigregs32(struct pt_regs *regs,_sigregs32 *sregs)
_s390_regs_common32 regs32;
int err, i;
regs32.psw.mask = PSW32_USER_BITS |
((__u32)(regs->psw.mask >> 32) & PSW32_MASK_CC);
regs32.psw.mask = PSW32_MASK_MERGE(PSW32_USER_BITS,
(__u32)(regs->psw.mask >> 32));
regs32.psw.addr = PSW32_ADDR_AMODE31 | (__u32) regs->psw.addr;
for (i = 0; i < NUM_GPRS; i++)
regs32.gprs[i] = (__u32) regs->gprs[i];
......@@ -320,8 +318,8 @@ static int restore_sigregs32(struct pt_regs *regs,_sigregs32 *sregs)
err = __copy_from_user(&regs32, &sregs->regs, sizeof(regs32));
if (err)
return err;
regs->psw.mask = PSW_USER32_BITS |
(__u64)(regs32.psw.mask & PSW32_MASK_CC) << 32;
regs->psw.mask = PSW_MASK_MERGE(regs->psw.mask,
(__u64)regs32.psw.mask << 32);
regs->psw.addr = (__u64)(regs32.psw.addr & PSW32_ADDR_INSN);
for (i = 0; i < NUM_GPRS; i++)
regs->gprs[i] = (__u64) regs32.gprs[i];
......@@ -482,7 +480,6 @@ static void setup_frame32(int sig, struct k_sigaction *ka,
/* Set up registers for signal handler */
regs->gprs[15] = (__u64) frame;
regs->psw.addr = (__u64) ka->sa.sa_handler;
regs->psw.mask = PSW_USER32_BITS;
regs->gprs[2] = map_signal(sig);
regs->gprs[3] = (__u64) &frame->sc;
......@@ -539,7 +536,6 @@ static void setup_rt_frame32(int sig, struct k_sigaction *ka, siginfo_t *info,
/* Set up registers for signal handler */
regs->gprs[15] = (__u64) frame;
regs->psw.addr = (__u64) ka->sa.sa_handler;
regs->psw.mask = PSW_USER32_BITS;
regs->gprs[2] = map_signal(sig);
regs->gprs[3] = (__u64) &frame->info;
......@@ -556,36 +552,12 @@ static void setup_rt_frame32(int sig, struct k_sigaction *ka, siginfo_t *info,
* OK, we're invoking a handler
*/
static void
void
handle_signal32(unsigned long sig, siginfo_t *info, sigset_t *oldset,
struct pt_regs * regs)
{
struct k_sigaction *ka = &current->sighand->action[sig-1];
/* Are we from a system call? */
if (regs->trap == __LC_SVC_OLD_PSW) {
/* If so, check system call restarting.. */
switch (regs->gprs[2]) {
case -ERESTART_RESTARTBLOCK:
current_thread_info()->restart_block.fn =
do_no_restart_syscall;
clear_thread_flag(TIF_RESTART_SVC);
case -ERESTARTNOHAND:
regs->gprs[2] = -EINTR;
break;
case -ERESTARTSYS:
if (!(ka->sa.sa_flags & SA_RESTART)) {
regs->gprs[2] = -EINTR;
break;
}
/* fallthrough */
case -ERESTARTNOINTR:
regs->gprs[2] = regs->orig_gpr2;
regs->psw.addr -= regs->ilc;
}
}
/* Set up the stack frame */
if (ka->sa.sa_flags & SA_SIGINFO)
setup_rt_frame32(sig, ka, info, oldset, regs);
......@@ -604,53 +576,3 @@ handle_signal32(unsigned long sig, siginfo_t *info, sigset_t *oldset,
}
}
/*
* Note that 'init' is a special process: it doesn't get signals it doesn't
* want to handle. Thus you cannot kill init even with a SIGKILL even by
* mistake.
*
* Note that we go through the signals twice: once to check the signals that
* the kernel can handle, and then we build all the user-level signal handling
* stack-frames in one go after that.
*/
int do_signal32(struct pt_regs *regs, sigset_t *oldset)
{
siginfo_t info;
int signr;
/*
* We want the common case to go fast, which
* is why we may in certain cases get here from
* kernel mode. Just return without doing anything
* if so.
*/
if (!user_mode(regs))
return 1;
if (!oldset)
oldset = &current->blocked;
signr = get_signal_to_deliver(&info, regs, NULL);
if (signr > 0) {
/* Whee! Actually deliver the signal. */
handle_signal32(signr, &info, oldset, regs);
return 1;
}
/* Did we come from a system call? */
if ( regs->trap == __LC_SVC_OLD_PSW /* System Call! */ ) {
/* Restart the system call - no handlers present */
if (regs->gprs[2] == -ERESTARTNOHAND ||
regs->gprs[2] == -ERESTARTSYS ||
regs->gprs[2] == -ERESTARTNOINTR) {
regs->gprs[2] = regs->orig_gpr2;
regs->psw.addr -= regs->ilc;
}
/* Restart the system call with a new system call number */
if (regs->gprs[2] == -ERESTART_RESTARTBLOCK) {
regs->gprs[2] = __NR_restart_syscall;
set_thread_flag(TIF_RESTART_SVC);
}
}
return 0;
}
......@@ -1097,6 +1097,7 @@ compat_sys_futex_wrapper:
lgfr %r3,%r3 # int
lgfr %r4,%r4 # int
llgtr %r5,%r5 # struct compat_timespec *
llgtr %r6,%r6 # u32 *
jg compat_sys_futex # branch to system call
.globl sys32_setxattr_wrapper
......@@ -1338,3 +1339,17 @@ sys32_io_cancel_wrapper:
llgtr %r3,%r3 # struct iocb *
llgtr %r4,%r4 # struct io_event *
jg sys_io_cancel
.globl compat_sys_statfs64_wrapper
compat_sys_statfs64_wrapper:
llgtr %r2,%r2 # const char *
llgfr %r3,%r3 # compat_size_t
llgtr %r4,%r4 # struct compat_statfs64 *
jg compat_statfs64
.globl compat_sys_fstatfs64_wrapper
compat_sys_fstatfs64_wrapper:
llgfr %r2,%r2 # unsigned int fd
llgfr %r3,%r3 # compat_size_t
llgtr %r4,%r4 # struct compat_statfs64 *
jg compat_fstatfs64
......@@ -432,6 +432,9 @@ pgm_per:
pgm_per_std:
SAVE_ALL __LC_PGM_OLD_PSW,1
GET_THREAD_INFO
mvc __THREAD_per+__PER_atmid(2,%r9),__LC_PER_ATMID
mvc __THREAD_per+__PER_address(4,%r9),__LC_PER_ADDRESS
mvc __THREAD_per+__PER_access_id(1,%r9),__LC_PER_ACCESS_ID
la %r4,0x7f
l %r3,__LC_PGM_ILC # load program interruption code
nr %r4,%r3 # clear per-event-bit and ilc
......@@ -445,7 +448,7 @@ pgm_per_only:
la %r2,SP_PTREGS(15) # address of register-save area
l %r1,BASED(.Lhandle_per) # load adr. of per handler
la %r14,BASED(sysc_return) # load adr. of system return
br %r1 # branch to handle_per_exception
br %r1 # branch to do_debugger_trap
#
# it was a single stepped SVC that is causing all the trouble
......@@ -455,6 +458,9 @@ pgm_svcper:
lh %r7,0x8a # get svc number from lowcore
stosm 24(%r15),0x03 # reenable interrupts
GET_THREAD_INFO # load pointer to task_struct to R9
mvc __THREAD_per+__PER_atmid(2,%r9),__LC_PER_ATMID
mvc __THREAD_per+__PER_address(4,%r9),__LC_PER_ADDRESS
mvc __THREAD_per+__PER_access_id(1,%r9),__LC_PER_ACCESS_ID
sla %r7,2 # *4 and test for svc 0
bnz BASED(pgm_svcstd) # svc number > 0 ?
# svc 0: system call number in %r1
......@@ -473,18 +479,18 @@ pgm_svcstd:
pgm_svcret:
tm __TI_flags+3(%r9),_TIF_SIGPENDING
bo BASED(pgm_svcper_nosig)
bno BASED(pgm_svcper_nosig)
la %r2,SP_PTREGS(%r15) # load pt_regs
sr %r3,%r3 # clear *oldset
l %r1,BASED(.Ldo_signal)
basr %r4,%r1 # call do_signal
basr %r14,%r1 # call do_signal
pgm_svcper_nosig:
mvi SP_TRAP+3(%r15),0x28 # set trap indication to pgm check
la %r2,SP_PTREGS(15) # address of register-save area
l %r1,BASED(.Lhandle_per) # load adr. of per handler
la %r14,BASED(sysc_return) # load adr. of system return
br %r1 # branch to handle_per_exception
br %r1 # branch to do_debugger_trap
#
# call trace before and after sys_call
#
......@@ -690,7 +696,7 @@ restart_go:
.Ldo_softirq: .long do_softirq
.Lentry_base: .long entry_base
.Lext_hash: .long ext_int_hash
.Lhandle_per: .long handle_per_exception
.Lhandle_per: .long do_debugger_trap
.Ljump_table: .long pgm_check_table
.Lschedule: .long schedule
.Lclone: .long sys_clone
......
......@@ -471,6 +471,9 @@ pgm_per:
pgm_per_std:
SAVE_ALL __LC_PGM_OLD_PSW,1
GET_THREAD_INFO
mvc __THREAD_per+__PER_atmid(2,%r9),__LC_PER_ATMID
mvc __THREAD_per+__PER_address(8,%r9),__LC_PER_ADDRESS
mvc __THREAD_per+__PER_access_id(1,%r9),__LC_PER_ACCESS_ID
lghi %r4,0x7f
lgf %r3,__LC_PGM_ILC # load program interruption code
nr %r4,%r3 # clear per-event-bit and ilc
......@@ -483,7 +486,7 @@ pgm_per_std:
pgm_per_only:
la %r2,SP_PTREGS(15) # address of register-save area
larl %r14,sysc_return # load adr. of system return
jg handle_per_exception
jg do_debugger_trap
#
# it was a single stepped SVC that is causing all the trouble
......@@ -493,6 +496,9 @@ pgm_svcper:
llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore
stosm 48(%r15),0x03 # reenable interrupts
GET_THREAD_INFO # load pointer to task_struct to R9
mvc __THREAD_per+__PER_atmid(2,%r9),__LC_PER_ATMID
mvc __THREAD_per+__PER_address(8,%r9),__LC_PER_ADDRESS
mvc __THREAD_per+__PER_access_id(1,%r9),__LC_PER_ACCESS_ID
slag %r7,%r7,2 # *4 and test for svc 0
jnz pgm_svcstd
# svc 0: system call number in %r1
......@@ -516,7 +522,7 @@ pgm_svcper_noemu:
pgm_svcret:
tm __TI_flags+7(%r9),_TIF_SIGPENDING
jo pgm_svcper_nosig
jno pgm_svcper_nosig
la %r2,SP_PTREGS(%r15) # load pt_regs
sgr %r3,%r3 # clear *oldset
brasl %r14,do_signal
......@@ -526,7 +532,7 @@ pgm_svcper_nosig:
st %r0,SP_TRAP(%r15)
la %r2,SP_PTREGS(15) # address of register-save area
larl %r14,sysc_return # load adr. of system return
jg handle_per_exception
jg do_debugger_trap
#
# call trace before and after sys_call
#
......
......@@ -193,9 +193,9 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data)
*/
if (addr == (addr_t) &dummy->regs.psw.mask &&
#ifdef CONFIG_S390_SUPPORT
(data & ~PSW_MASK_CC) != PSW_USER32_BITS &&
data != PSW_MASK_MERGE(PSW_USER32_BITS, data) &&
#endif
(data & ~PSW_MASK_CC) != PSW_USER_BITS)
data != PSW_MASK_MERGE(PSW_USER_BITS, data))
/* Invalid psw mask. */
return -EINVAL;
#ifndef CONFIG_ARCH_S390X
......@@ -331,7 +331,7 @@ peek_user_emu31(struct task_struct *child, addr_t addr, addr_t data)
if (addr == (addr_t) &dummy32->regs.psw.mask) {
/* Fake a 31 bit psw mask. */
tmp = (__u32)(__KSTK_PTREGS(child)->psw.mask >> 32);
tmp = (tmp & PSW32_MASK_CC) | PSW32_USER_BITS;
tmp = PSW32_MASK_MERGE(PSW32_USER_BITS, tmp);
} else if (addr == (addr_t) &dummy32->regs.psw.addr) {
/* Fake a 31 bit psw address. */
tmp = (__u32) __KSTK_PTREGS(child)->psw.addr |
......@@ -402,11 +402,11 @@ poke_user_emu31(struct task_struct *child, addr_t addr, addr_t data)
*/
if (addr == (addr_t) &dummy32->regs.psw.mask) {
/* Build a 64 bit psw mask from 31 bit mask. */
if ((tmp & ~PSW32_MASK_CC) != PSW32_USER_BITS)
if (tmp != PSW32_MASK_MERGE(PSW32_USER_BITS, tmp))
/* Invalid psw mask. */
return -EINVAL;
__KSTK_PTREGS(child)->psw.mask = PSW_USER32_BITS |
((tmp & PSW32_MASK_CC) << 32);
__KSTK_PTREGS(child)->psw.mask =
PSW_MASK_MERGE(PSW_USER32_BITS, (__u64) tmp << 32);
} else if (addr == (addr_t) &dummy32->regs.psw.addr) {
/* Build a 64 bit psw address from 31 bit address. */
__KSTK_PTREGS(child)->psw.addr =
......
......@@ -148,9 +148,14 @@ sys_sigaltstack(const stack_t *uss, stack_t *uoss, struct pt_regs *regs)
/* Returns non-zero on fault. */
static int save_sigregs(struct pt_regs *regs, _sigregs *sregs)
{
unsigned long old_mask = regs->psw.mask;
int err;
/* Copy a 'clean' PSW mask to the user to avoid leaking
information about whether PER is currently on. */
regs->psw.mask = PSW_MASK_MERGE(PSW_USER_BITS, regs->psw.mask);
err = __copy_to_user(&sregs->regs, regs, sizeof(_s390_regs_common));
regs->psw.mask = old_mask;
if (err != 0)
return err;
/*
......@@ -165,13 +170,14 @@ static int save_sigregs(struct pt_regs *regs, _sigregs *sregs)
/* Returns positive number on error */
static int restore_sigregs(struct pt_regs *regs, _sigregs *sregs)
{
unsigned long old_mask = regs->psw.mask;
int err;
/* Alwys make any pending restarted system call return -EINTR */
current_thread_info()->restart_block.fn = do_no_restart_syscall;
err = __copy_from_user(regs, &sregs->regs, sizeof(_s390_regs_common));
regs->psw.mask = PSW_USER_BITS | (regs->psw.mask & PSW_MASK_CC);
regs->psw.mask = PSW_MASK_MERGE(old_mask, regs->psw.mask);
regs->psw.addr |= PSW_ADDR_AMODE;
if (err)
return err;
......@@ -319,7 +325,6 @@ static void setup_frame(int sig, struct k_sigaction *ka,
/* Set up registers for signal handler */
regs->gprs[15] = (unsigned long) frame;
regs->psw.addr = (unsigned long) ka->sa.sa_handler | PSW_ADDR_AMODE;
regs->psw.mask = PSW_USER_BITS;
regs->gprs[2] = map_signal(sig);
regs->gprs[3] = (unsigned long) &frame->sc;
......@@ -378,7 +383,6 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
/* Set up registers for signal handler */
regs->gprs[15] = (unsigned long) frame;
regs->psw.addr = (unsigned long) ka->sa.sa_handler | PSW_ADDR_AMODE;
regs->psw.mask = PSW_USER_BITS;
regs->gprs[2] = map_signal(sig);
regs->gprs[3] = (unsigned long) &frame->info;
......@@ -401,30 +405,6 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
{
struct k_sigaction *ka = &current->sighand->action[sig-1];
/* Are we from a system call? */
if (regs->trap == __LC_SVC_OLD_PSW) {
/* If so, check system call restarting.. */
switch (regs->gprs[2]) {
case -ERESTART_RESTARTBLOCK:
current_thread_info()->restart_block.fn =
do_no_restart_syscall;
clear_thread_flag(TIF_RESTART_SVC);
case -ERESTARTNOHAND:
regs->gprs[2] = -EINTR;
break;
case -ERESTARTSYS:
if (!(ka->sa.sa_flags & SA_RESTART)) {
regs->gprs[2] = -EINTR;
break;
}
/* fallthrough */
case -ERESTARTNOINTR:
regs->gprs[2] = regs->orig_gpr2;
regs->psw.addr -= regs->ilc;
}
}
/* Set up the stack frame */
if (ka->sa.sa_flags & SA_SIGINFO)
setup_rt_frame(sig, ka, info, oldset, regs);
......@@ -454,6 +434,7 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
*/
int do_signal(struct pt_regs *regs, sigset_t *oldset)
{
unsigned long retval = 0, continue_addr = 0, restart_addr = 0;
siginfo_t info;
int signr;
......@@ -468,35 +449,62 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
if (!oldset)
oldset = &current->blocked;
#ifdef CONFIG_S390_SUPPORT
if (test_thread_flag(TIF_31BIT)) {
extern asmlinkage int do_signal32(struct pt_regs *regs,
sigset_t *oldset);
return do_signal32(regs, oldset);
}
#endif
/* Are we from a system call? */
if (regs->trap == __LC_SVC_OLD_PSW) {
continue_addr = regs->psw.addr;
restart_addr = continue_addr - regs->ilc;
retval = regs->gprs[2];
/* Prepare for system call restart. We do this here so that a
debugger will see the already changed PSW. */
if (retval == -ERESTARTNOHAND ||
retval == -ERESTARTSYS ||
retval == -ERESTARTNOINTR) {
regs->gprs[2] = regs->orig_gpr2;
regs->psw.addr = restart_addr;
} else if (retval == -ERESTART_RESTARTBLOCK) {
regs->gprs[2] = -EINTR;
}
}
/* Get signal to deliver. When running under ptrace, at this point
the debugger may change all our registers ... */
signr = get_signal_to_deliver(&info, regs, NULL);
/* Depending on the signal settings we may need to revert the
decision to restart the system call. */
if (signr > 0 && regs->psw.addr == restart_addr) {
if (retval == -ERESTARTNOHAND
|| (retval == -ERESTARTSYS
&& !(current->sighand->action[signr-1].sa.sa_flags
& SA_RESTART))) {
regs->gprs[2] = -EINTR;
regs->psw.addr = continue_addr;
}
}
if (signr > 0) {
/* Whee! Actually deliver the signal. */
#ifdef CONFIG_S390_SUPPORT
if (test_thread_flag(TIF_31BIT)) {
extern void handle_signal32(unsigned long sig,
siginfo_t *info,
sigset_t *oldset,
struct pt_regs *regs);
handle_signal32(signr, &info, oldset, regs);
return 1;
}
#endif
handle_signal(signr, &info, oldset, regs);
return 1;
}
/* Did we come from a system call? */
if ( regs->trap == __LC_SVC_OLD_PSW /* System Call! */ ) {
/* Restart the system call - no handlers present */
if (regs->gprs[2] == -ERESTARTNOHAND ||
regs->gprs[2] == -ERESTARTSYS ||
regs->gprs[2] == -ERESTARTNOINTR) {
regs->gprs[2] = regs->orig_gpr2;
regs->psw.addr -= regs->ilc;
}
/* Restart the system call with a new system call number */
if (regs->gprs[2] == -ERESTART_RESTARTBLOCK) {
regs->gprs[2] = __NR_restart_syscall;
set_thread_flag(TIF_RESTART_SVC);
}
/* Restart a different system call. */
if (retval == -ERESTART_RESTARTBLOCK
&& regs->psw.addr == continue_addr) {
regs->gprs[2] = __NR_restart_syscall;
set_thread_flag(TIF_RESTART_SVC);
}
return 0;
}
......@@ -245,52 +245,7 @@ asmlinkage __SYS_RETTYPE sys_ipc (uint call, int first, int second,
return -EINVAL;
}
/*
* Old cruft
*/
asmlinkage int sys_uname(struct old_utsname * name)
{
int err;
if (!name)
return -EFAULT;
down_read(&uts_sem);
err=copy_to_user(name, &system_utsname, sizeof (*name));
up_read(&uts_sem);
return err?-EFAULT:0;
}
#ifndef CONFIG_ARCH_S390X
asmlinkage int sys_olduname(struct oldold_utsname * name)
{
int error;
if (!name)
return -EFAULT;
if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname)))
return -EFAULT;
down_read(&uts_sem);
error = __copy_to_user(&name->sysname,&system_utsname.sysname,__OLD_UTS_LEN);
error |= __put_user(0,name->sysname+__OLD_UTS_LEN);
error |= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN);
error |= __put_user(0,name->nodename+__OLD_UTS_LEN);
error |= __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN);
error |= __put_user(0,name->release+__OLD_UTS_LEN);
error |= __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN);
error |= __put_user(0,name->version+__OLD_UTS_LEN);
error |= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN);
error |= __put_user(0,name->machine+__OLD_UTS_LEN);
up_read(&uts_sem);
error = error ? -EFAULT : 0;
return error;
}
#else /* CONFIG_ARCH_S390X */
#ifdef CONFIG_ARCH_S390X
asmlinkage int s390x_newuname(struct new_utsname * name)
{
int ret = sys_newuname(name);
......
......@@ -54,7 +54,7 @@ SYSCALL(sys_pipe,sys_pipe,sys32_pipe_wrapper)
SYSCALL(sys_times,sys_times,compat_sys_times_wrapper)
NI_SYSCALL /* old prof syscall */
SYSCALL(sys_brk,sys_brk,sys32_brk_wrapper) /* 45 */
SYSCALL(sys_setgid16,sys_ni_syscall,sys32_setgid16) /* old setgid16 syscall*/
SYSCALL(sys_setgid16,sys_ni_syscall,sys32_setgid16_wrapper) /* old setgid16 syscall*/
SYSCALL(sys_getgid16,sys_ni_syscall,sys32_getgid16) /* old getgid16 syscall*/
SYSCALL(sys_signal,sys_signal,sys32_signal_wrapper)
SYSCALL(sys_geteuid16,sys_ni_syscall,sys32_geteuid16) /* old geteuid16 syscall */
......@@ -273,3 +273,5 @@ SYSCALL(sys_clock_getres,sys_clock_getres,sys32_clock_getres_wrapper)
SYSCALL(sys_clock_nanosleep,sys_clock_nanosleep,sys32_clock_nanosleep_wrapper)
NI_SYSCALL /* reserved for vserver */
SYSCALL(s390_fadvise64_64,sys_ni_syscall,sys32_fadvise64_64_wrapper)
SYSCALL(sys_statfs64,sys_statfs64,compat_sys_statfs64_wrapper)
SYSCALL(sys_fstatfs64,sys_fstatfs64,compat_sys_fstatfs64_wrapper)
......@@ -308,7 +308,7 @@ static inline void *get_check_address(struct pt_regs *regs)
return (void *)((regs->psw.addr-S390_lowcore.pgm_ilc) & PSW_ADDR_INSN);
}
static int do_debugger_trap(struct pt_regs *regs)
int do_debugger_trap(struct pt_regs *regs)
{
if ((regs->psw.mask & PSW_MASK_PSTATE) &&
(current->ptrace & PT_PTRACED)) {
......@@ -652,23 +652,3 @@ void __init trap_init(void)
#endif
}
}
void handle_per_exception(struct pt_regs *regs)
{
if (regs->psw.mask & PSW_MASK_PSTATE) {
per_struct *per_info=&current->thread.per_info;
per_info->lowcore.words.perc_atmid=S390_lowcore.per_perc_atmid;
per_info->lowcore.words.address=S390_lowcore.per_address;
per_info->lowcore.words.access_id=S390_lowcore.per_access_id;
}
if (do_debugger_trap(regs)) {
/* I've seen this possibly a task structure being reused ? */
printk("Spurious per exception detected\n");
printk("switching off per tracing for this task.\n");
show_regs(regs);
/* Hopefully switching off per tracing will help us survive */
regs->psw.mask &= ~PSW_MASK_PER;
}
}
......@@ -384,7 +384,6 @@ CONFIG_MD_RAID5=m
CONFIG_MD_RAID6=m
CONFIG_MD_MULTIPATH=m
CONFIG_BLK_DEV_DM=m
# CONFIG_DM_IOCTL_V4 is not set
CONFIG_DM_CRYPT=m
#
......@@ -1075,12 +1074,10 @@ CONFIG_I2C_ALI1535=m
CONFIG_I2C_ALI15X3=m
CONFIG_I2C_AMD756=m
CONFIG_I2C_AMD8111=m
CONFIG_I2C_ELV=m
CONFIG_I2C_I801=m
CONFIG_I2C_I810=m
CONFIG_I2C_ISA=m
CONFIG_I2C_NFORCE2=m
CONFIG_I2C_PHILIPSPAR=m
CONFIG_I2C_PARPORT=m
CONFIG_I2C_PARPORT_LIGHT=m
CONFIG_I2C_PROSAVAGE=m
......@@ -1089,7 +1086,6 @@ CONFIG_SCx200_ACB=m
CONFIG_I2C_SIS5595=m
CONFIG_I2C_SIS630=m
CONFIG_I2C_SIS96X=m
CONFIG_I2C_VELLEMAN=m
CONFIG_I2C_VIA=m
CONFIG_I2C_VIAPRO=m
CONFIG_I2C_VOODOO3=m
......
This diff is collapsed.
......@@ -92,7 +92,8 @@ struct ctlr_info {
void *vaddr;
unsigned long paddr;
unsigned long ioaddr;
unsigned long io_mem_addr;
unsigned long io_mem_length;
int intr;
int usage_count;
drv_info_t drv[NWD];
......
......@@ -156,27 +156,27 @@ static struct access_method smart2_access = {
*/
static void smart2e_submit_command(ctlr_info_t *h, cmdlist_t *c)
{
outl(c->busaddr, h->ioaddr + COMMAND_FIFO);
outl(c->busaddr, h->io_mem_addr + COMMAND_FIFO);
}
static void smart2e_intr_mask(ctlr_info_t *h, unsigned long val)
{
outl(val, h->ioaddr + INTR_MASK);
outl(val, h->io_mem_addr + INTR_MASK);
}
static unsigned long smart2e_fifo_full(ctlr_info_t *h)
{
return inl(h->ioaddr + COMMAND_FIFO);
return inl(h->io_mem_addr + COMMAND_FIFO);
}
static unsigned long smart2e_completed(ctlr_info_t *h)
{
return inl(h->ioaddr + COMMAND_COMPLETE_FIFO);
return inl(h->io_mem_addr + COMMAND_COMPLETE_FIFO);
}
static unsigned long smart2e_intr_pending(ctlr_info_t *h)
{
return inl(h->ioaddr + INTR_PENDING);
return inl(h->io_mem_addr + INTR_PENDING);
}
static struct access_method smart2e_access = {
......@@ -212,30 +212,30 @@ static void smart1_submit_command(ctlr_info_t *h, cmdlist_t *c)
*/
c->hdr.size = 0;
outb(CHANNEL_CLEAR, h->ioaddr + SMART1_SYSTEM_DOORBELL);
outb(CHANNEL_CLEAR, h->io_mem_addr + SMART1_SYSTEM_DOORBELL);
outl(c->busaddr, h->ioaddr + SMART1_LISTADDR);
outw(c->size, h->ioaddr + SMART1_LISTLEN);
outl(c->busaddr, h->io_mem_addr + SMART1_LISTADDR);
outw(c->size, h->io_mem_addr + SMART1_LISTLEN);
outb(CHANNEL_BUSY, h->ioaddr + SMART1_LOCAL_DOORBELL);
outb(CHANNEL_BUSY, h->io_mem_addr + SMART1_LOCAL_DOORBELL);
}
static void smart1_intr_mask(ctlr_info_t *h, unsigned long val)
{
if (val == 1) {
outb(0xFD, h->ioaddr + SMART1_SYSTEM_DOORBELL);
outb(CHANNEL_BUSY, h->ioaddr + SMART1_LOCAL_DOORBELL);
outb(0x01, h->ioaddr + SMART1_INTR_MASK);
outb(0x01, h->ioaddr + SMART1_SYSTEM_MASK);
outb(0xFD, h->io_mem_addr + SMART1_SYSTEM_DOORBELL);
outb(CHANNEL_BUSY, h->io_mem_addr + SMART1_LOCAL_DOORBELL);
outb(0x01, h->io_mem_addr + SMART1_INTR_MASK);
outb(0x01, h->io_mem_addr + SMART1_SYSTEM_MASK);
} else {
outb(0, h->ioaddr + 0xC8E);
outb(0, h->io_mem_addr + 0xC8E);
}
}
static unsigned long smart1_fifo_full(ctlr_info_t *h)
{
unsigned char chan;
chan = inb(h->ioaddr + SMART1_SYSTEM_DOORBELL) & CHANNEL_CLEAR;
chan = inb(h->io_mem_addr + SMART1_SYSTEM_DOORBELL) & CHANNEL_CLEAR;
return chan;
}
......@@ -244,13 +244,13 @@ static unsigned long smart1_completed(ctlr_info_t *h)
unsigned char status;
unsigned long cmd;
if (inb(h->ioaddr + SMART1_SYSTEM_DOORBELL) & CHANNEL_BUSY) {
outb(CHANNEL_BUSY, h->ioaddr + SMART1_SYSTEM_DOORBELL);
if (inb(h->io_mem_addr + SMART1_SYSTEM_DOORBELL) & CHANNEL_BUSY) {
outb(CHANNEL_BUSY, h->io_mem_addr + SMART1_SYSTEM_DOORBELL);
cmd = inl(h->ioaddr + SMART1_COMPLETE_ADDR);
status = inb(h->ioaddr + SMART1_LISTSTATUS);
cmd = inl(h->io_mem_addr + SMART1_COMPLETE_ADDR);
status = inb(h->io_mem_addr + SMART1_LISTSTATUS);
outb(CHANNEL_CLEAR, h->ioaddr + SMART1_LOCAL_DOORBELL);
outb(CHANNEL_CLEAR, h->io_mem_addr + SMART1_LOCAL_DOORBELL);
/*
* this is x86 (actually compaq x86) only, so it's ok
......@@ -265,7 +265,7 @@ static unsigned long smart1_completed(ctlr_info_t *h)
static unsigned long smart1_intr_pending(ctlr_info_t *h)
{
unsigned char chan;
chan = inb(h->ioaddr + SMART1_SYSTEM_DOORBELL) & CHANNEL_BUSY;
chan = inb(h->io_mem_addr + SMART1_SYSTEM_DOORBELL) & CHANNEL_BUSY;
return chan;
}
......
......@@ -3316,6 +3316,7 @@ int __init cdu31a_init(void)
char msg[255];
char buf[40];
int i;
int tmp_irq;
/*
* According to Alex Freed (freed@europa.orion.adobe.com), this is
......@@ -3335,7 +3336,7 @@ int __init cdu31a_init(void)
if (cdu31a_port != 0) {
/* Need IRQ 0 because we can't sleep here. */
int tmp_irq = cdu31a_irq;
tmp_irq = cdu31a_irq;
cdu31a_irq = 0;
if (!get_drive_configuration(cdu31a_port,
drive_config.exec_status,
......
......@@ -17,6 +17,7 @@
#include <linux/raw.h>
#include <linux/capability.h>
#include <linux/uio.h>
#include <linux/cdev.h>
#include <asm/uaccess.h>
......@@ -260,11 +261,26 @@ static struct file_operations raw_ctl_fops = {
.owner = THIS_MODULE,
};
static struct cdev raw_cdev = {
.kobj = {.name = "raw", },
.owner = THIS_MODULE,
};
static int __init raw_init(void)
{
int i;
dev_t dev = MKDEV(RAW_MAJOR, 0);
if (register_chrdev_region(dev, MAX_RAW_MINORS, "raw"))
goto error;
cdev_init(&raw_cdev, &raw_fops);
if (cdev_add(&raw_cdev, dev, MAX_RAW_MINORS)) {
kobject_put(&raw_cdev.kobj);
unregister_chrdev_region(dev, MAX_RAW_MINORS);
goto error;
}
register_chrdev(RAW_MAJOR, "raw", &raw_fops);
devfs_mk_cdev(MKDEV(RAW_MAJOR, 0),
S_IFCHR | S_IRUGO | S_IWUGO,
"raw/rawctl");
......@@ -273,6 +289,10 @@ static int __init raw_init(void)
S_IFCHR | S_IRUGO | S_IWUGO,
"raw/raw%d", i);
return 0;
error:
printk(KERN_ERR "error register raw device\n");
return 1;
}
static void __exit raw_exit(void)
......@@ -283,7 +303,8 @@ static void __exit raw_exit(void)
devfs_remove("raw/raw%d", i);
devfs_remove("raw/rawctl");
devfs_remove("raw");
unregister_chrdev(RAW_MAJOR, "raw");
cdev_del(&raw_cdev);
unregister_chrdev_region(MKDEV(RAW_MAJOR, 0), MAX_RAW_MINORS);
}
module_init(raw_init);
......
......@@ -883,16 +883,6 @@ int ide_release_dma_engine (ide_hwif_t *hwif)
return 1;
}
int ide_release_mmio_dma (ide_hwif_t *hwif)
{
if ((hwif->dma_extra) && (hwif->channel == 0))
release_mem_region((hwif->dma_base + 16), hwif->dma_extra);
release_mem_region(hwif->dma_base, 8);
if (hwif->dma_base2)
release_mem_region(hwif->dma_base, 8);
return 1;
}
int ide_release_iomio_dma (ide_hwif_t *hwif)
{
if ((hwif->dma_extra) && (hwif->channel == 0))
......@@ -914,8 +904,6 @@ int ide_release_dma (ide_hwif_t *hwif)
return 1;
ide_release_dma_engine(hwif);
if (hwif->mmio == 1)
return ide_release_mmio_dma(hwif);
return ide_release_iomio_dma(hwif);
}
......@@ -939,38 +927,6 @@ int ide_allocate_dma_engine (ide_hwif_t *hwif)
return 1;
}
int ide_mmio_dma (ide_hwif_t *hwif, unsigned long base, unsigned int ports)
{
printk(KERN_INFO " %s: MMIO-DMA at 0x%08lx-0x%08lx",
hwif->name, base, base + ports - 1);
if (!request_mem_region(base, ports, hwif->name))
goto fail;
hwif->dma_base = base;
if ((hwif->cds->extra) && (hwif->channel == 0)) {
if (!request_region(base+16, hwif->cds->extra, hwif->cds->name))
goto release_mem;
hwif->dma_extra = hwif->cds->extra;
}
if(hwif->mate)
hwif->dma_master = (hwif->channel) ? hwif->mate->dma_base : base;
else
hwif->dma_master = base;
if (hwif->dma_base2) {
if (!request_mem_region(hwif->dma_base2, ports, hwif->name))
goto release_io;
}
return 0;
release_mem:
release_mem_region(base, ports);
release_io:
release_region(base+16, hwif->cds->extra);
fail:
printk(" -- Error, MMIO ports already in use.\n");
return 1;
}
int ide_mapped_mmio_dma (ide_hwif_t *hwif, unsigned long base, unsigned int ports)
{
printk(KERN_INFO " %s: MMIO-DMA ", hwif->name);
......@@ -1022,8 +978,7 @@ int ide_dma_iobase (ide_hwif_t *hwif, unsigned long base, unsigned int ports)
{
if (hwif->mmio == 2)
return ide_mapped_mmio_dma(hwif, base,ports);
if (hwif->mmio == 1)
return ide_mmio_dma(hwif, base, ports);
BUG_ON(hwif->mmio == 1);
return ide_iomio_dma(hwif, base, ports);
}
......
......@@ -844,7 +844,6 @@ EXPORT_SYMBOL(probe_hwif);
int hwif_init (ide_hwif_t *hwif);
int probe_hwif_init (ide_hwif_t *hwif)
{
hwif->initializing = 1;
probe_hwif(hwif);
hwif_init(hwif);
......@@ -860,7 +859,6 @@ int probe_hwif_init (ide_hwif_t *hwif)
}
}
}
hwif->initializing = 0;
return 0;
}
......
......@@ -518,11 +518,6 @@ int ide_hwif_request_regions(ide_hwif_t *hwif)
addr = hwif->io_ports[IDE_CONTROL_OFFSET];
if (addr && !hwif_request_region(hwif, addr, 1))
goto control_region_busy;
#if defined(CONFIG_AMIGA) || defined(CONFIG_MAC)
addr = hwif->io_ports[IDE_IRQ_OFFSET];
if (addr && !hwif_request_region(hwif, addr, 1))
goto irq_region_busy;
#endif /* (CONFIG_AMIGA) || (CONFIG_MAC) */
hwif->straight8 = 0;
addr = hwif->io_ports[IDE_DATA_OFFSET];
if ((addr | 7) == hwif->io_ports[IDE_STATUS_OFFSET]) {
......@@ -542,12 +537,6 @@ int ide_hwif_request_regions(ide_hwif_t *hwif)
return 0;
data_region_busy:
#if defined(CONFIG_AMIGA) || defined(CONFIG_MAC)
addr = hwif->io_ports[IDE_IRQ_OFFSET];
if (addr)
hwif_release_region(addr, 1);
irq_region_busy:
#endif /* (CONFIG_AMIGA) || (CONFIG_MAC) */
addr = hwif->io_ports[IDE_CONTROL_OFFSET];
if (addr)
hwif_release_region(addr, 1);
......@@ -577,20 +566,13 @@ void ide_hwif_release_regions(ide_hwif_t *hwif)
return;
if (hwif->io_ports[IDE_CONTROL_OFFSET])
hwif_release_region(hwif->io_ports[IDE_CONTROL_OFFSET], 1);
#if defined(CONFIG_AMIGA) || defined(CONFIG_MAC)
if (hwif->io_ports[IDE_IRQ_OFFSET])
hwif_release_region(hwif->io_ports[IDE_IRQ_OFFSET], 1);
#endif /* (CONFIG_AMIGA) || (CONFIG_MAC) */
if (hwif->straight8) {
hwif_release_region(hwif->io_ports[IDE_DATA_OFFSET], 8);
return;
}
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
if (hwif->io_ports[i]) {
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++)
if (hwif->io_ports[i])
hwif_release_region(hwif->io_ports[i], 1);
}
}
}
EXPORT_SYMBOL(ide_hwif_release_regions);
......@@ -869,7 +851,6 @@ void ide_unregister (unsigned int index)
#ifndef CONFIG_BLK_DEV_IDECS
hwif->irq = old_hwif.irq;
#endif /* CONFIG_BLK_DEV_IDECS */
hwif->initializing = old_hwif.initializing;
hwif->dma_base = old_hwif.dma_base;
hwif->dma_master = old_hwif.dma_master;
......
......@@ -821,7 +821,7 @@ static int __init init_hpt37x(struct pci_dev *dev)
*/
pci_read_config_word(dev, 0x78, &freq);
freq &= 0x1FF;
if (freq < 0x9c) {
if (freq < 0xa0) {
pll = F_LOW_PCI_33;
if (hpt_minimum_revision(dev,8))
pci_set_drvdata(dev, (void *) thirty_three_base_hpt374);
......@@ -897,7 +897,7 @@ static int __init init_hpt37x(struct pci_dev *dev)
pll & ~0x100);
pci_write_config_byte(dev, 0x5b, 0x21);
if (hpt_minimum_revision(dev,8))
return -EOPNOTSUPP;
pci_set_drvdata(dev, (void *) fifty_base_hpt370a);
else if (hpt_minimum_revision(dev,5))
pci_set_drvdata(dev, (void *) fifty_base_hpt372);
else if (hpt_minimum_revision(dev,4))
......
......@@ -339,7 +339,6 @@ void pdcnew_reset (ide_drive_t *drive)
*/
if (hwif->present) {
u16 hunit = 0;
hwif->initializing = 1;
for (hunit = 0; hunit < MAX_DRIVES; ++hunit) {
ide_drive_t *hdrive = &hwif->drives[hunit];
if (hdrive->present) {
......@@ -349,11 +348,9 @@ void pdcnew_reset (ide_drive_t *drive)
hwif->tuneproc(hdrive, 5);
}
}
hwif->initializing = 0;
}
if (mate->present) {
u16 munit = 0;
mate->initializing = 1;
for (munit = 0; munit < MAX_DRIVES; ++munit) {
ide_drive_t *mdrive = &mate->drives[munit];
if (mdrive->present) {
......@@ -363,7 +360,6 @@ void pdcnew_reset (ide_drive_t *drive)
mate->tuneproc(mdrive, 5);
}
}
mate->initializing = 0;
}
#else
hwif->tuneproc(drive, 5);
......
......@@ -618,7 +618,6 @@ void pdc202xx_reset (ide_drive_t *drive)
*/
if (hwif->present) {
u16 hunit = 0;
hwif->initializing = 1;
for (hunit = 0; hunit < MAX_DRIVES; ++hunit) {
ide_drive_t *hdrive = &hwif->drives[hunit];
if (hdrive->present) {
......@@ -628,11 +627,9 @@ void pdc202xx_reset (ide_drive_t *drive)
hwif->tuneproc(hdrive, 5);
}
}
hwif->initializing = 0;
}
if (mate->present) {
u16 munit = 0;
mate->initializing = 1;
for (munit = 0; munit < MAX_DRIVES; ++munit) {
ide_drive_t *mdrive = &mate->drives[munit];
if (mdrive->present) {
......@@ -642,7 +639,6 @@ void pdc202xx_reset (ide_drive_t *drive)
mate->tuneproc(mdrive, 5);
}
}
mate->initializing = 0;
}
#else
hwif->tuneproc(drive, 5);
......
/* $Id: kcapi.c,v 1.1.2.4 2004/02/10 01:07:11 keil Exp $
/* $Id: kcapi.c,v 1.1.2.7 2004/03/16 08:01:47 armin Exp $
*
* Kernel CAPI 2.0 Module
*
......@@ -31,7 +31,7 @@
#include <linux/b1lli.h>
#endif
static char *revision = "$Revision: 1.1.2.4 $";
static char *revision = "$Revision: 1.1.2.7 $";
/* ------------------------------------------------------------- */
......@@ -45,7 +45,7 @@ MODULE_PARM(showcapimsgs, "i");
/* ------------------------------------------------------------- */
struct capi_notifier {
struct capi_notifier *next;
struct work_struct work;
unsigned int cmd;
u32 controller;
u16 applid;
......@@ -69,7 +69,6 @@ struct capi_ctr *capi_cards[CAPI_MAXCONTR];
static int ncards;
static struct sk_buff_head recv_queue;
static struct work_struct tq_state_notify;
static struct work_struct tq_recv_notify;
/* -------- controller ref counting -------------------------------------- */
......@@ -161,79 +160,6 @@ static void release_appl(struct capi_ctr *card, u16 applid)
capi_ctr_put(card);
}
/* -------- Notifier handling --------------------------------- */
static struct capi_notifier_list{
struct capi_notifier *head;
struct capi_notifier *tail;
} notifier_list;
static spinlock_t notifier_lock = SPIN_LOCK_UNLOCKED;
static inline void notify_enqueue(struct capi_notifier *np)
{
struct capi_notifier_list *q = &notifier_list;
unsigned long flags;
spin_lock_irqsave(&notifier_lock, flags);
if (q->tail) {
q->tail->next = np;
q->tail = np;
} else {
q->head = q->tail = np;
}
spin_unlock_irqrestore(&notifier_lock, flags);
}
static inline struct capi_notifier *notify_dequeue(void)
{
struct capi_notifier_list *q = &notifier_list;
struct capi_notifier *np = 0;
unsigned long flags;
spin_lock_irqsave(&notifier_lock, flags);
if (q->head) {
np = q->head;
if ((q->head = np->next) == 0)
q->tail = 0;
np->next = 0;
}
spin_unlock_irqrestore(&notifier_lock, flags);
return np;
}
static int notify_push(unsigned int cmd, u32 controller,
u16 applid, u32 ncci)
{
struct capi_notifier *np;
if (!try_module_get(THIS_MODULE)) {
printk(KERN_WARNING "%s: cannot reserve module\n", __FUNCTION__);
return -1;
}
np = (struct capi_notifier *)kmalloc(sizeof(struct capi_notifier), GFP_ATOMIC);
if (!np) {
module_put(THIS_MODULE);
return -1;
}
memset(np, 0, sizeof(struct capi_notifier));
np->cmd = cmd;
np->controller = controller;
np->applid = applid;
np->ncci = ncci;
notify_enqueue(np);
/*
* The notifier will result in adding/deleteing
* of devices. Devices can only removed in
* user process, not in bh.
*/
__module_get(THIS_MODULE);
if (schedule_work(&tq_state_notify) == 0)
module_put(THIS_MODULE);
return 0;
}
/* -------- KCI_CONTRUP --------------------------------------- */
static void notify_up(u32 contr)
......@@ -242,7 +168,9 @@ static void notify_up(u32 contr)
struct capi20_appl *ap;
u16 applid;
printk(KERN_DEBUG "kcapi: notify up contr %d\n", contr);
if (showcapimsgs & 1) {
printk(KERN_DEBUG "kcapi: notify up contr %d\n", contr);
}
for (applid = 1; applid <= CAPI_MAXAPPL; applid++) {
ap = get_capi_appl_by_nr(applid);
......@@ -258,7 +186,9 @@ static void notify_down(u32 contr)
struct capi20_appl *ap;
u16 applid;
printk(KERN_DEBUG "kcapi: notify down contr %d\n", contr);
if (showcapimsgs & 1) {
printk(KERN_DEBUG "kcapi: notify down contr %d\n", contr);
}
for (applid = 1; applid <= CAPI_MAXAPPL; applid++) {
ap = get_capi_appl_by_nr(applid);
......@@ -267,31 +197,43 @@ static void notify_down(u32 contr)
}
}
/* ------------------------------------------------------------ */
static inline void notify_doit(struct capi_notifier *np)
static void notify_handler(void *data)
{
struct capi_notifier *np = data;
switch (np->cmd) {
case KCI_CONTRUP:
notify_up(np->controller);
break;
case KCI_CONTRDOWN:
notify_down(np->controller);
break;
case KCI_CONTRUP:
notify_up(np->controller);
break;
case KCI_CONTRDOWN:
notify_down(np->controller);
break;
}
kfree(np);
}
static void notify_handler(void *dummy)
/*
* The notifier will result in adding/deleteing of devices. Devices can
* only removed in user process, not in bh.
*/
static int notify_push(unsigned int cmd, u32 controller, u16 applid, u32 ncci)
{
struct capi_notifier *np;
struct capi_notifier *np = kmalloc(sizeof(*np), GFP_ATOMIC);
while ((np = notify_dequeue()) != 0) {
notify_doit(np);
kfree(np);
module_put(THIS_MODULE);
}
module_put(THIS_MODULE);
if (!np)
return -ENOMEM;
INIT_WORK(&np->work, notify_handler, np);
np->cmd = cmd;
np->controller = controller;
np->applid = applid;
np->ncci = ncci;
schedule_work(&np->work);
return 0;
}
/* -------- Receiver ------------------------------------------ */
......@@ -304,7 +246,7 @@ static void recv_handler(void *dummy)
ap = get_capi_appl_by_nr(CAPIMSG_APPID(skb->data));
if (!ap) {
printk(KERN_ERR "kcapi: recv_handler: applid %d ? (%s)\n",
ap->applid, capi_message2str(skb->data));
CAPIMSG_APPID(skb->data), capi_message2str(skb->data));
kfree_skb(skb);
continue;
}
......@@ -565,7 +507,9 @@ u16 capi20_register(struct capi20_appl *ap)
continue;
register_appl(capi_cards[i], applid, &ap->rparam);
}
printk(KERN_DEBUG "kcapi: appl %d up\n", applid);
if (showcapimsgs & 1) {
printk(KERN_DEBUG "kcapi: appl %d up\n", applid);
}
return CAPI_NOERROR;
}
......@@ -584,7 +528,9 @@ u16 capi20_release(struct capi20_appl *ap)
release_appl(capi_cards[i], ap->applid);
}
capi_applications[ap->applid - 1] = NULL;
printk(KERN_DEBUG "kcapi: appl %d down\n", ap->applid);
if (showcapimsgs & 1) {
printk(KERN_DEBUG "kcapi: appl %d down\n", ap->applid);
}
return CAPI_NOERROR;
}
......@@ -981,7 +927,6 @@ static int __init kcapi_init(void)
skb_queue_head_init(&recv_queue);
INIT_WORK(&tq_state_notify, notify_handler, NULL);
INIT_WORK(&tq_recv_notify, recv_handler, NULL);
kcapi_proc_init();
......@@ -1001,6 +946,9 @@ static int __init kcapi_init(void)
static void __exit kcapi_exit(void)
{
kcapi_proc_exit();
/* make sure all notifiers are finished */
flush_scheduled_work();
}
module_init(kcapi_init);
......
This diff is collapsed.
......@@ -123,7 +123,7 @@ static void emulate_large_send_offload(struct sk_buff *skb)
*/
static int loopback_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct net_device_stats *stats = netdev_priv(dev);
struct net_device_stats *stats = dev->priv;
skb_orphan(skb);
......
......@@ -28,8 +28,8 @@
*/
#define DRV_NAME "de2104x"
#define DRV_VERSION "0.6"
#define DRV_RELDATE "Sep 1, 2003"
#define DRV_VERSION "0.7"
#define DRV_RELDATE "Mar 17, 2004"
#include <linux/config.h>
#include <linux/module.h>
......@@ -303,7 +303,6 @@ struct de_private {
struct net_device_stats net_stats;
struct pci_dev *pdev;
u32 macmode;
u16 setup_frame[DE_SETUP_FRAME_WORDS];
......@@ -732,7 +731,7 @@ static void __de_set_rx_mode (struct net_device *dev)
struct de_desc *txd;
struct de_desc *dummy_txd = NULL;
macmode = de->macmode & ~(AcceptAllMulticast | AcceptAllPhys);
macmode = dr32(MacMode) & ~(AcceptAllMulticast | AcceptAllPhys);
if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */
macmode |= AcceptAllMulticast | AcceptAllPhys;
......@@ -805,10 +804,8 @@ static void __de_set_rx_mode (struct net_device *dev)
dw32(TxPoll, NormalTxPoll);
out:
if (macmode != de->macmode) {
dw32 (MacMode, macmode);
de->macmode = macmode;
}
if (macmode != dr32(MacMode))
dw32(MacMode, macmode);
}
static void de_set_rx_mode (struct net_device *dev)
......@@ -923,6 +920,7 @@ static void de_link_down(struct de_private *de)
static void de_set_media (struct de_private *de)
{
unsigned media = de->media_type;
u32 macmode = dr32(MacMode);
if (de_is_running(de))
BUG();
......@@ -940,9 +938,9 @@ static void de_set_media (struct de_private *de)
mdelay(10);
if (media == DE_MEDIA_TP_FD)
de->macmode |= FullDuplex;
macmode |= FullDuplex;
else
de->macmode &= ~FullDuplex;
macmode &= ~FullDuplex;
if (netif_msg_link(de)) {
printk(KERN_INFO "%s: set link %s\n"
......@@ -951,9 +949,11 @@ static void de_set_media (struct de_private *de)
de->dev->name, media_name[media],
de->dev->name, dr32(MacMode), dr32(SIAStatus),
dr32(CSR13), dr32(CSR14), dr32(CSR15),
de->dev->name, de->macmode, de->media[media].csr13,
de->dev->name, macmode, de->media[media].csr13,
de->media[media].csr14, de->media[media].csr15);
}
if (macmode != dr32(MacMode))
dw32(MacMode, macmode);
}
static void de_next_media (struct de_private *de, u32 *media,
......@@ -1173,18 +1173,18 @@ static int de_reset_mac (struct de_private *de)
u32 status, tmp;
/*
* Reset MAC. Copied from de4x5.c.
* Reset MAC. de4x5.c and tulip.c examined for "advice"
* in this area.
*/
tmp = dr32 (BusMode);
if (tmp == 0xffffffff)
return -ENODEV;
mdelay (1);
if (dr32(BusMode) == 0xffffffff)
return -EBUSY;
dw32 (BusMode, tmp | CmdReset);
/* Reset the chip, holding bit 0 set at least 50 PCI cycles. */
dw32 (BusMode, CmdReset);
mdelay (1);
dw32 (BusMode, tmp);
dw32 (BusMode, de_bus_mode);
mdelay (1);
for (tmp = 0; tmp < 5; tmp++) {
......@@ -1235,11 +1235,12 @@ static void de_adapter_sleep (struct de_private *de)
static int de_init_hw (struct de_private *de)
{
struct net_device *dev = de->dev;
u32 macmode;
int rc;
de_adapter_wake(de);
de->macmode = dr32(MacMode) & ~MacModeClear;
macmode = dr32(MacMode) & ~MacModeClear;
rc = de_reset_mac(de);
if (rc)
......@@ -1250,7 +1251,7 @@ static int de_init_hw (struct de_private *de)
dw32(RxRingAddr, de->ring_dma);
dw32(TxRingAddr, de->ring_dma + (sizeof(struct de_desc) * DE_RX_RING_SIZE));
dw32(MacMode, RxTx | de->macmode);
dw32(MacMode, RxTx | macmode);
dr32(RxMissed); /* self-clearing */
......@@ -1501,7 +1502,7 @@ static int __de_get_settings(struct de_private *de, struct ethtool_cmd *ecmd)
break;
}
if (de->macmode & FullDuplex)
if (dr32(MacMode) & FullDuplex)
ecmd->duplex = DUPLEX_FULL;
else
ecmd->duplex = DUPLEX_HALF;
......
......@@ -253,8 +253,9 @@ static void tulip_down(struct net_device *dev);
static struct net_device_stats *tulip_get_stats(struct net_device *dev);
static int private_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static void set_rx_mode(struct net_device *dev);
#ifdef CONFIG_NET_POLL_CONTROLLER
static void poll_tulip(struct net_device *dev);
#endif
static void tulip_set_power_state (struct tulip_private *tp,
int sleep, int snooze)
......
......@@ -307,18 +307,18 @@ config PCMCIA_WL3501
It has basic support for Linux wireless extensions and initial
micro support for ethtool.
comment "Prism GT/Duette 802.11(a/b/g) PCI/PCMCIA support"
comment "Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support"
depends on NET_RADIO && PCI
config PRISM54
tristate 'Intersil Prism GT/Duette/Indigo PCI/PCMCIA'
tristate 'Intersil Prism GT/Duette/Indigo PCI/Cardbus'
depends on PCI && NET_RADIO && EXPERIMENTAL && HOTPLUG
select FW_LOADER
---help---
Enable PCI and Cardbus support for the following chipset based cards:
ISL3880 - Prism GT 802.11 b/g
ISL3877 - Prism Indigo 802.11 a
ISL3890 - Prism Duette 802.11 a/b/g
ISL3880 - Prism GT 802.11 b/g
ISL3877 - Prism Indigo 802.11 a
ISL3890 - Prism Duette 802.11 a/b/g
For a complete list of supported cards visit <http://prism54.org>.
Here is the latest confirmed list of supported cards:
......@@ -335,8 +335,9 @@ config PRISM54
Peabird WLG-PCI PCI Card
Sitecom WL-100i Cardbus Card
Sitecom WL-110i PCI Card
SMC2802W - EZ Connect g 2.4GHz 54 Mbps Wireless PCI Card
SMC2835W - EZ Connect g 2.4GHz 54 Mbps Wireless Cardbus Card
SMC2802W - EZ Connect g 2.4GHz 54 Mbps Wireless PCI Card
SMC2835W - EZ Connect g 2.4GHz 54 Mbps Wireless Cardbus Card
SMC2835W-V2 - EZ Connect g 2.4GHz 54 Mbps Wireless Cardbus Card
Z-Com XG-900 PCI Card
Zyxel G-100 Cardbus Card
......
This diff is collapsed.
/*
* $Id: isl_oid.h,v 1.2 2004/01/30 16:24:00 ajfa Exp $
* $Id: isl_oid.h,v 1.3 2004/03/09 09:05:27 mcgrof Exp $
*
* Copyright (C) 2003 Herbert Valerio Riedel <hvr@gnu.org>
* Copyright (C) 2004 Luis R. Rodriguez <mcgrof@ruslug.rutgers.edu>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -142,15 +143,131 @@ enum dot11_priv_t {
DOT11_PRIV_TKIP = 1
};
/* Prism "Nitro" / Frameburst / "Packet Frame Grouping"
* Value is in microseconds. Represents the # microseconds
* the firmware will take to group frames before sending out then out
* together with a CSMA contention. Without this all frames are
* sent with a CSMA contention.
* Bibliography:
* http://www.hpl.hp.com/personal/Jean_Tourrilhes/Papers/Packet.Frame.Grouping.html
*/
enum dot11_maxframeburst_t {
/* Values for DOT11_OID_MAXFRAMEBURST */
DOT11_MAXFRAMEBURST_OFF = 0, /* Card firmware default */
DOT11_MAXFRAMEBURST_MIXED_SAFE = 650, /* 802.11 a,b,g safe */
DOT11_MAXFRAMEBURST_IDEAL = 1300, /* Theoretical ideal level */
DOT11_MAXFRAMEBURST_MAX = 5000, /* Use this as max,
* Note: firmware allows for greater values. This is a
* recommended max. I'll update this as I find
* out what the real MAX is. Also note that you don't necessarily
* get better results with a greater value here.
*/
};
/* Support for 802.11 long and short frame preambles.
* Long preamble uses 128-bit sync field, 8-bit CRC
* Short preamble uses 56-bit sync field, 16-bit CRC
*
* 802.11a -- not sure, both optionally ?
* 802.11b supports long and optionally short
* 802.11g supports both */
enum dot11_preamblesettings_t {
DOT11_PREAMBLESETTING_LONG = 0,
/* Allows *only* long 802.11 preambles */
DOT11_PREAMBLESETTING_SHORT = 1,
/* Allows *only* short 802.11 preambles */
DOT11_PREAMBLESETTING_DYNAMIC = 2
/* AutomatiGically set */
};
/* Support for 802.11 slot timing (time between packets).
*
* Long uses 802.11a slot timing (9 usec ?)
* Short uses 802.11b slot timing (20 use ?) */
enum dot11_slotsettings_t {
DOT11_SLOTSETTINGS_LONG = 0,
/* Allows *only* long 802.11b slot timing */
DOT11_SLOTSETTINGS_SHORT = 1,
/* Allows *only* long 802.11a slot timing */
DOT11_SLOTSETTINGS_DYNAMIC = 2
/* AutomatiGically set */
};
/* All you need to know, ERP is "Extended Rate PHY".
* An Extended Rate PHY (ERP) STA or AP shall support three different
* preamble and header formats:
* Long preamble (refer to above)
* Short preamble (refer to above)
* OFDM preamble ( ? )
*
* I'm assuming here Protection tells the AP
* to be careful, a STA which cannot handle the long pre-amble
* has joined.
*/
enum do11_nonerpstatus_t {
DOT11_ERPSTAT_NONEPRESENT = 0,
DOT11_ERPSTAT_USEPROTECTION = 1
};
/* (ERP is "Extended Rate PHY") Way to read NONERP is NON-ERP-*
* The key here is DOT11 NON ERP NEVER protects against
* NON ERP STA's. You *don't* want this unless
* you know what you are doing. It means you will only
* get Extended Rate capabilities */
enum dot11_nonerpprotection_t {
DOT11_NONERP_NEVER = 0,
DOT11_NONERP_ALWAYS = 1,
DOT11_NONERP_DYNAMIC = 2
};
/* Preset OID configuration for 802.11 modes
* Note: DOT11_OID_CW[MIN|MAX] hold the values of the
* DCS MIN|MAX backoff used */
enum dot11_profile_t { /* And set/allowed values */
/* Allowed values for DOT11_OID_PROFILES */
DOT11_PROFILE_B_ONLY = 0,
/* DOT11_OID_RATES: 1, 2, 5.5, 11Mbps
* DOT11_OID_PREAMBLESETTINGS: DOT11_PREAMBLESETTING_DYNAMIC
* DOT11_OID_CWMIN: 31
* DOT11_OID_NONEPROTECTION: DOT11_NOERP_DYNAMIC
* DOT11_OID_SLOTSETTINGS: DOT11_SLOTSETTINGS_LONG
*/
DOT11_PROFILE_MIXED_G_WIFI = 1,
/* DOT11_OID_RATES: 1, 2, 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54Mbs
* DOT11_OID_PREAMBLESETTINGS: DOT11_PREAMBLESETTING_DYNAMIC
* DOT11_OID_CWMIN: 15
* DOT11_OID_NONEPROTECTION: DOT11_NOERP_DYNAMIC
* DOT11_OID_SLOTSETTINGS: DOT11_SLOTSETTINGS_DYNAMIC
*/
DOT11_PROFILE_MIXED_LONG = 2, /* "Long range" */
/* Same as Profile MIXED_G_WIFI */
DOT11_PROFILE_G_ONLY = 3,
/* Same as Profile MIXED_G_WIFI */
DOT11_PROFILE_TEST = 4,
/* Same as Profile MIXED_G_WIFI except:
* DOT11_OID_PREAMBLESETTINGS: DOT11_PREAMBLESETTING_SHORT
* DOT11_OID_NONEPROTECTION: DOT11_NOERP_NEVER
* DOT11_OID_SLOTSETTINGS: DOT11_SLOTSETTINGS_SHORT
*/
DOT11_PROFILE_B_WIFI = 5,
/* Same as Profile B_ONLY */
DOT11_PROFILE_A_ONLY = 6,
/* Same as Profile MIXED_G_WIFI except:
* DOT11_OID_RATES: 6, 9, 12, 18, 24, 36, 48, 54Mbs
*/
DOT11_PROFILE_MIXED_SHORT = 7
/* Same as MIXED_G_WIFI */
};
/* The dot11d conformance level configures the 802.11d conformance levels.
* The following conformance levels exist:*/
enum oid_inl_conformance_t {
OID_INL_CONFORMANCE_NONE = 0, /* Perform active scanning */
OID_INL_CONFORMANCE_STRICT = 1, /* Strictly adhere to 802.11d */
OID_INL_CONFORMANCE_FLEXIBLE = 2, /* Use passed 802.11d info to
* determine channel AND/OR just make
* assumption that active
* channels are valid channels */
* determine channel AND/OR just make assumption that active
* channels are valid channels */
};
enum oid_inl_mode_t {
......@@ -176,6 +293,7 @@ enum oid_inl_phycap_t {
INL_PHYCAP_FAA = 0x80000000, /* Means card supports the FAA switch */
};
enum oid_num_t {
GEN_OID_MACADDRESS = 0,
GEN_OID_LINKSTATE,
......@@ -269,8 +387,8 @@ enum oid_num_t {
DOT11_OID_FRAMEABORTSPHY,
DOT11_OID_SLOTTIME,
DOT11_OID_CWMIN,
DOT11_OID_CWMAX,
DOT11_OID_CWMIN, /* MIN DCS backoff */
DOT11_OID_CWMAX, /* MAX DCS backoff */
DOT11_OID_ACKWINDOW,
DOT11_OID_ANTENNARX,
DOT11_OID_ANTENNATX,
......
......@@ -245,7 +245,7 @@ static int
islpci_open(struct net_device *ndev)
{
u32 rc;
islpci_private *priv = ndev->priv;
islpci_private *priv = netdev_priv(ndev);
printk(KERN_DEBUG "%s: islpci_open()\n", ndev->name);
......@@ -265,7 +265,7 @@ islpci_open(struct net_device *ndev)
static int
islpci_close(struct net_device *ndev)
{
islpci_private *priv = ndev->priv;
islpci_private *priv = netdev_priv(ndev);
printk(KERN_DEBUG "%s: islpci_close ()\n", ndev->name);
......@@ -491,7 +491,7 @@ islpci_reset(islpci_private *priv, int reload_firmware)
struct net_device_stats *
islpci_statistics(struct net_device *ndev)
{
islpci_private *priv = ndev->priv;
islpci_private *priv = netdev_priv(ndev);
#if VERBOSE > SHOW_ERROR_MESSAGES
DEBUG(SHOW_FUNCTION_CALLS, "islpci_statistics \n");
......
......@@ -63,6 +63,7 @@ islpci_eth_cleanup_transmit(islpci_private *priv,
priv->pci_map_tx_address[index],
skb->len, PCI_DMA_TODEVICE);
dev_kfree_skb_irq(skb);
skb = NULL;
}
/* increment the free data low queue pointer */
priv->free_data_tx++;
......@@ -72,7 +73,7 @@ islpci_eth_cleanup_transmit(islpci_private *priv,
int
islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev)
{
islpci_private *priv = ndev->priv;
islpci_private *priv = netdev_priv(ndev);
isl38xx_control_block *cb = priv->control_block;
u32 index;
dma_addr_t pci_map_address;
......@@ -238,6 +239,7 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev)
drop_free:
/* free the skbuf structure before aborting */
dev_kfree_skb(skb);
skb = NULL;
priv->statistics.tx_dropped++;
spin_unlock_irqrestore(&priv->slock, flags);
......@@ -346,8 +348,10 @@ islpci_eth_receive(islpci_private *priv)
skb->data[0], skb->data[1], skb->data[2], skb->data[3],
skb->data[4], skb->data[5]);
#endif
if (discard)
if (discard) {
dev_kfree_skb(skb);
skb = NULL;
}
else
netif_rx(skb);
......@@ -388,6 +392,7 @@ islpci_eth_receive(islpci_private *priv)
/* free the skbuf structure before aborting */
dev_kfree_skb((struct sk_buff *) skb);
skb = NULL;
break;
}
/* update the fragment address */
......@@ -411,7 +416,7 @@ islpci_eth_receive(islpci_private *priv)
void
islpci_eth_tx_timeout(struct net_device *ndev)
{
islpci_private *priv = ndev->priv;
islpci_private *priv = netdev_priv(ndev);
struct net_device_stats *statistics = &priv->statistics;
/* increment the transmit error counter */
......
......@@ -29,10 +29,10 @@
#include "isl_oid.h"
#define DRV_NAME "prism54"
#define DRV_VERSION "1.0.2.2"
#define DRV_VERSION "1.1"
MODULE_AUTHOR("W.Termorshuizen, R.Bastings, H.V.Riedel, prism54.org team");
MODULE_DESCRIPTION("Intersil 802.11 Wireless LAN adapter");
MODULE_AUTHOR("[Intersil] R.Bastings and W.Termorshuizen, The prism54.org Development Team <prism54-devel@prism54.org>");
MODULE_DESCRIPTION("The Prism54 802.11 Wireless LAN adapter");
MODULE_LICENSE("GPL");
/* In this order: vendor, device, subvendor, subdevice, class, class_mask,
......@@ -96,6 +96,11 @@ static const struct pci_device_id prism54_id_tbl[] = {
PCIVENDOR_ACCTON, 0xee03UL,
0, 0,
(unsigned long) "SMC 2802Wv2"},
{
PCIVENDOR_INTERSIL, PCIDEVICE_ISL3890,
PCIVENDOR_SMC, 0xa835UL,
0, 0,
(unsigned long) "SMC 2835Wv2"},
{
PCIVENDOR_INTERSIL, PCIDEVICE_ISL3877,
PCI_ANY_ID, PCI_ANY_ID,
......@@ -133,7 +138,7 @@ prism54_get_card_model(struct net_device *ndev)
islpci_private *priv;
char *modelp;
priv = ndev->priv;
priv = netdev_priv(ndev);
switch (priv->pdev->subsystem_device) {
case PCIDEVICE_ISL3877:
modelp = "PRISM Indigo";
......@@ -159,6 +164,9 @@ prism54_get_card_model(struct net_device *ndev)
case 0x2835UL:
modelp = "SMC2835W";
break;
case 0xa835UL:
modelp = "SMC2835W V2";
break;
/* Let's leave this one out for now since it seems bogus/wrong
* Even if the manufacturer did use 0x0000UL it may not be correct
* by their part, therefore deserving no name ;) */
......@@ -269,7 +277,7 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)
goto do_pci_release_regions;
}
priv = ndev->priv;
priv = netdev_priv(ndev);
islpci_set_state(priv, PRV_STATE_PREBOOT); /* we are attempting to boot */
/* card is in unknown state yet, might have some interrupts pending */
......@@ -314,7 +322,7 @@ void
prism54_remove(struct pci_dev *pdev)
{
struct net_device *ndev = pci_get_drvdata(pdev);
islpci_private *priv = ndev ? ndev->priv : 0;
islpci_private *priv = ndev ? netdev_priv(ndev) : 0;
BUG_ON(!priv);
if (!__in_cleanup_module) {
......@@ -355,7 +363,7 @@ int
prism54_suspend(struct pci_dev *pdev, u32 state)
{
struct net_device *ndev = pci_get_drvdata(pdev);
islpci_private *priv = ndev ? ndev->priv : 0;
islpci_private *priv = ndev ? netdev_priv(ndev) : 0;
BUG_ON(!priv);
printk(KERN_NOTICE "%s: got suspend request (state %d)\n",
......@@ -380,7 +388,7 @@ int
prism54_resume(struct pci_dev *pdev)
{
struct net_device *ndev = pci_get_drvdata(pdev);
islpci_private *priv = ndev ? ndev->priv : 0;
islpci_private *priv = ndev ? netdev_priv(ndev) : 0;
BUG_ON(!priv);
printk(KERN_NOTICE "%s: got resume request\n", ndev->name);
......
......@@ -22,6 +22,7 @@
#include <linux/netdevice.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/moduleparam.h>
#include <asm/io.h>
#include <asm/system.h>
......@@ -38,7 +39,7 @@
Global variable definition section
******************************************************************************/
int pc_debug = VERBOSE;
MODULE_PARM(pc_debug, "i");
module_param(pc_debug, int, 0);
/******************************************************************************
Driver general functions
......@@ -106,7 +107,7 @@ pimfor_decode_header(void *data, int len)
int
islpci_mgmt_rx_fill(struct net_device *ndev)
{
islpci_private *priv = ndev->priv;
islpci_private *priv = netdev_priv(ndev);
isl38xx_control_block *cb = /* volatile not needed */
(isl38xx_control_block *) priv->control_block;
u32 curr = le32_to_cpu(cb->driver_curr_frag[ISL38XX_CB_RX_MGMTQ]);
......@@ -165,7 +166,7 @@ static int
islpci_mgt_transmit(struct net_device *ndev, int operation, unsigned long oid,
void *data, int length)
{
islpci_private *priv = ndev->priv;
islpci_private *priv = netdev_priv(ndev);
isl38xx_control_block *cb =
(isl38xx_control_block *) priv->control_block;
void *p;
......@@ -271,7 +272,7 @@ islpci_mgt_transmit(struct net_device *ndev, int operation, unsigned long oid,
int
islpci_mgt_receive(struct net_device *ndev)
{
islpci_private *priv = ndev->priv;
islpci_private *priv = netdev_priv(ndev);
isl38xx_control_block *cb =
(isl38xx_control_block *) priv->control_block;
u32 curr_frag;
......@@ -414,7 +415,7 @@ n",
void
islpci_mgt_cleanup_transmit(struct net_device *ndev)
{
islpci_private *priv = ndev->priv;
islpci_private *priv = netdev_priv(ndev);
isl38xx_control_block *cb = /* volatile not needed */
(isl38xx_control_block *) priv->control_block;
u32 curr_frag;
......@@ -451,7 +452,7 @@ islpci_mgt_transaction(struct net_device *ndev,
void *senddata, int sendlen,
struct islpci_mgmtframe **recvframe)
{
islpci_private *priv = ndev->priv;
islpci_private *priv = netdev_priv(ndev);
const long wait_cycle_jiffies = (ISL38XX_WAIT_CYCLE * 10 * HZ) / 1000;
long timeout_left = ISL38XX_MAX_WAIT_CYCLES * wait_cycle_jiffies;
int err;
......
......@@ -87,11 +87,13 @@ static const int init_wds = 0; /* help compiler optimize away dead code */
#define CARD_DEFAULT_KEY4 "default_key_4"
#define CARD_DEFAULT_WEP 0
#define CARD_DEFAULT_FILTER 0
# define CARD_DEFAULT_WDS 0
#define CARD_DEFAULT_WDS 0
#define CARD_DEFAULT_AUTHEN DOT11_AUTH_OS
#define CARD_DEFAULT_DOT1X 0
#define CARD_DEFAULT_MLME_MODE DOT11_MLME_AUTO
#define CARD_DEFAULT_CONFORMANCE OID_INL_CONFORMANCE_NONE
#define CARD_DEFAULT_PROFILE DOT11_PROFILE_MIXED_G_WIFI
#define CARD_DEFAULT_MAXFRAMEBURST DOT11_MAXFRAMEBURST_MIXED_SAFE
/* PIMFOR package definitions */
#define PIMFOR_ETHERTYPE 0x8828
......
......@@ -97,7 +97,7 @@ struct oid_t isl_oid[] = {
[DOT11_OID_ALOFT_CONFIG] = OID_UNKNOWN(0x1d000006),
[DOT11_OID_VDCFX] = {0x1b000000, 7, 0, 0},
[DOT11_OID_MAXFRAMEBURST] = OID_U32(0x1b000008),
[DOT11_OID_MAXFRAMEBURST] = OID_U32(0x1b000008), /* in microseconds */
[DOT11_OID_PSM] = OID_U32(0x14000000),
[DOT11_OID_CAMTIMEOUT] = OID_U32(0x14000001),
......
......@@ -48,12 +48,12 @@ config DASD_FBA
say "Y".
config DASD_DIAG
tristate "Support for DIAG access to CMS reserved Disks"
tristate "Support for DIAG access to Disks"
depends on DASD && ARCH_S390X = 'n'
help
Select this option if you want to use CMS reserved Disks under VM
with the Diagnose250 command. If you are not running under VM or
unsure what it is, say "N".
Select this option if you want to use Diagnose250 command to access
Disks under VM. If you are not running under VM or unsure what it is,
say "N".
config DASD_CMB
tristate "Compatibility interface for DASD channel measurement blocks"
......
This diff is collapsed.
......@@ -11,7 +11,7 @@
* functions may not be called from interrupt context. In particular
* dasd_get_device is a no-no from interrupt context.
*
* $Revision: 1.25 $
* $Revision: 1.26 $
*/
#include <linux/config.h>
......@@ -681,6 +681,13 @@ dasd_add_sysfs_files(struct ccw_device *cdev)
return sysfs_create_group(&cdev->dev.kobj, &dasd_attr_group);
}
void
dasd_remove_sysfs_files(struct ccw_device *cdev)
{
sysfs_remove_group(&cdev->dev.kobj, &dasd_attr_group);
}
int
dasd_devmap_init(void)
{
......
......@@ -6,7 +6,7 @@
* Bugreports.to..: <Linux390@de.ibm.com>
* (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
*
* $Revision: 1.33 $
* $Revision: 1.34 $
*/
#include <linux/config.h>
......@@ -173,7 +173,6 @@ dasd_ext_handler(struct pt_regs *regs, __u16 code)
if (!ip) { /* no intparm: unsolicited interrupt */
MESSAGE(KERN_DEBUG, "%s", "caught unsolicited interrupt");
irq_exit();
return;
}
cqr = (struct dasd_ccw_req *)(addr_t) ip;
......@@ -183,7 +182,6 @@ dasd_ext_handler(struct pt_regs *regs, __u16 code)
" magic number of dasd_ccw_req 0x%08X doesn't"
" match discipline 0x%08X",
cqr->magic, *(int *) (&device->discipline->name));
irq_exit();
return;
}
......
This diff is collapsed.
......@@ -18,6 +18,6 @@ obj-$(CONFIG_SCLP_CPI) += sclp_cpi.o
tape-$(CONFIG_S390_TAPE_BLOCK) += tape_block.o
tape-$(CONFIG_PROC_FS) += tape_proc.o
tape-objs := tape_core.o tape_std.o tape_char.o tape_class.o $(tape-y)
obj-$(CONFIG_S390_TAPE) += tape.o
tape-objs := tape_core.o tape_std.o tape_char.o $(tape-y)
obj-$(CONFIG_S390_TAPE) += tape.o tape_class.o
obj-$(CONFIG_S390_TAPE_34XX) += tape_34xx.o
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.
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