S: USA
N: Benjamin Herrenschmidt
-E: bh40@calva.net
+E: benh@kernel.crashing.org
E: benh@mipsys.com
-D: PowerMac booter (BootX)
+D: PowerMac booters (BootX, yaboot)
D: Additional PowerBook support
D: Apple "Core99" machines support (ibook,g4,...)
-S: 22, rue des Marguettes
-S: 75012 Paris
+S: 122, blvd. Baille
+S: 13005 Marseille
S: France
N: Sebastian Hetze
If unsure, say Y.
-IEEE1284 transfer modes
-CONFIG_PARPORT_1284
- If you have a printer that supports status readback or device ID, or
- want to use a device that uses enhanced parallel port transfer modes
- such as EPP, you can say Y here to enable advanced IEEE 1284
- transfer modes. Also say Y if you want device ID information to
- appear in /proc/parport/*/autoprobe*. It is safe to say N.
-
PC-style hardware
CONFIG_PARPORT_PC
You should say Y here if you have a PC-style parallel port. All IBM
VERSION = 2
PATCHLEVEL = 2
SUBLEVEL = 19
-EXTRAVERSION = pre11
+EXTRAVERSION = pre13
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
mainmenu_option next_comment
comment 'ISDN subsystem'
-tristate 'ISDN support' CONFIG_ISDN
-if [ "$CONFIG_ISDN" != "n" ]; then
- source drivers/isdn/Config.in
+if [ "$CONFIG_NET" != "n" ]; then
+ tristate 'ISDN support' CONFIG_ISDN
+ if [ "$CONFIG_ISDN" != "n" ]; then
+ source drivers/isdn/Config.in
+ fi
fi
endmenu
unlock_kernel();
return error;
}
+
+#ifdef __SMP__
+/*
+ * execve() system call for in kernel use.
+ *
+ * Two(user and kernel) execve() have quite different call path and
+ * following function puts lock_kernel() and unlock_kernel() in kernel
+ * execve(). You could put them in unistd.h but you will have to
+ * modify many files to clear compile error -
+ *
+ * soohoon.lee@api-networks.com. */
+
+asmlinkage int ___kernel_execve(char *filename, char **argp, char **envp,
+ struct pt_regs *regs)
+{
+ int error;
+
+ lock_kernel();
+
+ error = do_execve(filename, argp, envp, regs);
+
+ unlock_kernel();
+
+ return error;
+}
+#endif /* __SMP__ */
CONFIG_X86_POPAD_OK=y
CONFIG_X86_TSC=y
CONFIG_X86_GOOD_APIC=y
+# CONFIG_MICROCODE is not set
+# CONFIG_X86_MSR is not set
+# CONFIG_X86_CPUID is not set
CONFIG_1GB=y
# CONFIG_2GB is not set
# CONFIG_MATH_EMULATION is not set
CONFIG_BINFMT_MISC=y
# CONFIG_PARPORT is not set
# CONFIG_APM is not set
+# CONFIG_TOSHIBA is not set
#
# Plug and Play support
CONFIG_PARIDE_PARPORT=y
# CONFIG_PARIDE is not set
# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_HD is not set
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
#
# Telephony Support
#
#
CONFIG_BLK_DEV_SD=y
# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
# CONFIG_BLK_DEV_SR is not set
# CONFIG_CHR_DEV_SG is not set
# CONFIG_SCSI_AHA152X is not set
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AHA1740 is not set
-# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_AM53C974 is not set
# CONFIG_SCSI_MEGARAID is not set
# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_SCSI_CPQFCTS is not set
# CONFIG_SCSI_DTC3280 is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_EATA_DMA is not set
CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=4
CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32
CONFIG_SCSI_NCR53C8XX_SYNC=20
-# CONFIG_SCSI_NCR53C8XX_PROFILE is not set
# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
# CONFIG_SCSI_NCR53C8XX_PQS_PDS is not set
# CONFIG_SCSI_PAS16 is not set
# CONFIG_SCSI_U14_34F is not set
# CONFIG_SCSI_ULTRASTOR is not set
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+# CONFIG_I2O_PCI is not set
+# CONFIG_I2O_BLOCK is not set
+# CONFIG_I2O_SCSI is not set
+
#
# Network device support
#
#
# CONFIG_ARCNET is not set
CONFIG_DUMMY=m
+# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
# CONFIG_NET_SB1000 is not set
CONFIG_NET_EISA=y
# CONFIG_PCNET32 is not set
# CONFIG_APRICOT is not set
+# CONFIG_LP486E is not set
# CONFIG_CS89x0 is not set
-# CONFIG_DM9102 is not set
# CONFIG_DE4X5 is not set
# CONFIG_DEC_ELCP is not set
# CONFIG_DEC_ELCP_OLD is not set
# CONFIG_HOSTESS_SV11 is not set
# CONFIG_COSA is not set
# CONFIG_SEALEVEL_4021 is not set
+# CONFIG_SYNCLINK_SYNCPPP is not set
+# CONFIG_LANMEDIA is not set
# CONFIG_COMX is not set
# CONFIG_DLCI is not set
# CONFIG_WAN_DRIVERS is not set
+# CONFIG_XPEED is not set
# CONFIG_SBNI is not set
#
# CONFIG_WATCHDOG is not set
# CONFIG_NVRAM is not set
# CONFIG_RTC is not set
+# CONFIG_INTEL_RNG is not set
#
# Video For Linux
#
# CONFIG_FTAPE is not set
+#
+# USB support
+#
+# CONFIG_USB is not set
+
#
# Filesystems
#
#
# CONFIG_CODA_FS is not set
CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+# CONFIG_NFSD is not set
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
# CONFIG_SMB_FS is not set
#
# CONFIG_BSD_DISKLABEL is not set
# CONFIG_MAC_PARTITION is not set
+# CONFIG_MINIX_SUBPARTITION is not set
# CONFIG_SMD_DISKLABEL is not set
# CONFIG_SOLARIS_X86_PARTITION is not set
# CONFIG_NLS is not set
mainmenu_option next_comment
comment 'ISDN subsystem'
-tristate 'ISDN support' CONFIG_ISDN
-if [ "$CONFIG_ISDN" != "n" ]; then
- source drivers/isdn/Config.in
+if [ "$CONFIG_NET" != "n" ]; then
+ tristate 'ISDN support' CONFIG_ISDN
+ if [ "$CONFIG_ISDN" != "n" ]; then
+ source drivers/isdn/Config.in
+ fi
fi
endmenu
mainmenu_option next_comment
comment 'Mac device drivers'
-bool 'Use input layer for ADB keyboard and mouse' CONFIG_INPUT_ADBHID
+if [ "$CONFIG_INPUT_KEYBDEV" = "y" -o "$CONFIG_INPUT_MOUSEDEV" = "y" ]; then
+ bool 'Use input layer for ADB keyboard and mouse' CONFIG_INPUT_ADBHID
+fi
if [ "$CONFIG_INPUT_ADBHID" = "y" ]; then
define_bool CONFIG_INPUT_KEYBDEV $CONFIG_VT
define_bool CONFIG_INPUT_MOUSEDEV y
* arch/ppc/kernel/feature.c
*
* Copyright (C) 1996 Paul Mackerras (paulus@cs.anu.edu.au)
- * Ben. Herrenschmidt (bh40@calva.net)
+ * Ben. Herrenschmidt (benh@kernel.crashing.org)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
*
* Added initialisation code for Apple Core99 machines, tweaked a few things
* to avoid bogus interrupts and to make sure the disable function exits with
- * the interrupt actually masked.
- * Benjamin Herrenschmidt <bh40@calva.net>
+ * the interrupt actually masked. --BenH
* Todo: map interrupts to all available CPUs after the ack round
*
* This file is subject to the terms and conditions of the GNU General Public
#ifdef CONFIG_BLK_DEV_IDE_PMAC
+void
+ide_pmac_init(void)
+{
+ if (_machine == _MACH_Pmac)
+ pmu_suspend();
+ ide_init();
+ if (_machine == _MACH_Pmac)
+ pmu_resume();
+}
+
extern kdev_t pmac_find_ide_boot(char *bootdevice, int n);
__initfunc(kdev_t find_ide_boot(void))
}
#endif
- /* If OpenFirmware version >= 3, then use quiesce call */
- if (RELOC(prom_version) >= 3) {
+ /* If PowerMac, then use quiesce call */
+ if (!chrp) {
prom_print(RELOC("Calling quiesce ...\n"));
call_prom(RELOC("quiesce"), 0, 0);
offset = reloc_offset();
/*
* This file contains sleep low-level functions for PowerBook G3.
- * Copyright (C) 1999 Benjamin Herrenschmidt (bh40@calva.net)
+ * Copyright (C) 1999 Benjamin Herrenschmidt (benh@kernel.crashing.org)
* and Paul Mackerras (paulus@cs.anu.edu.au).
*
* This program is free software; you can redistribute it and/or
mainmenu_option next_comment
comment 'ISDN subsystem'
-tristate 'ISDN support' CONFIG_ISDN
-if [ "$CONFIG_ISDN" != "n" ]; then
- source drivers/isdn/Config.in
+if [ "$CONFIG_NET" != "n" ]; then
+ tristate 'ISDN support' CONFIG_ISDN
+ if [ "$CONFIG_ISDN" != "n" ]; then
+ source drivers/isdn/Config.in
+ fi
fi
endmenu
#include <asm/uaccess.h>
#include <linux/blk.h>
+#ifdef CONFIG_POWERMAC
+#include <asm/ide.h>
+#endif
+
#include <linux/module.h>
/*
isp16_init();
#endif CONFIG_ISP16_CDI
#ifdef CONFIG_BLK_DEV_IDE
+#ifdef CONFIG_POWERMAC
+ ide_pmac_init();
+#else
ide_init(); /* this MUST precede hd_init */
#endif
+#endif
#ifdef CONFIG_BLK_DEV_HD
hd_init();
#endif
if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then
int 'Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256
fi
-if [ "$CONFIG_PARPORT" != "n" ]; then
+if [ "$CONFIG_PARPORT" = "y" -o "$CONFIG_PARPORT" = "m" ]; then
dep_tristate 'Parallel printer support' CONFIG_PRINTER $CONFIG_PARPORT
if [ "$CONFIG_PRINTER" != "n" ]; then
bool ' Support IEEE1284 status readback' CONFIG_PRINTER_READBACK
fi
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
- tristate '/dev/agpgart (AGP Support) (EXPERIMENTAL)' CONFIG_AGP n
+ tristate '/dev/agpgart (AGP Support) (EXPERIMENTAL)' CONFIG_AGP
if [ "$CONFIG_AGP" != "n" ]; then
bool ' Intel 440LX/BX/GX and I815/820 support' CONFIG_AGP_INTEL
bool ' Intel I810/I815 (on-board video) support' CONFIG_AGP_I810
if [ "$CONFIG_RADIO_TRUST" = "y" ]; then
hex ' Trust FM Radio I/O port (0x350 or 0x358)' CONFIG_RADIO_TRUST_PORT 350
fi
- if [ "$CONFIG_PCI" != "n" ]; then
+ if [ "$CONFIG_PCI" = "y" ]; then
dep_tristate 'BT848 Video For Linux' CONFIG_VIDEO_BT848 $CONFIG_VIDEO_DEV
if [ "$CONFIG_VIDEO_BT848" != "n" ]; then
comment ' MSP3400 sound decoder support is in the section "additional'
comment ' low level sound drivers". You may need to enable it there.'
fi
fi
- if [ "$CONFIG_PARPORT" != "n" ]; then
+ if [ "$CONFIG_PARPORT" = "y" -o "$CONFIG_PARPORT" = "m" ]; then
dep_tristate 'Quickcam BW Video For Linux' CONFIG_VIDEO_BWQCAM $CONFIG_VIDEO_DEV $CONFIG_PARPORT
dep_tristate 'Colour QuickCam Video For Linux (EXPERIMENTAL)' CONFIG_VIDEO_CQCAM $CONFIG_VIDEO_DEV $CONFIG_PARPORT
fi
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
dep_tristate 'CPiA Video For Linux' CONFIG_VIDEO_CPIA $CONFIG_VIDEO_DEV
if [ "$CONFIG_VIDEO_CPIA" != "n" ]; then
- if [ "CONFIG_PARPORT_1284" != "n" ]; then
- dep_tristate ' CPiA Parallel Port Lowlevel Support' CONFIG_VIDEO_CPIA_PP $CONFIG_VIDEO_CPIA $CONFIG_PARPORT
- fi
- if [ "$CONFIG_USB" != "n" ]; then
+ dep_tristate ' CPiA Parallel Port Lowlevel Support' CONFIG_VIDEO_CPIA_PP $CONFIG_VIDEO_CPIA $CONFIG_PARPORT
+ if [ "$CONFIG_USB" = "y" -o "$CONFIG_USB" = "m" ]; then
dep_tristate ' CPiA USB Lowlevel Support' CONFIG_VIDEO_CPIA_USB $CONFIG_VIDEO_CPIA $CONFIG_USB
fi
fi
#include <asm/bitops.h>
#include <asm/serial.h>
+#ifdef CONFIG_MAC_SERIAL
+#define SERIAL_DEV_OFFSET 4
+#else
+#define SERIAL_DEV_OFFSET 0
+#endif
+
#ifdef SERIAL_INLINE
#define _INLINE_ inline
#endif
tty->driver_data = info;
info->tty = tty;
if (serial_paranoia_check(info, tty->device, "rs_open")) {
- MOD_DEC_USE_COUNT;
+ /* MOD_DEC_USE_COUNT; "info->tty" will cause this */
return -ENODEV;
}
if (!tmp_buf) {
page = get_free_page(GFP_KERNEL);
if (!page) {
- MOD_DEC_USE_COUNT;
+ /* MOD_DEC_USE_COUNT; "info->tty" will cause this? */
return -ENOMEM;
}
if (tmp_buf)
(info->flags & ASYNC_CLOSING)) {
if (info->flags & ASYNC_CLOSING)
interruptible_sleep_on(&info->close_wait);
- MOD_DEC_USE_COUNT;
+ /* MOD_DEC_USE_COUNT; "info->tty" will cause this? */
#ifdef SERIAL_DO_RESTART
return ((info->flags & ASYNC_HUP_NOTIFY) ?
-EAGAIN : -ERESTARTSYS);
*/
retval = startup(info);
if (retval) {
- MOD_DEC_USE_COUNT;
+ /* MOD_DEC_USE_COUNT; "info->tty" will cause this? */
return retval;
}
retval = block_til_ready(tty, filp, info);
if (retval) {
- MOD_DEC_USE_COUNT;
+ /* MOD_DEC_USE_COUNT; "info->tty" will cause this? */
#ifdef SERIAL_DEBUG_OPEN
printk("rs_open returning after block_til_ready with %d\n",
retval);
serial_driver.driver_name = "serial";
serial_driver.name = "ttyS";
serial_driver.major = TTY_MAJOR;
- serial_driver.minor_start = 64;
+ serial_driver.minor_start = 64 + SERIAL_DEV_OFFSET;
serial_driver.num = NR_PORTS;
serial_driver.type = TTY_DRIVER_TYPE_SERIAL;
serial_driver.subtype = SERIAL_TYPE_NORMAL;
state->icount.frame = state->icount.parity = 0;
state->icount.overrun = state->icount.brk = 0;
state->irq = irq_cannonicalize(state->irq);
- if (check_region(state->port,8))
- continue;
- if (state->flags & ASYNC_BOOT_AUTOCONF)
- autoconfig(state);
+#ifdef CONFIG_PPC
+ /* PowerMacs don't have legacy serial ports on IOs and would machine check */
+ if (_machine != _MACH_Pmac) {
+#endif
+ if (check_region(state->port,8))
+ continue;
+ if (state->flags & ASYNC_BOOT_AUTOCONF)
+ autoconfig(state);
+#ifdef CONFIG_PPC
+ }
+#endif
}
+#ifdef CONFIG_PPC
+ if (_machine == _MACH_Pmac)
+ return 0;
+#endif
/*
* Detect the IRQ only once every port is initialised,
* because some 16450 do not reset to 0 the MCR register.
state->irq = detect_uart_irq(state);
printk(KERN_INFO "tty%02d at 0x%04x (irq = %d) is a %s\n",
- state->line, state->port, state->irq,
+ state->line + SERIAL_DEV_OFFSET, state->port, state->irq,
uart_config[state->type].name);
- return state->line;
+ return state->line + SERIAL_DEV_OFFSET;
}
void unregister_serial(int line)
{
unsigned long flags;
- struct serial_state *state = &rs_table[line];
+ struct serial_state *state = &rs_table[line + SERIAL_DEV_OFFSET];
save_flags(flags);
cli();
if (state->info && state->info->tty)
tty_hangup(state->info->tty);
state->type = PORT_UNKNOWN;
- printk(KERN_INFO "tty%02d unloaded\n", state->line);
+ printk(KERN_INFO "tty%02d unloaded\n", state->line + SERIAL_DEV_OFFSET);
restore_flags(flags);
}
*
* Added support for a Unix98-style ptmx device.
* -- C. Scott Ananian <cananian@alumni.princeton.edu>, 14-Jan-1998
- *
- * Don't call close after a failed open.
- * -- Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 21-Jan-2001
*/
#include <linux/config.h>
* WSH 09/09/97: rewritten to avoid some nasty race conditions that could
* lead to double frees or releasing memory still in use.
*/
-static void release_dev(struct file * filp, int do_close)
+static void release_dev(struct file * filp)
{
struct tty_struct *tty, *o_tty;
int pty_master, tty_closing, o_tty_closing, do_sleep;
}
#endif
- if (do_close && tty->driver.close)
+ if (tty->driver.close)
tty->driver.close(tty, filp);
/*
static int tty_open(struct inode * inode, struct file * filp)
{
struct tty_struct *tty;
- int noctty, retval, open_ok;
+ int noctty, retval;
kdev_t device;
unsigned short saved_flags;
char buf[64];
#ifdef TTY_DEBUG_HANGUP
printk("opening %s...", tty_name(tty, buf));
#endif
- open_ok = 0;
- if (tty->driver.open) {
+ if (tty->driver.open)
retval = tty->driver.open(tty, filp);
- if (!retval)
- open_ok = 1;
- } else
+ else
retval = -ENODEV;
filp->f_flags = saved_flags;
tty_name(tty, buf));
#endif
- release_dev(filp, open_ok);
+ release_dev(filp);
if (retval != -ERESTARTSYS)
return retval;
if (signal_pending(current))
static int tty_release(struct inode * inode, struct file * filp)
{
- release_dev(filp, 1);
+ release_dev(filp);
return 0;
}
if [ "$CONFIG_ISDN_AUDIO" != "n" ]; then
bool ' Support AT-Fax Class 1 and 2 commands' CONFIG_ISDN_TTY_FAX
fi
-if [ "$CONFIG_X25" != "n" ]; then
+
+# CONFIG_X25 is defined only when CONFIG_EXPERIMENTAL=y
+if [ "$CONFIG_EXPERIMENTAL" = "y" -a "$CONFIG_X25" != "n" ]; then
bool ' X.25 PLP on top of ISDN' CONFIG_ISDN_X25
fi
tristate 'Packet Engines GNIC-II (Hamachi) support' CONFIG_HAMACHI
tristate 'Packet Engines Yellowfin Gigabit-NIC support' CONFIG_YELLOWFIN
fi
- dep_tristate 'SysKonnect SK-98xx support' CONFIG_SK98LIN $CONFIG_PCI
+ if [ "$CONFIG_PCI" = "y" ]; then
+ tristate 'SysKonnect SK-98xx support' CONFIG_SK98LIN
+ fi
endmenu
bool 'FDDI driver support' CONFIG_FDDI
#
tristate 'MultiGate (COMX) synchronous serial boards support' CONFIG_COMX
- if [ "$CONFIG_COMX" != "n" ]; then
+if [ "$CONFIG_COMX" != "n" ]; then
dep_tristate ' Support for COMX/CMX/HiCOMX boards' CONFIG_COMX_HW_COMX $CONFIG_COMX
dep_tristate ' Support for LoCOMX board' CONFIG_COMX_HW_LOCOMX $CONFIG_COMX
dep_tristate ' Support for MixCOM board' CONFIG_COMX_HW_MIXCOM $CONFIG_COMX
dep_tristate ' SDL RISCom/N2 support' CONFIG_N2 $CONFIG_HDLC
dep_tristate ' Moxa C101 support' CONFIG_C101 $CONFIG_HDLC
- if [ "$CONFIG_PCI" != "n" ]; then
+ if [ "$CONFIG_PCI" = "y" ]; then
dep_tristate ' SBE wanXL support' CONFIG_WANXL $CONFIG_HDLC
dep_tristate ' Cyclades-PC300 support' CONFIG_PC300 $CONFIG_HDLC
if [ "$CONFIG_PC300" != "n" ]; then
# Wan router core.
#
-if [ "$CONFIG_WAN_ROUTER" != "n" ]; then
+# CONFIG_WAN_ROUTER is defined only when CONFIG_EXPERIMENTAL=y
+if [ "$CONFIG_EXPERIMENTAL" = y -a "$CONFIG_WAN_ROUTER" != "n" ]; then
bool 'WAN drivers' CONFIG_WAN_DRIVERS
if [ "$CONFIG_WAN_DRIVERS" = "y" ]; then
dep_tristate 'Sangoma WANPIPE(tm) multi-port cards: (select M not Y !)' CONFIG_VENDOR_SANGOMA $CONFIG_WAN_DRIVERS
if [ "$CONFIG_INET" != "n" ]; then
- if [ "$CONFIG_VENDOR_SANGOMA" != "n" ]; then
+ if [ "$CONFIG_VENDOR_SANGOMA" != "n" ]; then
int ' Maximum number of cards' CONFIG_WANPIPE_CARDS 1
#bool ' WANPIPE X.25 support' CONFIG_WANPIPE_X25
bool ' WANPIPE Frame Relay support' CONFIG_WANPIPE_FR
#
# Xpeed drivers
#
-dep_tristate 'Xpeed X200/X300 DSL NIC support' CONFIG_XPEED $CONFIG_PCI
+if [ "$CONFIG_PCI" = "y" ]; then
+ tristate 'Xpeed X200/X300 DSL NIC support' CONFIG_XPEED
+fi
endmenu
#
# X.25 network drivers
#
-if [ "$CONFIG_X25" != "n" ]; then
-if [ "$CONFIG_LAPB" = "y" -o "$CONFIG_LAPB" = "m" ]; then
+
+# CONFIG_X25 is defined only when CONFIG_EXPERIMENTAL=y
+if [ "$CONFIG_EXPERIMENTAL" = "y" -a "$CONFIG_X25" != "n" ]; then
+ if [ "$CONFIG_LAPB" = "y" -o "$CONFIG_LAPB" = "m" ]; then
dep_tristate 'LAPB over Ethernet driver' CONFIG_LAPBETHER $CONFIG_LAPB
dep_tristate 'X.25 async driver' CONFIG_X25_ASY $CONFIG_LAPB
-fi
+ fi
fi
tristate 'SBNI12-xx support' CONFIG_SBNI
* Changes:
* Arnaldo Carvalho de Melo <acme@conectiva.com.br> - 08/06/2000
* - check init_etherdev return in gmac_probe1
- * BenH <bh40@calva.net> - 03/09/2000
+ * BenH <benh@kernel.crashing.org> - 03/09/2000
* - Add support for new PHYs
* - Add some PowerBook sleep code
*
/* A few user-configurable values. */
-/* Maximum events (Rx packets, etc.) to handle at each interrupt. */
-static int max_interrupt_work = 25;
-
#define MAX_UNITS 8
/* Used to pass the full-duplex flag, etc. */
static int full_duplex[MAX_UNITS] = {0, };
MODULE_AUTHOR("Donald Becker <becker@cesdis.gsfc.nasa.gov>");
MODULE_DESCRIPTION("Digital 21*4* Tulip ethernet driver");
MODULE_PARM(debug, "i");
-MODULE_PARM(max_interrupt_work, "i");
MODULE_PARM(reverse_probe, "i");
MODULE_PARM(rx_copybreak, "i");
MODULE_PARM(csr0, "i");
#define RUN_AT(x) (jiffies + (x))
-#if (LINUX_VERSION_CODE >= 0x20100)
-static char kernel_version[] = UTS_RELEASE;
-#endif
-
#if LINUX_VERSION_CODE < 0x20123
#define hard_smp_processor_id() smp_processor_id()
#define test_and_set_bit(val, addr) set_bit(val, addr)
{0,0,0,16, 3,19,16,24, 27,4,7,5, 0,20,23,20 };
static u8 t21040_csr13[] = {2,0x0C,8,4, 4,0,0,0, 0,0,0,0, 4,0,0,0};
/* 21041 transceiver register settings: 10-T, 10-2, AUI, 10-T, 10T-FD*/
-static u16 t21041_csr13[] = { 0xEF01, 0xEF09, 0xEF09, 0xEF01, 0xEF09, };
+static u16 t21041_csr13[] = { 0xEF05, 0xEF0D, 0xEF0D, 0xEF05, 0xEF05, };
static u16 t21041_csr14[] = { 0xFFFF, 0xF7FD, 0xF7FD, 0x7F3F, 0x7F3D, };
static u16 t21041_csr15[] = { 0x0008, 0x0006, 0x000E, 0x0008, 0x0008, };
return -ENODEV;
for (;pci_index < 0xff; pci_index++) {
- u16 vendor, device, pci_command, new_command;
+ u16 vendor, device, pci_command, new_command, subvendor;
int chip_idx;
int irq;
long ioaddr;
PCI_VENDOR_ID, &vendor);
pcibios_read_config_word(pci_bus, pci_device_fn,
PCI_DEVICE_ID, &device);
+ pcibios_read_config_word(pci_bus, pci_device_fn,
+ PCI_SUBSYSTEM_VENDOR_ID, &subvendor);
+
+ if( subvendor == 0x1376 ){
+ printk("tulip: skipping LMC card.\n");
+ continue;
+ }
for (chip_idx = 0; pci_tbl[chip_idx].vendor_id; chip_idx++)
if (vendor == pci_tbl[chip_idx].vendor_id
put_unaligned(le16_to_cpu(value), ((u16*)dev->dev_addr) + i);
sum += value & 0xffff;
}
- } else if (chip_idx == COMET){
- /* No need to read the EEPROM. */
- put_unaligned(inl(ioaddr + 0xA4), (u32 *)dev->dev_addr);
- put_unaligned(inl(ioaddr + 0xA8), (u16 *)(dev->dev_addr + 4));
- for (i = 0; i < 6; i ++)
- sum += dev->dev_addr[i];
- } else if (chip_idx == COMET5){
+ } else if ((chip_idx == COMET) || (chip_idx == COMET5)) {
/* No need to read the EEPROM. */
put_unaligned(inl(ioaddr + 0xA4), (u32 *)dev->dev_addr);
put_unaligned(inl(ioaddr + 0xA8), (u16 *)(dev->dev_addr + 4));
outl(0x00001000, ioaddr + CSR12);
break;
case COMET:
- /* No initialization necessary. */
- break;
case COMET5:
/* No initialization necessary. */
break;
return 0xffff;
}
- if (tp->chip_id == COMET) {
- if (phy_id == 1) {
- if (location < 7)
- return inl(ioaddr + 0xB4 + (location<<2));
- else if (location == 17)
- return inl(ioaddr + 0xD0);
- else if (location >= 29 && location <= 31)
- return inl(ioaddr + 0xD4 + ((location-29)<<2));
- }
- return 0xffff;
- }
- if (tp->chip_id == COMET5) {
+ if ((tp->chip_id == COMET) || (tp->chip_id == COMET5)) {
if (phy_id == 1) {
if (location < 7)
return inl(ioaddr + 0xB4 + (location<<2));
return;
}
- if (tp->chip_id == COMET) {
- if (phy_id != 1)
- return;
- if (location < 7)
- outl(value, ioaddr + 0xB4 + (location<<2));
- else if (location == 17)
- outl(value, ioaddr + 0xD0);
- else if (location >= 29 && location <= 31)
- outl(value, ioaddr + 0xD4 + ((location-29)<<2));
- return;
- }
-
- if (tp->chip_id == COMET5) {
+ if ((tp->chip_id == COMET) || (tp->chip_id == COMET5)) {
if (phy_id != 1)
return;
if (location < 7)
outl(addr_low, ioaddr + CSR14);
outl(1, ioaddr + CSR13);
outl(addr_high, ioaddr + CSR14);
- } else if (tp->chip_id == COMET) {
- outl(addr_low, ioaddr + 0xA4);
- outl(addr_high, ioaddr + 0xA8);
- outl(0, ioaddr + 0xAC);
- outl(0, ioaddr + 0xB0);
- } else if (tp->chip_id == COMET5) {
+ } else if ((tp->chip_id == COMET) || (tp->chip_id == COMET5)) {
outl(addr_low, ioaddr + 0xA4);
outl(addr_high, ioaddr + 0xA8);
outl(0, ioaddr + 0xAC);
outl(0x0000, ioaddr + CSR13);
outl(0x0000, ioaddr + CSR14);
outl(0x0008, ioaddr + CSR15);
- } else if (tp->chip_id == COMET) {
- dev->if_port = 0;
- tp->csr6 = 0x00040000;
- } else if (tp->chip_id == COMET5) {
+ } else if ((tp->chip_id == COMET) || (tp->chip_id == COMET5)) {
dev->if_port = 0;
tp->csr6 = 0x00040000;
} else if (tp->chip_id == AX88140) {
data[0] = phy;
else if (tp->flags & HAS_NWAY143)
data[0] = 32;
- else if (tp->chip_id == COMET)
- data[0] = 1;
- else if (tp->chip_id == COMET5)
+ else if ((tp->chip_id == COMET) || (tp->chip_id == COMET5))
data[0] = 1;
else
return -ENODEV;
outl(mc_filter[0], ioaddr + CSR14);
outl(3, ioaddr + CSR13);
outl(mc_filter[1], ioaddr + CSR14);
- } else if (tp->chip_id == COMET) { /* Has a simple hash filter. */
- outl(mc_filter[0], ioaddr + 0xAC);
- outl(mc_filter[1], ioaddr + 0xB0);
- } else if (tp->chip_id == COMET5) { /* Has a simple hash filter. */
+
+ /* Has a simple hash filter. */
+ } else if ((tp->chip_id == COMET) || (tp->chip_id == COMET5)) {
outl(mc_filter[0], ioaddr + 0xAC);
outl(mc_filter[1], ioaddr + 0xB0);
}
dep_tristate 'Adaptec AHA1740 support' CONFIG_SCSI_AHA1740 $CONFIG_SCSI
dep_tristate 'Adaptec AIC7xxx support' CONFIG_SCSI_AIC7XXX $CONFIG_SCSI
if [ "$CONFIG_SCSI_AIC7XXX" != "n" ]; then
- bool ' Enable Tagged Command Queueing (TCQ) by default' CONFIG_AIC7XXX_TCQ_ON_BY_DEFAULT y
+ bool ' Enable Tagged Command Queueing (TCQ) by default' CONFIG_AIC7XXX_TCQ_ON_BY_DEFAULT
int ' Maximum number of TCQ commands per device' CONFIG_AIC7XXX_CMDS_PER_DEVICE 24
- bool ' Collect statistics to report in /proc' CONFIG_AIC7XXX_PROC_STATS y
+ bool ' Collect statistics to report in /proc' CONFIG_AIC7XXX_PROC_STATS
fi
dep_tristate 'IBM ServeRAID support' CONFIG_SCSI_IPS $CONFIG_SCSI
dep_tristate 'AdvanSys SCSI support' CONFIG_SCSI_ADVANSYS $CONFIG_SCSI
dep_tristate 'Initio 9100U(W) support' CONFIG_SCSI_INITIO $CONFIG_SCSI
dep_tristate 'Initio INI-A100U2W support' CONFIG_SCSI_INIA100 $CONFIG_SCSI
fi
-if [ "$CONFIG_PARPORT" != "n" ]; then
+if [ "$CONFIG_PARPORT" = "y" -o "$CONFIG_PARPORT" = "m" ]; then
dep_tristate 'IOMEGA parallel port (ppa - older drives)' CONFIG_SCSI_PPA $CONFIG_SCSI $CONFIG_PARPORT
dep_tristate 'IOMEGA parallel port (imm - newer drives)' CONFIG_SCSI_IMM $CONFIG_SCSI $CONFIG_PARPORT
if [ "$CONFIG_SCSI_PPA" != "n" -o "$CONFIG_SCSI_IMM" != "n" ]; then
* v0.4 - fixes in unidirectional mode
* v0.5 - add DEVICE_ID string support
* v0.6 - never time out
+ * v0.? - fixed bulk-IN read and poll (David Paschal, paschal@rcsis.com)
*/
/*
#define IOCNR_GET_DEVICE_ID 1
#define LPIOC_GET_DEVICE_ID(len) _IOC(_IOC_READ, 'P', IOCNR_GET_DEVICE_ID, len) /* get device_id string */
+#define LPGETSTATUS 0x060b /* same as in drivers/char/lp.c */
/*
* A DEVICE_ID string may include the printer's serial number.
int readcount; /* Counter for reads */
int ifnum; /* Interface number */
int minor; /* minor number of device */
+ unsigned int quirks; /* quirks flags */
unsigned char used; /* True if open */
unsigned char bidir; /* interface is bidirectional */
unsigned char *device_id_string; /* IEEE 1284 DEVICE ID string (ptr) */
static struct usblp *usblp_table[USBLP_MINORS];
+/* Quirks: various printer quirks are handled by this table & its flags. */
+
+struct quirk_printer_struct {
+ __u16 vendorId;
+ __u16 productId;
+ unsigned int quirks;
+};
+
+#define USBLP_QUIRK_BIDIR 0x1 /* reports bidir but requires unidirectional mode (no INs/reads) */
+#define USBLP_QUIRK_USB_INIT 0x2 /* needs vendor USB init string */
+
+static struct quirk_printer_struct quirk_printers[] = {
+ { 0x03f0, 0x0004, USBLP_QUIRK_BIDIR }, /* HP DeskJet 895C */
+ { 0x03f0, 0x0104, USBLP_QUIRK_BIDIR }, /* HP DeskJet 880C */
+ { 0x03f0, 0x0204, USBLP_QUIRK_BIDIR }, /* HP DeskJet 815C */
+ { 0x03f0, 0x0304, USBLP_QUIRK_BIDIR }, /* HP DeskJet 810C/812C */
+ { 0x03f0, 0x0404, USBLP_QUIRK_BIDIR }, /* HP DeskJet 830C */
+ { 0, 0 }
+};
+
/*
* Functions for usblp control messages.
*/
if (usblp->used)
goto out;
+ /*
+ * TODO: need to implement LP_ABORTOPEN + O_NONBLOCK as in drivers/char/lp.c ???
+ * This is #if 0-ed because we *don't* want to fail an open
+ * just because the printer is off-line.
+ */
+#if 0
if ((retval = usblp_check_status(usblp, 0))) {
retval = retval > 1 ? -EIO : -ENOSPC;
goto out;
}
+#else
+ retval = 0;
+#endif
usblp->used = 1;
file->private_data = usblp;
if (usblp->bidir) {
usblp->readcount = 0;
+ usblp->readurb.dev = usblp->dev;
usb_submit_urb(&usblp->readurb);
}
out:
{
struct usblp *usblp = file->private_data;
poll_wait(file, &usblp->wait, wait);
- return ((usblp->bidir || usblp->readurb.status == -EINPROGRESS) ? 0 : POLLIN | POLLRDNORM)
- | (usblp->writeurb.status == -EINPROGRESS ? 0 : POLLOUT | POLLWRNORM);
+ return ((!usblp->bidir || usblp->readurb.status == -EINPROGRESS) ? 0 : POLLIN | POLLRDNORM)
+ | (usblp->writeurb.status == -EINPROGRESS ? 0 : POLLOUT | POLLWRNORM);
}
static int usblp_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
{
struct usblp *usblp = file->private_data;
- int length;
+ int length, err;
+ unsigned char status;
- if ((_IOC_TYPE(cmd) != 'P') || (_IOC_DIR(cmd) != _IOC_READ))
- return -EINVAL;
+ if (_IOC_TYPE(cmd) == 'P') /* new-style ioctl number */
+
+ switch (_IOC_NR(cmd)) {
- switch (_IOC_NR(cmd)) {
+ case IOCNR_GET_DEVICE_ID: /* get the DEVICE_ID string */
+ if (_IOC_DIR(cmd) != _IOC_READ)
+ return -EINVAL;
- case IOCNR_GET_DEVICE_ID: /* get the DEVICE_ID string */
+ err = usblp_get_id(usblp, 0, usblp->device_id_string, DEVICE_ID_SIZE - 1);
+ if (err < 0) {
+ dbg ("usblp%d: error = %d reading IEEE-1284 Device ID string",
+ usblp->minor, err);
+ usblp->device_id_string[0] = usblp->device_id_string[1] = '\0';
+ return -EIO;
+ }
- length = (usblp->device_id_string[0] << 8) + usblp->device_id_string[1]; /* big-endian */
+ length = (usblp->device_id_string[0] << 8) + usblp->device_id_string[1]; /* big-endian */
+ if (length < DEVICE_ID_SIZE)
+ usblp->device_id_string[length] = '\0';
+ else
+ usblp->device_id_string[DEVICE_ID_SIZE - 1] = '\0';
- dbg ("usblp_ioctl GET_DEVICE_ID actlen: %d, size: %d, string: '%s'",
- length, _IOC_SIZE(cmd), &usblp->device_id_string[2]);
+ dbg ("usblp%d Device ID string [%d/max %d]='%s'",
+ usblp->minor, length, _IOC_SIZE(cmd), &usblp->device_id_string[2]);
- if (length > _IOC_SIZE(cmd)) length = _IOC_SIZE(cmd); /* truncate */
+ if (length > _IOC_SIZE(cmd)) length = _IOC_SIZE(cmd); /* truncate */
- if (copy_to_user((unsigned char *) arg, usblp->device_id_string, (unsigned long) length))
- return -EFAULT;
+ if (copy_to_user((unsigned char *) arg, usblp->device_id_string, (unsigned long) length))
+ return -EFAULT;
- break;
+ break;
- default:
- return -EINVAL;
- }
+ default:
+ return -EINVAL;
+ }
+ else /* old-style ioctl value */
+ switch (cmd) {
+
+ case LPGETSTATUS:
+ if (usblp_read_status(usblp, &status)) {
+ err("usblp%d: failed reading printer status", usblp->minor);
+ return -EIO;
+ }
+ if (copy_to_user ((unsigned char *)arg, &status, 1))
+ return -EFAULT;
+ break;
+
+ default:
+ return -EINVAL;
+ }
return 0;
}
return -ENODEV;
if (usblp->writeurb.status) {
- err = usblp_check_status(usblp, err);
- continue;
+ if (usblp->quirks & USBLP_QUIRK_BIDIR) {
+ if (usblp->writeurb.status != -EINPROGRESS)
+ err("usblp%d: error %d writing to printer",
+ usblp->minor, usblp->writeurb.status);
+ err = usblp->writeurb.status;
+ continue;
+ }
+ else {
+ err = usblp_check_status(usblp, err);
+ continue;
+ }
}
writecount += usblp->writeurb.transfer_buffer_length;
if (copy_from_user(usblp->writeurb.transfer_buffer, buffer + writecount,
usblp->writeurb.transfer_buffer_length)) return -EFAULT;
+ usblp->writeurb.dev = usblp->dev;
usb_submit_urb(&usblp->writeurb);
}
if (usblp->readurb.status) {
err("usblp%d: error %d reading from printer",
usblp->minor, usblp->readurb.status);
+ usblp->readurb.dev = usblp->dev;
+ usblp->readcount = 0;
usb_submit_urb(&usblp->readurb);
return -EIO;
}
if (copy_to_user(buffer, usblp->readurb.transfer_buffer + usblp->readcount, count))
return -EFAULT;
- if ((usblp->readcount += count) == usblp->readurb.actual_length)
+ if ((usblp->readcount += count) == usblp->readurb.actual_length) {
+ usblp->readcount = 0;
+ usblp->readurb.dev = usblp->dev;
usb_submit_urb(&usblp->readurb);
+ }
return count;
}
+/*
+ * Checks for printers that have quirks, such as requiring unidirectional
+ * communication but reporting bidirectional; currently some HP printers
+ * have this flaw (HP 810, 880, 895, etc.), or needing an init string
+ * sent at each open (like some Epsons).
+ * Returns 1 if found, 0 if not found.
+ *
+ * HP recommended that we use the bidirectional interface but
+ * don't attempt any bulk IN transfers from the IN endpoint.
+ * Here's some more detail on the problem:
+ * The problem is not that it isn't bidirectional though. The problem
+ * is that if you request a device ID, or status information, while
+ * the buffers are full, the return data will end up in the print data
+ * buffer. For example if you make sure you never request the device ID
+ * while you are sending print data, and you don't try to query the
+ * printer status every couple of milliseconds, you will probably be OK.
+ */
+static unsigned int usblp_quirks (__u16 vendor, __u16 product)
+{
+ int i;
+
+ for (i = 0; quirk_printers[i].vendorId; i++) {
+ if (vendor == quirk_printers[i].vendorId &&
+ product == quirk_printers[i].productId)
+ return quirk_printers[i].quirks;
+ }
+ return 0;
+}
+
static void *usblp_probe(struct usb_device *dev, unsigned int ifnum)
{
struct usb_interface_descriptor *interface;
struct usb_endpoint_descriptor *epread, *epwrite;
struct usblp *usblp;
- int minor, i, alts = -1, bidir = 0;
+ int minor, i, bidir = 0, quirks;
+ int alts = dev->actconfig->interface[ifnum].act_altsetting;
int length, err;
char *buf;
+ /* If a bidirectional interface exists, use it. */
for (i = 0; i < dev->actconfig->interface[ifnum].num_altsetting; i++) {
interface = &dev->actconfig->interface[ifnum].altsetting[i];
(interface->bInterfaceProtocol > 1 && interface->bNumEndpoints < 2))
continue;
- if (alts == -1)
- alts = i;
-
- if (!bidir && interface->bInterfaceProtocol > 1) {
+ if (interface->bInterfaceProtocol > 1) {
bidir = 1;
alts = i;
+ break;
}
}
- if (alts == -1)
- return NULL;
-
interface = &dev->actconfig->interface[ifnum].altsetting[alts];
if (usb_set_interface(dev, ifnum, alts))
err("can't set desired altsetting %d on interface %d", alts, ifnum);
}
memset(usblp, 0, sizeof(struct usblp));
+ /* lookup quirks for this printer */
+ quirks = usblp_quirks(dev->descriptor.idVendor, dev->descriptor.idProduct);
+
+ if (bidir && (quirks & USBLP_QUIRK_BIDIR)) {
+ bidir = 0;
+ epread = NULL;
+ info ("Disabling reads from problem bidirectional printer on usblp%d",
+ minor);
+ }
+
usblp->dev = dev;
usblp->ifnum = ifnum;
usblp->minor = minor;
usblp->bidir = bidir;
+ usblp->quirks = quirks;
init_waitqueue_head(&usblp->wait);
}
#ifdef DEBUG
- usblp_check_status(usblp);
+ usblp_check_status(usblp, 0);
#endif
info("usblp%d: USB %sdirectional printer dev %d if %d alt %d",
probe: usblp_probe,
disconnect: usblp_disconnect,
fops: &usblp_fops,
- minor: USBLP_MINOR_BASE
+ minor: USBLP_MINOR_BASE,
};
static int __init usblp_init(void)
if [ "$CONFIG_ATARI" = "y" ]; then
bool 'Atari native chipset support' CONFIG_FB_ATARI
fi
- if [ "$CONFIG_ATARI" = "y" -o "$CONFIG_PCI" != "n" ]; then
+ if [ "$CONFIG_ATARI" = "y" -o "$CONFIG_PCI" = "y" ]; then
tristate 'ATI Mach64 display support' CONFIG_FB_ATY
fi
if [ "$CONFIG_PPC" = "y" ]; then
define_bool CONFIG_BUS_I2C y
fi
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
- if [ "$CONFIG_PCI" != "n" -a "$ARCH" != "sparc" -a "$ARCH" != "sparc64" ]; then
+ if [ "$CONFIG_PCI" = "y" -a "$ARCH" != "sparc" -a "$ARCH" != "sparc64" ]; then
tristate 'Matrox acceleration' CONFIG_FB_MATROX
if [ "$CONFIG_FB_MATROX" != "n" ]; then
bool ' Millennium I/II support' CONFIG_FB_MATROX_MILLENIUM
fi
fi
if [ "$ARCH" = "sparc" ]; then
- if [ "$CONFIG_PCI" != "n" ]; then
+ if [ "$CONFIG_PCI" = "y" ]; then
bool 'PCI framebuffers' CONFIG_FB_PCI
if [ "$CONFIG_FB_PCI" != "n" ]; then
bool ' IGA 168x display support' CONFIG_FB_IGA
int chip_gen;
struct aty128fb_par default_par, current_par;
struct display disp;
- struct display_switch dispsw; /* for cursor and font */
struct { u8 red, green, blue, pad; } palette[256];
#ifdef CONFIG_PMAC_PBOOK
unsigned char *save_framebuffer;
switch (bpp) {
#ifdef FBCON_HAS_CFB8
case 8:
- info->dispsw = accel ? fbcon_aty128_8 : fbcon_cfb8;
- disp->dispsw = &info->dispsw;
+ disp->dispsw = accel ? &fbcon_aty128_8 : &fbcon_cfb8;
break;
#endif
#ifdef FBCON_HAS_CFB16
case 15:
case 16:
- info->dispsw = accel ? fbcon_aty128_16 : fbcon_cfb16;
- disp->dispsw = &info->dispsw;
+ disp->dispsw = accel ? &fbcon_aty128_16 : &fbcon_cfb16;
disp->dispsw_data = info->fbcon_cmap.cfb16;
break;
#endif
#ifdef FBCON_HAS_CFB24
case 24:
- info->dispsw = accel ? fbcon_aty128_24 : fbcon_cfb24;
- disp->dispsw = &info->dispsw;
+ disp->dispsw = accel ? &fbcon_aty128_24 : &fbcon_cfb24;
disp->dispsw_data = info->fbcon_cmap.cfb24;
break;
#endif
#ifdef FBCON_HAS_CFB32
case 32:
- info->dispsw = accel ? fbcon_aty128_32 : fbcon_cfb32;
- disp->dispsw = &info->dispsw;
+ disp->dispsw = accel ? &fbcon_aty128_32 : &fbcon_cfb32;
disp->dispsw_data = info->fbcon_cmap.cfb32;
break;
#endif
memset(&var, 0, sizeof(var));
#ifdef CONFIG_FB_OF
- if (default_vmode == VMODE_CHOOSE) {
-#endif /* CONFIG_FB_OF */
+ /* New iBook */
+ if (default_vmode == VMODE_CHOOSE &&
+ machine_is_compatible("PowerBook2,2"))
+ default_vmode = VMODE_800_600_60;
+
+ if (default_vmode == VMODE_CHOOSE)
+ var = default_var;
+ else if (mac_vmode_to_var(default_vmode, default_cmode, &var))
+ var = default_var;
+#else /* CONFIG_FB_OF */
var = default_var;
-
-#ifdef CONFIG_FB_OF
- /* New iBook */
- if (machine_is_compatible("PowerBook2,2"))
- default_vmode = VMODE_800_600_60;
- } else {
- if (mac_vmode_to_var(default_vmode, default_cmode, &var))
- var = default_var;
- }
#endif /* CONFIG_FB_OF */
#endif /* MODULE */
xid == rp->c_xid && proc == rp->c_proc &&
proto == rp->c_prot && vers == rp->c_vers &&
time_before(jiffies, rp->c_timestamp + 120*HZ) &&
- memcmp((char*)&rqstp->rq_addr, (char*)&rp->c_addr, rqstp->rq_addrlen)==0) {
+ memcmp((char*)&rqstp->rq_addr, (char*)&rp->c_addr, sizeof(rp->c_addr))==0) {
nfsdstats.rchits++;
goto found_entry;
}
extern ide_ioreg_t chrp_idedma_regbase; /* one for both channels */
extern unsigned int chrp_ide_irq;
extern void chrp_ide_probe(void);
+extern void ide_pmac_init(void);
struct ide_machdep_calls {
void (*insw)(ide_ioreg_t port, void *buf, int ns);
#define MAP_ANONYMOUS 0x20 /* don't use a file */
#define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */
#define MAP_NORESERVE 0x40 /* don't reserve swap pages */
+#define MAP_LOCKED 0x80
#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
#ifndef __ASSEMBLY__
#ifdef __KERNEL__
+#ifdef CONFIG_XMON
+#define BUG() do { \
+ printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
+ xmon(0); \
+} while (0)
+#else
+#define BUG() do { \
+ printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
+ __asm__ __volatile__(".long 0x0"); \
+} while (0)
+#endif
+#define PAGE_BUG(page) do { BUG(); } while (0)
+
#define STRICT_MM_TYPECHECKS
#ifdef STRICT_MM_TYPECHECKS
pte_t * pte;
int ret;
+ current->state = TASK_RUNNING;
pgd = pgd_offset(vma->vm_mm, address);
pmd = pmd_alloc(pgd, address);
if (!pmd)
if (get_user(len, optlen))
return -EFAULT;
+ if (len < 0)
+ return -EINVAL;
+
switch (optname) {
case AX25_WINDOW:
val = sk->protinfo.ax25->window;
struct timeval tm;
} v;
- unsigned int lv=sizeof(int),len;
+ int lv=sizeof(int),len;
if(get_user(len,optlen))
return -EFAULT;
+ if(len < 0)
+ return -EINVAL;
+
switch(optname)
{
case SO_DEBUG:
if(get_user(len,optlen))
return -EFAULT;
+ if(len < 0)
+ return -EINVAL;
+
switch(optname)
{
case IP_OPTIONS:
return -EFAULT;
olr=min(olr,sizeof(int));
+
+ if(olr < 0)
+ return -EINVAL;
+
if(put_user(olr,optlen))
return -EFAULT;
if(optname==MRT_VERSION)
if (get_user(len,optlen))
return -EFAULT;
+ if (len < 0)
+ return -EINVAL;
if (len > sizeof(struct icmp_filter))
len = sizeof(struct icmp_filter);
if (put_user(len, optlen))
return -EFAULT;
len = min(len, sizeof(int));
+
+ if(len < 0)
+ return -EINVAL;
switch(optname) {
case TCP_MAXSEG:
return -ENOPROTOOPT;
if (get_user(len, optlen))
return -EFAULT;
+ if(len < 0)
+ return -EINVAL;
switch (optname) {
case IPV6_PKTOPTIONS:
{
case ICMPV6_FILTER:
if (get_user(len, optlen))
return -EFAULT;
+ if (len < 0)
+ return -EINVAL;
if (len > sizeof(struct icmp6_filter))
len = sizeof(struct icmp6_filter);
if (put_user(len, optlen))
return (-EFAULT);
len = min(len, sizeof(int));
+
+ if(len < 0)
+ return -EINVAL;
+
if(put_user(len, optlen))
return (-EFAULT);
if (get_user(len, optlen))
return -EFAULT;
+ if (len < 0)
+ return -EINVAL;
+
switch (optname) {
case IRLMP_ENUMDEVICES:
/* Tell IrLMP we want to be notified */
if (get_user(len, optlen))
return -EFAULT;
+ if (len < 0)
+ return -EINVAL;
+
switch (optname) {
case NETROM_T1:
val = sk->protinfo.nr->t1 / HZ;
if (get_user(len, optlen))
return -EFAULT;
+
+ if (len < 0)
+ return -EINVAL;
switch (optname) {
case ROSE_DEFER:
{
int err;
struct socket *sock;
-
+
+ if(optlen < 0)
+ return -EINVAL;
+
lock_kernel();
if ((sock = sockfd_lookup(fd, &err))!=NULL)
{
if (get_user(len, optlen))
return -EFAULT;
+ if (len < 0)
+ return -EINVAL;
+
switch (optname) {
case X25_QBITINCL:
val = sk->protinfo.x25->qbitincl;