Commit d08b4405 authored by Andy Grover's avatar Andy Grover

Merge groveronline.com:/root/bk/linux-2.5

into groveronline.com:/root/bk/linux-acpi
parents abf13627 93a3177f
No related merge requests found
......@@ -1085,18 +1085,17 @@ EXPORT_NO_SYMBOLS;
<title>Initializing structure members</title>
<para>
The preferred method of initializing structures is to use the
gcc Labeled Elements extension, eg:
The preferred method of initializing structures is to use
designated initialisers, as defined by ISO C99, eg:
</para>
<programlisting>
static struct block_device_operations opt_fops = {
open: opt_open,
release: opt_release,
ioctl: opt_ioctl,
check_media_change: opt_media_change,
.open = opt_open,
.release = opt_release,
.ioctl = opt_ioctl,
.check_media_change = opt_media_change,
};
</programlisting>
<para>
This makes it easy to grep for, and makes it clear which
structure fields are set. You should do this because it looks
......
......@@ -86,7 +86,7 @@ Hot plug support for SCSI tape drives
Hot plugging of SCSI tape drives is supported, with some caveats.
The cciss driver must be informed that changes to the SCSI bus
have been made, in addition to and prior to informing the the SCSI
have been made, in addition to and prior to informing the SCSI
mid layer. This may be done via the /proc filesystem. For example:
echo "rescan" > /proc/scsi/cciss0/1
......
......@@ -63,8 +63,8 @@ and the first two patches to this driver (0.1, 0.2, and 0.3).
Thanks also to Eberhard Moenkeberg (emoenke@gwdg.de) for prodding
me to place this code into the mainstream Linux source tree
(as of Linux version 1.1.91), as well as some patches to make
it a better device citizen. Further thanks to "S. Joel Katz"
<stimpson@panix.com> for his MODULE patches (see details below),
it a better device citizen. Further thanks to Joel Katz
<joelkatz@webchat.org> for his MODULE patches (see details below),
Porfiri Claudio <C.Porfiri@nisms.tei.ericsson.se> for patches
to make the driver work with the older CDU-510/515 series, and
Heiko Eissfeldt <heiko@colossus.escape.de> for pointing out that
......@@ -79,7 +79,7 @@ Ken Pizzini
ken@halcyon.com
------------------------------------------------------------------------------
(The following is from Joel Katz <Stimpson@Panix.COM>.)
(The following is from Joel Katz <joelkatz@webchat.org>.)
To build a version of sony535.o that can be installed as a module,
use the following command:
......@@ -103,7 +103,7 @@ exactly as it used to if compiled into the kernel.
I have an external drive, and I usually leave it powered off. I used
to have to reboot if I needed to use the CDROM drive. Now I don't.
Even if you have an internal drive, why waste the 268K of memory
Even if you have an internal drive, why waste the 96K of memory
(unswappable) that the driver uses if you use your CD-ROM drive infrequently?
This driver will not install (whether compiled in or loaded as a
......
......@@ -185,9 +185,22 @@ suggestions welcome) (WIP)
Change History
--------------
Version 0.9.23 - In progress
* New, compile-time conditional for testing better RX reset
Version 0.9.26 - August 9, 2002
* Fix MII ioctl phy id corruption.
* Fix big-endian multicast bug.
* Support register dumps via ethtool.
* Fix several uses of 'len' after potential skb free, in dev->hard_start_xmit
* Replace several "magic numbers" with their proper representation
constants in linux/mii.h.
* Support ethtool media interface via generic kernel MII API
* Export NIC-specific statistics via ethtool.
* Proper support for RTL8139 rev K. (can be disabled via
compile-time conditional)
* Add PCI ids for new 8139 boards.
* Use ethernet crc via generic linux/crc32.h kernel API.
* Better RX reset. Old rx-reset method still available via
a compile-time conditional.
* Only account specific RX errors if rx_status is !OK
......
......@@ -266,7 +266,7 @@ Questions :
If not explicitly configured with ifconfig, the MAC address of the
bonding device is taken from its first slave device. This MAC address
is then passed to all following slaves and remains persistent (even if
the the first slave is removed) until the bonding device is brought
the first slave is removed) until the bonding device is brought
down or reconfigured.
If you wish to change the MAC address, you can set it with ifconfig:
......
Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters
===============================================================
June 11, 2002
August 6, 2002
Contents
......@@ -20,12 +20,12 @@ In This Release
===============
This file describes the Linux* Base Driver for the Intel(R) PRO/1000 Family
of Adapters, version 4.2.x. This driver includes support for
of Adapters, version 4.3.x. This driver includes support for
Itanium(TM)-based systems.
This release version includes the following:
- Support for the ethtool 1.5 interface. A third-party application can use
- Support for the ethtool 1.6 interface. A third-party application can use
the ethtool interface to get and set driver parameters.
- Zero copy. This feature provides faster data throughput. Enabled by
......@@ -113,12 +113,12 @@ Valid Range: 0x01-0x0F, 0x20-0x2F
Default Value: 0x2F
This parameter is a bit mask that specifies which speed and duplex
settings the board advertises. When this parameter is used, the Speed and
Duplex parameters must not be specified.
Duplex parameters must not be specified.
Duplex (adapters using copper connections only)
Valid Range: 0-2 (0=auto-negotiate, 1=half, 2=full)
Default Value: 0
Defines the direction in which data is allowed to flow. Can by either one
Defines the direction in which data is allowed to flow. Can by either one
or two-directional. If both Duplex and the link partner are set to auto-
negotiate, the board auto-detects the correct duplex. If the link partner
is forced (either full or half), Duplex defaults to half-duplex.
......@@ -126,45 +126,58 @@ Default Value: 0
FlowControl
Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx)
Default: Read flow control settings from the EEPROM
This parameter controls the automatic generation(Tx) and response(Rx) to
This parameter controls the automatic generation(Tx) and response(Rx) to
Ethernet PAUSE frames.
RxDescriptors
Valid Range: 80-256 for 82542 and 82543-based adapters
80-4096 for 82540, 82544, 82545, and 82546-based adapters
Default Value: 80
This value is the number of receive descriptors allocated by the driver.
Increasing this value allows the driver to buffer more incoming packets.
This value is the number of receive descriptors allocated by the driver.
Increasing this value allows the driver to buffer more incoming packets.
Each descriptor is 16 bytes. A receive buffer is also allocated for each
descriptor and can be either 2048, 4096, 8192, or 16384 bytes, depending
descriptor and can be either 2048, 4096, 8192, or 16384 bytes, depending
on the MTU setting. The maximum MTU size is 16110.
NOTE: MTU designates the frame size. It only needs to be set for Jumbo
Frames.
RxIntDelay
Valid Range: 0-65535 (0=off)
Default Value: 0 (82542, 82543, and 82544-based adapters)
128 (82540, 82545, and 82546-based adapters)
This value delays the generation of receive interrupts in units of 1.024
microseconds. Receive interrupt reduction can improve CPU efficiency if
properly tuned for specific network traffic. Increasing this value adds
extra latency to frame reception and can end up decreasing the throughput
of TCP traffic. If the system is reporting dropped receives, this value
may be set too high, causing the driver to run out of available receive
This value delays the generation of receive interrupts in units of 1.024
microseconds. Receive interrupt reduction can improve CPU efficiency if
properly tuned for specific network traffic. Increasing this value adds
extra latency to frame reception and can end up decreasing the throughput
of TCP traffic. If the system is reporting dropped receives, this value
may be set too high, causing the driver to run out of available receive
descriptors.
CAUTION: When setting RxIntDelay to a value other than 0, adapters based
on the Intel 82543 and 82544 LAN controllers may hang (stop
CAUTION: When setting RxIntDelay to a value other than 0, adapters based
on the Intel 82543 and 82544 LAN controllers may hang (stop
transmitting) under certain network conditions. If this occurs a
message is logged in the system event log. In addition, the
controller is automatically reset, restoring the network
connection. To eliminate the potential for the hang ensure that
message is logged in the system event log. In addition, the
controller is automatically reset, restoring the network
connection. To eliminate the potential for the hang ensure that
RxIntDelay is set to 0.
RxAbsIntDelay (82540, 82545, and 82546-based adapters only)
Valid Range: 0-65535 (0=off)
Default Value: 128
This value, in units of 1.024 microseconds, limits the delay in which a
transmit interrupt is generated. Useful only if RxIntDelay is non-zero,
this value ensures that an interrupt is generated after the initial
packet is received within the set amount of time. Proper tuning,
along with RxIntDelay, may improve traffic throughput in specific network
conditions.
Speed (adapters using copper connections only)
Valid Settings: 0, 10, 100, 1000
Default Value: 0 (auto-negotiate at all supported speeds)
Speed forces the line speed to the specified value in megabits per second
(Mbps). If this parameter is not specified or is set to 0 and the link
partner is set to auto-negotiate, the board will auto-detect the correct
(Mbps). If this parameter is not specified or is set to 0 and the link
partner is set to auto-negotiate, the board will auto-detect the correct
speed. Duplex must also be set when Speed is set to either 10 or 100.
TxDescriptors
......@@ -172,9 +185,28 @@ Valid Range: 80-256 for 82542 and 82543-based adapters
80-4096 for 82540, 82544, 82545, and 82546-based adapters
Default Value: 256
This value is the number of transmit descriptors allocated by the driver.
Increasing this value allows the driver to queue more transmits. Each
Increasing this value allows the driver to queue more transmits. Each
descriptor is 16 bytes.
TxIntDelay
Valid Range: 0-65535 (0=off)
Default Value: 64
This value delays the generation of transmit interrupts in units of
1.024 microseconds. Transmit interrupt reduction can improve CPU
efficiency if properly tuned for specific network traffic. If the
system is reporting dropped transmits, this value may be set too high
causing the driver to run out of available transmit descriptors.
TxAbsIntDelay (82540, 82545, and 82546-based adapters only)
Valid Range: 0-65535 (0=off)
Default Value: 64
This value, in units of 1.024 microseconds, limits the delay in which a
transmit interrupt is generated. Useful only if TxIntDelay is non-zero,
this value ensures that an interrupt is generated after the initial
packet is sent on the wire within the set amount of time. Proper tuning,
along with TxIntDelay, may improve traffic throughput in specific
network conditions.
XsumRX (not available on the PRO/1000 Gigabit Server Adapter)
Valid Range: 0-1
Default Value: 1
......
......@@ -278,7 +278,7 @@ machzwd.c -- MachZ ZF-Logic
when the timeout runs out which can be 0 = RESET (default),
1 = SMI, 2 = NMI, 3 = SCI.
Supports CONFIG_WATCHDOG_NOWAYOUT and the the magic character
Supports CONFIG_WATCHDOG_NOWAYOUT and the magic character
'V' close handling.
GETSUPPORT returns WDIOF_KEEPALIVEPING, and the GETSTATUS call
......
......@@ -1888,7 +1888,6 @@ S: Maintained
VIDEO FOR LINUX
P: Gerd Knorr
M: kraxel@bytesex.org
W: http://roadrunner.swansea.linux.org.uk/v4l.shtml
S: Maintained
WAN ROUTER & SANGOMA WANPIPE DRIVERS & API (X.25, FRAME RELAY, PPP, CISCO HDLC)
......
......@@ -338,6 +338,7 @@ if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
fi
endmenu
source drivers/input/Config.in
source drivers/char/Config.in
#source drivers/misc/Config.in
......@@ -373,7 +374,6 @@ fi
endmenu
source drivers/usb/Config.in
source drivers/input/Config.in
source net/bluetooth/Config.in
......
......@@ -657,8 +657,84 @@ CONFIG_MOUSE_PS2=y
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_SERIAL_NONSTANDARD is not set
#
# Serial drivers
#
CONFIG_SERIAL_8250=y
# CONFIG_SERIAL_8250_CONSOLE is not set
# CONFIG_SERIAL_8250_CS is not set
# CONFIG_SERIAL_8250_EXTENDED is not set
# CONFIG_SERIAL_8250_MANY_PORTS is not set
# CONFIG_SERIAL_8250_SHARE_IRQ is not set
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
# CONFIG_SERIAL_8250_MULTIPORT is not set
# CONFIG_SERIAL_8250_RSA is not set
#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
CONFIG_PRINTER=y
# CONFIG_LP_CONSOLE is not set
# CONFIG_PPDEV is not set
#
# I2C support
#
# CONFIG_I2C is not set
#
# Mice
#
# CONFIG_BUSMOUSE is not set
# CONFIG_QIC02_TAPE is not set
#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
CONFIG_INTEL_RNG=y
# CONFIG_NVRAM is not set
# CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_SONYPI is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
CONFIG_AGP=y
CONFIG_AGP_INTEL=y
CONFIG_AGP_I810=y
# CONFIG_AGP_VIA is not set
# CONFIG_AGP_AMD is not set
# CONFIG_AGP_SIS is not set
# CONFIG_AGP_ALI is not set
# CONFIG_AGP_SWORKS is not set
CONFIG_DRM=y
# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_GAMMA is not set
# CONFIG_DRM_R128 is not set
CONFIG_DRM_RADEON=y
# CONFIG_DRM_I810 is not set
# CONFIG_DRM_I830 is not set
# CONFIG_DRM_MGA is not set
#
# PCMCIA character devices
#
# CONFIG_SYNCLINK_CS is not set
# CONFIG_MWAVE is not set
# CONFIG_RAW_DRIVER is not set
#
# Multimedia devices
#
......
......@@ -58,6 +58,9 @@ EXPORT_SYMBOL(boot_cpu_data);
EXPORT_SYMBOL(EISA_bus);
#endif
EXPORT_SYMBOL(MCA_bus);
#ifdef CONFIG_MULTIQUAD
EXPORT_SYMBOL(xquad_portio);
#endif
EXPORT_SYMBOL(__verify_write);
EXPORT_SYMBOL(dump_thread);
EXPORT_SYMBOL(dump_fpu);
......@@ -169,7 +172,3 @@ extern int is_sony_vaio_laptop;
EXPORT_SYMBOL(is_sony_vaio_laptop);
EXPORT_SYMBOL(__PAGE_KERNEL);
#ifdef CONFIG_MULTIQUAD
EXPORT_SYMBOL(xquad_portio);
#endif
......@@ -395,7 +395,7 @@ void __init smp_callin(void)
Dprintk("CALLIN, before setup_local_APIC().\n");
/*
* Because we use NMIs rather than the INIT-STARTUP sequence to
* bootstrap the CPUs, the APIC may be in a wierd state. Kick it.
* bootstrap the CPUs, the APIC may be in a weird state. Kick it.
*/
if (clustered_apic_mode)
clear_local_APIC();
......
......@@ -7485,7 +7485,7 @@ pcibr_device_flags_set(devfs_handle_t pconn_vhdl,
#ifdef LITTLE_ENDIAN
/*
* on sn-ia we need to twiddle the the addresses going out
* on sn-ia we need to twiddle the addresses going out
* the pci bus because we use the unswizzled synergy space
* (the alternative is to use the swizzled synergy space
* and byte swap the data)
......
......@@ -389,6 +389,8 @@ if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
fi
endmenu
source drivers/input/Config.in
source drivers/char/Config.in
source drivers/media/Config.in
......@@ -474,7 +476,6 @@ if [ "$CONFIG_SGI_IP22" = "y" ]; then
fi
source drivers/usb/Config.in
source drivers/input/Config.in
mainmenu_option next_comment
comment 'Kernel hacking'
......
......@@ -54,7 +54,6 @@ static struct linux_binfmt irix_format = {
#ifndef elf_addr_t
#define elf_addr_t unsigned long
#define elf_caddr_t char *
#endif
#ifdef DEBUG_ELF
......@@ -155,8 +154,8 @@ unsigned long * create_irix_tables(char * p, int argc, int envc,
unsigned int interp_load_addr,
struct pt_regs *regs, struct elf_phdr *ephdr)
{
elf_caddr_t *argv;
elf_caddr_t *envp;
elf_addr_t *argv;
elf_addr_t *envp;
elf_addr_t *sp, *csp;
#ifdef DEBUG_ELF
......@@ -202,20 +201,20 @@ unsigned long * create_irix_tables(char * p, int argc, int envc,
#undef NEW_AUX_ENT
sp -= envc+1;
envp = (elf_caddr_t *) sp;
envp = sp;
sp -= argc+1;
argv = (elf_caddr_t *) sp;
argv = sp;
__put_user((elf_addr_t)argc,--sp);
current->mm->arg_start = (unsigned long) p;
while (argc-->0) {
__put_user((elf_caddr_t)(unsigned long)p,argv++);
__put_user((unsigned long)p,argv++);
p += strlen_user(p);
}
__put_user(NULL, argv);
current->mm->arg_end = current->mm->env_start = (unsigned long) p;
while (envc-->0) {
__put_user((elf_caddr_t)(unsigned long)p,envp++);
__put_user((unsigned long)p,envp++);
p += strlen_user(p);
}
__put_user(NULL, envp);
......
......@@ -285,7 +285,7 @@ static inline void cpu_probe(void)
mips_cpu.isa_level = MIPS_CPU_ISA_IV;
mips_cpu.options = MIPS_CPU_TLB | MIPS_CPU_4KEX |
MIPS_CPU_FPU | MIPS_CPU_32FPR;
mips_cpu.tlbsize = 384; /* has wierd TLB: 3-way x 128 */
mips_cpu.tlbsize = 384; /* has weird TLB: 3-way x 128 */
break;
case PRID_IMP_R10000:
mips_cpu.cputype = CPU_R10000;
......
......@@ -189,6 +189,8 @@ if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
fi
endmenu
source drivers/input/Config.in
source drivers/char/Config.in
#source drivers/misc/Config.in
......@@ -230,7 +232,6 @@ if [ "$CONFIG_SGI_IP22" = "y" ]; then
fi
source drivers/usb/Config.in
source drivers/input/Config.in
mainmenu_option next_comment
comment 'Kernel hacking'
......
......@@ -80,7 +80,6 @@ struct elf_prpsinfo32
};
#define elf_addr_t u32
#define elf_caddr_t u32
#define init_elf_binfmt init_elf32_binfmt
#undef CONFIG_BINFMT_ELF
#ifdef CONFIG_BINFMT_ELF32
......
......@@ -4,7 +4,7 @@
/*
* This file contains the routines for TLB flushing.
* On machines where the MMU uses a hash table to store virtual to
* physical translations, these routines flush entries from the the
* physical translations, these routines flush entries from the
* hash table also.
* -- paulus
*
......
......@@ -130,7 +130,7 @@ static void iSeries_IoMmTable_AllocateEntry(struct pci_dev* PciDev, int BarNumbe
/* The HvCallPci_getBarParms is used to get the size of the BAR */
/* space. It calls iSeries_IoMmTable_AllocateEntry to allocate */
/* each entry. */
/* - Loops through The Bar resourses(0 - 5) including the the ROM */
/* - Loops through The Bar resources(0 - 5) including the ROM */
/* is resource(6). */
/*******************************************************************/
void iSeries_allocateDeviceBars(struct pci_dev* PciDev)
......
......@@ -166,7 +166,6 @@ struct elf_prpsinfo32
#define NEW_TO_OLD_GID(gid) ((gid) > 65535) ? (u16)overflowgid : (u16)(gid)
#define elf_addr_t u32
#define elf_caddr_t u32
/*
#define init_elf_binfmt init_elf32_binfmt
*/
......
......@@ -107,7 +107,7 @@ void make_intc2_irq(unsigned int irq, unsigned int addr,
}
disable_irq_nosync(irq);
/* Fill the the data we need */
/* Fill the data we need */
intc2_data[offset].addr=addr;
intc2_data[offset].mask=1<<pos;
......
......@@ -147,7 +147,6 @@ jiffies_to_timeval32(unsigned long jiffies, struct timeval32 *value)
}
#define elf_addr_t u32
#define elf_caddr_t u32
#undef start_thread
#define start_thread start_thread32
#define init_elf_binfmt init_elf32_binfmt
......
......@@ -186,7 +186,6 @@ MODULE_AUTHOR("Eric Youngdale, Andi Kleen");
#undef MODULE_AUTHOR
#define elf_addr_t __u32
#define elf_caddr_t __u32
static void elf32_init(struct pt_regs *);
......
......@@ -33,7 +33,6 @@
#include <linux/module.h>
#include <linux/version.h>
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/sched.h>
......
......@@ -201,9 +201,9 @@ static inline struct page * vmalloc_to_page(void * vmalloc_addr)
/* Macros to make printk easier */
#define DRM_ERROR(fmt, arg...) \
printk(KERN_ERR "[" DRM_NAME ":" __FUNCTION__ "] *ERROR* " fmt , ##arg)
printk(KERN_ERR "[" DRM_NAME ":%s] *ERROR* " fmt , __FUNCTION__ , ##arg)
#define DRM_MEM_ERROR(area, fmt, arg...) \
printk(KERN_ERR "[" DRM_NAME ":" __FUNCTION__ ":%s] *ERROR* " fmt , \
printk(KERN_ERR "[" DRM_NAME ":%s:%s] *ERROR* " fmt , __FUNCTION__, \
DRM(mem_stats)[area].name , ##arg)
#define DRM_INFO(fmt, arg...) printk(KERN_INFO "[" DRM_NAME "] " fmt , ##arg)
......@@ -212,8 +212,8 @@ static inline struct page * vmalloc_to_page(void * vmalloc_addr)
do { \
if ( DRM(flags) & DRM_FLAG_DEBUG ) \
printk(KERN_DEBUG \
"[" DRM_NAME ":" __FUNCTION__ "] " fmt , \
##arg); \
"[" DRM_NAME ":%s] " fmt , \
__FUNCTION__ , ##arg); \
} while (0)
#else
#define DRM_DEBUG(fmt, arg...) do { } while (0)
......
......@@ -696,7 +696,7 @@ int mga_dma_flush( DRM_IOCTL_ARGS )
#if MGA_DMA_DEBUG
int ret = mga_do_wait_for_idle( dev_priv );
if ( ret < 0 )
DRM_INFO( "%s: -EBUSY\n", __func__ );
DRM_INFO( "%s: -EBUSY\n", __FUNCTION__ );
return ret;
#else
return mga_do_wait_for_idle( dev_priv );
......
......@@ -188,7 +188,7 @@ do { \
if ( !_DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ) || \
dev->lock.pid != DRM_CURRENTPID ) { \
DRM_ERROR( "%s called without lock held\n", \
__func__ ); \
__FUNCTION__ ); \
return DRM_ERR(EINVAL); \
} \
} while (0)
......@@ -201,7 +201,7 @@ do { \
} else if ( dev_priv->prim.space < \
dev_priv->prim.high_mark ) { \
if ( MGA_DMA_DEBUG ) \
DRM_INFO( "%s: wrap...\n", __func__ ); \
DRM_INFO( "%s: wrap...\n", __FUNCTION__ ); \
return DRM_ERR(EBUSY); \
} \
} \
......@@ -212,7 +212,7 @@ do { \
if ( test_bit( 0, &dev_priv->prim.wrapped ) ) { \
if ( mga_do_wait_for_idle( dev_priv ) < 0 ) { \
if ( MGA_DMA_DEBUG ) \
DRM_INFO( "%s: wrap...\n", __func__ ); \
DRM_INFO( "%s: wrap...\n", __FUNCTION__ ); \
return DRM_ERR(EBUSY); \
} \
mga_do_dma_wrap_end( dev_priv ); \
......@@ -234,7 +234,7 @@ do { \
do { \
if ( MGA_VERBOSE ) { \
DRM_INFO( "BEGIN_DMA( %d ) in %s\n", \
(n), __func__ ); \
(n), __FUNCTION__ ); \
DRM_INFO( " space=0x%x req=0x%x\n", \
dev_priv->prim.space, (n) * DMA_BLOCK_SIZE ); \
} \
......@@ -245,7 +245,7 @@ do { \
#define BEGIN_DMA_WRAP() \
do { \
if ( MGA_VERBOSE ) { \
DRM_INFO( "BEGIN_DMA() in %s\n", __func__ ); \
DRM_INFO( "BEGIN_DMA() in %s\n", __FUNCTION__ ); \
DRM_INFO( " space=0x%x\n", dev_priv->prim.space ); \
} \
prim = dev_priv->prim.start; \
......@@ -264,7 +264,7 @@ do { \
#define FLUSH_DMA() \
do { \
if ( 0 ) { \
DRM_INFO( "%s:\n", __func__ ); \
DRM_INFO( "%s:\n", __FUNCTION__ ); \
DRM_INFO( " tail=0x%06x head=0x%06lx\n", \
dev_priv->prim.tail, \
MGA_READ( MGA_PRIMADDRESS ) - \
......
......@@ -37,7 +37,6 @@
#include "drm.h"
#include "mga_drm.h"
#include "mga_drv.h"
#include "drm.h"
/* ================================================================
......@@ -662,7 +661,7 @@ static void mga_dma_dispatch_swap( drm_device_t *dev )
FLUSH_DMA();
DRM_DEBUG( "%s... done.\n", __func__ );
DRM_DEBUG( "%s... done.\n", __FUNCTION__ );
}
static void mga_dma_dispatch_vertex( drm_device_t *dev, drm_buf_t *buf )
......@@ -1023,7 +1022,7 @@ int mga_dma_iload( DRM_IOCTL_ARGS )
#if 0
if ( mga_do_wait_for_idle( dev_priv ) < 0 ) {
if ( MGA_DMA_DEBUG )
DRM_INFO( "%s: -EBUSY\n", __func__ );
DRM_INFO( "%s: -EBUSY\n", __FUNCTION__ );
return DRM_ERR(EBUSY);
}
#endif
......
......@@ -666,7 +666,7 @@ int r128_cce_start( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( dev_priv->cce_running || dev_priv->cce_mode == R128_PM4_NONPM4 ) {
DRM_DEBUG( "%s while CCE running\n", __func__ );
DRM_DEBUG( "%s while CCE running\n", __FUNCTION__ );
return 0;
}
......@@ -728,7 +728,7 @@ int r128_cce_reset( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( !dev_priv ) {
DRM_DEBUG( "%s called before init done\n", __func__ );
DRM_DEBUG( "%s called before init done\n", __FUNCTION__ );
return DRM_ERR(EINVAL);
}
......
......@@ -401,7 +401,7 @@ extern int R128_READ_PLL(drm_device_t *dev, int addr);
do { \
if ( !_DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ) || \
dev->lock.pid != DRM_CURRENTPID ) { \
DRM_ERROR( "%s called without lock held\n", __func__ ); \
DRM_ERROR( "%s called without lock held\n", __FUNCTION__ ); \
return DRM_ERR(EINVAL); \
} \
} while (0)
......@@ -459,7 +459,7 @@ do { \
#define BEGIN_RING( n ) do { \
if ( R128_VERBOSE ) { \
DRM_INFO( "BEGIN_RING( %d ) in %s\n", \
(n), __func__ ); \
(n), __FUNCTION__ ); \
} \
if ( dev_priv->ring.space <= (n) * sizeof(u32) ) { \
r128_wait_ring( dev_priv, (n) * sizeof(u32) ); \
......
......@@ -43,7 +43,7 @@ static void r128_emit_clip_rects( drm_r128_private_t *dev_priv,
{
u32 aux_sc_cntl = 0x00000000;
RING_LOCALS;
DRM_DEBUG( " %s\n", __func__ );
DRM_DEBUG( " %s\n", __FUNCTION__ );
BEGIN_RING( 17 );
......@@ -86,7 +86,7 @@ static __inline__ void r128_emit_core( drm_r128_private_t *dev_priv )
drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
drm_r128_context_regs_t *ctx = &sarea_priv->context_state;
RING_LOCALS;
DRM_DEBUG( " %s\n", __func__ );
DRM_DEBUG( " %s\n", __FUNCTION__ );
BEGIN_RING( 2 );
......@@ -101,7 +101,7 @@ static __inline__ void r128_emit_context( drm_r128_private_t *dev_priv )
drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
drm_r128_context_regs_t *ctx = &sarea_priv->context_state;
RING_LOCALS;
DRM_DEBUG( " %s\n", __func__ );
DRM_DEBUG( " %s\n", __FUNCTION__ );
BEGIN_RING( 13 );
......@@ -127,7 +127,7 @@ static __inline__ void r128_emit_setup( drm_r128_private_t *dev_priv )
drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
drm_r128_context_regs_t *ctx = &sarea_priv->context_state;
RING_LOCALS;
DRM_DEBUG( " %s\n", __func__ );
DRM_DEBUG( " %s\n", __FUNCTION__ );
BEGIN_RING( 3 );
......@@ -143,7 +143,7 @@ static __inline__ void r128_emit_masks( drm_r128_private_t *dev_priv )
drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
drm_r128_context_regs_t *ctx = &sarea_priv->context_state;
RING_LOCALS;
DRM_DEBUG( " %s\n", __func__ );
DRM_DEBUG( " %s\n", __FUNCTION__ );
BEGIN_RING( 5 );
......@@ -162,7 +162,7 @@ static __inline__ void r128_emit_window( drm_r128_private_t *dev_priv )
drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
drm_r128_context_regs_t *ctx = &sarea_priv->context_state;
RING_LOCALS;
DRM_DEBUG( " %s\n", __func__ );
DRM_DEBUG( " %s\n", __FUNCTION__ );
BEGIN_RING( 2 );
......@@ -179,7 +179,7 @@ static __inline__ void r128_emit_tex0( drm_r128_private_t *dev_priv )
drm_r128_texture_regs_t *tex = &sarea_priv->tex_state[0];
int i;
RING_LOCALS;
DRM_DEBUG( " %s\n", __func__ );
DRM_DEBUG( " %s\n", __FUNCTION__ );
BEGIN_RING( 7 + R128_MAX_TEXTURE_LEVELS );
......@@ -205,7 +205,7 @@ static __inline__ void r128_emit_tex1( drm_r128_private_t *dev_priv )
drm_r128_texture_regs_t *tex = &sarea_priv->tex_state[1];
int i;
RING_LOCALS;
DRM_DEBUG( " %s\n", __func__ );
DRM_DEBUG( " %s\n", __FUNCTION__ );
BEGIN_RING( 5 + R128_MAX_TEXTURE_LEVELS );
......@@ -228,7 +228,7 @@ static __inline__ void r128_emit_state( drm_r128_private_t *dev_priv )
drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
unsigned int dirty = sarea_priv->dirty;
DRM_DEBUG( "%s: dirty=0x%08x\n", __func__, dirty );
DRM_DEBUG( "%s: dirty=0x%08x\n", __FUNCTION__, dirty );
if ( dirty & R128_UPLOAD_CORE ) {
r128_emit_core( dev_priv );
......@@ -369,7 +369,7 @@ static void r128_cce_dispatch_clear( drm_device_t *dev,
unsigned int flags = clear->flags;
int i;
RING_LOCALS;
DRM_DEBUG( "%s\n", __func__ );
DRM_DEBUG( "%s\n", __FUNCTION__ );
if ( dev_priv->page_flipping && dev_priv->current_page == 1 ) {
unsigned int tmp = flags;
......@@ -472,7 +472,7 @@ static void r128_cce_dispatch_swap( drm_device_t *dev )
drm_clip_rect_t *pbox = sarea_priv->boxes;
int i;
RING_LOCALS;
DRM_DEBUG( "%s\n", __func__ );
DRM_DEBUG( "%s\n", __FUNCTION__ );
#if R128_PERFORMANCE_BOXES
/* Do some trivial performance monitoring...
......@@ -1148,7 +1148,7 @@ static int r128_cce_dispatch_read_pixels( drm_device_t *dev,
int count, *x, *y;
int i;
RING_LOCALS;
DRM_DEBUG( "%s\n", __func__ );
DRM_DEBUG( "%s\n", __FUNCTION__ );
count = depth->n;
if ( count > dev_priv->depth_pitch ) {
......@@ -1215,7 +1215,7 @@ static void r128_cce_dispatch_stipple( drm_device_t *dev, u32 *stipple )
drm_r128_private_t *dev_priv = dev->dev_private;
int i;
RING_LOCALS;
DRM_DEBUG( "%s\n", __func__ );
DRM_DEBUG( "%s\n", __FUNCTION__ );
BEGIN_RING( 33 );
......@@ -1264,7 +1264,7 @@ int r128_cce_swap( DRM_IOCTL_ARGS )
DRM_DEVICE;
drm_r128_private_t *dev_priv = dev->dev_private;
drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
DRM_DEBUG( "%s\n", __func__ );
DRM_DEBUG( "%s\n", __FUNCTION__ );
LOCK_TEST_WITH_RETURN( dev );
......@@ -1296,7 +1296,7 @@ int r128_cce_vertex( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( !dev_priv ) {
DRM_ERROR( "%s called with no initialization\n", __func__ );
DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
return DRM_ERR(EINVAL);
}
......@@ -1356,7 +1356,7 @@ int r128_cce_indices( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( !dev_priv ) {
DRM_ERROR( "%s called with no initialization\n", __func__ );
DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
return DRM_ERR(EINVAL);
}
......@@ -1505,7 +1505,7 @@ int r128_cce_indirect( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( !dev_priv ) {
DRM_ERROR( "%s called with no initialization\n", __func__ );
DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
return DRM_ERR(EINVAL);
}
......
......@@ -1307,12 +1307,12 @@ int radeon_cp_start( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( dev_priv->cp_running ) {
DRM_DEBUG( "%s while CP running\n", __func__ );
DRM_DEBUG( "%s while CP running\n", __FUNCTION__ );
return 0;
}
if ( dev_priv->cp_mode == RADEON_CSQ_PRIDIS_INDDIS ) {
DRM_DEBUG( "%s called with bogus CP mode (%d)\n",
__func__, dev_priv->cp_mode );
__FUNCTION__, dev_priv->cp_mode );
return 0;
}
......@@ -1374,7 +1374,7 @@ int radeon_cp_reset( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( !dev_priv ) {
DRM_DEBUG( "%s called before init done\n", __func__ );
DRM_DEBUG( "%s called before init done\n", __FUNCTION__ );
return DRM_ERR(EINVAL);
}
......
......@@ -680,7 +680,7 @@ extern int RADEON_READ_PLL( drm_device_t *dev, int addr );
do { \
if ( !_DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ) || \
dev->lock.pid != DRM_CURRENTPID ) { \
DRM_ERROR( "%s called without lock held\n", __func__ ); \
DRM_ERROR( "%s called without lock held\n", __FUNCTION__ ); \
return DRM_ERR(EINVAL); \
} \
} while (0)
......@@ -742,7 +742,7 @@ do { \
#define BEGIN_RING( n ) do { \
if ( RADEON_VERBOSE ) { \
DRM_INFO( "BEGIN_RING( %d ) in %s\n", \
n, __func__ ); \
n, __FUNCTION__ ); \
} \
if ( dev_priv->ring.space <= (n) * sizeof(u32) ) { \
COMMIT_RING(); \
......
......@@ -1383,7 +1383,7 @@ int radeon_cp_vertex( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( !dev_priv ) {
DRM_ERROR( "%s called with no initialization\n", __func__ );
DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
return DRM_ERR(EINVAL);
}
......@@ -1470,7 +1470,7 @@ int radeon_cp_indices( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( !dev_priv ) {
DRM_ERROR( "%s called with no initialization\n", __func__ );
DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
return DRM_ERR(EINVAL);
}
......@@ -1620,7 +1620,7 @@ int radeon_cp_indirect( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( !dev_priv ) {
DRM_ERROR( "%s called with no initialization\n", __func__ );
DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
return DRM_ERR(EINVAL);
}
......@@ -1697,7 +1697,7 @@ int radeon_cp_vertex2( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( !dev_priv ) {
DRM_ERROR( "%s called with no initialization\n", __func__ );
DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
return DRM_ERR(EINVAL);
}
......@@ -1975,7 +1975,7 @@ int radeon_cp_cmdbuf( DRM_IOCTL_ARGS )
LOCK_TEST_WITH_RETURN( dev );
if ( !dev_priv ) {
DRM_ERROR( "%s called with no initialization\n", __func__ );
DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
return DRM_ERR(EINVAL);
}
......@@ -2097,7 +2097,7 @@ int radeon_cp_getparam( DRM_IOCTL_ARGS )
int value;
if ( !dev_priv ) {
DRM_ERROR( "%s called with no initialization\n", __func__ );
DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
return DRM_ERR(EINVAL);
}
......
......@@ -1180,8 +1180,10 @@ int __init kbd_init(void)
for (i = 0 ; i < MAX_NR_CONSOLES ; i++)
kbd_table[i] = kbd0;
input_register_handler(&kbd_handler);
tasklet_enable(&keyboard_tasklet);
tasklet_schedule(&keyboard_tasklet);
input_register_handler(&kbd_handler);
return 0;
}
......@@ -650,7 +650,7 @@ int mxser_init(void)
n = (sizeof(mxser_pcibrds) / sizeof(mxser_pcibrds[0])) - 1;
index = 0;
for (b = 0; b < n; b++) {
while (pdev = pci_find_device(mxser_pcibrds[b].vendor, mxser_pcibrds[b].device, pdev))
while ((pdev = pci_find_device(mxser_pcibrds[b].vendor, mxser_pcibrds[b].device, pdev)))
{
if (pci_enable_device(pdev))
continue;
......
......@@ -76,7 +76,7 @@ static struct sysrq_key_op sysrq_SAK_op = {
};
#endif
#ifdef CONFIG_VT
/* unraw sysrq handler */
static void sysrq_handle_unraw(int key, struct pt_regs *pt_regs,
struct tty_struct *tty)
......@@ -91,7 +91,7 @@ static struct sysrq_key_op sysrq_unraw_op = {
help_msg: "unRaw",
action_msg: "Keyboard mode set to XLATE",
};
#endif /* CONFIG_VT */
/* reboot sysrq handler */
static void sysrq_handle_reboot(int key, struct pt_regs *pt_regs,
......@@ -371,7 +371,11 @@ static struct sysrq_key_op *sysrq_key_table[SYSRQ_KEY_TABLE_LENGTH] = {
as 'Off' at init time */
/* p */ &sysrq_showregs_op,
/* q */ NULL,
#ifdef CONFIG_VT
/* r */ &sysrq_unraw_op,
#else
/* r */ NULL,
#endif
/* s */ &sysrq_sync_op,
/* t */ &sysrq_showstate_op,
/* u */ &sysrq_mountro_op,
......
......@@ -3005,14 +3005,8 @@ int ide_cdrom_check_media_change (ide_drive_t *drive)
static
void ide_cdrom_revalidate (ide_drive_t *drive)
{
ide_hwif_t *hwif = HWIF(drive);
int unit = drive - hwif->drives;
struct gendisk *g = hwif->gd[unit];
struct request_sense sense;
cdrom_read_toc(drive, &sense);
g->minor_shift = 0;
grok_partitions(mk_kdev(g->major, drive->select.b.unit), current_capacity(drive));
}
static
......@@ -3031,6 +3025,9 @@ int ide_cdrom_cleanup(ide_drive_t *drive)
{
struct cdrom_info *info = drive->driver_data;
struct cdrom_device_info *devinfo = &info->devinfo;
ide_hwif_t *hwif = HWIF(drive);
int unit = drive - hwif->drives;
struct gendisk *g = hwif->gd[unit];
if (ide_unregister_subdriver (drive))
return 1;
......@@ -3044,13 +3041,14 @@ int ide_cdrom_cleanup(ide_drive_t *drive)
printk ("%s: ide_cdrom_cleanup failed to unregister device from the cdrom driver.\n", drive->name);
kfree(info);
drive->driver_data = NULL;
del_gendisk(g);
return 0;
}
int ide_cdrom_init(void);
int ide_cdrom_reinit (ide_drive_t *drive);
static int ide_cdrom_reinit (ide_drive_t *drive);
static ide_driver_t ide_cdrom_driver = {
owner: THIS_MODULE,
name: "ide-cdrom",
version: IDECD_VERSION,
media: ide_cdrom,
......@@ -3079,17 +3077,10 @@ static ide_driver_t ide_cdrom_driver = {
capacity: ide_cdrom_capacity,
special: NULL,
proc: NULL,
init: ide_cdrom_init,
reinit: ide_cdrom_reinit,
ata_prebuilder: NULL,
atapi_prebuilder: NULL,
};
static ide_module_t ide_cdrom_module = {
IDE_DRIVER_MODULE,
ide_cdrom_init,
&ide_cdrom_driver,
NULL
drives: LIST_HEAD_INIT(ide_cdrom_driver.drives),
};
/* options */
......@@ -3098,95 +3089,81 @@ char *ignore = NULL;
MODULE_PARM(ignore, "s");
MODULE_DESCRIPTION("ATAPI CD-ROM Driver");
int ide_cdrom_reinit (ide_drive_t *drive)
static int ide_cdrom_reinit (ide_drive_t *drive)
{
struct cdrom_info *info;
int failed = 0;
ide_hwif_t *hwif = HWIF(drive);
int unit = drive - hwif->drives;
struct gendisk *g = hwif->gd[unit];
struct request_sense sense;
MOD_INC_USE_COUNT;
if (!strstr("ide-cdrom", drive->driver_req))
goto failed;
if (!drive->present)
goto failed;
if (drive->media != ide_cdrom)
goto failed;
/* skip drives that we were told to ignore */
if (ignore != NULL) {
if (strstr(ignore, drive->name)) {
printk("ide-cd: ignoring drive %s\n", drive->name);
goto failed;
}
}
if (drive->scsi) {
printk("ide-cd: passing drive %s to ide-scsi emulation.\n", drive->name);
goto failed;
}
info = (struct cdrom_info *) kmalloc (sizeof (struct cdrom_info), GFP_KERNEL);
if (info == NULL) {
printk ("%s: Can't allocate a cdrom structure\n", drive->name);
return 1;
goto failed;
}
if (ide_register_subdriver (drive, &ide_cdrom_driver, IDE_SUBDRIVER_VERSION)) {
printk ("%s: Failed to register the driver with ide.c\n", drive->name);
kfree (info);
return 1;
goto failed;
}
memset (info, 0, sizeof (struct cdrom_info));
drive->driver_data = info;
DRIVER(drive)->busy++;
if (ide_cdrom_setup (drive)) {
struct cdrom_device_info *devinfo = &info->devinfo;
DRIVER(drive)->busy--;
if (ide_cdrom_cleanup (drive))
printk ("%s: ide_cdrom_cleanup failed in ide_cdrom_init\n", drive->name);
return 1;
ide_unregister_subdriver (drive);
if (info->buffer != NULL)
kfree(info->buffer);
if (info->toc != NULL)
kfree(info->toc);
if (info->changer_info != NULL)
kfree(info->changer_info);
if (devinfo->handle == drive && unregister_cdrom (devinfo))
printk ("%s: ide_cdrom_cleanup failed to unregister device from the cdrom driver.\n", drive->name);
kfree(info);
drive->driver_data = NULL;
goto failed;
}
DRIVER(drive)->busy--;
failed--;
ide_register_module(&ide_cdrom_module);
MOD_DEC_USE_COUNT;
cdrom_read_toc(drive, &sense);
g->minor_shift = 0;
add_gendisk(g);
register_disk(g, mk_kdev(g->major,g->first_minor),
1<<g->minor_shift, ide_fops,
g->part[0].nr_sects);
return 0;
failed:
return 1;
}
static void __exit ide_cdrom_exit(void)
{
ide_drive_t *drive;
int failed = 0;
while ((drive = ide_scan_devices (ide_cdrom, ide_cdrom_driver.name, &ide_cdrom_driver, failed)) != NULL)
if (ide_cdrom_cleanup (drive)) {
printk ("%s: cleanup_module() called while still busy\n", drive->name);
failed++;
}
ide_unregister_module (&ide_cdrom_module);
ide_unregister_driver(&ide_cdrom_driver);
}
int ide_cdrom_init(void)
static int ide_cdrom_init(void)
{
ide_drive_t *drive;
struct cdrom_info *info;
int failed = 0;
MOD_INC_USE_COUNT;
while ((drive = ide_scan_devices (ide_cdrom, ide_cdrom_driver.name, NULL, failed++)) != NULL) {
/* skip drives that we were told to ignore */
if (ignore != NULL) {
if (strstr(ignore, drive->name)) {
printk("ide-cd: ignoring drive %s\n", drive->name);
continue;
}
}
if (drive->scsi) {
printk("ide-cd: passing drive %s to ide-scsi emulation.\n", drive->name);
continue;
}
info = (struct cdrom_info *) kmalloc (sizeof (struct cdrom_info), GFP_KERNEL);
if (info == NULL) {
printk ("%s: Can't allocate a cdrom structure\n", drive->name);
continue;
}
if (ide_register_subdriver (drive, &ide_cdrom_driver, IDE_SUBDRIVER_VERSION)) {
printk ("%s: Failed to register the driver with ide.c\n", drive->name);
kfree (info);
continue;
}
memset (info, 0, sizeof (struct cdrom_info));
drive->driver_data = info;
DRIVER(drive)->busy++;
if (ide_cdrom_setup (drive)) {
DRIVER(drive)->busy--;
if (ide_cdrom_cleanup (drive))
printk ("%s: ide_cdrom_cleanup failed in ide_cdrom_init\n", drive->name);
continue;
}
DRIVER(drive)->busy--;
failed--;
}
ide_register_module(&ide_cdrom_module);
MOD_DEC_USE_COUNT;
ide_register_driver(&ide_cdrom_driver);
return 0;
}
......
......@@ -1629,20 +1629,26 @@ static void idedisk_setup (ide_drive_t *drive)
static int idedisk_cleanup (ide_drive_t *drive)
{
ide_hwif_t *hwif = HWIF(drive);
int unit = drive - hwif->drives;
struct gendisk *g = hwif->gd[unit];
if ((drive->id->cfs_enable_2 & 0x3000) && drive->wcache)
if (do_idedisk_flushcache(drive))
printk (KERN_INFO "%s: Write Cache FAILED Flushing!\n",
drive->name);
return ide_unregister_subdriver(drive);
if (ide_unregister_subdriver(drive))
return 1;
del_gendisk(g);
return 0;
}
int idedisk_init (void);
int idedisk_reinit(ide_drive_t *drive);
static int idedisk_reinit(ide_drive_t *drive);
/*
* IDE subdriver functions, registered with ide.c
*/
static ide_driver_t idedisk_driver = {
owner: THIS_MODULE,
name: "ide-disk",
version: IDEDISK_VERSION,
media: ide_disk,
......@@ -1667,92 +1673,64 @@ static ide_driver_t idedisk_driver = {
capacity: idedisk_capacity,
special: idedisk_special,
proc: idedisk_proc,
init: idedisk_init,
reinit: idedisk_reinit,
ata_prebuilder: NULL,
atapi_prebuilder: NULL,
};
static ide_module_t idedisk_module = {
IDE_DRIVER_MODULE,
idedisk_init,
&idedisk_driver,
NULL
drives: LIST_HEAD_INIT(idedisk_driver.drives),
};
MODULE_DESCRIPTION("ATA DISK Driver");
int idedisk_reinit (ide_drive_t *drive)
static int idedisk_reinit(ide_drive_t *drive)
{
int failed = 0;
MOD_INC_USE_COUNT;
ide_hwif_t *hwif = HWIF(drive);
int unit = drive - hwif->drives;
struct gendisk *g = hwif->gd[unit];
/* strstr("foo", "") is non-NULL */
if (!strstr("ide-disk", drive->driver_req))
goto failed;
if (!drive->present)
goto failed;
if (drive->media != ide_disk)
goto failed;
if (ide_register_subdriver (drive, &idedisk_driver, IDE_SUBDRIVER_VERSION)) {
printk (KERN_ERR "ide-disk: %s: Failed to register the driver with ide.c\n", drive->name);
return 1;
goto failed;
}
DRIVER(drive)->busy++;
idedisk_setup(drive);
if ((!drive->head || drive->head > 16) && !drive->select.b.lba) {
printk(KERN_ERR "%s: INVALID GEOMETRY: %d PHYSICAL HEADS?\n",
drive->name, drive->head);
(void) idedisk_cleanup(drive);
if ((drive->id->cfs_enable_2 & 0x3000) && drive->wcache)
if (do_idedisk_flushcache(drive))
printk (KERN_INFO "%s: Write Cache FAILED Flushing!\n",
drive->name);
ide_unregister_subdriver(drive);
DRIVER(drive)->busy--;
return 1;
goto failed;
}
DRIVER(drive)->busy--;
failed--;
ide_register_module(&idedisk_module);
MOD_DEC_USE_COUNT;
g->minor_shift = PARTN_BITS;
add_gendisk(g);
register_disk(g, mk_kdev(g->major,g->first_minor),
1<<g->minor_shift, ide_fops,
current_capacity(drive));
return 0;
failed:
return 1;
}
static void __exit idedisk_exit (void)
{
ide_drive_t *drive;
int failed = 0;
while ((drive = ide_scan_devices (ide_disk, idedisk_driver.name, &idedisk_driver, failed)) != NULL) {
if (idedisk_cleanup (drive)) {
printk (KERN_ERR "%s: cleanup_module() called while still busy\n", drive->name);
failed++;
}
/* We must remove proc entries defined in this module.
Otherwise we oops while accessing these entries */
#ifdef CONFIG_PROC_FS
if (drive->proc)
ide_remove_proc_entries(drive->proc, idedisk_proc);
#endif
}
ide_unregister_module(&idedisk_module);
ide_unregister_driver(&idedisk_driver);
}
int idedisk_init (void)
static int idedisk_init (void)
{
ide_drive_t *drive;
int failed = 0;
MOD_INC_USE_COUNT;
while ((drive = ide_scan_devices (ide_disk, idedisk_driver.name, NULL, failed++)) != NULL) {
if (ide_register_subdriver (drive, &idedisk_driver, IDE_SUBDRIVER_VERSION)) {
printk (KERN_ERR "ide-disk: %s: Failed to register the driver with ide.c\n", drive->name);
continue;
}
DRIVER(drive)->busy++;
idedisk_setup(drive);
if ((!drive->head || drive->head > 16) && !drive->select.b.lba) {
printk(KERN_ERR "%s: INVALID GEOMETRY: %d PHYSICAL HEADS?\n", drive->name, drive->head);
(void) idedisk_cleanup(drive);
DRIVER(drive)->busy--;
continue;
}
DRIVER(drive)->busy--;
failed--;
}
ide_register_module(&idedisk_module);
MOD_DEC_USE_COUNT;
ide_register_driver(&idedisk_driver);
return 0;
}
......
......@@ -2122,11 +2122,15 @@ static void idefloppy_setup (ide_drive_t *drive, idefloppy_floppy_t *floppy)
static int idefloppy_cleanup (ide_drive_t *drive)
{
idefloppy_floppy_t *floppy = drive->driver_data;
ide_hwif_t *hwif = HWIF(drive);
int unit = drive - hwif->drives;
struct gendisk *g = hwif->gd[unit];
if (ide_unregister_subdriver (drive))
return 1;
drive->driver_data = NULL;
kfree (floppy);
del_gendisk(g);
return 0;
}
......@@ -2143,13 +2147,13 @@ static ide_proc_entry_t idefloppy_proc[] = {
#endif /* CONFIG_PROC_FS */
int idefloppy_init (void);
int idefloppy_reinit(ide_drive_t *drive);
static int idefloppy_reinit(ide_drive_t *drive);
/*
* IDE subdriver functions, registered with ide.c
*/
static ide_driver_t idefloppy_driver = {
owner: THIS_MODULE,
name: "ide-floppy",
version: IDEFLOPPY_VERSION,
media: ide_floppy,
......@@ -2178,111 +2182,68 @@ static ide_driver_t idefloppy_driver = {
capacity: idefloppy_capacity,
special: NULL,
proc: idefloppy_proc,
init: idefloppy_init,
reinit: idefloppy_reinit,
ata_prebuilder: NULL,
atapi_prebuilder: NULL,
drives: LIST_HEAD_INIT(idefloppy_driver.drives),
};
static ide_module_t idefloppy_module = {
IDE_DRIVER_MODULE,
idefloppy_init,
&idefloppy_driver,
NULL
};
int idefloppy_reinit (ide_drive_t *drive)
static int idefloppy_reinit (ide_drive_t *drive)
{
idefloppy_floppy_t *floppy;
int failed = 0;
MOD_INC_USE_COUNT;
while ((drive = ide_scan_devices (ide_floppy, idefloppy_driver.name, NULL, failed++)) != NULL) {
if (!idefloppy_identify_device (drive, drive->id)) {
printk (KERN_ERR "ide-floppy: %s: not supported by this version of ide-floppy\n", drive->name);
continue;
}
if (drive->scsi) {
printk("ide-floppy: passing drive %s to ide-scsi emulation.\n", drive->name);
continue;
}
if ((floppy = (idefloppy_floppy_t *) kmalloc (sizeof (idefloppy_floppy_t), GFP_KERNEL)) == NULL) {
printk (KERN_ERR "ide-floppy: %s: Can't allocate a floppy structure\n", drive->name);
continue;
}
if (ide_register_subdriver (drive, &idefloppy_driver, IDE_SUBDRIVER_VERSION)) {
printk (KERN_ERR "ide-floppy: %s: Failed to register the driver with ide.c\n", drive->name);
kfree (floppy);
continue;
}
DRIVER(drive)->busy++;
idefloppy_setup (drive, floppy);
DRIVER(drive)->busy--;
failed--;
ide_hwif_t *hwif = HWIF(drive);
int unit = drive - hwif->drives;
struct gendisk *g = hwif->gd[unit];
if (!strstr("ide-floppy", drive->driver_req))
goto failed;
if (!drive->present)
goto failed;
if (drive->media != ide_floppy)
goto failed;
if (!idefloppy_identify_device (drive, drive->id)) {
printk (KERN_ERR "ide-floppy: %s: not supported by this version of ide-floppy\n", drive->name);
goto failed;
}
ide_register_module(&idefloppy_module);
MOD_DEC_USE_COUNT;
if (drive->scsi) {
printk("ide-floppy: passing drive %s to ide-scsi emulation.\n", drive->name);
goto failed;
}
if ((floppy = (idefloppy_floppy_t *) kmalloc (sizeof (idefloppy_floppy_t), GFP_KERNEL)) == NULL) {
printk (KERN_ERR "ide-floppy: %s: Can't allocate a floppy structure\n", drive->name);
goto failed;
}
if (ide_register_subdriver (drive, &idefloppy_driver, IDE_SUBDRIVER_VERSION)) {
printk (KERN_ERR "ide-floppy: %s: Failed to register the driver with ide.c\n", drive->name);
kfree (floppy);
goto failed;
}
DRIVER(drive)->busy++;
idefloppy_setup (drive, floppy);
DRIVER(drive)->busy--;
g->minor_shift = PARTN_BITS;
add_gendisk(g);
register_disk(g, mk_kdev(g->major,g->first_minor),
1<<g->minor_shift, ide_fops,
g->part[0].nr_sects);
return 0;
failed:
return 1;
}
MODULE_DESCRIPTION("ATAPI FLOPPY Driver");
static void __exit idefloppy_exit (void)
{
ide_drive_t *drive;
int failed = 0;
while ((drive = ide_scan_devices (ide_floppy, idefloppy_driver.name, &idefloppy_driver, failed)) != NULL) {
if (idefloppy_cleanup (drive)) {
printk ("%s: cleanup_module() called while still busy\n", drive->name);
failed++;
}
/* We must remove proc entries defined in this module.
Otherwise we oops while accessing these entries */
#ifdef CONFIG_PROC_FS
if (drive->proc)
ide_remove_proc_entries(drive->proc, idefloppy_proc);
#endif
}
ide_unregister_module(&idefloppy_module);
ide_unregister_driver(&idefloppy_driver);
}
/*
* idefloppy_init will register the driver for each floppy.
*/
int idefloppy_init (void)
static int idefloppy_init (void)
{
ide_drive_t *drive;
idefloppy_floppy_t *floppy;
int failed = 0;
printk("ide-floppy driver " IDEFLOPPY_VERSION "\n");
MOD_INC_USE_COUNT;
while ((drive = ide_scan_devices (ide_floppy, idefloppy_driver.name, NULL, failed++)) != NULL) {
if (!idefloppy_identify_device (drive, drive->id)) {
printk (KERN_ERR "ide-floppy: %s: not supported by this version of ide-floppy\n", drive->name);
continue;
}
if (drive->scsi) {
printk("ide-floppy: passing drive %s to ide-scsi emulation.\n", drive->name);
continue;
}
if ((floppy = (idefloppy_floppy_t *) kmalloc (sizeof (idefloppy_floppy_t), GFP_KERNEL)) == NULL) {
printk (KERN_ERR "ide-floppy: %s: Can't allocate a floppy structure\n", drive->name);
continue;
}
if (ide_register_subdriver (drive, &idefloppy_driver, IDE_SUBDRIVER_VERSION)) {
printk (KERN_ERR "ide-floppy: %s: Failed to register the driver with ide.c\n", drive->name);
kfree (floppy);
continue;
}
DRIVER(drive)->busy++;
idefloppy_setup (drive, floppy);
DRIVER(drive)->busy--;
failed--;
}
ide_register_module(&idefloppy_module);
MOD_DEC_USE_COUNT;
ide_register_driver(&idefloppy_driver);
return 0;
}
......
......@@ -555,6 +555,7 @@ static void probe_hwif (ide_hwif_t *hwif)
*/
for (unit = 0; unit < MAX_DRIVES; ++unit) {
ide_drive_t *drive = &hwif->drives[unit];
drive->dn = ((hwif->channel ? 2 : 0) + unit);
(void) probe_for_drive (drive);
if (drive->present && !hwif->present) {
hwif->present = 1;
......@@ -585,6 +586,17 @@ static void probe_hwif (ide_hwif_t *hwif)
if (hwif->tuneproc != NULL && drive->autotune == 1)
/* auto-tune PIO mode */
hwif->tuneproc(drive, 255);
if ((drive->autotune != 2) && hwif->dmaproc != NULL) {
/*
* Force DMAing for the beginning of the check.
* Some chipsets appear to do interesting
* things, if not checked and cleared.
* PARANOIA!!!
*/
hwif->dmaproc(ide_dma_off_quietly, drive);
hwif->dmaproc(ide_dma_check, drive);
}
}
}
}
......@@ -852,14 +864,12 @@ static void init_gendisk (ide_hwif_t *hwif)
gd[unit].nr_real = 1;
gd[unit].fops = ide_fops;
hwif->gd[unit] = gd + unit;
add_gendisk(gd + unit);
}
for (unit = 0; unit < units; ++unit) {
#if 1
char name[64];
ide_add_generic_settings(hwif->drives + unit);
hwif->drives[unit].dn = ((hwif->channel ? 2 : 0) + unit);
sprintf (name, "host%d/bus%d/target%d/lun%d",
(hwif->channel && hwif->mate) ?
hwif->mate->index : hwif->index,
......@@ -871,7 +881,6 @@ static void init_gendisk (ide_hwif_t *hwif)
char name[64];
ide_add_generic_settings(hwif->drives + unit);
hwif->drives[unit].dn = ((hwif->channel ? 2 : 0) + unit);
sprintf (name, "host%d/bus%d/target%d/lun%d",
(hwif->channel && hwif->mate) ? hwif->mate->index : hwif->index,
hwif->channel, unit, hwif->drives[unit].lun);
......@@ -997,6 +1006,15 @@ int ideprobe_init (void)
for (index = 0; index < MAX_HWIFS; ++index)
if (probe[index])
hwif_init(&ide_hwifs[index]);
for (index = 0; index < MAX_HWIFS; ++index)
if (probe[index]) {
ide_hwif_t *hwif = &ide_hwifs[index];
int unit;
if (!hwif->present)
continue;
for (unit = 0; unit < MAX_DRIVES; ++unit)
ata_attach(&hwif->drives[unit]);
}
if (!ide_probe)
ide_probe = &ideprobe_module;
MOD_DEC_USE_COUNT;
......
......@@ -67,6 +67,7 @@
#include <linux/ctype.h>
#include <linux/hdreg.h>
#include <linux/ide.h>
#include <linux/seq_file.h>
#include <asm/io.h>
......@@ -374,24 +375,6 @@ static int ide_getdigit(char c)
return digit;
}
static int proc_ide_read_drivers
(char *page, char **start, off_t off, int count, int *eof, void *data)
{
char *out = page;
int len;
ide_module_t *p = ide_modules;
ide_driver_t *driver;
while (p) {
driver = (ide_driver_t *) p->info;
if (driver)
out += sprintf(out, "%s version %s\n", driver->name, driver->version);
p = p->next;
}
len = out - page;
PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
}
static int proc_ide_read_imodel
(char *page, char **start, off_t off, int count, int *eof, void *data)
{
......@@ -832,15 +815,29 @@ static void destroy_proc_ide_interfaces(void)
}
}
extern struct seq_operations ide_drivers_op;
static int ide_drivers_open(struct inode *inode, struct file *file)
{
return seq_open(file, &ide_drivers_op);
}
static struct file_operations ide_drivers_operations = {
open: ide_drivers_open,
read: seq_read,
llseek: seq_lseek,
release: seq_release,
};
void proc_ide_create(void)
{
struct proc_dir_entry *entry;
proc_ide_root = proc_mkdir("ide", 0);
if (!proc_ide_root) return;
create_proc_ide_interfaces();
create_proc_read_entry("drivers", 0, proc_ide_root,
proc_ide_read_drivers, NULL);
entry = create_proc_entry("drivers", 0, proc_ide_root);
if (entry)
entry->proc_fops = &ide_drivers_operations;
#ifdef CONFIG_BLK_DEV_AEC62XX
if ((aec62xx_display_info) && (aec62xx_proc))
......
......@@ -1424,7 +1424,6 @@ typedef struct {
* Additional state variables are defined in our ide_drive_t structure.
*/
static idetape_chrdev_t idetape_chrdevs[MAX_HWIFS * MAX_DRIVES];
static int idetape_chrdev_present = 0;
#if IDETAPE_DEBUG_LOG_VERBOSE
......@@ -6272,11 +6271,6 @@ static int idetape_cleanup (ide_drive_t *drive)
devfs_unregister(tape->de_r);
devfs_unregister(tape->de_n);
kfree (tape);
for (minor = 0; minor < MAX_HWIFS * MAX_DRIVES; minor++)
if (idetape_chrdevs[minor].drive != NULL)
return 0;
unregister_chrdev(IDETAPE_MAJOR, "ht");
idetape_chrdev_present = 0;
return 0;
}
......@@ -6305,13 +6299,13 @@ static ide_proc_entry_t idetape_proc[] = {
#endif
int idetape_init (void);
int idetape_reinit(ide_drive_t *drive);
static int idetape_reinit(ide_drive_t *drive);
/*
* IDE subdriver functions, registered with ide.c
*/
static ide_driver_t idetape_driver = {
owner: THIS_MODULE,
name: "ide-tape",
version: IDETAPE_VERSION,
media: ide_tape,
......@@ -6340,17 +6334,10 @@ static ide_driver_t idetape_driver = {
capacity: NULL,
special: NULL,
proc: idetape_proc,
init: idetape_init,
reinit: idetape_reinit,
ata_prebuilder: NULL,
atapi_prebuilder: NULL,
};
static ide_module_t idetape_module = {
IDE_DRIVER_MODULE,
idetape_init,
&idetape_driver,
NULL
drives: LIST_HEAD_INIT(idetape_driver.drives),
};
/*
......@@ -6365,91 +6352,57 @@ static struct file_operations idetape_fops = {
release: idetape_chrdev_release,
};
int idetape_reinit (ide_drive_t *drive)
static int idetape_reinit (ide_drive_t *drive)
{
#if 0
idetape_tape_t *tape;
int minor, failed = 0, supported = 0;
/* DRIVER(drive)->busy++; */
MOD_INC_USE_COUNT;
#if ONSTREAM_DEBUG
printk(KERN_INFO "ide-tape: MOD_INC_USE_COUNT in idetape_init\n");
#endif
if (!idetape_chrdev_present)
for (minor = 0; minor < MAX_HWIFS * MAX_DRIVES; minor++ )
idetape_chrdevs[minor].drive = NULL;
int minor;
if ((drive = ide_scan_devices(ide_tape, idetape_driver.name, NULL, failed++)) == NULL) {
ide_register_module(&idetape_module);
MOD_DEC_USE_COUNT;
#if ONSTREAM_DEBUG
printk(KERN_INFO "ide-tape: MOD_DEC_USE_COUNT in idetape_init\n");
#endif
return 0;
}
if (!idetape_chrdev_present &&
register_chrdev(IDETAPE_MAJOR, "ht", &idetape_fops)) {
printk(KERN_ERR "ide-tape: Failed to register character device interface\n");
MOD_DEC_USE_COUNT;
#if ONSTREAM_DEBUG
printk(KERN_INFO "ide-tape: MOD_DEC_USE_COUNT in idetape_init\n");
#endif
return -EBUSY;
}
do {
if (!idetape_identify_device(drive, drive->id)) {
printk(KERN_ERR "ide-tape: %s: not supported by this version of ide-tape\n", drive->name);
continue;
}
if (drive->scsi) {
if (strstr(drive->id->model, "OnStream DI-30")) {
printk("ide-tape: ide-scsi emulation is not supported for %s.\n", drive->id->model);
} else {
printk("ide-tape: passing drive %s to ide-scsi emulation.\n", drive->name);
continue;
}
}
tape = (idetape_tape_t *) kmalloc (sizeof (idetape_tape_t), GFP_KERNEL);
if (tape == NULL) {
printk(KERN_ERR "ide-tape: %s: Can't allocate a tape structure\n", drive->name);
continue;
}
if (ide_register_subdriver (drive, &idetape_driver, IDE_SUBDRIVER_VERSION)) {
printk(KERN_ERR "ide-tape: %s: Failed to register the driver with ide.c\n", drive->name);
kfree(tape);
continue;
if (!strstr("ide-tape", drive->driver_req))
goto failed;
if (!drive->present)
goto failed;
if (drive->media != ide_tape)
goto failed;
if (!idetape_identify_device (drive, drive->id)) {
printk(KERN_ERR "ide-tape: %s: not supported by this version of ide-tape\n", drive->name);
goto failed;
}
if (drive->scsi) {
if (strstr(drive->id->model, "OnStream DI-")) {
printk("ide-tape: ide-scsi emulation is not supported for %s.\n", drive->id->model);
} else {
printk("ide-tape: passing drive %s to ide-scsi emulation.\n", drive->name);
goto failed;
}
for (minor = 0; idetape_chrdevs[minor].drive != NULL; minor++);
idetape_setup(drive, tape, minor);
idetape_chrdevs[minor].drive = drive;
tape->de_r =
devfs_register (drive->de, "mt", DEVFS_FL_DEFAULT,
HWIF(drive)->major, minor,
S_IFCHR | S_IRUGO | S_IWUGO,
&idetape_fops, NULL);
tape->de_n =
devfs_register (drive->de, "mtn", DEVFS_FL_DEFAULT,
HWIF(drive)->major, minor + 128,
S_IFCHR | S_IRUGO | S_IWUGO,
&idetape_fops, NULL);
devfs_register_tape(tape->de_r);
supported++;
failed--;
} while ((drive = ide_scan_devices(ide_tape, idetape_driver.name, NULL, failed++)) != NULL);
if (!idetape_chrdev_present && !supported) {
devfs_unregister_chrdev(IDETAPE_MAJOR, "ht");
} else
idetape_chrdev_present = 1;
ide_register_module(&idetape_module);
MOD_DEC_USE_COUNT;
#if ONSTREAM_DEBUG
printk(KERN_INFO "ide-tape: MOD_DEC_USE_COUNT in idetape_init\n");
#endif
}
tape = (idetape_tape_t *) kmalloc (sizeof (idetape_tape_t), GFP_KERNEL);
if (tape == NULL) {
printk(KERN_ERR "ide-tape: %s: Can't allocate a tape structure\n", drive->name);
goto failed;
}
if (ide_register_subdriver (drive, &idetape_driver, IDE_SUBDRIVER_VERSION)) {
printk(KERN_ERR "ide-tape: %s: Failed to register the driver with ide.c\n", drive->name);
kfree(tape);
goto failed;
}
for (minor = 0; idetape_chrdevs[minor].drive != NULL; minor++)
;
idetape_setup(drive, tape, minor);
idetape_chrdevs[minor].drive = drive;
tape->de_r =
devfs_register (drive->de, "mt", DEVFS_FL_DEFAULT,
HWIF(drive)->major, minor,
S_IFCHR | S_IRUGO | S_IWUGO,
&idetape_fops, NULL);
tape->de_n =
devfs_register (drive->de, "mtn", DEVFS_FL_DEFAULT,
HWIF(drive)->major, minor + 128,
S_IFCHR | S_IRUGO | S_IWUGO,
&idetape_fops, NULL);
devfs_register_tape(tape->de_r);
return 0;
#else
failed:
return 1;
#endif
}
MODULE_DESCRIPTION("ATAPI Streaming TAPE Driver");
......@@ -6457,100 +6410,20 @@ MODULE_LICENSE("GPL");
static void __exit idetape_exit (void)
{
ide_drive_t *drive;
int minor;
for (minor = 0; minor < MAX_HWIFS * MAX_DRIVES; minor++) {
drive = idetape_chrdevs[minor].drive;
if (drive != NULL && idetape_cleanup (drive))
printk(KERN_ERR "ide-tape: %s: cleanup_module() called while still busy\n", drive->name);
}
ide_unregister_module(&idetape_module);
ide_unregister_driver(&idetape_driver);
unregister_chrdev(IDETAPE_MAJOR, "ht");
}
/*
* idetape_init will register the driver for each tape.
*/
int idetape_init (void)
static int idetape_init (void)
{
ide_drive_t *drive;
idetape_tape_t *tape;
int minor, failed = 0, supported = 0;
/* DRIVER(drive)->busy++; */
MOD_INC_USE_COUNT;
#if ONSTREAM_DEBUG
printk(KERN_INFO "ide-tape: MOD_INC_USE_COUNT in idetape_init\n");
#endif
if (!idetape_chrdev_present)
for (minor = 0; minor < MAX_HWIFS * MAX_DRIVES; minor++ )
idetape_chrdevs[minor].drive = NULL;
if ((drive = ide_scan_devices(ide_tape, idetape_driver.name, NULL, failed++)) == NULL) {
ide_register_module(&idetape_module);
MOD_DEC_USE_COUNT;
#if ONSTREAM_DEBUG
printk(KERN_INFO "ide-tape: MOD_DEC_USE_COUNT in idetape_init\n");
#endif
return 0;
}
if (!idetape_chrdev_present &&
register_chrdev(IDETAPE_MAJOR, "ht", &idetape_fops)) {
if (register_chrdev(IDETAPE_MAJOR, "ht", &idetape_fops)) {
printk(KERN_ERR "ide-tape: Failed to register character device interface\n");
MOD_DEC_USE_COUNT;
#if ONSTREAM_DEBUG
printk(KERN_INFO "ide-tape: MOD_DEC_USE_COUNT in idetape_init\n");
#endif
return -EBUSY;
}
do {
if (!idetape_identify_device (drive, drive->id)) {
printk(KERN_ERR "ide-tape: %s: not supported by this version of ide-tape\n", drive->name);
continue;
}
if (drive->scsi) {
if (strstr(drive->id->model, "OnStream DI-")) {
printk("ide-tape: ide-scsi emulation is not supported for %s.\n", drive->id->model);
} else {
printk("ide-tape: passing drive %s to ide-scsi emulation.\n", drive->name);
continue;
}
}
tape = (idetape_tape_t *) kmalloc (sizeof (idetape_tape_t), GFP_KERNEL);
if (tape == NULL) {
printk(KERN_ERR "ide-tape: %s: Can't allocate a tape structure\n", drive->name);
continue;
}
if (ide_register_subdriver (drive, &idetape_driver, IDE_SUBDRIVER_VERSION)) {
printk(KERN_ERR "ide-tape: %s: Failed to register the driver with ide.c\n", drive->name);
kfree(tape);
continue;
}
for (minor = 0; idetape_chrdevs[minor].drive != NULL; minor++);
idetape_setup(drive, tape, minor);
idetape_chrdevs[minor].drive = drive;
tape->de_r =
devfs_register (drive->de, "mt", DEVFS_FL_DEFAULT,
HWIF(drive)->major, minor,
S_IFCHR | S_IRUGO | S_IWUGO,
&idetape_fops, NULL);
tape->de_n =
devfs_register (drive->de, "mtn", DEVFS_FL_DEFAULT,
HWIF(drive)->major, minor + 128,
S_IFCHR | S_IRUGO | S_IWUGO,
&idetape_fops, NULL);
devfs_register_tape(tape->de_r);
supported++;
failed--;
} while ((drive = ide_scan_devices(ide_tape, idetape_driver.name, NULL, failed++)) != NULL);
if (!idetape_chrdev_present && !supported) {
unregister_chrdev(IDETAPE_MAJOR, "ht");
} else
idetape_chrdev_present = 1;
ide_register_module(&idetape_module);
MOD_DEC_USE_COUNT;
#if ONSTREAM_DEBUG
printk(KERN_INFO "ide-tape: MOD_DEC_USE_COUNT in idetape_init\n");
#endif
ide_register_driver(&idetape_driver);
return 0;
}
......
This diff is collapsed.
......@@ -9,7 +9,7 @@ define_tristate CONFIG_INPUT y
comment 'Userland interfaces'
dep_tristate ' Mouse interface' CONFIG_INPUT_MOUSEDEV $CONFIG_INPUT
dep_mbool ' Provide legacy /dev/psaux device' CONFIG_INPUT_MOUSEDEV_PSAUX $CONFIG_INPUT
dep_mbool ' Provide legacy /dev/psaux device' CONFIG_INPUT_MOUSEDEV_PSAUX $CONFIG_INPUT_MOUSEDEV
if [ "$CONFIG_INPUT_MOUSEDEV" != "n" ]; then
int ' Horizontal screen resolution' CONFIG_INPUT_MOUSEDEV_SCREEN_X 1024
int ' Vertical screen resolution' CONFIG_INPUT_MOUSEDEV_SCREEN_Y 768
......
/*
* $Id: input.c,v 1.48 2001/12/26 21:08:33 jsimmons Exp $
* The input core
*
* Copyright (c) 1999-2001 Vojtech Pavlik
*
* The input core
* Copyright (c) 1999-2002 Vojtech Pavlik
*/
/*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Should you need to contact me, the author, you can do so either by
* e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
* Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published by
* the Free Software Foundation.
*/
#include <linux/init.h>
......@@ -39,7 +23,7 @@
#include <linux/poll.h>
#include <linux/device.h>
MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
MODULE_DESCRIPTION("Input core");
MODULE_LICENSE("GPL");
......@@ -337,7 +321,7 @@ static void input_call_hotplug(char *verb, struct input_dev *dev)
int i = 0, j, value;
if (!hotplug_path[0]) {
printk(KERN_ERR "input.c: calling hotplug a hotplug agent defined\n");
printk(KERN_ERR "input.c: calling hotplug without a hotplug agent defined\n");
return;
}
if (in_interrupt()) {
......@@ -395,16 +379,20 @@ static void input_call_hotplug(char *verb, struct input_dev *dev)
envp[i++] = 0;
#ifdef INPUT_DEBUG
printk(KERN_DEBUG "input.c: calling %s %s [%s %s %s %s %s]\n",
argv[0], argv[1], envp[0], envp[1], envp[2], envp[3], envp[4]);
#endif
value = call_usermodehelper(argv [0], argv, envp);
kfree(buf);
kfree(envp);
#ifdef INPUT_DEBUG
if (value != 0)
printk(KERN_WARNING "input.c: hotplug returned %d\n", value);
printk(KERN_DEBUG "input.c: hotplug returned %d\n", value);
#endif
}
#endif
......@@ -415,31 +403,17 @@ void input_register_device(struct input_dev *dev)
struct input_handle *handle;
struct input_device_id *id;
/*
* Add the EV_SYN capability.
*/
set_bit(EV_SYN, dev->evbit);
/*
* Initialize repeat timer to default values.
*/
init_timer(&dev->timer);
dev->timer.data = (long) dev;
dev->timer.function = input_repeat_key;
dev->rep[REP_DELAY] = HZ/4;
dev->rep[REP_PERIOD] = HZ/33;
/*
* Add the device.
*/
INIT_LIST_HEAD(&dev->h_list);
list_add_tail(&dev->node,&input_dev_list);
/*
* Notify handlers.
*/
list_for_each(node,&input_handler_list) {
struct input_handler *handler = to_handler(node);
if ((id = input_match_device(handler->id_table, dev)))
......@@ -447,18 +421,10 @@ void input_register_device(struct input_dev *dev)
input_link_handle(handle);
}
/*
* Notify the hotplug agent.
*/
#ifdef CONFIG_HOTPLUG
input_call_hotplug("add", dev);
#endif
/*
* Notify /proc.
*/
#ifdef CONFIG_PROC_FS
input_devices_state++;
wake_up(&input_devices_poll_wait);
......@@ -471,22 +437,11 @@ void input_unregister_device(struct input_dev *dev)
if (!dev) return;
/*
* Turn off power management for the device.
*/
if (dev->pm_dev)
pm_unregister(dev->pm_dev);
/*
* Kill any pending repeat timers.
*/
del_timer_sync(&dev->timer);
/*
* Notify handlers.
*/
list_for_each_safe(node,next,&dev->h_list) {
struct input_handle * handle = to_handle(node);
list_del_init(&handle->d_node);
......@@ -494,23 +449,12 @@ void input_unregister_device(struct input_dev *dev)
handle->handler->disconnect(handle);
}
/*
* Notify the hotplug agent.
*/
#ifdef CONFIG_HOTPLUG
input_call_hotplug("remove", dev);
#endif
/*
* Remove the device.
*/
list_del_init(&dev->node);
/*
* Notify /proc.
*/
#ifdef CONFIG_PROC_FS
input_devices_state++;
wake_up(&input_devices_poll_wait);
......@@ -526,22 +470,12 @@ void input_register_handler(struct input_handler *handler)
if (!handler) return;
INIT_LIST_HEAD(&handler->h_list);
/*
* Add minors if needed.
*/
if (handler->fops != NULL)
input_table[handler->minor >> 5] = handler;
/*
* Add the handler.
*/
list_add_tail(&handler->node,&input_handler_list);
/*
* Notify it about all existing devices.
*/
list_for_each(node,&input_dev_list) {
struct input_dev *dev = to_dev(node);
if ((id = input_match_device(handler->id_table, dev)))
......@@ -549,10 +483,6 @@ void input_register_handler(struct input_handler *handler)
input_link_handle(handle);
}
/*
* Notify /proc.
*/
#ifdef CONFIG_PROC_FS
input_devices_state++;
wake_up(&input_devices_poll_wait);
......@@ -563,10 +493,6 @@ void input_unregister_handler(struct input_handler *handler)
{
struct list_head * node, * next;
/*
* Tell the handler to disconnect from all devices it keeps open.
*/
list_for_each_safe(node,next,&handler->h_list) {
struct input_handle * handle = to_handle_h(node);
list_del_init(&handle->h_node);
......@@ -574,21 +500,11 @@ void input_unregister_handler(struct input_handler *handler)
handler->disconnect(handle);
}
/*
* Remove it.
*/
list_del_init(&handler->node);
/*
* Remove minors.
*/
if (handler->fops != NULL)
input_table[handler->minor >> 5] = NULL;
/*
* Notify /proc.
*/
#ifdef CONFIG_PROC_FS
input_devices_state++;
wake_up(&input_devices_poll_wait);
......@@ -644,10 +560,6 @@ void input_unregister_minor(devfs_handle_t handle)
devfs_unregister(handle);
}
/*
* ProcFS interface for the input drivers.
*/
#ifdef CONFIG_PROC_FS
#define SPRINTF_BIT_B(bit, name, max) \
......
/*
* $Id: atkbd.c,v 1.33 2002/02/12 09:34:34 vojtech Exp $
* AT and PS/2 keyboard driver
*
* Copyright (c) 1999-2001 Vojtech Pavlik
* Copyright (c) 1999-2002 Vojtech Pavlik
*/
/*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Should you need to contact me, the author, you can do so either by
* e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
* Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published by
* the Free Software Foundation.
*/
#include <linux/delay.h>
......@@ -33,7 +19,7 @@
#include <linux/serio.h>
#include <linux/tqueue.h>
MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
MODULE_DESCRIPTION("AT and PS/2 keyboard driver");
MODULE_PARM(atkbd_set, "1i");
MODULE_LICENSE("GPL");
......@@ -94,9 +80,11 @@ static unsigned char atkbd_set3_keycode[512] = {
#define ATKBD_CMD_SETLEDS 0x10ed
#define ATKBD_CMD_GSCANSET 0x11f0
#define ATKBD_CMD_SSCANSET 0x10f0
#define ATKBD_CMD_GETID 0x02f2
#define ATKBD_CMD_GETID 0x01f2
#define ATKBD_CMD_GETID2 0x0100
#define ATKBD_CMD_ENABLE 0x00f4
#define ATKBD_CMD_RESET_DIS 0x00f5
#define ATKBD_CMD_RESET_BAT 0x01ff
#define ATKBD_CMD_SETALL_MB 0x00f8
#define ATKBD_CMD_RESEND 0x00fe
#define ATKBD_CMD_EX_ENABLE 0x10ea
......@@ -147,7 +135,7 @@ static void atkbd_interrupt(struct serio *serio, unsigned char data, unsigned in
#endif
/* Interface error. Request that the keyboard resend. */
if ((flags & (SERIO_FRAME | SERIO_PARITY)) && atkbd->write) {
if ((flags & (SERIO_FRAME | SERIO_PARITY)) && (~flags & SERIO_TIMEOUT) && atkbd->write) {
printk("atkbd.c: frame/parity error: %02x\n", flags);
serio_write(serio, ATKBD_CMD_RESEND);
return;
......@@ -360,70 +348,60 @@ static int atkbd_probe(struct atkbd *atkbd)
unsigned char param[2];
/*
* Full reset with selftest can on some keyboards be annoyingly slow,
* so we just do a reset-and-disable on the keyboard, which
* is considerably faster, but doesn't have to reset everything.
* Some systems, where the bit-twiddling when testing the io-lines of the
* controller may confuse the keyboard need a full reset of the keyboard. On
* these systems the BIOS also usually doesn't do it for us.
*/
if (atkbd_command(atkbd, NULL, ATKBD_CMD_RESET_DIS))
#ifdef CONFIG_KEYBOARD_ATKBD_RESET
if (atkbd_command(atkbd, NULL, ATKBD_CMD_RESET_BAT))
printk(KERN_WARNING "atkbd.c: keyboard reset failed\n");
#endif
/*
* Next, we check if it's a keyboard. It should send 0xab83
* (0xab84 on IBM ThinkPad, and 0xaca1 on a NCD Sun layout keyboard,
* 0xab02 on unxlated i8042 and 0xab03 on unxlated ThinkPad, 0xab7f
* on Fujitsu Lifebook).
* If it's a mouse, it'll only send 0x00 (0x03 if it's MS mouse),
* and we'll time out here, and report an error.
* Next we check we can set LEDs on the keyboard. This should work on every
* keyboard out there. It also turns the LEDs off, which we want anyway.
*/
param[0] = param[1] = 0;
if (atkbd_command(atkbd, param, ATKBD_CMD_GETID))
param[0] = 0;
if (atkbd_command(atkbd, param, ATKBD_CMD_SETLEDS))
return -1;
atkbd->id = (param[0] << 8) | param[1];
if (atkbd->id != 0xab83 && atkbd->id != 0xab84 && atkbd->id != 0xaca1 &&
atkbd->id != 0xab7f && atkbd->id != 0xab02 && atkbd->id != 0xab03)
printk(KERN_WARNING "atkbd.c: Unusual keyboard ID: %#x on %s\n",
atkbd->id, atkbd->serio->phys);
return 0;
}
/*
* atkbd_initialize() sets the keyboard into a sane state.
* Then we check the keyboard ID. We should get 0xab83 under normal conditions.
* Some keyboards report different values, but the first byte is always 0xab or
* 0xac. Some old AT keyboards don't report anything.
*/
static void atkbd_initialize(struct atkbd *atkbd)
{
unsigned char param;
if (atkbd_command(atkbd, param, ATKBD_CMD_GETID)) {
atkbd->id = 0xabba;
return 0;
}
if (param[0] != 0xab && param[0] != 0xac)
return -1;
atkbd->id = param[0] << 8;
if (atkbd_command(atkbd, param, ATKBD_CMD_GETID2))
return -1;
atkbd->id |= param[0];
/*
* Disable autorepeat. We don't need it, as we do it in software anyway,
* because that way can get faster repeat, and have less system load
* (less accesses to the slow ISA hardware). If this fails, we don't care,
* and will just ignore the repeated keys.
* because that way can get faster repeat, and have less system load (less
* accesses to the slow ISA hardware). If this fails, we don't care, and will
* just ignore the repeated keys.
*/
atkbd_command(atkbd, NULL, ATKBD_CMD_SETALL_MB);
/*
* We also shut off all the leds. The console code will turn them back on,
* if needed.
*/
param = 0;
atkbd_command(atkbd, &param, ATKBD_CMD_SETLEDS);
/*
* Last, we enable the keyboard so that we get keypresses from it.
* Last, we enable the keyboard to make sure that we get keypresses from it.
*/
if (atkbd_command(atkbd, NULL, ATKBD_CMD_ENABLE))
printk(KERN_ERR "atkbd.c: Failed to enable keyboard on %s\n",
atkbd->serio->phys);
return 0;
}
/*
......@@ -524,9 +502,6 @@ static void atkbd_connect(struct serio *serio, struct serio_dev *dev)
input_register_device(&atkbd->dev);
printk(KERN_INFO "input: %s on %s\n", atkbd->name, serio->phys);
if (atkbd->write)
atkbd_initialize(atkbd);
}
......
/*
* $Id: psmouse.c,v 1.18 2002/03/13 10:03:43 vojtech Exp $
* PS/2 mouse driver
*
* Copyright (c) 1999-2001 Vojtech Pavlik
* Copyright (c) 1999-2002 Vojtech Pavlik
*/
/*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Should you need to contact me, the author, you can do so either by
* e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
* Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published by
* the Free Software Foundation.
*/
#include <linux/delay.h>
......@@ -33,7 +19,7 @@
#include <linux/init.h>
#include <linux/tqueue.h>
MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
MODULE_DESCRIPTION("PS/2 mouse driver");
MODULE_LICENSE("GPL");
......@@ -43,6 +29,7 @@ MODULE_LICENSE("GPL");
#define PSMOUSE_CMD_SETSTREAM 0x00ea
#define PSMOUSE_CMD_POLL 0x03eb
#define PSMOUSE_CMD_GETID 0x01f2
#define PSMOUSE_CMD_GETID2 0x0100
#define PSMOUSE_CMD_SETRATE 0x10f3
#define PSMOUSE_CMD_ENABLE 0x00f4
#define PSMOUSE_CMD_RESET_DIS 0x00f6
......@@ -313,7 +300,7 @@ static int psmouse_extensions(struct psmouse *psmouse)
param[0] = 0;
psmouse->vendor = "Generic";
psmouse->name = "Mouse";
psmouse->model = 2;
psmouse->model = 0;
/*
* Try Genius NetMouse magic init.
......@@ -327,13 +314,13 @@ static int psmouse_extensions(struct psmouse *psmouse)
psmouse_command(psmouse, param, PSMOUSE_CMD_GETINFO);
if (param[0] == 0x00 && param[1] == 0x33 && param[2] == 0x55) {
psmouse->vendor = "Genius";
psmouse->name = "Mouse";
set_bit(BTN_EXTRA, psmouse->dev.keybit);
set_bit(BTN_SIDE, psmouse->dev.keybit);
set_bit(REL_WHEEL, psmouse->dev.relbit);
psmouse->vendor = "Genius";
psmouse->name = "Wheel Mouse";
return PSMOUSE_GENPS;
}
......@@ -356,7 +343,6 @@ static int psmouse_extensions(struct psmouse *psmouse)
static int logitech_ps2pp[] = { 12, 13, 40, 41, 42, 43, 50, 51, 52, 53, 73, 75,
76, 80, 81, 83, 88, 96, 97, -1 };
psmouse->vendor = "Logitech";
psmouse->name = "Mouse";
psmouse->model = ((param[0] >> 4) & 0x07) | ((param[0] << 3) & 0x78);
if (param[1] < 3)
......@@ -367,46 +353,53 @@ static int psmouse_extensions(struct psmouse *psmouse)
psmouse->type = PSMOUSE_PS2;
for (i = 0; logitech_ps2pp[i] != -1; i++)
if (logitech_ps2pp[i] == psmouse->model) psmouse->type = PSMOUSE_PS2PP;
if (logitech_ps2pp[i] == psmouse->model)
psmouse->type = PSMOUSE_PS2PP;
if (psmouse->type != PSMOUSE_PS2PP) return PSMOUSE_PS2;
if (psmouse->type == PSMOUSE_PS2PP) {
for (i = 0; logitech_4btn[i] != -1; i++)
if (logitech_4btn[i] == psmouse->model) set_bit(BTN_SIDE, psmouse->dev.keybit);
for (i = 0; logitech_4btn[i] != -1; i++)
if (logitech_4btn[i] == psmouse->model)
set_bit(BTN_SIDE, psmouse->dev.keybit);
for (i = 0; logitech_wheel[i] != -1; i++)
if (logitech_wheel[i] == psmouse->model) set_bit(REL_WHEEL, psmouse->dev.relbit);
for (i = 0; logitech_wheel[i] != -1; i++)
if (logitech_wheel[i] == psmouse->model) {
set_bit(REL_WHEEL, psmouse->dev.relbit);
psmouse->name = "Wheel Mouse";
}
/*
* Do Logitech PS2++ / PS2T++ magic init.
*/
if (psmouse->model == 97) { /* TouchPad 3 */
if (psmouse->model == 97) { /* TouchPad 3 */
set_bit(REL_WHEEL, psmouse->dev.relbit);
set_bit(REL_HWHEEL, psmouse->dev.relbit);
set_bit(REL_WHEEL, psmouse->dev.relbit);
set_bit(REL_HWHEEL, psmouse->dev.relbit);
param[0] = 0x11; param[1] = 0x04; param[2] = 0x68; /* Unprotect RAM */
psmouse_command(psmouse, param, 0x30d1);
param[0] = 0x11; param[1] = 0x05; param[2] = 0x0b; /* Enable features */
psmouse_command(psmouse, param, 0x30d1);
param[0] = 0x11; param[1] = 0x09; param[2] = 0xc3; /* Enable PS2++ */
psmouse_command(psmouse, param, 0x30d1);
param[0] = 0x11; param[1] = 0x04; param[2] = 0x68; /* Unprotect RAM */
psmouse_command(psmouse, param, 0x30d1);
param[0] = 0x11; param[1] = 0x05; param[2] = 0x0b; /* Enable features */
psmouse_command(psmouse, param, 0x30d1);
param[0] = 0x11; param[1] = 0x09; param[2] = 0xc3; /* Enable PS2++ */
psmouse_command(psmouse, param, 0x30d1);
param[0] = 0;
if (!psmouse_command(psmouse, param, 0x13d1) &&
param[0] == 0x06 && param[1] == 0x00 && param[2] == 0x14)
return PSMOUSE_PS2TPP;
param[0] = 0;
if (!psmouse_command(psmouse, param, 0x13d1) &&
param[0] == 0x06 && param[1] == 0x00 && param[2] == 0x14)
return PSMOUSE_PS2TPP;
} else {
psmouse_ps2pp_cmd(psmouse, param, 0x39); /* Magic knock */
psmouse_ps2pp_cmd(psmouse, param, 0xDB);
} else {
param[0] = param[1] = param[2] = 0;
if ((param[0] & 0x78) == 0x48 && (param[1] & 0xf3) == 0xc2 &&
(param[2] & 3) == ((param[1] >> 2) & 3))
return PSMOUSE_PS2PP;
}
psmouse_ps2pp_cmd(psmouse, param, 0x39); /* Magic knock */
psmouse_ps2pp_cmd(psmouse, param, 0xDB);
if ((param[0] & 0x78) == 0x48 && (param[1] & 0xf3) == 0xc2 &&
(param[2] & 3) == ((param[1] >> 2) & 3))
return PSMOUSE_PS2PP;
}
}
}
/*
......@@ -426,7 +419,7 @@ static int psmouse_extensions(struct psmouse *psmouse)
set_bit(REL_WHEEL, psmouse->dev.relbit);
/*
* Try IntelliMouse Explorer magic init.
* Try IntelliMouse/Explorer magic init.
*/
param[0] = 200;
......@@ -439,29 +432,22 @@ static int psmouse_extensions(struct psmouse *psmouse)
if (param[0] == 4) {
psmouse->vendor = "Microsoft";
psmouse->name = "IntelliMouse Explorer";
set_bit(BTN_SIDE, psmouse->dev.keybit);
set_bit(BTN_EXTRA, psmouse->dev.keybit);
psmouse->name = "Explorer Mouse";
return PSMOUSE_IMEX;
}
psmouse->vendor = "Microsoft";
psmouse->name = "IntelliMouse";
psmouse->name = "Wheel Mouse";
return PSMOUSE_IMPS;
}
/*
* Okay, all failed, we have a standard mouse here. The number of the buttons is
* still a question, though.
* Okay, all failed, we have a standard mouse here. The number of the buttons
* is still a question, though. We assume 3.
*/
psmouse->vendor = "Generic";
psmouse->name = "Mouse";
return PSMOUSE_PS2;
}
......@@ -474,14 +460,7 @@ static int psmouse_probe(struct psmouse *psmouse)
unsigned char param[2];
/*
* First we reset and disable the mouse.
*/
if (psmouse_command(psmouse, NULL, PSMOUSE_CMD_RESET_DIS))
return -1;
/*
* Next, we check if it's a mouse. It should send 0x00 or 0x03
* First, we check if it's a mouse. It should send 0x00 or 0x03
* in case of an IntelliMouse in 4-byte mode or 0x04 for IM Explorer.
*/
......@@ -490,9 +469,21 @@ static int psmouse_probe(struct psmouse *psmouse)
if (psmouse_command(psmouse, param, PSMOUSE_CMD_GETID))
return -1;
if (param[0] == 0xab || param[0] == 0xac) {
psmouse_command(psmouse, param, PSMOUSE_CMD_GETID2);
return -1;
}
if (param[0] != 0x00 && param[0] != 0x03 && param[0] != 0x04)
return -1;
/*
* Then we reset and disable the mouse so that it doesn't generate events.
*/
if (psmouse_command(psmouse, NULL, PSMOUSE_CMD_RESET_DIS))
return -1;
/*
* And here we try to determine if it has any extensions over the
* basic PS/2 3-button mouse.
......@@ -602,9 +593,9 @@ static void psmouse_connect(struct serio *serio, struct serio_dev *dev)
psmouse->dev.name = psmouse->devname;
psmouse->dev.phys = psmouse->phys;
psmouse->dev.id.bustype = BUS_I8042;
psmouse->dev.id.vendor = psmouse->type;
psmouse->dev.id.product = psmouse->model;
psmouse->dev.id.version = 0x0100;
psmouse->dev.id.vendor = 0x0002;
psmouse->dev.id.product = psmouse->type;
psmouse->dev.id.version = psmouse->model;
input_register_device(&psmouse->dev);
......
......@@ -351,6 +351,15 @@ static ssize_t mousedev_write(struct file * file, const char * buffer, size_t co
list->ps2[1] = 0x60; list->ps2[2] = 3; list->ps2[3] = 200;
list->bufsiz = 4;
break;
case 0xff: /* Reset */
list->impsseq = 0;
list->imexseq = 0;
list->mode = 0;
list->ps2[0] = 0xaa;
list->ps2[1] = 0x00;
list->bufsiz = 2;
break;
}
list->buffer = list->bufsiz;
......
......@@ -23,7 +23,7 @@
#include "i8042.h"
MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
MODULE_DESCRIPTION("i8042 keyboard and mouse controller driver");
MODULE_LICENSE("GPL");
......@@ -347,6 +347,11 @@ static void i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs)
unsigned long flags;
unsigned char str, data;
unsigned int dfl;
struct {
int data;
int str;
} buffer[I8042_BUFFER_SIZE];
int i, j = 0;
#ifdef CONFIG_VT
kbd_pt_regs = regs;
......@@ -354,20 +359,31 @@ static void i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs)
spin_lock_irqsave(&i8042_lock, flags);
while ((str = i8042_read_status()) & I8042_STR_OBF) {
while (j < I8042_BUFFER_SIZE &&
(buffer[j].str = i8042_read_status()) & I8042_STR_OBF)
buffer[j++].data = i8042_read_data();
spin_unlock_irqrestore(&i8042_lock, flags);
for (i = 0; i < j; i++) {
str = buffer[i].str;
data = buffer[i].data;
data = i8042_read_data();
dfl = ((str & I8042_STR_PARITY) ? SERIO_PARITY : 0) |
((str & I8042_STR_TIMEOUT) ? SERIO_TIMEOUT : 0);
#ifdef I8042_DEBUG_IO
printk(KERN_DEBUG "i8042.c: %02x <- i8042 (interrupt, %s, %d) [%d]\n",
data, (str & I8042_STR_AUXDATA) ? "aux" : "kbd", irq, (int) (jiffies - i8042_start));
printk(KERN_DEBUG "i8042.c: %02x <- i8042 (interrupt, %s, %d%s%s) [%d]\n",
data, (str & I8042_STR_AUXDATA) ? "aux" : "kbd", irq,
dfl & SERIO_PARITY ? ", bad parity" : "",
dfl & SERIO_TIMEOUT ? ", timeout" : "",
(int) (jiffies - i8042_start));
#endif
if (i8042_aux_values.exists && (str & I8042_STR_AUXDATA)) {
serio_interrupt(&i8042_aux_port, data, dfl);
} else {
if (i8042_aux_values.exists && (buffer[i].str & I8042_STR_AUXDATA)) {
serio_interrupt(&i8042_aux_port, buffer[i].data, dfl);
} else
if (i8042_kbd_values.exists) {
if (!i8042_direct) {
if (data > 0x7f) {
......@@ -385,10 +401,8 @@ static void i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs)
}
serio_interrupt(&i8042_kbd_port, data, dfl);
}
}
}
spin_unlock_irqrestore(&i8042_lock, flags);
}
/*
......
......@@ -48,7 +48,6 @@
#include <asm/pmac_feature.h>
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
#include <asm/sections.h>
#include <asm/cputable.h>
#include <asm/time.h>
#ifdef CONFIG_PMAC_BACKLIGHT
......
......@@ -4,7 +4,7 @@
mainmenu_option next_comment
comment 'Video For Linux'
bool ' V4L information in proc filesystem' CONFIG_VIDEO_PROC_FS
dep_bool ' V4L information in proc filesystem' CONFIG_VIDEO_PROC_FS $CONFIG_PROC_FS
comment 'Video Adapters'
if [ "$CONFIG_I2C_ALGOBIT" = "y" -o "$CONFIG_I2C_ALGOBIT" = "m" ]; then
......
This diff is collapsed.
......@@ -47,15 +47,32 @@
#include <linux/version.h>
#include <asm/uaccess.h>
#include <linux/i2c-old.h>
#include <linux/i2c.h>
#include <linux/video_encoder.h>
#define DEBUG(x) x /* Debug driver */
/* ----------------------------------------------------------------------- */
static unsigned short normal_i2c[] = {34>>1, I2C_CLIENT_END };
static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
static unsigned short probe[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
static unsigned short probe_range[2] = { I2C_CLIENT_END , I2C_CLIENT_END };
static unsigned short ignore[2] = { I2C_CLIENT_END , I2C_CLIENT_END };
static unsigned short ignore_range[2] = { I2C_CLIENT_END , I2C_CLIENT_END };
static unsigned short force[2] = { I2C_CLIENT_END , I2C_CLIENT_END };
static struct i2c_client_address_data addr_data = {
normal_i2c , normal_i2c_range,
probe , probe_range,
ignore , ignore_range,
force
};
static struct i2c_client client_template;
struct bt856 {
struct i2c_bus *bus;
struct i2c_client *client;
int addr;
unsigned char reg[128];
......@@ -73,40 +90,35 @@ struct bt856 {
/* ----------------------------------------------------------------------- */
static int bt856_write(struct bt856 *dev, unsigned char subaddr,
unsigned char data)
static int bt856_probe(struct i2c_adapter *adap)
{
int ack;
LOCK_I2C_BUS(dev->bus);
i2c_start(dev->bus);
i2c_sendbyte(dev->bus, dev->addr, I2C_DELAY);
i2c_sendbyte(dev->bus, subaddr, I2C_DELAY);
ack = i2c_sendbyte(dev->bus, data, I2C_DELAY);
dev->reg[subaddr] = data;
i2c_stop(dev->bus);
UNLOCK_I2C_BUS(dev->bus);
return ack;
return i2c_probe(adap, &addr_data , bt856_attach);
}
static int bt856_setbit(struct bt856 *dev, int subaddr, int bit, int data)
{
return bt856_write(dev, subaddr,(dev->reg[subaddr] & ~(1 << bit)) | (data ? (1 << bit) : 0));
return i2c_smbus_write_byte_data(dev->client, subaddr,(dev->reg[subaddr] & ~(1 << bit)) | (data ? (1 << bit) : 0));
}
/* ----------------------------------------------------------------------- */
static int bt856_attach(struct i2c_device *device)
static int bt856_attach(struct i2c_adapter *adap, int addr , unsigned long flags, int kind)
{
struct bt856 *encoder;
struct i2c_client *client;
client = kmalloc(sizeof(*client), GFP_KERNEL);
if(client == NULL)
return -ENOMEM;
client_template.adapter = adap;
client_template.addr = addr;
memcpy(client, &client_template, sizeof(*client));
/* This chip is not on the buz card but at the same address saa7185 */
//if (memcmp(device->bus->name, "buz", 3) == 0 || memcmp(device->bus->name, "zr36057", 6) == 0)
// return 1;
MOD_INC_USE_COUNT;
device->data = encoder = kmalloc(sizeof(struct bt856), GFP_KERNEL);
encoder = kmalloc(sizeof(struct bt856), GFP_KERNEL);
if (encoder == NULL) {
MOD_DEC_USE_COUNT;
......@@ -115,17 +127,21 @@ static int bt856_attach(struct i2c_device *device)
memset(encoder, 0, sizeof(struct bt856));
strcpy(device->name, "bt856");
encoder->bus = device->bus;
encoder->addr = device->addr;
strcpy(client->name, "bt856");
encoder->client = client;
client->data = encoder;
encoder->addr = client->addr;
encoder->norm = VIDEO_MODE_NTSC;
encoder->enable = 1;
DEBUG(printk(KERN_INFO "%s-bt856: attach\n", encoder->bus->name));
bt856_write(encoder, 0xdc, 0x18);
bt856_write(encoder, 0xda, 0);
bt856_write(encoder, 0xde, 0);
i2c_smbus_write_byte_data(client, 0xdc, 0x18);
encoder->reg[0xdc] = 0x18;
i2c_smbus_write_byte_data(client, 0xda, 0);
encoder->reg[0xda] = 0;
i2c_smbus_write_byte_data(client, 0xde, 0);
encoder->reg[0xde] = 0;
bt856_setbit(encoder, 0xdc, 3, 1);
//bt856_setbit(encoder, 0xdc, 6, 0);
......@@ -145,21 +161,26 @@ static int bt856_attach(struct i2c_device *device)
bt856_setbit(encoder, 0xdc, 1, 1);
bt856_setbit(encoder, 0xde, 4, 0);
bt856_setbit(encoder, 0xde, 3, 1);
init_MUTEX(&encoder->lock);
i2c_attach_client(client);
MOD_INC_USE_COUNT;
return 0;
}
static int bt856_detach(struct i2c_device *device)
static int bt856_detach(struct i2c_client *client)
{
kfree(device->data);
i2c_detach_client(client);
kfree(client->data);
kfree(client);
MOD_DEC_USE_COUNT;
return 0;
}
static int bt856_command(struct i2c_device *device, unsigned int cmd,
static int bt856_command(struct i2c_client *client, unsigned int cmd,
void *arg)
{
struct bt856 *encoder = device->data;
struct bt856 *encoder = client->data;
switch (cmd) {
......@@ -169,7 +190,7 @@ static int bt856_command(struct i2c_device *device, unsigned int cmd,
DEBUG(printk
(KERN_INFO "%s-bt856: get capabilities\n",
encoder->bus->name));
encoder->client->name));
cap->flags
= VIDEO_ENCODER_PAL
......@@ -184,7 +205,7 @@ static int bt856_command(struct i2c_device *device, unsigned int cmd,
int *iarg = arg;
DEBUG(printk(KERN_INFO "%s-bt856: set norm %d\n",
encoder->bus->name, *iarg));
encoder->client->name, *iarg));
switch (*iarg) {
......@@ -211,7 +232,7 @@ static int bt856_command(struct i2c_device *device, unsigned int cmd,
int *iarg = arg;
DEBUG(printk(KERN_INFO "%s-bt856: set input %d\n",
encoder->bus->name, *iarg));
encoder->client->name, *iarg));
/* We only have video bus.
*iarg = 0: input is from bt819
......@@ -247,7 +268,7 @@ static int bt856_command(struct i2c_device *device, unsigned int cmd,
int *iarg = arg;
DEBUG(printk(KERN_INFO "%s-bt856: set output %d\n",
encoder->bus->name, *iarg));
encoder->client->name, *iarg));
/* not much choice of outputs */
if (*iarg != 0) {
......@@ -264,7 +285,7 @@ static int bt856_command(struct i2c_device *device, unsigned int cmd,
DEBUG(printk
(KERN_INFO "%s-bt856: enable output %d\n",
encoder->bus->name, encoder->enable));
encoder->client->name, encoder->enable));
}
break;
......@@ -279,21 +300,30 @@ static int bt856_command(struct i2c_device *device, unsigned int cmd,
static struct i2c_driver i2c_driver_bt856 = {
"bt856", /* name */
I2C_DRIVERID_VIDEOENCODER, /* ID */
I2C_BT856, I2C_BT856 + 1,
bt856_attach,
I2C_DRIVERID_BT856, /* ID */
I2C_DF_NOTIFY,
bt856_probe,
bt856_detach,
bt856_command
};
static struct i2c_client client_template = {
"bt856_client",
-1,
0,
0,
NULL,
&i2c_driver_bt856
};
static int bt856_init(void)
{
return i2c_register_driver(&i2c_driver_bt856);
return i2c_add_driver(&i2c_driver_bt856);
}
static void bt856_exit(void)
{
i2c_unregister_driver(&i2c_driver_bt856);
i2c_del_driver(&i2c_driver_bt856);
}
module_init(bt856_init);
......
This diff is collapsed.
......@@ -44,7 +44,7 @@ static struct video_device *video_device[VIDEO_NUM_DEVICES];
static DECLARE_MUTEX(videodev_lock);
#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
#ifdef CONFIG_VIDEO_PROC_FS
#include <linux/proc_fs.h>
......@@ -60,7 +60,7 @@ struct proc_dir_entry *video_proc_entry = NULL;
EXPORT_SYMBOL(video_proc_entry);
LIST_HEAD(videodev_proc_list);
#endif /* CONFIG_PROC_FS && CONFIG_VIDEO_PROC_FS */
#endif /* CONFIG_VIDEO_PROC_FS */
struct video_device* video_devdata(struct file *file)
{
......@@ -198,7 +198,7 @@ extern int video_exclusive_release(struct inode *inode, struct file *file)
* /proc support
*/
#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
#ifdef CONFIG_VIDEO_PROC_FS
/* Hmm... i'd like to see video_capability information here, but
* how can I access it (without changing the other drivers? -claudio
......@@ -289,7 +289,7 @@ static void videodev_proc_create(void)
}
#ifdef MODULE
#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
#ifdef CONFIG_VIDEO_PROC_FS
static void videodev_proc_destroy(void)
{
if (video_dev_proc_entry != NULL)
......@@ -439,7 +439,7 @@ int video_register_device(struct video_device *vfd, int type, int nr)
NULL);
init_MUTEX(&vfd->lock);
#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
#ifdef CONFIG_VIDEO_PROC_FS
sprintf (name, "%s%d", name_base, i - base);
videodev_proc_create_dev (vfd, name);
#endif
......@@ -460,7 +460,7 @@ void video_unregister_device(struct video_device *vfd)
if(video_device[vfd->minor]!=vfd)
panic("videodev: bad unregister");
#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
#ifdef CONFIG_VIDEO_PROC_FS
videodev_proc_destroy_dev (vfd);
#endif
......@@ -489,7 +489,7 @@ static int __init videodev_init(void)
return -EIO;
}
#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
#ifdef CONFIG_VIDEO_PROC_FS
videodev_proc_create ();
#endif
......@@ -498,7 +498,7 @@ static int __init videodev_init(void)
static void __exit videodev_exit(void)
{
#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
#ifdef CONFIG_VIDEO_PROC_FS
videodev_proc_destroy ();
#endif
unregister_chrdev(VIDEO_MAJOR, "video_capture");
......
......@@ -318,7 +318,7 @@ X. Validating Configuration
DESCRIPTION
This function posts an ExecConfigValidate message to the controller
identified by iop. This message indicates that the the current
identified by iop. This message indicates that the current
configuration is accepted. The iop changes the status of suspect drivers
to valid and may delete old drivers from its store.
......
......@@ -51,7 +51,6 @@
#include <linux/pagemap.h>
#include <linux/iobuf.h>
#include <linux/slab.h>
#include <linux/pagemap.h>
#include <linux/mtd/compatmac.h>
#include <linux/mtd/mtd.h>
......
......@@ -406,7 +406,7 @@ static void handle_mtdblock_request(void)
if (minor(req->rq_dev) >= MAX_MTD_DEVICES)
panic(__FUNCTION__": minor out of bound");
if (req->flags & REQ_CMD)
if (! (req->flags & REQ_CMD))
goto end_req;
if ((req->sector + req->current_nr_sectors) > (mtdblk->mtd->size >> 9))
......
......@@ -24,17 +24,16 @@
PCI suspend/resume - Felipe Damasio <felipewd@terra.com.br>
TODO, in rough priority order:
* Test Tx checksumming thoroughly
* dev->tx_timeout
* LinkChg interrupt
* Support forcing media type with a module parameter,
like dl2k.c/sundance.c
* Constants (module parms?) for Rx work limit
* support 64-bit PCI DMA
* Complete reset on PciErr
* Consider Rx interrupt mitigation using TimerIntr
* Implement 8139C+ statistics dump; maybe not...
h/w stats can be reset only by software reset
* Tx checksumming
* Handle netif_rx return value
* Investigate using skb->priority with h/w VLAN priority
* Investigate using High Priority Tx Queue with skb->priority
......@@ -50,8 +49,8 @@
*/
#define DRV_NAME "8139cp"
#define DRV_VERSION "0.1.0"
#define DRV_RELDATE "Jun 14, 2002"
#define DRV_VERSION "0.2.1"
#define DRV_RELDATE "Aug 9, 2002"
#include <linux/config.h>
......@@ -67,9 +66,17 @@
#include <linux/mii.h>
#include <linux/if_vlan.h>
#include <linux/crc32.h>
#include <linux/in.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/udp.h>
#include <asm/io.h>
#include <asm/uaccess.h>
/* experimental TX checksumming feature enable/disable */
#undef CP_TX_CHECKSUM
/* VLAN tagging feature enable/disable */
#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
#define CP_VLAN_TAG_USED 1
#define CP_VLAN_TX_TAG(tx_desc,vlan_tag_value) \
......@@ -245,6 +252,7 @@ enum {
/* C+ mode command register */
RxVlanOn = (1 << 6), /* Rx VLAN de-tagging enable */
RxChkSum = (1 << 5), /* Rx checksum offload enable */
PCIDAC = (1 << 4), /* PCI Dual Address Cycle (64-bit PCI) */
PCIMulRW = (1 << 3), /* Enable PCI read/write multiple */
CpRxOn = (1 << 1), /* Rx mode enable */
CpTxOn = (1 << 0), /* Tx mode enable */
......@@ -295,8 +303,7 @@ static const unsigned int cp_rx_config =
struct cp_desc {
u32 opts1;
u32 opts2;
u32 addr_lo;
u32 addr_hi;
u64 addr;
};
struct ring_info {
......@@ -357,6 +364,7 @@ struct cp_private {
struct sk_buff *frag_skb;
unsigned dropping_frag : 1;
unsigned pci_using_dac : 1;
unsigned int board_type;
unsigned int wol_enabled : 1; /* Is Wake-on-LAN enabled? */
......@@ -637,7 +645,7 @@ static void cp_rx (struct cp_private *cp)
else
desc->opts1 = cpu_to_le32(DescOwn | cp->rx_buf_sz);
cp->rx_ring[rx_tail].opts2 = 0;
cp->rx_ring[rx_tail].addr_lo = cpu_to_le32(mapping);
cp->rx_ring[rx_tail].addr = cpu_to_le64(mapping);
rx_tail = NEXT_RX(rx_tail);
}
......@@ -768,22 +776,33 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
eor = (entry == (CP_TX_RING_SIZE - 1)) ? RingEnd : 0;
if (skb_shinfo(skb)->nr_frags == 0) {
struct cp_desc *txd = &cp->tx_ring[entry];
u32 mapping, len;
u32 len;
dma_addr_t mapping;
len = skb->len;
mapping = pci_map_single(cp->pdev, skb->data, len, PCI_DMA_TODEVICE);
eor = (entry == (CP_TX_RING_SIZE - 1)) ? RingEnd : 0;
CP_VLAN_TX_TAG(txd, vlan_tag);
txd->addr_lo = cpu_to_le32(mapping);
txd->addr = cpu_to_le64(mapping);
wmb();
#ifdef CP_TX_CHECKSUM
txd->opts1 = cpu_to_le32(eor | len | DescOwn | FirstFrag |
LastFrag | IPCS | UDPCS | TCPCS);
#else
txd->opts1 = cpu_to_le32(eor | len | DescOwn | FirstFrag |
LastFrag);
if (skb->ip_summed == CHECKSUM_HW) {
const struct iphdr *ip = skb->nh.iph;
if (ip->protocol == IPPROTO_TCP)
txd->opts1 = cpu_to_le32(eor | len | DescOwn |
FirstFrag | LastFrag |
IPCS | TCPCS);
else if (ip->protocol == IPPROTO_UDP)
txd->opts1 = cpu_to_le32(eor | len | DescOwn |
FirstFrag | LastFrag |
IPCS | UDPCS);
else
BUG();
} else
#endif
txd->opts1 = cpu_to_le32(eor | len | DescOwn |
FirstFrag | LastFrag);
wmb();
cp->tx_skb[entry].skb = skb;
......@@ -792,8 +811,12 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
entry = NEXT_TX(entry);
} else {
struct cp_desc *txd;
u32 first_len, first_mapping;
u32 first_len;
dma_addr_t first_mapping;
int frag, first_entry = entry;
#ifdef CP_TX_CHECKSUM
const struct iphdr *ip = skb->nh.iph;
#endif
/* We must give this initial chunk to the device last.
* Otherwise we could race with the device.
......@@ -808,8 +831,9 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) {
skb_frag_t *this_frag = &skb_shinfo(skb)->frags[frag];
u32 len, mapping;
u32 len;
u32 ctrl;
dma_addr_t mapping;
len = this_frag->size;
mapping = pci_map_single(cp->pdev,
......@@ -818,16 +842,24 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
len, PCI_DMA_TODEVICE);
eor = (entry == (CP_TX_RING_SIZE - 1)) ? RingEnd : 0;
#ifdef CP_TX_CHECKSUM
ctrl = eor | len | DescOwn | IPCS | UDPCS | TCPCS;
#else
ctrl = eor | len | DescOwn;
if (skb->ip_summed == CHECKSUM_HW) {
ctrl = eor | len | DescOwn | IPCS;
if (ip->protocol == IPPROTO_TCP)
ctrl |= TCPCS;
else if (ip->protocol == IPPROTO_UDP)
ctrl |= UDPCS;
else
BUG();
} else
#endif
ctrl = eor | len | DescOwn;
if (frag == skb_shinfo(skb)->nr_frags - 1)
ctrl |= LastFrag;
txd = &cp->tx_ring[entry];
CP_VLAN_TX_TAG(txd, vlan_tag);
txd->addr_lo = cpu_to_le32(mapping);
txd->addr = cpu_to_le64(mapping);
wmb();
txd->opts1 = cpu_to_le32(ctrl);
......@@ -841,14 +873,23 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
txd = &cp->tx_ring[first_entry];
CP_VLAN_TX_TAG(txd, vlan_tag);
txd->addr_lo = cpu_to_le32(first_mapping);
txd->addr = cpu_to_le64(first_mapping);
wmb();
#ifdef CP_TX_CHECKSUM
txd->opts1 = cpu_to_le32(first_len | FirstFrag | DescOwn | IPCS | UDPCS | TCPCS);
#else
txd->opts1 = cpu_to_le32(first_len | FirstFrag | DescOwn);
if (skb->ip_summed == CHECKSUM_HW) {
if (ip->protocol == IPPROTO_TCP)
txd->opts1 = cpu_to_le32(first_len | FirstFrag |
DescOwn | IPCS | TCPCS);
else if (ip->protocol == IPPROTO_UDP)
txd->opts1 = cpu_to_le32(first_len | FirstFrag |
DescOwn | IPCS | UDPCS);
else
BUG();
} else
#endif
txd->opts1 = cpu_to_le32(first_len | FirstFrag |
DescOwn);
wmb();
}
cp->tx_head = entry;
......@@ -977,10 +1018,11 @@ static void cp_reset_hw (struct cp_private *cp)
static inline void cp_start_hw (struct cp_private *cp)
{
u16 pci_dac = cp->pci_using_dac ? PCIDAC : 0;
if (cp->board_type == RTL8169)
cpw16(CpCmd, PCIMulRW | RxChkSum);
cpw16(CpCmd, pci_dac | PCIMulRW | RxChkSum);
else
cpw16(CpCmd, PCIMulRW | RxChkSum | CpRxOn | CpTxOn);
cpw16(CpCmd, pci_dac | PCIMulRW | RxChkSum | CpRxOn | CpTxOn);
cpw8(Cmd, RxOn | TxOn);
}
......@@ -1053,8 +1095,7 @@ static int cp_refill_rx (struct cp_private *cp)
cp->rx_ring[i].opts1 =
cpu_to_le32(DescOwn | cp->rx_buf_sz);
cp->rx_ring[i].opts2 = 0;
cp->rx_ring[i].addr_lo = cpu_to_le32(cp->rx_skb[i].mapping);
cp->rx_ring[i].addr_hi = 0;
cp->rx_ring[i].addr = cpu_to_le64(cp->rx_skb[i].mapping);
}
return 0;
......@@ -1173,6 +1214,7 @@ static int cp_close (struct net_device *dev)
return 0;
}
#ifdef BROKEN
static int cp_change_mtu(struct net_device *dev, int new_mtu)
{
struct cp_private *cp = dev->priv;
......@@ -1206,6 +1248,7 @@ static int cp_change_mtu(struct net_device *dev, int new_mtu)
return rc;
}
#endif /* BROKEN */
static char mii_2_8139_map[8] = {
BasicModeCtrl,
......@@ -1716,7 +1759,7 @@ static int __devinit cp_init_one (struct pci_dev *pdev,
int rc;
void *regs;
long pciaddr;
unsigned addr_len, i;
unsigned int addr_len, i;
u8 pci_rev, cache_size;
u16 pci_command;
unsigned int board_type = (unsigned int) ent->driver_data;
......@@ -1781,6 +1824,19 @@ static int __devinit cp_init_one (struct pci_dev *pdev,
goto err_out_res;
}
/* Configure DMA attributes. */
if (!pci_set_dma_mask(pdev, (u64) 0xffffffffffffffff)) {
cp->pci_using_dac = 1;
} else {
rc = pci_set_dma_mask(pdev, (u64) 0xffffffff);
if (rc) {
printk(KERN_ERR PFX "No usable DMA configuration, "
"aborting.\n");
goto err_out_res;
}
cp->pci_using_dac = 0;
}
regs = ioremap_nocache(pciaddr, CP_REGS_SIZE);
if (!regs) {
rc = -EIO;
......@@ -1805,7 +1861,9 @@ static int __devinit cp_init_one (struct pci_dev *pdev,
dev->hard_start_xmit = cp_start_xmit;
dev->get_stats = cp_get_stats;
dev->do_ioctl = cp_ioctl;
#ifdef BROKEN
dev->change_mtu = cp_change_mtu;
#endif
#if 0
dev->tx_timeout = cp_tx_timeout;
dev->watchdog_timeo = TX_TIMEOUT;
......
......@@ -92,7 +92,7 @@
*/
#define DRV_NAME "8139too"
#define DRV_VERSION "0.9.25"
#define DRV_VERSION "0.9.26"
#include <linux/config.h>
......@@ -462,7 +462,7 @@ enum RxConfigBits {
/* Twister tuning parameters from RealTek.
Completely undocumented, but required to tune bad links. */
Completely undocumented, but required to tune bad links on some boards. */
enum CSCRBits {
CSCR_LinkOKBit = 0x0400,
CSCR_LinkChangeBit = 0x0800,
......@@ -477,10 +477,14 @@ enum Cfg9346Bits {
Cfg9346_Unlock = 0xC0,
};
#ifdef CONFIG_8139TOO_TUNE_TWISTER
enum TwisterParamVals {
PARA78_default = 0x78fa8388,
PARA7c_default = 0xcb38de43, /* param[0][3] */
PARA7c_xxx = 0xcb38de43,
};
#define PARA78_default 0x78fa8388
#define PARA7c_default 0xcb38de43 /* param[0][3] */
#define PARA7c_xxx 0xcb38de43
static const unsigned long param[4][4] = {
{0xcb39de43, 0xcb39ce43, 0xfb38de03, 0xcb38de43},
{0xcb39de43, 0xcb39ce43, 0xcb39ce83, 0xcb39ce83},
......@@ -488,6 +492,8 @@ static const unsigned long param[4][4] = {
{0xbb39de43, 0xbb39ce43, 0xbb39ce83, 0xbb39ce83}
};
#endif /* CONFIG_8139TOO_TUNE_TWISTER */
typedef enum {
CH_8139 = 0,
CH_8139_K,
......@@ -1302,7 +1308,7 @@ static int rtl8139_open (struct net_device *dev)
tp->mii.full_duplex = tp->mii.duplex_lock;
tp->tx_flag = (TX_FIFO_THRESH << 11) & 0x003f0000;
tp->twistie = 1;
tp->twistie = (tp->chipset == CH_8139_K) ? 1 : 0;
tp->time_to_die = 0;
rtl8139_init_ring (dev);
......@@ -1784,7 +1790,7 @@ static void rtl8139_rx_err (u32 rx_status, struct net_device *dev,
struct rtl8139_private *tp, void *ioaddr)
{
u8 tmp8;
#ifndef CONFIG_8139_NEW_RX_RESET
#ifdef CONFIG_8139_OLD_RX_RESET
int tmp_work;
#endif
......@@ -1807,7 +1813,7 @@ static void rtl8139_rx_err (u32 rx_status, struct net_device *dev,
tp->xstats.rx_lost_in_ring++;
}
#ifdef CONFIG_8139_NEW_RX_RESET
#ifndef CONFIG_8139_OLD_RX_RESET
tmp8 = RTL_R8 (ChipCmd);
RTL_W8 (ChipCmd, tmp8 & ~CmdRxEnb);
RTL_W8 (ChipCmd, tmp8);
......
......@@ -673,10 +673,12 @@ CONFIG_8139TOO_PIO
say N.
CONFIG_8139TOO_TUNE_TWISTER
This implements a function which might come in handy in case you are
using low quality on long cabling. It tries to match the transceiver
to the cable characteristics. This is experimental since hardly
documented by the manufacturer. If unsure, say N.
This implements a function which might come in handy in case you
are using low quality on long cabling. It is required for RealTek
RTL-8139 revision K boards, and totally unused otherwise. It tries
to match the transceiver to the cable characteristics. This is
experimental since hardly documented by the manufacturer.
If unsure, say Y.
CONFIG_8139TOO_8129
This enables support for the older and uncommon RTL-8129 and
......@@ -684,6 +686,13 @@ CONFIG_8139TOO_8129
instead of an internal one. Disabling this option will save some
memory by making the code size smaller. If unsure, say Y.
CONFIG_8139_OLD_RX_RESET
The 8139too driver was recently updated to contain a more rapid
reset sequence, in the face of severe receive errors. This "new"
RX-reset method should be adequate for all boards. But if you
experience problems, you can enable this option to restore the
old RX-reset behavior. If unsure, say N.
CONFIG_SIS900
This is a driver for the Fast Ethernet PCI network cards based on
the SiS 900 and SiS 7016 chips. The SiS 900 core is also embedded in
......
......@@ -174,9 +174,9 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
dep_tristate ' RealTek RTL-8139 C+ PCI Fast Ethernet Adapter support (EXPERIMENTAL)' CONFIG_8139CP $CONFIG_PCI $CONFIG_EXPERIMENTAL
dep_tristate ' RealTek RTL-8139 PCI Fast Ethernet Adapter support' CONFIG_8139TOO $CONFIG_PCI
dep_mbool ' Use PIO instead of MMIO' CONFIG_8139TOO_PIO $CONFIG_8139TOO
dep_mbool ' Support for automatic channel equalization (EXPERIMENTAL)' CONFIG_8139TOO_TUNE_TWISTER $CONFIG_8139TOO $CONFIG_EXPERIMENTAL
dep_mbool ' Support for uncommon RTL-8139 rev. K (automatic channel equalization)' CONFIG_8139TOO_TUNE_TWISTER $CONFIG_8139TOO
dep_mbool ' Support for older RTL-8129/8130 boards' CONFIG_8139TOO_8129 $CONFIG_8139TOO
dep_mbool ' Experiment for better RX reset (EXPERIMENTAL)' CONFIG_8139_NEW_RX_RESET $CONFIG_8139TOO $CONFIG_EXPERIMENTAL
dep_mbool ' Use older RX-reset method' CONFIG_8139_OLD_RX_RESET $CONFIG_8139TOO
dep_tristate ' SiS 900/7016 PCI Fast Ethernet Adapter support' CONFIG_SIS900 $CONFIG_PCI
dep_tristate ' SMC EtherPower II' CONFIG_EPIC100 $CONFIG_PCI
dep_tristate ' Sundance Alta support' CONFIG_SUNDANCE $CONFIG_PCI
......@@ -226,6 +226,7 @@ if [ "$CONFIG_ACENIC" != "n" ]; then
fi
dep_tristate 'D-Link DL2000-based Gigabit Ethernet support' CONFIG_DL2K $CONFIG_PCI
dep_tristate 'Intel(R) PRO/1000 Gigabit Ethernet support' CONFIG_E1000 $CONFIG_PCI
dep_mbool ' Use Rx Polling (NAPI) (EXPERIMENTAL)' CONFIG_E1000_NAPI $CONFIG_E1000 $CONFIG_EXPERIMENTAL
dep_tristate 'MyriCOM Gigabit Ethernet support' CONFIG_MYRI_SBUS $CONFIG_SBUS
dep_tristate 'National Semiconduct DP83820 support' CONFIG_NS83820 $CONFIG_PCI
dep_tristate 'Packet Engines Hamachi GNIC-II support' CONFIG_HAMACHI $CONFIG_PCI
......
......@@ -680,7 +680,7 @@ static void set_multicast_list(struct net_device *master)
}
/*
* This function counts the the number of attached
* This function counts the number of attached
* slaves for use by bond_xmit_xor.
*/
static void update_slave_cnt(bonding_t *bond)
......
This diff is collapsed.
/*******************************************************************************
This software program is available to you under a choice of one of two
licenses. You may choose to be licensed under either the GNU General Public
License 2.0, June 1991, available at http://www.fsf.org/copyleft/gpl.html,
or the Intel BSD + Patent License, the text of which follows:
Recipient has requested a license and Intel Corporation ("Intel") is willing
to grant a license for the software entitled Linux Base Driver for the
Intel(R) PRO/100 Family of Adapters (e100) (the "Software") being provided
by Intel Corporation. The following definitions apply to this license:
"Licensed Patents" means patent claims licensable by Intel Corporation which
are necessarily infringed by the use of sale of the Software alone or when
combined with the operating system referred to below.
"Recipient" means the party to whom Intel delivers this Software.
"Licensee" means Recipient and those third parties that receive a license to
any operating system available under the GNU General Public License 2.0 or
later.
Copyright (c) 1999 - 2002 Intel Corporation.
All rights reserved.
The license is provided to Recipient and Recipient's Licensees under the
following terms.
Redistribution and use in source and binary forms of the Software, with or
without modification, are permitted provided that the following conditions
are met:
Redistributions of source code of the Software may retain the above
copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form of the Software may reproduce the above
copyright notice, this list of conditions and the following disclaimer in
the documentation and/or materials provided with the distribution.
Neither the name of Intel Corporation nor the names of its contributors
shall be used to endorse or promote products derived from this Software
without specific prior written permission.
Intel hereby grants Recipient and Licensees a non-exclusive, worldwide,
royalty-free patent license under Licensed Patents to make, use, sell, offer
to sell, import and otherwise transfer the Software, if any, in source code
and object code form. This license shall include changes to the Software
that are error corrections or other minor changes to the Software that do
not add functionality or features when the Software is incorporated in any
version of an operating system that has been distributed under the GNU
General Public License 2.0 or later. This patent license shall apply to the
combination of the Software and any operating system licensed under the GNU
General Public License 2.0 or later if, at the time Intel provides the
Software to Recipient, such addition of the Software to the then publicly
available versions of such operating systems available under the GNU General
Public License 2.0 or later (whether in gold, beta or alpha form) causes
such combination to be covered by the Licensed Patents. The patent license
shall not apply to any other combinations which include the Software. NO
hardware per se is licensed hereunder.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MECHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR IT CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
ANY LOSS OF USE; DATA, OR PROFITS; OR BUSINESS INTERUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright(c) 1999 - 2002 Intel Corporation. All rights reserved.
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 the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
The full GNU General Public License is included in this distribution in the
file called LICENSE.
Contact Information:
Linux NICS <linux.nics@intel.com>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*******************************************************************************/
#ifndef _E100_INC_
......@@ -104,6 +59,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <linux/proc_fs.h>
#include <linux/ip.h>
#define E100_REGS_LEN 1
/*
* Configure parameters for buffers per controller.
* If the machine this is being used on is a faster machine (i.e. > 150MHz)
......
/*******************************************************************************
This software program is available to you under a choice of one of two
licenses. You may choose to be licensed under either the GNU General Public
License 2.0, June 1991, available at http://www.fsf.org/copyleft/gpl.html,
or the Intel BSD + Patent License, the text of which follows:
Recipient has requested a license and Intel Corporation ("Intel") is willing
to grant a license for the software entitled Linux Base Driver for the
Intel(R) PRO/100 Family of Adapters (e100) (the "Software") being provided
by Intel Corporation. The following definitions apply to this license:
"Licensed Patents" means patent claims licensable by Intel Corporation which
are necessarily infringed by the use of sale of the Software alone or when
combined with the operating system referred to below.
"Recipient" means the party to whom Intel delivers this Software.
"Licensee" means Recipient and those third parties that receive a license to
any operating system available under the GNU General Public License 2.0 or
later.
Copyright (c) 1999 - 2002 Intel Corporation.
All rights reserved.
The license is provided to Recipient and Recipient's Licensees under the
following terms.
Redistribution and use in source and binary forms of the Software, with or
without modification, are permitted provided that the following conditions
are met:
Redistributions of source code of the Software may retain the above
copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form of the Software may reproduce the above
copyright notice, this list of conditions and the following disclaimer in
the documentation and/or materials provided with the distribution.
Neither the name of Intel Corporation nor the names of its contributors
shall be used to endorse or promote products derived from this Software
without specific prior written permission.
Intel hereby grants Recipient and Licensees a non-exclusive, worldwide,
royalty-free patent license under Licensed Patents to make, use, sell, offer
to sell, import and otherwise transfer the Software, if any, in source code
and object code form. This license shall include changes to the Software
that are error corrections or other minor changes to the Software that do
not add functionality or features when the Software is incorporated in any
version of an operating system that has been distributed under the GNU
General Public License 2.0 or later. This patent license shall apply to the
combination of the Software and any operating system licensed under the GNU
General Public License 2.0 or later if, at the time Intel provides the
Software to Recipient, such addition of the Software to the then publicly
available versions of such operating systems available under the GNU General
Public License 2.0 or later (whether in gold, beta or alpha form) causes
such combination to be covered by the Licensed Patents. The patent license
shall not apply to any other combinations which include the Software. NO
hardware per se is licensed hereunder.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MECHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR IT CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
ANY LOSS OF USE; DATA, OR PROFITS; OR BUSINESS INTERUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright(c) 1999 - 2002 Intel Corporation. All rights reserved.
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 the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
The full GNU General Public License is included in this distribution in the
file called LICENSE.
Contact Information:
Linux NICS <linux.nics@intel.com>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*******************************************************************************/
/**********************************************************************
......
/*******************************************************************************
This software program is available to you under a choice of one of two
licenses. You may choose to be licensed under either the GNU General Public
License 2.0, June 1991, available at http://www.fsf.org/copyleft/gpl.html,
or the Intel BSD + Patent License, the text of which follows:
Recipient has requested a license and Intel Corporation ("Intel") is willing
to grant a license for the software entitled Linux Base Driver for the
Intel(R) PRO/100 Family of Adapters (e100) (the "Software") being provided
by Intel Corporation. The following definitions apply to this license:
"Licensed Patents" means patent claims licensable by Intel Corporation which
are necessarily infringed by the use of sale of the Software alone or when
combined with the operating system referred to below.
"Recipient" means the party to whom Intel delivers this Software.
"Licensee" means Recipient and those third parties that receive a license to
any operating system available under the GNU General Public License 2.0 or
later.
Copyright (c) 1999 - 2002 Intel Corporation.
All rights reserved.
The license is provided to Recipient and Recipient's Licensees under the
following terms.
Redistribution and use in source and binary forms of the Software, with or
without modification, are permitted provided that the following conditions
are met:
Redistributions of source code of the Software may retain the above
copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form of the Software may reproduce the above
copyright notice, this list of conditions and the following disclaimer in
the documentation and/or materials provided with the distribution.
Neither the name of Intel Corporation nor the names of its contributors
shall be used to endorse or promote products derived from this Software
without specific prior written permission.
Intel hereby grants Recipient and Licensees a non-exclusive, worldwide,
royalty-free patent license under Licensed Patents to make, use, sell, offer
to sell, import and otherwise transfer the Software, if any, in source code
and object code form. This license shall include changes to the Software
that are error corrections or other minor changes to the Software that do
not add functionality or features when the Software is incorporated in any
version of an operating system that has been distributed under the GNU
General Public License 2.0 or later. This patent license shall apply to the
combination of the Software and any operating system licensed under the GNU
General Public License 2.0 or later if, at the time Intel provides the
Software to Recipient, such addition of the Software to the then publicly
available versions of such operating systems available under the GNU General
Public License 2.0 or later (whether in gold, beta or alpha form) causes
such combination to be covered by the Licensed Patents. The patent license
shall not apply to any other combinations which include the Software. NO
hardware per se is licensed hereunder.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MECHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR IT CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
ANY LOSS OF USE; DATA, OR PROFITS; OR BUSINESS INTERUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright(c) 1999 - 2002 Intel Corporation. All rights reserved.
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 the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
The full GNU General Public License is included in this distribution in the
file called LICENSE.
Contact Information:
Linux NICS <linux.nics@intel.com>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*******************************************************************************/
#ifndef _E100_CONFIG_INC_
......
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.
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.
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.
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.
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