Commit c6545c79 authored by Linus Torvalds's avatar Linus Torvalds

Import 1.3.40

parent d0562c8d
VERSION = 1
PATCHLEVEL = 3
SUBLEVEL = 39
SUBLEVEL = 40
ARCH = i386
......@@ -223,12 +223,14 @@ drivers: dummy
net: dummy
$(MAKE) linuxsubdirs SUBDIRS=net
MODFLAGS = -DMODULE
ifdef CONFIG_MODVERSIONS
MODV = -DMODVERSIONS
MODFLAGS += -DMODVERSIONS -include $(HPATH)/linux/modversions.h
endif
modules: include/linux/version.h
@set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i CFLAGS="$(CFLAGS) -DMODULE $(MODV)" modules; done
@set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i CFLAGS="$(CFLAGS) $(MODFLAGS)" modules; done
modules_install:
@( \
......@@ -280,18 +282,19 @@ backup: mrproper
cd .. && tar cf - linux | gzip -9 > backup.gz
sync
#depend dep: .hdepend
depend dep: archdep .hdepend include/linux/version.h
dep-files: archdep .hdepend include/linux/version.h
$(AWK) -f scripts/depend.awk init/*.c > .tmpdepend
set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i fastdep; done
mv .tmpdepend .depend
MODVERFILE :=
ifdef CONFIG_MODVERSIONS
@echo updating $(TOPDIR)/include/linux/modversions.h
@(cd $(TOPDIR)/include/linux/modules; for f in *.ver;\
do echo "#include <linux/modules/$${f}>"; done) \
> $(TOPDIR)/include/linux/modversions.h
MODVERFILE := $(TOPDIR)/include/linux/modversions.h
endif
depend dep: dep-files $(MODVERFILE)
ifdef CONFIGURATION
..$(CONFIGURATION):
@echo
......
......@@ -138,17 +138,26 @@ ifdef CONFIG_MODVERSIONS
SYMTAB_OBJS = $(LX_OBJS) $(OX_OBJS) $(MX_OBJS)
ifneq "$(strip $(SYMTAB_OBJS))" ""
%.ver: %.c
MODINCL = $(TOPDIR)/include/linux/modules
$(MODINCL)/%.ver: %.c
@if [ ! -x /sbin/genksyms ]; then echo "Please read: README.modules"; fi
$(CC) $(CFLAGS) -E -D__GENKSYMS__ $< | /sbin/genksyms -w $(TOPDIR)/include/linux/modules
@ln -sf $(TOPDIR)/include/linux/modules/$@ .
$(CC) $(CFLAGS) -E -D__GENKSYMS__ $< | /sbin/genksyms -w $(MODINCL)
$(SYMTAB_OBJS:.o=.ver): $(TOPDIR)/include/linux/autoconf.h
$(TOPDIR)/include/linux/modversions.h: $(SYMTAB_OBJS:.o=.ver)
$(TOPDIR)/include/linux/modversions.h: $(join $(MODINCL)/,$(SYMTAB_OBJS:.o=.ver))
@echo updating $(TOPDIR)/include/linux/modversions.h
@(cd $(TOPDIR)/include/linux/modules; for f in *.ver;\
do echo "#include <linux/modules/$${f}>"; done) \
@(echo "#ifdef MODVERSIONS";\
echo "#undef CONFIG_MODVERSIONS";\
echo "#define CONFIG_MODVERSIONS";\
echo "#ifndef _set_ver";\
echo "#define _set_ver(sym,vers) sym ## _R ## vers";\
echo "#endif";\
cd $(TOPDIR)/include/linux/modules; for f in *.ver;\
do echo "#include <linux/modules/$${f}>"; done; \
echo "#undef CONFIG_MODVERSIONS";\
echo "#endif") \
> $(TOPDIR)/include/linux/modversions.h
$(MX_OBJS): $(TOPDIR)/include/linux/modversions.h
......
......@@ -10,7 +10,6 @@
.text
#include <linux/tasks.h>
#include <linux/fd.h>
#include <linux/linkage.h>
#include <asm/segment.h>
......
This diff is collapsed.
......@@ -1909,7 +1909,7 @@ static void con_setsize(unsigned long rows, unsigned long cols)
*/
unsigned long con_init(unsigned long kmem_start)
{
char display_desc[5] = "????";
char display_desc[] = "????";
int currcons = 0;
int orig_x = ORIG_X;
int orig_y = ORIG_Y;
......
......@@ -36,6 +36,17 @@
#include "diacr.h"
#include "vt_kern.h"
/*
* On non-x86 hardware we do a full keyboard controller
* initialization, in case the bootup software hasn't done
* it. On a x86, the BIOS will already have initialized the
* keyboard.
*/
#ifndef __i386__
#define INIT_KBD
static int initialize_kbd(void);
#endif
#define SIZE(x) (sizeof(x)/sizeof((x)[0]))
#define KBD_REPORT_ERR
......@@ -1195,35 +1206,15 @@ int kbd_init(void)
bh_base[KEYBOARD_BH].routine = kbd_bh;
request_irq(KEYBOARD_IRQ, keyboard_interrupt, 0, "keyboard");
request_region(0x60,16,"kbd");
#ifdef __alpha__
#if 0
/* if there is an input byte left, eat it up: */
if (inb(0x64) & 0x01) {
inb(0x60);
}
/* enable keyboard interrupts, PC/AT mode */
kb_wait();
outb(0x60,0x64); /* write PS/2 Mode Register */
kb_wait();
outb(0x65,0x60); /* KCC | DMS | SYS | EKI */
kb_wait();
if (!send_data(0xf0) || !send_data(0x02))
printk("Scanmode 2 change failed\n");
#else /* 0 */
{
static int alpha_kbd_init(void); /* forward decl */
alpha_kbd_init();
}
#endif /* 0 */
#endif /* __alpha __ */
#ifdef INIT_KBD
initialize_kbd();
#endif
mark_bh(KEYBOARD_BH);
enable_bh(KEYBOARD_BH);
return 0;
}
#ifdef __alpha__
#ifdef INIT_KBD
/*
* keyboard controller registers
*/
......@@ -1260,11 +1251,13 @@ int kbd_init(void)
* keyboard controller mode register bits
*/
#define KBD_EKI (unsigned int) 0x01
#define KBD_SYS (unsigned int) 0x04
#define KBD_DMS (unsigned int) 0x20
#define KBD_KCC (unsigned int) 0x40
#define TIMEOUT_CONST 500000
static int
kbd_wait_for_input(void)
static int kbd_wait_for_input(void)
{
int n;
int status, data;
......@@ -1297,105 +1290,102 @@ kbd_wait_for_input(void)
return (-1); /* timed-out if fell through to here... */
}
static void
kbd_write(int address, int data)
static void kbd_write(int address, int data)
{
int status;
do {
status = inb(KBD_STATUS_REG); /* spin until input buffer empty*/
} while (status & KBD_IBF);
outb(data, address); /* write out the data*/
int status;
do {
status = inb(KBD_STATUS_REG); /* spin until input buffer empty*/
} while (status & KBD_IBF);
outb(data, address); /* write out the data*/
}
static int
alpha_kbd_init(void)
static int initialize_kbd(void)
{
unsigned long flags;
save_flags(flags); cli();
/* Flush any pending input. */
while (kbd_wait_for_input() != -1)
continue;
/*
* Test the keyboard interface.
* This seems to be the only way to get it going.
* If the test is successful a x55 is placed in the input buffer.
*/
kbd_write(KBD_CNTL_REG, KBD_SELF_TEST);
if (kbd_wait_for_input() != 0x55) {
printk("alpha_kbd_init: keyboard failed self test.\n");
restore_flags(flags);
return(-1);
}
unsigned long flags;
/*
* Perform a keyboard interface test. This causes the controller
* to test the keyboard clock and data lines. The results of the
* test are placed in the input buffer.
*/
kbd_write(KBD_CNTL_REG, KBD_SELF_TEST2);
if (kbd_wait_for_input() != 0x00) {
printk("alpha_kbd_init: keyboard failed self test 2.\n");
restore_flags(flags);
return(-1);
}
save_flags(flags); cli();
/* Enable the keyboard by allowing the keyboard clock to run. */
kbd_write(KBD_CNTL_REG, KBD_CNTL_ENABLE);
/*
* Reset keyboard. If the read times out
* then the assumption is that no keyboard is
* plugged into the machine.
* This defaults the keyboard to scan-code set 2.
*/
kbd_write(KBD_DATA_REG, KBD_RESET);
if (kbd_wait_for_input() != KBD_ACK) {
printk("alpha_kbd_init: reset kbd failed, no ACK.\n");
restore_flags(flags);
return(-1);
}
/* Flush any pending input. */
while (kbd_wait_for_input() != -1)
continue;
if (kbd_wait_for_input() != KBD_POR) {
printk("alpha_kbd_init: reset kbd failed, not POR.\n");
restore_flags(flags);
return(-1);
}
/*
* Test the keyboard interface.
* This seems to be the only way to get it going.
* If the test is successful a x55 is placed in the input buffer.
*/
kbd_write(KBD_CNTL_REG, KBD_SELF_TEST);
if (kbd_wait_for_input() != 0x55) {
printk("initialize_kbd: keyboard failed self test.\n");
restore_flags(flags);
return(-1);
}
/*
* now do a DEFAULTS_DISABLE always
*/
kbd_write(KBD_DATA_REG, KBD_DISABLE);
if (kbd_wait_for_input() != KBD_ACK) {
printk("alpha_kbd_init: disable kbd failed, no ACK.\n");
restore_flags(flags);
return(-1);
}
/*
* Perform a keyboard interface test. This causes the controller
* to test the keyboard clock and data lines. The results of the
* test are placed in the input buffer.
*/
kbd_write(KBD_CNTL_REG, KBD_SELF_TEST2);
if (kbd_wait_for_input() != 0x00) {
printk("initialize_kbd: keyboard failed self test 2.\n");
restore_flags(flags);
return(-1);
}
/*
* enable keyboard interrupt, operate in "real" mode,
* Enable keyboard (by clearing the disable keyboard bit),
* no conversion of keycodes.
*/
kbd_write(KBD_CNTL_REG, KBD_WRITE_MODE);
kbd_write(KBD_DATA_REG, KBD_EKI);
/*
* now ENABLE the keyboard to set it scanning...
*/
kbd_write(KBD_DATA_REG, KBD_ENABLE);
if (kbd_wait_for_input() != KBD_ACK) {
printk("alpha_kbd_init: keyboard enable failed.\n");
restore_flags(flags);
return(-1);
}
/* Enable the keyboard by allowing the keyboard clock to run. */
kbd_write(KBD_CNTL_REG, KBD_CNTL_ENABLE);
/*
* Reset keyboard. If the read times out
* then the assumption is that no keyboard is
* plugged into the machine.
* This defaults the keyboard to scan-code set 2.
*/
kbd_write(KBD_DATA_REG, KBD_RESET);
if (kbd_wait_for_input() != KBD_ACK) {
printk("initialize_kbd: reset kbd failed, no ACK.\n");
restore_flags(flags);
return(-1);
}
if (kbd_wait_for_input() != KBD_POR) {
printk("initialize_kbd: reset kbd failed, not POR.\n");
restore_flags(flags);
return(-1);
}
restore_flags(flags);
/*
* now do a DEFAULTS_DISABLE always
*/
kbd_write(KBD_DATA_REG, KBD_DISABLE);
if (kbd_wait_for_input() != KBD_ACK) {
printk("initialize_kbd: disable kbd failed, no ACK.\n");
restore_flags(flags);
return(-1);
}
/*
* Enable keyboard interrupt, operate in "sys" mode,
* enable keyboard (by clearing the disable keyboard bit),
* disable mouse, do conversion of keycodes.
*/
kbd_write(KBD_CNTL_REG, KBD_WRITE_MODE);
kbd_write(KBD_DATA_REG, KBD_EKI|KBD_SYS|KBD_DMS|KBD_KCC);
/*
* now ENABLE the keyboard to set it scanning...
*/
kbd_write(KBD_DATA_REG, KBD_ENABLE);
if (kbd_wait_for_input() != KBD_ACK) {
printk("initialize_kbd: keyboard enable failed.\n");
restore_flags(flags);
return(-1);
}
return (1);
restore_flags(flags);
return (1);
}
#endif /* __alpha__ */
#endif /* INIT_KBD */
......@@ -144,14 +144,14 @@ con_type_init(unsigned long kmem_start, char *display_desc)
{
video_type = VIDEO_TYPE_EGAM;
video_mem_term = 0xb8000;
display_desc = "EGA+";
strcpy(display_desc, "EGA+");
request_region(0x3b0,16,"ega");
}
else
{
video_type = VIDEO_TYPE_MDA;
video_mem_term = 0xb2000;
display_desc = "*MDA";
strcpy(display_desc, "*MDA");
request_region(0x3b0,12,"mda");
request_region(0x3bf, 1,"mda");
}
......@@ -170,11 +170,11 @@ con_type_init(unsigned long kmem_start, char *display_desc)
if (!ORIG_VIDEO_ISVGA) {
video_type = VIDEO_TYPE_EGAC;
display_desc = "EGA";
strcpy(display_desc, "EGA");
request_region(0x3c0,32,"ega");
} else {
video_type = VIDEO_TYPE_VGAC;
display_desc = "VGA+";
strcpy(display_desc, "VGA+");
request_region(0x3c0,32,"vga+");
#ifdef VGA_CAN_DO_64KB
......@@ -215,7 +215,7 @@ con_type_init(unsigned long kmem_start, char *display_desc)
{
video_type = VIDEO_TYPE_CGA;
video_mem_term = 0xba000;
display_desc = "*CGA";
strcpy(display_desc, "*CGA");
request_region(0x3d4,2,"cga");
}
}
......
......@@ -64,6 +64,7 @@ if [ "$CONFIG_NET_EISA" = "y" ]; then
fi
tristate 'Apricot Xen-II on board ethernet' CONFIG_APRICOT
tristate 'DE425, DE434, DE435, DE500 support' CONFIG_DE4X5
tristate 'ICL EtherTeam 16i/32 support' CONFIG_ETH16
# tristate 'DEC 21040 PCI support' CONFIG_DEC_ELCP
# bool 'LPL T100V 100Mbs support' CONFIG_LPL_T100
# bool 'PCnet32 (32 bit VLB and PCI LANCE) support' CONFIG_PCNET32
......
......@@ -332,6 +332,14 @@ else
endif
endif
ifeq ($(CONFIG_ETH16),y)
L_OBJS += eth16i.o
else
ifeq ($(CONFIG_ETH16),m)
M_OBJS += eth16i.o
endif
endif
ifeq ($(CONFIG_PI),y)
L_OBJS += pi2.o
CONFIG_PI = CONFIG_PI
......
This diff is collapsed.
......@@ -1138,6 +1138,6 @@ cleanup_module(void)
/*
* Local variables:
* compile-command: "gcc -DMODULE -DCONFIG_MODVERSIONS -D__KERNEL__ -Wall -Wstrict-prototypes -O2 -g -fomit-frame-pointer -pipe -m486 -c plip.c"
* compile-command: "gcc -DMODULE -DMODVERSIONS -D__KERNEL__ -Wall -Wstrict-prototypes -O2 -g -fomit-frame-pointer -pipe -m486 -c plip.c"
* End:
*/
......@@ -3,19 +3,13 @@
* etc.
*/
#ifdef MODULE
/*
* Don't import our own symbols, as this would severely mess up our
* symbol tables.
*/
#define _SCSI_SYMS_VER_
#include <linux/autoconf.h>
#define __NO_VERSION__
#include <linux/module.h>
#include <linux/version.h>
#else
#define MOD_INC_USE_COUNT
#define MOD_DEC_USE_COUNT
#endif
#include <linux/config.h>
#include <linux/blk.h>
......
......@@ -16,19 +16,13 @@
* hosts currently present in the system.
*/
#ifdef MODULE
/*
* Don't import our own symbols, as this would severely mess up our
* symbol tables.
*/
#define _SCSI_SYMS_VER_
#include <linux/autoconf.h>
#define __NO_VERSION__
#include <linux/module.h>
#include <linux/version.h>
#else
#define MOD_INC_USE_COUNT
#define MOD_DEC_USE_COUNT
#endif
#include <linux/config.h>
#include <linux/blk.h>
......
......@@ -2499,7 +2499,8 @@ static void resize_dma_pool(void)
for(i=0; i < dma_sectors >> 3; i++)
scsi_init_free(dma_malloc_pages[i], PAGE_SIZE);
if (dma_malloc_pages)
scsi_init_free((char *) dma_malloc_pages, dma_sectors>>1);
scsi_init_free((char *) dma_malloc_pages,
(dma_sectors>>3)*sizeof(*dma_malloc_pages));
dma_malloc_pages = NULL;
if (dma_malloc_freelist)
scsi_init_free(dma_malloc_freelist, dma_sectors>>3);
......@@ -2555,8 +2556,10 @@ static void resize_dma_pool(void)
memset(new_dma_malloc_freelist, 0, new_dma_sectors >> 3);
new_dma_malloc_pages = (unsigned char **)
scsi_init_malloc(new_dma_sectors >> 1, GFP_ATOMIC);
memset(new_dma_malloc_pages, 0, new_dma_sectors >> 1);
scsi_init_malloc((new_dma_sectors>>3)*sizeof(*new_dma_malloc_pages),
GFP_ATOMIC);
memset(new_dma_malloc_pages, 0,
(new_dma_sectors>>3)*sizeof(*new_dma_malloc_pages));
}
/*
......@@ -2582,8 +2585,10 @@ static void resize_dma_pool(void)
if (dma_malloc_pages)
{
memcpy(new_dma_malloc_pages, dma_malloc_pages, dma_sectors >> 1);
scsi_init_free((char *) dma_malloc_pages, dma_sectors>>1);
memcpy(new_dma_malloc_pages, dma_malloc_pages,
(dma_sectors>>3)*sizeof(*dma_malloc_pages));
scsi_init_free((char *) dma_malloc_pages,
(dma_sectors>>3)*sizeof(*dma_malloc_pages));
}
dma_free_sectors += new_dma_sectors - dma_sectors;
......@@ -3084,7 +3089,7 @@ int init_module(void) {
/* One pointer per page for the page list */
dma_malloc_pages = (unsigned char **)
scsi_init_malloc(dma_sectors >> 1, GFP_ATOMIC);
scsi_init_malloc((dma_sectors >> 3)*sizeof(*dma_malloc_pages), GFP_ATOMIC);
dma_malloc_pages[0] = (unsigned char *)
scsi_init_malloc(PAGE_SIZE, GFP_ATOMIC | GFP_DMA);
return 0;
......
#ifdef MODULE
/*
* Don't import our own symbols, as this would severely mess up our
* symbol tables.
*/
#define _SCSI_SYMS_VER_
#include <linux/autoconf.h>
#define __NO_VERSION__
#include <linux/module.h>
#include <linux/version.h>
#else
#define MOD_INC_USE_COUNT
#define MOD_DEC_USE_COUNT
#endif
#include <asm/io.h>
#include <asm/segment.h>
......
......@@ -13,19 +13,13 @@
* Andreas Heilwagen <crashcar@informatik.uni-koblenz.de>
*/
#ifdef MODULE
/*
* Don't import our own symbols, as this would severely mess up our
* symbol tables.
*/
#define _SCSI_SYMS_VER_
#include <linux/autoconf.h>
#define __NO_VERSION__
#include <linux/module.h>
#include <linux/version.h>
#else
#define MOD_INC_USE_COUNT
#define MOD_DEC_USE_COUNT
#endif
#include <linux/string.h>
#include <linux/mm.h>
......
......@@ -2,10 +2,7 @@
* We should not even be trying to compile this if we are not doing
* a module.
*/
#ifndef MODULE
#error Go away.
#endif
#define __NO_VERSION__
#include <linux/module.h>
#include <linux/config.h>
......@@ -16,6 +13,7 @@
#include <linux/ioport.h>
#include <linux/kernel.h>
#include <linux/blk.h>
#include <linux/fs.h>
#include <asm/system.h>
#include <asm/irq.h>
......
......@@ -10,19 +10,13 @@
* For more information, please consult the SCSI-CAM draft.
*/
#ifdef MODULE
/*
* Don't import our own symbols, as this would severely mess up our
* symbol tables.
*/
#define _SCSI_SYMS_VER_
#include <linux/autoconf.h>
#define __NO_VERSION__
#include <linux/module.h>
#include <linux/version.h>
#else
#define MOD_INC_USE_COUNT
#define MOD_DEC_USE_COUNT
#endif
#include <linux/fs.h>
#include <linux/genhd.h>
......
#ifdef MODULE
#include <linux/autoconf.h>
#include <linux/module.h>
#include <linux/version.h>
#endif /* MODULE */
/*
* drivers/scsi/sd_ioctl.c
*
* ioctl handling for SCSI disks
*/
#include <linux/kernel.h>
#include <linux/sched.h>
......
......@@ -14,7 +14,7 @@
* Modified by Eric Youngdale eric@aib.com to support loadable
* low-level scsi drivers.
*
* Modified by Thomas Quinot thomas@melchior.frmug.fr.net to
* Modified by Thomas Quinot thomas@melchior.cuivre.fdn.fr to
* provide auto-eject.
*
*/
......@@ -69,13 +69,13 @@ static void sr_release(struct inode * inode, struct file * file)
{
sync_dev(inode->i_rdev);
if(! --scsi_CDs[MINOR(inode->i_rdev)].device->access_count)
{
sr_ioctl(inode, NULL, SCSI_IOCTL_DOORUNLOCK, 0);
{
sr_ioctl(inode, NULL, SCSI_IOCTL_DOORUNLOCK, 0);
if (scsi_CDs[MINOR(inode->i_rdev)].auto_eject)
sr_ioctl(inode, NULL, CDROMEJECT, 0);
}
sr_ioctl(inode, NULL, CDROMEJECT, 0);
}
if (scsi_CDs[MINOR(inode->i_rdev)].device->host->hostt->usage_count)
(*scsi_CDs[MINOR(inode->i_rdev)].device->host->hostt->usage_count)--;
(*scsi_CDs[MINOR(inode->i_rdev)].device->host->hostt->usage_count)--;
if(sr_template.usage_count) (*sr_template.usage_count)--;
}
......@@ -307,7 +307,7 @@ static void rw_intr (Scsi_Cmnd * SCpnt)
* kraxel@cs.tu-berlin.de (Gerd Knorr)
*/
/*
* 19950704 operator@melchior.frmug.fr.net (Thomas Quinot)
* 19950704 operator@melchior.cuivre.fdn.fr (Thomas Quinot)
*
* - SONY: Same as Nec.
*
......@@ -368,7 +368,7 @@ static void sr_photocd(struct inode *inode)
break;
}
if (rec[14] != 0 && rec[14] != 0xb0) {
printk("sr_photocd: Hmm, seems the CDROM doesn't support multisession CD's\n");
printk("sr_photocd: (NEC) Hmm, seems the CDROM doesn't support multisession CD's\n");
no_multi = 1;
break;
}
......@@ -407,7 +407,7 @@ static void sr_photocd(struct inode *inode)
SCSI_IOCTL_TEST_UNIT_READY, NULL)) {
printk("sr_photocd: drive not ready\n");
} else {
printk("sr_photocd: Hmm, seems the CDROM doesn't support multisession CD's\n");
printk("sr_photocd: (TOSHIBA) Hmm, seems the CDROM doesn't support multisession CD's\n");
no_multi = 1;
}
} else
......@@ -468,32 +468,37 @@ static void sr_photocd(struct inode *inode)
}
break;
case SCSI_MAN_SONY: /* Thomas QUINOT <thomas@melchior.frmug.fr.net> */
case SCSI_MAN_SONY: /* Thomas QUINOT <thomas@melchior.cuivre.fdn.fr> */
case SCSI_MAN_PIONEER:
#ifdef DEBUG
printk("sr_photocd: use SONY/PIONEER code\n");
printk("sr_photocd: use SONY/PIONEER code\n");
#endif
memset(buf,0,40);
*((unsigned long*)buf) = 0x0; /* we send nothing... */
*((unsigned long*)buf+1) = 0x0c; /* and receive 0x0c bytes */
cmd[0] = 0x43; /* Read TOC */
cmd[8] = 0x0c;
cmd[9] = 0x40;
rc = kernel_scsi_ioctl(scsi_CDs[MINOR(inode->i_rdev)].device,
SCSI_IOCTL_SEND_COMMAND, buf);
if ((rc != 0) || ((rec[0] << 8) + rec[1] != 0x0a)) {
printk("sr_photocd: ioctl error (SONY): 0x%x\n",rc);
break;
}
sector = rec[11] + (rec[10] << 8) + (rec[9] << 16) + (rec[8] << 24);
is_xa = !!sector;
memset(buf,0,40);
*((unsigned long*)buf) = 0x0; /* we send nothing... */
*((unsigned long*)buf+1) = 0x0c; /* and receive 0x0c bytes */
cmd[0] = 0x43; /* Read TOC */
cmd[8] = 0x0c;
cmd[9] = 0x40;
rc = kernel_scsi_ioctl(scsi_CDs[MINOR(inode->i_rdev)].device,
SCSI_IOCTL_SEND_COMMAND, buf);
if (rc != 0) {
printk("sr_photocd: ioctl error (SONY): 0x%x\n",rc);
break;
}
if ((rec[0] << 8) + rec[1] != 0x0a) {
printk("sr_photocd: (SONY) Hmm, seems the CDROM doesn't support multisession CD's\n");
no_multi = 1;
break;
}
sector = rec[11] + (rec[10] << 8) + (rec[9] << 16) + (rec[8] << 24);
is_xa = !!sector;
#ifdef DEBUG
if (sector)
printk ("sr_photocd: multisession CD detected. start: %lu\n",sector);
if (sector)
printk ("sr_photocd: multisession CD detected. start: %lu\n",sector);
#endif
break;
break;
case SCSI_MAN_NEC_OLDCDR:
case SCSI_MAN_UNKNOWN:
default:
......@@ -565,15 +570,15 @@ static void do_sr_request (void)
INIT_SCSI_REQUEST;
SDev = scsi_CDs[DEVICE_NR(CURRENT->rq_dev)].device;
/*
* I am not sure where the best place to do this is. We need
* to hook in a place where we are likely to come if in user
* space.
*/
if( SDev->was_reset )
{
SDev = scsi_CDs[DEVICE_NR(CURRENT->rq_dev)].device;
/*
* I am not sure where the best place to do this is. We need
* to hook in a place where we are likely to come if in user
* space.
*/
if( SDev->was_reset )
{
/*
* We need to relock the door, but we might
* be in an interrupt handler. Only do this
......@@ -582,11 +587,11 @@ static void do_sr_request (void)
*/
if( SDev->removable && !intr_count )
{
scsi_ioctl(SDev, SCSI_IOCTL_DOORLOCK, 0);
scsi_ioctl(SDev, SCSI_IOCTL_DOORLOCK, 0);
}
SDev->was_reset = 0;
}
}
if (flag++ == 0)
SCpnt = allocate_device(&CURRENT,
scsi_CDs[DEVICE_NR(CURRENT->rq_dev)].device, 0);
......@@ -1060,7 +1065,7 @@ static int sr_init()
sizeof(int), GFP_ATOMIC);
for(i=0;i<sr_template.dev_max;i++) sr_blocksizes[i] = 2048;
blksize_size[MAJOR_NR] = sr_blocksizes;
return 0;
return 0;
}
void sr_finish()
......
#ifdef MODULE
#include <linux/autoconf.h>
#include <linux/module.h>
#include <linux/version.h>
#endif /* MODULE */
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/mm.h>
......
......@@ -3,8 +3,6 @@
#undef NO_INLINE_ASM
#undef SHORT_BANNERS
#include <linux/module.h>
#include <linux/param.h>
#include <linux/types.h>
#include <linux/errno.h>
......
......@@ -30,6 +30,8 @@
* Created modular version by Peter Trattler (peter@sbox.tu-graz.ac.at)
*/
#include <linux/module.h>
#include "sound_config.h"
#ifdef CONFIGURE_SOUNDCARD
......@@ -604,7 +606,7 @@ sound_alloc_dmap (int dev, struct dma_buffparms *dmap, int chan)
}
}
dmap->raw_buf = start_addr;
dmap->raw_buf_phys = virt_to_phys (start_addr);
dmap->raw_buf_phys = virt_to_bus (start_addr);
memset (dmap->raw_buf, 0x00, audio_devs[dev]->buffsize);
......
......@@ -82,7 +82,8 @@ int register_binfmt(struct linux_binfmt * fmt)
return -EBUSY;
tmp = &(*tmp)->next;
}
*tmp = fmt;
fmt->next = formats;
formats = fmt;
return 0;
}
......
/*
* linux/fs/msdos/dir.c
* MS-DOS directory handling functions
*
* Written 1992,1993 by Werner Almesberger
*
* MS-DOS directory handling functions
* Hidden files 1995 by Albert Cahalan <albert@ccs.neu.edu> <adc@coe.neu.edu>
*/
#include <linux/fs.h>
......@@ -85,13 +86,20 @@ int msdos_readdir(
return -ENOENT;
bh = NULL;
while ((ino = msdos_get_entry(inode,&filp->f_pos,&bh,&de)) > -1) {
if (!IS_FREE(de->name)
&& !(de->attr & (ATTR_VOLUME|ATTR_SYS|ATTR_HIDDEN))) {
char bufname[12];
if (!IS_FREE(de->name) && !(de->attr & ATTR_VOLUME)) {
char bufname[13];
char *ptname = bufname;
int dotoffset = 0;
if ((de->attr & ATTR_HIDDEN) && MSDOS_SB(sb)->dotsOK) {
bufname[0] = '.';
dotoffset = 1;
ptname = bufname+1;
}
for (i = last = 0; i < 8; i++) {
if (!(c = de->name[i])) break;
if (c >= 'A' && c <= 'Z') c += 32;
/* see namei.c, msdos_format_name */
if (c == 0x05) c = 0xE5;
if (c != ' ')
last = i+1;
ptname[i] = c;
......@@ -112,7 +120,7 @@ int msdos_readdir(
ino = inode->i_ino;
else if (!strcmp(de->name,MSDOS_DOTDOT))
ino = msdos_parent_ino(inode,0);
if (filldir(dirent, bufname, i, oldpos, ino) < 0) {
if (filldir(dirent, bufname, i+dotoffset, oldpos, ino) < 0) {
filp->f_pos = oldpos;
break;
}
......
......@@ -6,8 +6,6 @@
* MS-DOS regular file handling primitives
*/
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/locks.h>
#include <linux/fs.h>
......@@ -285,6 +283,8 @@ int msdos_file_write(
printk("msdos_file_write: mode = %07o\n",inode->i_mode);
return -EINVAL;
}
/* Must not harm system files */
if (MSDOS_I(inode)->i_attrs & ATTR_SYS) return -EPERM;
/*
* ok, append may not work when many processes are writing at the same time
* but so what. That way leads to madness anyway.
......@@ -362,6 +362,9 @@ void msdos_truncate(struct inode *inode)
{
int cluster;
/* Must not harm system files */
/* Why no return value? Surely the disk could fail... */
if (MSDOS_I(inode)->i_attrs & ATTR_SYS) return /* -EPERM */;
cluster = SECTOR_SIZE*MSDOS_SB(inode->i_sb)->cluster_size;
(void) fat_free(inode,(inode->i_size+(cluster-1))/cluster);
MSDOS_I(inode)->i_attrs |= ATTR_ARCH;
......
......@@ -75,12 +75,13 @@ static struct super_operations msdos_sops = {
static int parse_options(char *options,char *check,char *conversion,uid_t *uid,
gid_t *gid,int *umask,int *debug,int *fat,int *quiet,
int *blksize)
int *blksize, char *dotsOK)
{
char *this_char,*value;
*check = 'n';
*conversion = 'b';
*dotsOK =1;
*uid = current->uid;
*gid = current->gid;
*umask = current->fs->umask;
......@@ -105,6 +106,11 @@ static int parse_options(char *options,char *check,char *conversion,uid_t *uid,
else if (!strcmp(value,"auto")) *conversion = 'a';
else return 0;
}
else if (!strcmp(this_char,"dotsOK") && value) {
if (!strcmp(value,"yes")) *dotsOK = 1;
else if (!strcmp(value,"no")) *dotsOK = 0;
else return 0;
}
else if (!strcmp(this_char,"uid")) {
if (!value || !*value)
return 0;
......@@ -164,7 +170,7 @@ struct super_block *msdos_read_super(struct super_block *sb,void *data,
struct msdos_boot_sector *b;
int data_sectors,logical_sector_size,sector_mult,fat_clusters=0;
int debug,error,fat,quiet;
char check,conversion;
char check,conversion,dotsOK;
uid_t uid;
gid_t gid;
int umask;
......@@ -178,7 +184,7 @@ struct super_block *msdos_read_super(struct super_block *sb,void *data,
}
}
if (!parse_options((char *) data,&check,&conversion,&uid,&gid,&umask,
&debug,&fat,&quiet,&blksize)
&debug,&fat,&quiet,&blksize,&dotsOK)
|| (blksize != 512 && blksize != 1024)) {
sb->s_dev = 0;
MOD_DEC_USE_COUNT;
......@@ -290,6 +296,7 @@ struct super_block *msdos_read_super(struct super_block *sb,void *data,
MSDOS_SB(sb)->fs_gid = gid;
MSDOS_SB(sb)->fs_umask = umask;
MSDOS_SB(sb)->quiet = quiet;
MSDOS_SB(sb)->dotsOK = dotsOK;
MSDOS_SB(sb)->free_clusters = -1; /* don't know yet */
MSDOS_SB(sb)->fat_wait = NULL;
MSDOS_SB(sb)->fat_lock = 0;
......@@ -409,11 +416,10 @@ void msdos_read_inode(struct inode *inode)
break;
}
}
}
else {
inode->i_mode = MSDOS_MKMODE(raw_entry->attr,(IS_NOEXEC(inode)
? S_IRUGO|S_IWUGO : S_IRWXUGO) & ~MSDOS_SB(inode->i_sb)->fs_umask) |
S_IFREG;
} else { /* not a directory */
inode->i_mode = MSDOS_MKMODE(raw_entry->attr,
(IS_NOEXEC(inode) ? S_IRUGO|S_IWUGO : S_IRWXUGO)
& ~MSDOS_SB(inode->i_sb)->fs_umask) | S_IFREG;
inode->i_op = sb->s_blocksize == 1024
? &msdos_file_inode_operations_1024
: &msdos_file_inode_operations;
......
This diff is collapsed.
This diff is collapsed.
......@@ -482,10 +482,11 @@ static int get_stat(int pid, char * buffer)
tty_pgrp = -1;
/* scale priority and nice values from timeslices to -20..20 */
/* to make it look like a "normal" unix priority/nice value */
priority = tsk->counter;
priority = (priority * 10 + DEF_PRIORITY / 2) / DEF_PRIORITY - 20;
priority = 20 - (priority * 10 + DEF_PRIORITY / 2) / DEF_PRIORITY;
nice = tsk->priority;
nice = (nice * 20 + DEF_PRIORITY / 2) / DEF_PRIORITY - 20;
nice = 20 - (nice * 20 + DEF_PRIORITY / 2) / DEF_PRIORITY;
return sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu \
%lu %lu %lu %ld %ld %ld %ld %ld %ld %lu %lu %ld %lu %lu %lu %lu %lu %lu %lu %lu %lu \
......@@ -507,10 +508,8 @@ static int get_stat(int pid, char * buffer)
tsk->stime,
tsk->cutime,
tsk->cstime,
priority, /* this is the kernel priority ---
subtract 20 in your user-level program. */
nice, /* this is the nice value ---
subtract 20 in your user-level program. */
priority,
nice,
tsk->timeout,
tsk->it_real_value,
tsk->start_time,
......
......@@ -5,8 +5,6 @@
*
*/
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/stat.h>
......
......@@ -5,8 +5,6 @@
*
*/
#include <linux/module.h>
#include <asm/segment.h>
#include <asm/system.h>
......
......@@ -405,9 +405,6 @@ int smb_current_malloced;
#ifdef MODULE
/* looks ugly, taken from gcc-info */
static void *shut_up_gcc = (&shut_up_gcc, kernel_version);
static struct file_system_type smb_fs_type = {
smb_read_super, "smbfs", 0, NULL
};
......
......@@ -4,7 +4,6 @@
* Copyright (C) 1995 by Volker Lendecke
*
*/
#include <linux/module.h>
#include <asm/segment.h>
#include <linux/errno.h>
......
......@@ -5,8 +5,6 @@
*
*/
#include <linux/module.h>
#include <linux/stat.h>
#include <linux/sched.h>
#include <linux/kernel.h>
......
......@@ -5,8 +5,6 @@
*
*/
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/smbno.h>
#include <linux/smb_fs.h>
......
......@@ -5,8 +5,6 @@
*
*/
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/smb_fs.h>
#include <linux/errno.h>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -22,6 +22,7 @@ struct msdos_sb_info {
int fat_lock;
int prev_free; /* previously returned free cluster number */
int free_clusters; /* -1 if undefined */
char dotsOK;
};
#endif
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