Commit cde5f10a authored by Linus Torvalds's avatar Linus Torvalds

Import 2.0.13

parent 1b5d39c0
......@@ -32,7 +32,7 @@ P: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD 1E DF FE 69 EE 35 BD 74
D: Author of the SYSLINUX boot loader, maintainer of the linux.* news
D: hierarchy and the Linux Device List; various kernel hacks
S: 4390 Albany Dr. #46
S: San Jose CA 95129
S: San Jose, California 95129
S: USA
N: Derek Atkins
......@@ -210,7 +210,7 @@ N: Gordon Chaffee
E: chaffee@plateau.cs.berkeley.edu
D: vfat filesystem
S: 3674 Oakwood Terrace #201
S: Fremont, CA 94536
S: Fremont, California 94536
S: USA
N: Chih-Jen Chang
......@@ -466,7 +466,7 @@ W: http://www.cs.ucr.edu/~grif
D: Loopback speedup, qlogic scsi hacking, VT_LOCKSWITCH
S: Department of Computer Science
S: University of California, Riverside
S: Riverside, CA 92521-0304
S: Riverside, California 92521-0304
S: USA
N: Dmitry S. Gorodchanin
......@@ -490,7 +490,7 @@ N: John E. Gotts
E: jgotts@engin.umich.edu
D: kernel hacker
S: 8124 Constitution Apt. 7
S: Sterling Heights, MI 48313
S: Sterling Heights, Michigan 48313
S: USA
N: Grant Guenther
......@@ -558,7 +558,7 @@ N: Richard Henderson
E: rth@tamu.edu
D: Alpha/ELF, gcc, binutils, and glibc
S: 304 E. North Ave.
S: Bryan, TX 77801-3431
S: Bryan, Texas 77801-3431
S: USA
N: Sebastian Hetze
......@@ -589,7 +589,7 @@ E: khollis@bitgate.com
W: http://www.nurk.org/
D: Berkshire PC Watchdog Driver
S: PO Box 15
S: Grants Pass, OR 97526
S: Grants Pass, Oregon 97526
S: USA
N: Nick Holloway
......@@ -822,7 +822,7 @@ S: Puistokaari 1 E 18
S: 00200 Helsinki
S: Finland
N: Kai M"akisara
N: Kai Mkisara
E: Kai.Makisara@metla.fi
D: SCSI Tape Driver
......@@ -1089,23 +1089,27 @@ E: snprobst@immd4.informatik.uni-erlangen.de
D: The Linux Support Team Erlangen
N: Daniel Quinlan
E: quinlan@yggdrasil.com
D: FSSTND Coordinator
S: 816 Saratoga Avenue, Apartment M208
S: San Jose, California 95129
E: Daniel.Quinlan@linux.org
W: http://www.bucknell.edu/~quinlan
D: FSSTND coordinator; FHS editor
D: random Linux documentation, patches, and hacks
S: Box C-5083
S: Bucknell University
S: Lewisburg, Pennsylvania 17837
S: USA
N: Eric S. Raymond
E: esr@thyrsus.com
W: http://www.ccil.org/~esr/home.html
S: 22 South Warren Avenue
S: Malvern, PA 19355 USA
D: ncurses library co-maintainer
D: terminfo master file maintainer
D: Distributions HOWTO editor
D: Instigator, FHS standard
D: Keeper of the Jargon File and curator of the Retrocomputing Museum
D: Author, Emacs VC and GUD modes
S: 22 South Warren Avenue
S: Malvern, Pennsylvania 19355
S: USA
N: Stefan Reinauer
E: stepan@home.culture.mipt.ru
......@@ -1120,7 +1124,7 @@ E: roadcapw@cfw.com
W: http://www.cfw.com/~roadcapw
D: Author of menu based configuration tool, Menuconfig.
S: 1407 Broad Street
S: Waynesboro, Va 22980
S: Waynesboro, Virginia 22980
S: USA
N: Florian La Roche
......@@ -1198,7 +1202,7 @@ N: Darren Senn
E: sinster@darkwater.com
D: Whatever I notice needs doing (so far: itimers, /proc)
S: POB 64132
S: Sunnyvale, CA 94088-4132
S: Sunnyvale, California 94088-4132
S: USA
N: Simon Shapiro
......@@ -1225,7 +1229,7 @@ E: john@geolog.com
E: jshiffle@netcom.com
D: Always IN2000 SCSI driver
D: wd33c93 SCSI driver (linux-m68k)
S: San Jose, CA
S: San Jose, California
S: USA
N: Rick Sladkey
......@@ -1369,7 +1373,7 @@ S: 2F 14 ALY 31 LN 166 SEC 1 SHIH-PEI RD
S: Taipei
S: Taiwan 112, Republic of China
S: 24335 Delta Drive
S: Diamond Bar, CA 91765
S: Diamond Bar, California 91765
S: USA
N: Simmule Turner
......@@ -1456,7 +1460,7 @@ D: Maintainer of sunsite WWW and FTP, moderator c.o.l.answers
S: Cornell University Computer Science Department
S: Robotics and Vision Laboratory
S: 4130 Upson Hall
S: Ithaca NY 14850
S: Ithaca, New York 14850
S: USA
N: Greg Wettstein
......@@ -1470,7 +1474,7 @@ S: Dr. Greg Wettstein, Ph.D.
S: Oncology Research Division Computing Facility
S: Roger Maris Cancer Center
S: 820 4th St. N.
S: Fargo, ND 58122
S: Fargo, North Dakota 58122
S: USA
N: Hans-Joachim Widmaier
......
......@@ -21,7 +21,7 @@ mcdx
optcd
- info on the Optics Storage 8000 AT CD-ROM driver
sbpcd
- info on the SoundBlaster Pro CD-ROM interface driver.
- info on the SoundBlaster/Panasonic CD-ROM interface driver.
sjcd
- info on the SANYO CDR-H94A CD-ROM interface driver.
sonycd535
......
This diff is collapsed.
......@@ -172,7 +172,7 @@ L: linux-scsi@vger.rutgers.edu
S: Odd fixes (e.g., new signatures)
SCSI TAPE DRIVER
P: Kai Mdkisara
P: Kai Mkisara
M: Kai.Makisara@metla.fi
L: linux-scsi@vger.rutgers.edu
S: Maintained
......@@ -324,6 +324,18 @@ M: Juergen Fischer <fischer@et-inf.fho-emden.de>
L: linux-scsi@vger.rutgers.edu
S: Maintained
SBPCD CDROM DRIVER
P: Eberhard Moenkeberg
M: emoenke@gwdg.de
L: linux-kernel@vger.rutgers.edu
S: Maintained
NON-IDE/NON-SCSI CDROM DRIVERS [GENERAL] (come on, crew - mark your responsibility)
P: Eberhard Moenkeberg
M: emoenke@gwdg.de
L: linux-kernel@vger.rutgers.edu
S: Maintained
CREDITS FILE
P: John A. Martin
M: jam@acm.org
......
VERSION = 2
PATCHLEVEL = 0
SUBLEVEL = 12
SUBLEVEL = 13
ARCH = i386
......
......@@ -80,6 +80,17 @@ void show_regs(struct pt_regs * regs)
regs->r27, regs->r28, regs->gp, regs->hae);
}
/*
* Re-start a thread when doing execve()
*/
void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp)
{
current->tss.segment = USER_DS;
regs->pc = pc;
regs->ps = 8;
wrusp(sp);
}
/*
* Free current thread data structures etc..
*/
......
......@@ -132,6 +132,7 @@ unsigned long paging_init(unsigned long start_mem, unsigned long end_mem)
pgd_val(swapper_pg_dir[1023]) = (newptbr << 32) | pgprot_val(PAGE_KERNEL);
init_task.tss.ptbr = newptbr;
init_task.tss.flags = 1;
init_task.tss.segment = KERNEL_DS;
init_task.kernel_stack_page = INIT_STACK;
load_PCB(&init_task.tss);
......
......@@ -25,6 +25,7 @@
#include <linux/interrupt.h>
#include <linux/config.h>
#include <linux/unistd.h>
#include <linux/delay.h>
#include <asm/segment.h>
#include <asm/pgtable.h>
......@@ -206,6 +207,7 @@ void hard_reset_now(void)
for(j = 0; j < 100000 ; j++)
/* nothing */;
outb(0xfe,0x64); /* pulse reset low */
udelay(10);
}
__asm__ __volatile__("\tlidt %0": "=m" (no_idt));
}
......
......@@ -68,7 +68,7 @@ static unsigned long do_fast_gettimeoffset(void)
*/
if (test_bit(TIMER_BH, &bh_active) )
{
missing_time = 997670/HZ;
missing_time = 1000020/HZ;
}
/* Get last timer tick in absolute kernel time */
......@@ -90,7 +90,7 @@ static unsigned long do_fast_gettimeoffset(void)
:"r" (tmp),
"0" (eax), "1" (edx));
edx = 997670/HZ;
edx = 1000020/HZ;
tmp = eax;
eax = 0;
......@@ -111,7 +111,7 @@ static unsigned long do_fast_gettimeoffset(void)
eax -= low_timer;
/*
* Time offset = (997670/HZ * time_low) / quotient.
* Time offset = (1000020/HZ * time_low) / quotient.
*/
__asm__("mull %2"
......@@ -124,8 +124,8 @@ static unsigned long do_fast_gettimeoffset(void)
* we need to check the result so that we'll get a timer
* that is monotonic.
*/
if (edx >= 997670/HZ)
edx = 997670/HZ-1;
if (edx >= 1000020/HZ)
edx = 1000020/HZ-1;
eax = edx + missing_time;
return eax;
......
/*
* linux/drivers/block/cmd640.c Version 0.99 Aug 6, 1996
* linux/drivers/block/cmd640.c Version 1.01 Aug 12, 1996
*
* Copyright (C) 1995-1996 Linus Torvalds & authors (see below)
*/
......@@ -17,8 +17,7 @@
* to work on every motherboard design that uses this screwed chip seems
* bloody well impossible. However, we're still trying.
*
* Version 0.96 worked for just about everybody.
* Version 0.97 should work for everyone
* Version 0.97 worked for everybody.
*
* User feedback is essential. Many thanks to the beta test team:
*
......@@ -92,6 +91,9 @@
* other minor tune-ups: 0.96 was very good.
* Version 0.98 ignore PCI version when disabled by BIOS
* Version 0.99 display setup/active/recovery clocks with PIO mode
* Version 1.00 Mmm.. cannot depend on PCMD_ENA in all systems
* Version 1.01 slow/fast devsel can be selected with "hdparm -p6/-p7"
* ("fast" is necessary for 32bit I/O in some systems)
*/
#undef REALLY_SLOW_IO /* most systems can safely undef this */
......@@ -291,10 +293,12 @@ static int match_pci_cmd640_device (void)
if (get_cmd640_reg(i) != ven_dev[i])
return 0;
}
#ifdef STUPIDLY_TRUST_BROKEN_PCMD_ENA_BIT
if ((get_cmd640_reg(PCMD) & PCMD_ENA) == 0) {
printk("ide: cmd640 on PCI disabled by BIOS\n");
return 0;
}
#endif /* STUPIDLY_TRUST_BROKEN_PCMD_ENA_BIT */
return 1; /* success */
}
......@@ -634,6 +638,7 @@ static void cmd640_set_mode (unsigned int index, byte pio_mode, unsigned int cyc
*/
static void cmd640_tune_drive (ide_drive_t *drive, byte mode_wanted)
{
byte b;
ide_pio_data_t d;
unsigned int index = 0;
......@@ -643,18 +648,23 @@ static void cmd640_tune_drive (ide_drive_t *drive, byte mode_wanted)
return;
}
}
/*
* If the user asks for pio_mode 9 (no such mode),
* we take it to mean "turn ON prefetch" for this drive.
*
* If the user asks for pio_mode 8 (no such mode),
* we take it to mean "turn OFF prefetch" for this drive.
*/
if ((mode_wanted & 0xfe) == 0x08) { /* program prefetch? */
mode_wanted &= 1;
set_prefetch_mode(index, mode_wanted);
printk("%s: %sabled cmd640 prefetch\n", drive->name, mode_wanted ? "en" : "dis");
return;
switch (mode_wanted) {
case 6: /* set fast-devsel off */
case 7: /* set fast-devsel on */
mode_wanted &= 1;
b = get_cmd640_reg(CNTRL) & ~0x27;
if (mode_wanted)
b |= 0x27;
put_cmd640_reg(CNTRL, b);
printk("%s: %sabled cmd640 fast host timing (devsel)\n", drive->name, mode_wanted ? "en" : "dis");
return;
case 8: /* set prefetch off */
case 9: /* set prefetch on */
mode_wanted &= 1;
set_prefetch_mode(index, mode_wanted);
printk("%s: %sabled cmd640 prefetch\n", drive->name, mode_wanted ? "en" : "dis");
return;
}
(void) ide_get_best_pio_mode (drive, mode_wanted, 5, &d);
......
/*
* linux/drivers/block/ide.c Version 5.49 Aug 4, 1996
* linux/drivers/block/ide.c Version 5.51 Aug 10, 1996
*
* Copyright (C) 1994-1996 Linus Torvalds & authors (see below)
*/
......@@ -257,6 +257,8 @@
* prevent use of io_32bit on cmd640 with no prefetch
* Version 5.49 fix minor quirks in probing routines
* Version 5.50 allow values as small as 20 for idebus=
* Version 5.51 force non io_32bit in drive_cmd_intr()
* change delay_10ms() to delay_50ms() to fix problems
*
* Some additional driver compile-time options are in ide.h
*
......@@ -1211,7 +1213,10 @@ static void drive_cmd_intr (ide_drive_t *drive)
sti();
if ((stat & DRQ_STAT) && args && args[3]) {
byte io_32bit = drive->io_32bit;
drive->io_32bit = 0;
ide_input_data(drive, &args[4], args[3] * SECTOR_WORDS);
drive->io_32bit = io_32bit;
stat = GET_STAT();
}
if (OK_STAT(stat,READY_STAT,BAD_STAT))
......@@ -2417,13 +2422,13 @@ static inline void do_identify (ide_drive_t *drive, byte cmd)
}
/*
* Delay for *at least* 10ms. As we don't know how much time is left
* Delay for *at least* 50ms. As we don't know how much time is left
* until the next tick occurs, we wait an extra tick to be safe.
* This is used only during the probing/polling for drives at boot time.
*/
static void delay_10ms (void)
static void delay_50ms (void)
{
unsigned long timer = jiffies + (HZ + 99)/100 + 1;
unsigned long timer = jiffies + ((HZ + 19)/20) + 1;
while (timer > jiffies);
}
......@@ -2449,7 +2454,7 @@ static int try_to_identify (ide_drive_t *drive, byte cmd)
OUT_BYTE(drive->ctl,IDE_CONTROL_REG); /* enable device irq */
}
delay_10ms(); /* take a deep breath */
delay_50ms(); /* take a deep breath */
if ((IN_BYTE(IDE_ALTSTATUS_REG) ^ IN_BYTE(IDE_STATUS_REG)) & ~INDEX_STAT) {
printk("%s: probing with STATUS instead of ALTSTATUS\n", drive->name);
hd_status = IDE_STATUS_REG; /* ancient Seagate drives */
......@@ -2474,10 +2479,10 @@ static int try_to_identify (ide_drive_t *drive, byte cmd)
(void) probe_irq_off(irqs);
return 1; /* drive timed-out */
}
delay_10ms(); /* give drive a breather */
delay_50ms(); /* give drive a breather */
} while (IN_BYTE(hd_status) & BUSY_STAT);
delay_10ms(); /* wait for IRQ and DRQ_STAT */
delay_50ms(); /* wait for IRQ and DRQ_STAT */
if (OK_STAT(GET_STAT(),DRQ_STAT,BAD_R_STAT)) {
unsigned long flags;
save_flags(flags);
......@@ -2546,11 +2551,10 @@ static int do_probe (ide_drive_t *drive, byte cmd)
(cmd == WIN_IDENTIFY) ? "ATA" : "ATAPI");
#endif
SELECT_DRIVE(hwif,drive);
delay_10ms(); /* allow BUSY_STAT to assert & clear */
delay_10ms();
delay_50ms();
if (IN_BYTE(IDE_SELECT_REG) != drive->select.all && !drive->present) {
OUT_BYTE(0xa0,IDE_SELECT_REG); /* exit with drive0 selected */
delay_10ms(); /* allow BUSY_STAT to assert & clear */
delay_50ms(); /* allow BUSY_STAT to assert & clear */
return 3; /* no i/f present: avoid killing ethernet cards */
}
......@@ -2567,7 +2571,7 @@ static int do_probe (ide_drive_t *drive, byte cmd)
}
if (drive->select.b.unit != 0) {
OUT_BYTE(0xa0,IDE_SELECT_REG); /* exit with drive0 selected */
delay_10ms();
delay_50ms();
(void) GET_STAT(); /* ensure drive irq is clear */
}
return rc;
......
......@@ -274,7 +274,7 @@ void add_request(struct blk_dev_struct * dev, struct request * req)
tmp->next = req;
/* for SCSI devices, call request_fn unconditionally */
if (scsi_major(MAJOR(req->rq_dev)))
if (scsi_blk_major(MAJOR(req->rq_dev)))
(dev->request_fn)();
sti();
......
/*
* linux/drivers/block/triton.c Version 1.12 Jul 24, 1996
* linux/drivers/block/triton.c Version 1.13 Aug 12, 1996
*
* Copyright (c) 1995-1996 Mark Lord
* May be copied or modified under the terms of the GNU General Public License
......@@ -9,6 +9,9 @@
* This module provides support for the Bus Master IDE DMA function
* of the Intel PCI Triton I/II chipsets (i82371FB or i82371SB).
*
* Pretty much the same code will work for the OPTi "Viper" chipset.
* Look for DMA support for this in linux kernel 2.1.xx, when it appears.
*
* DMA is currently supported only for hard disk drives (not cdroms).
*
* Support for cdroms will likely be added at a later date,
......@@ -116,6 +119,8 @@
#include "ide.h"
#undef DISPLAY_TRITON_TIMINGS /* define this to display timings */
/*
* good_dma_drives() lists the model names (from "hdparm -i")
* of drives which do not support mword2 DMA but which are
......@@ -223,7 +228,7 @@ static int build_dmatable (ide_drive_t *drive)
if (bcount > size)
bcount = size;
*table++ = addr;
*table++ = bcount;
*table++ = bcount & 0xffff;
addr += bcount;
size -= bcount;
}
......@@ -309,7 +314,7 @@ static int triton_dmaproc (ide_dma_action_t func, ide_drive_t *drive)
return 1;
outl(virt_to_bus (HWIF(drive)->dmatable), dma_base + 4); /* PRD table */
outb(reading, dma_base); /* specify r/w */
outb(0x26, dma_base+2); /* clear status bits */
outb(inb(dma_base+2)|0x06, dma_base+2); /* clear status bits */
#ifdef CONFIG_BLK_DEV_IDEATAPI
if (drive->media != ide_disk)
return 0;
......@@ -320,6 +325,7 @@ static int triton_dmaproc (ide_dma_action_t func, ide_drive_t *drive)
return 0;
}
#ifdef DISPLAY_TRITON_TIMINGS
/*
* print_triton_drive_flags() displays the currently programmed options
* in the i82371 (Triton) for a given drive.
......@@ -341,6 +347,7 @@ static void print_triton_drive_flags (unsigned int unit, byte flags)
printk(" IORDY=%s", (flags&2) ? "on " : "off");
printk(" fastPIO=%s\n", ((flags&9)==1) ? "on " : "off");
}
#endif /* DISPLAY_TRITON_TIMINGS */
static void init_triton_dma (ide_hwif_t *hwif, unsigned short base)
{
......@@ -354,11 +361,11 @@ static void init_triton_dma (ide_hwif_t *hwif, unsigned short base)
hwif->dma_base = base;
if (!dmatable) {
/*
* Since we know we are on a PCI bus, we could
* actually use __get_free_pages() here instead
* The BM-DMA uses a full 32-bits, so we can
* safely use __get_free_page() here instead
* of __get_dma_pages() -- no ISA limitations.
*/
dmatable = __get_dma_pages(GFP_KERNEL, 0);
dmatable = __get_free_page(GFP_KERNEL);
}
if (dmatable) {
hwif->dmatable = (unsigned long *) dmatable;
......@@ -434,7 +441,10 @@ void ide_init_triton (byte bus, byte fn)
* Save the dma_base port addr for each interface
*/
for (h = 0; h < MAX_HWIFS; ++h) {
#ifdef DISPLAY_TRITON_TIMINGS
byte s_clks, r_clks;
unsigned short devid;
#endif /* DISPLAY_TRITON_TIMINGS */
ide_hwif_t *hwif = &ide_hwifs[h];
unsigned short time;
if (hwif->io_base == 0x1f0) {
......@@ -453,12 +463,32 @@ void ide_init_triton (byte bus, byte fn)
init_triton_dma(hwif, bmiba + 8);
} else
continue;
#ifdef DISPLAY_TRITON_TIMINGS
s_clks = ((~time >> 12) & 3) + 2;
r_clks = ((~time >> 8) & 3) + 1;
printk(" %s timing: (0x%04x) sample_CLKs=%d, recovery_CLKs=%d\n",
hwif->name, time, s_clks, r_clks);
if ((time & 0x40) && !pcibios_read_config_word(bus, fn, 0x02, &devid)
&& devid == PCI_DEVICE_ID_INTEL_82371SB_1)
{
byte stime;
if (pcibios_read_config_byte(bus, fn, 0x44, &stime)) {
if (hwif->io_base == 0x1f0) {
s_clks = ~stime >> 6;
r_clks = ~stime >> 4;
} else {
s_clks = ~stime >> 2;
r_clks = ~stime;
}
s_clks = (s_clks & 3) + 2;
r_clks = (r_clks & 3) + 1;
printk(" slave: sample_CLKs=%d, recovery_CLKs=%d\n",
s_clks, r_clks);
}
}
print_triton_drive_flags (0, time & 0xf);
print_triton_drive_flags (1, (time >> 4) & 0xf);
#endif /* DISPLAY_TRITON_TIMINGS */
}
quit: if (rc) printk("ide: pcibios access failed - %s\n", pcibios_strerror(rc));
......
......@@ -21,7 +21,7 @@
#define FM_WRITE 0x2 /* file mode write bit */
#define VERSION "$Id: cdrom.c,v 0.4 1996/04/17 20:47:50 david Exp david $"
#define VERSION "$Id: cdrom.c,v 0.8 1996/08/10 10:52:11 david Exp $"
/* Not-exported routines. */
int cdrom_open(struct inode *ip, struct file *fp);
......@@ -351,7 +351,7 @@ int cdrom_ioctl(struct inode *ip, struct file *fp,
return cdo->options;
case CDROM_SELECT_SPEED:
if (0 <= arg && arg < (int) (cdo->speed + 0.5) &&
if (0 <= arg && arg <= cdo->speed &&
cdo->capability & ~cdo->mask & CDC_SELECT_SPEED)
return cdo->select_speed(dev, arg);
else
......
......@@ -98,7 +98,7 @@
* - Philips/LMS cm260 product specification
*
* David van Leeuwen, david@tm.tno.nl. */
#define VERSION "$Id: cm206.c,v 0.99 1996/04/14 20:26:26 david Exp david $"
#define VERSION "$Id: cm206.c,v 0.99.1.1 1996/08/11 10:35:01 david Exp $"
#include <linux/module.h>
......@@ -1086,7 +1086,7 @@ static struct cdrom_device_ops cm206_dops = {
CDC_CLOSE_TRAY | CDC_OPEN_TRAY | CDC_LOCK | CDC_MULTI_SESSION |
CDC_MEDIA_CHANGED | CDC_MCN | CDC_PLAY_AUDIO, /* capability */
0, /* mask flags */
2.0, /* maximum speed */
2, /* maximum speed */
1, /* number of minor devices */
1, /* number of discs */
0, /* options, ignored */
......@@ -1188,12 +1188,14 @@ int cm206_init(void)
}
else printk(" IRQ %d found\n", cm206_irq);
#else
cli();
reset_cm260();
/* Now, the problem here is that reset_cm260 can generate an
interrupt. It seems that this can cause a kernel oops some time
later. So we wait a while and `service' this interrupt. */
udelay(10);
outw(dc_normal | READ_AHEAD, r_data_control);
sti();
printk(" using IRQ %d\n", cm206_irq);
#endif
if (send_receive_polled(c_drive_configuration) != c_drive_configuration)
......
......@@ -13,7 +13,7 @@
* labelled E2550UA or MK4015 or 2800F).
*/
#define VERSION "v4.4 Eberhard Moenkeberg <emoenke@gwdg.de>"
#define VERSION "v4.5 Eberhard Moenkeberg <emoenke@gwdg.de>"
/* Copyright (C) 1993, 1994, 1995 Eberhard Moenkeberg <emoenke@gwdg.de>
*
......@@ -284,10 +284,18 @@
* Inhibited "play audio" attempts with data CDs. Provisions for a
* "data-safe" handling of "mixed" (data plus audio) Cds.
*
* 4.5 Meanwhile Gonzalo Tornaria <tornaria@cmat.edu.uy> (GTL) built a
* special end_request routine: we seem to have to take care for not
* to have two processes working at the request list. My understanding
* was and is that ll_rw_blk should not call do_sbpcd_request as long
* as there is still one call active (the first call will care for all
* outstanding I/Os, and if a second call happens, that is a bug in
* ll_rw_blk.c).
* "Check media change" without touching any drive.
*
*
* TODO
*
* disk change detection
* synchronize multi-activity
* (data + audio + ioctl + disk change, multiple drives)
* implement "read all subchannel data" (96 bytes per frame)
......@@ -510,7 +518,6 @@ static int sbpcd_debug = (1<<DBG_INF);
static int sbpcd_debug = ((1<<DBG_INF) |
(1<<DBG_TOC) |
(1<<DBG_MUL) |
(1<<DBG_AUD) |
(1<<DBG_UPC));
#endif DISTRIBUTION
......@@ -914,7 +921,7 @@ static int sta2err(int sta)
if (sta==0x03) return (-607); /* unknown media */
if (sta==0x04) return (-612); /* general failure */
if (sta==0x05) return (0);
if (sta==0x06) return (-615); /* invalid disk change */
if (sta==0x06) return (-ERR_DISKCHANGE); /* disk change */
if (sta==0x0b) return (-612); /* general failure */
if (sta==0xff) return (-612); /* general failure */
return (0);
......@@ -931,10 +938,9 @@ static int sta2err(int sta)
if (sta==0x0f) return (-611); /* read fault */
if (sta==0x10) return (-611); /* read fault */
if (sta>=0x16) return (-612); /* general failure */
D_S[d].CD_changed=0xFF;
if (sta==0x11) return (-615); /* invalid disk change (LCS: removed) */
if (sta==0x11) return (-ERR_DISKCHANGE); /* disk change (LCS: removed) */
if (famL_drive)
if (sta==0x12) return (-615); /* invalid disk change (inserted) */
if (sta==0x12) return (-ERR_DISKCHANGE); /* disk change (inserted) */
return (-602); /* drive not ready */
}
}
......@@ -1115,8 +1121,12 @@ static int get_state_T(void)
/* 2: closed, disk in */
D_S[d].status_bits=p1_door_closed|p1_disk_in|p1_spinning|p1_disk_ok;
else if (D_S[d].error_state==6)
{
/* 3: closed, disk in, changed ("06 xx xx") */
D_S[d].status_bits=p1_door_closed|p1_disk_in;
D_S[d].CD_changed=0xFF;
D_S[d].diskstate_flags &= ~toc_bit;
}
else if ((D_S[d].error_state!=2)||(D_S[d].b3!=0x3A)||(D_S[d].b4==0x00))
{
/* 1: closed, no disk ("xx yy zz"or "02 3A 00") */
......@@ -1230,6 +1240,11 @@ static int cc_ReadError(void)
D_S[d].error_byte=infobuf[i];
msg(DBG_ERR,"cc_ReadError: infobuf[%d] is %d (%02X)\n",i,D_S[d].error_byte,D_S[d].error_byte);
i=sta2err(infobuf[i]);
if (i==-ERR_DISKCHANGE)
{
D_S[d].CD_changed=0xFF;
D_S[d].diskstate_flags &= ~toc_bit;
}
return (i);
}
/*==========================================================================*/
......@@ -1924,7 +1939,7 @@ static int DriveReset(void)
do
{
i=GetStatus();
if ((i<0)&&(i!=-615)) return (-2); /* i!=-615 is from sta2err */
if ((i<0)&&(i!=-ERR_DISKCHANGE)) return (-2); /* from sta2err */
if (!st_caddy_in) break;
sbp_sleep(1);
}
......@@ -4448,7 +4463,7 @@ static void sbp_transfer(struct request *req)
* special end_request for sbpcd to solve CURRENT==NULL bug. (GTL)
* GTL = Gonzalo Tornaria <tornaria@cmat.edu.uy>
*
* This is a kluge so we don't need to modify end_request
* This is a kludge so we don't need to modify end_request.
* We put the req we take out after INIT_REQUEST in the requests list,
* so that end_request will discard it.
*
......@@ -4458,7 +4473,7 @@ static void sbp_transfer(struct request *req)
*
* Could be a race here?? Could e.g. a timer interrupt schedule() us?
* If so, we should copy end_request here, and do it right.. (or
* modify end_request and the block devices.
* modify end_request and the block devices).
*
* In any case, the race here would be much small than it was, and
* I couldn't reproduce..
......@@ -4466,7 +4481,7 @@ static void sbp_transfer(struct request *req)
* The race could be: suppose CURRENT==NULL. We put our req in the list,
* and we are scheduled. Other process takes over, and gets into
* do_sbpcd_request. It sees CURRENT!=NULL (it is == to our req), so
* proceds. It ends, so CURRENT is now NULL.. Now we awake somewhere in
* proceeds. It ends, so CURRENT is now NULL.. Now we awake somewhere in
* end_request, but now CURRENT==NULL... oops!
*
*/
......@@ -4514,9 +4529,10 @@ static void DO_SBPCD_REQUEST(void)
sti();
if (req->rq_status == RQ_INACTIVE)
goto err_done;
sbpcd_end_request(req, 0);
if (req -> sector == -1)
goto err_done;
sbpcd_end_request(req, 0);
if (req->cmd != READ)
{
msg(DBG_INF, "bad cmd %d\n", req->cmd);
......@@ -5517,15 +5533,12 @@ void cleanup_module(void)
/*
* Check if the media has changed in the CD-ROM drive.
* used externally (isofs/inode.c, fs/buffer.c)
* Currently disabled (has to get "synchronized").
*/
static int sbpcd_chk_disk_change(kdev_t full_dev)
{
int i, st;
int i;
msg(DBG_CHK,"media_check (%d) called\n", MINOR(full_dev));
return (0); /* "busy" test necessary before we really can check */
i=MINOR(full_dev);
if ( (i<0) || (i>=NR_SBPCD) || (D_S[i].drv_id==-1) )
{
......@@ -5533,43 +5546,14 @@ static int sbpcd_chk_disk_change(kdev_t full_dev)
return (-1);
}
switch_drive(i);
cc_ReadStatus(); /* command: give 1-byte status */
st=ResponseStatus();
msg(DBG_CHK,"media_check: %02X\n",D_S[d].status_bits);
if (st<0)
{
msg(DBG_INF,"media_check: ResponseStatus error.\n");
return (1); /* status not obtainable */
}
if (D_S[d].CD_changed==0xFF) msg(DBG_CHK,"media_check: \"changed\" assumed.\n");
if (!st_spinning) msg(DBG_CHK,"media_check: motor off.\n");
if (!st_door_closed)
{
msg(DBG_CHK,"media_check: door open.\n");
D_S[d].CD_changed=0xFF;
}
if (!st_caddy_in)
{
msg(DBG_CHK,"media_check: no disk in drive.\n");
D_S[d].open_count=0;
D_S[d].CD_changed=0xFF;
}
if (!st_diskok) msg(DBG_CHK,"media_check: !st_diskok.\n");
#if 0000
if (D_S[d].CD_changed==0xFF)
{
D_S[d].CD_changed=1;
return (1); /* driver had a change detected before */
}
#endif 0000 /* seems to give additional errors at the moment */
if (!st_diskok) return (1); /* disk not o.k. */
if (!st_caddy_in) return (1); /* disk removed */
if (!st_door_closed) return (1); /* door open */
return (0);
if (D_S[i].CD_changed==0xFF)
{
D_S[i].CD_changed=0;
msg(DBG_CHK,"medium changed (drive %d)\n", i);
return (1);
}
else
return (0);
}
/*==========================================================================*/
/*
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -233,6 +233,7 @@ struct pci_dev_info dev_info[] = {
DEVICE( INTEL, INTEL_P6, "Orion P6"),
DEVICE( ADAPTEC, ADAPTEC_7850, "AIC-7850"),
DEVICE( ADAPTEC, ADAPTEC_7855, "AIC-7855"),
DEVICE( ADAPTEC, ADAPTEC_7860, "AIC-7860"),
DEVICE( ADAPTEC, ADAPTEC_7870, "AIC-7870"),
DEVICE( ADAPTEC, ADAPTEC_7871, "AIC-7871"),
DEVICE( ADAPTEC, ADAPTEC_7872, "AIC-7872"),
......
This diff is collapsed.
/* $Id: advansys.h,v 1.10 1996/01/15 04:51:06 bobf Exp bobf $ */
/* $Id: advansys.h,v 1.11 1996/08/12 17:20:44 bobf Exp bobf $ */
/*
* advansys.h - Linux Host Driver for AdvanSys SCSI Adapters
*
* Copyright (c) 1995-1996 Advanced System Products, Inc.
*
* This driver may be modified and freely distributed provided that
* the above copyright message and this comment are included in the
* distribution. The latest version of this driver is available at
* the AdvanSys FTP and BBS sites listed below.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that redistributions of source
* code retain the above copyright notice and this comment without
* modification.
*
* The latest version of this driver is available at the AdvanSys
* FTP and BBS sites listed below.
*
* Please send questions, comments, and bug reports to:
* bobf@advansys.com (Bob Frey)
......@@ -16,17 +19,12 @@
#ifndef _ADVANSYS_H
#define _ADVANSYS_H
/* The driver can be used in Linux 1.2.X or 1.3.X. */
#if !defined(LINUX_1_2) && !defined(LINUX_1_3)
/* Convert Linux Version, Patch-level, Sub-level to LINUX_VERSION_CODE. */
#define ASC_LINUX_VERSION(V, P, S) (((V) * 65536) + ((P) * 256) + (S))
#ifndef LINUX_VERSION_CODE
#include <linux/version.h>
#endif /* LINUX_VERSION_CODE */
#if LINUX_VERSION_CODE > 65536 + 3 * 256
#define LINUX_1_3
#else /* LINUX_VERSION_CODE */
#define LINUX_1_2
#endif /* LINUX_VERSION_CODE */
#endif /* !defined(LINUX_1_2) && !defined(LINUX_1_3) */
/*
* Scsi_Host_Template function prototypes.
......@@ -37,14 +35,18 @@ const char *advansys_info(struct Scsi_Host *);
int advansys_command(Scsi_Cmnd *);
int advansys_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
int advansys_abort(Scsi_Cmnd *);
#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,89)
int advansys_reset(Scsi_Cmnd *);
#ifdef LINUX_1_2
#else /* version >= v1.3.89 */
int advansys_reset(Scsi_Cmnd *, unsigned int);
#endif /* version >= v1.3.89 */
#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
int advansys_biosparam(Disk *, int, int[]);
#else /* LINUX_1_3 */
#else /* version >= v1.3.0 */
int advansys_biosparam(Disk *, kdev_t, int[]);
extern struct proc_dir_entry proc_scsi_advansys;
int advansys_proc_info(char *, char **, off_t, int, int, int);
#endif /* LINUX_1_3 */
#endif /* version >= v1.3.0 */
/* init/main.c setup function */
void advansys_setup(char *, int *);
......@@ -52,7 +54,7 @@ void advansys_setup(char *, int *);
/*
* AdvanSys Host Driver Scsi_Host_Template (struct SHT) from hosts.h.
*/
#ifdef LINUX_1_2
#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
#define ADVANSYS { \
NULL, /* struct SHT *next */ \
NULL, /* int *usage_count */ \
......@@ -88,7 +90,7 @@ void advansys_setup(char *, int *);
*/ \
DISABLE_CLUSTERING, /* unsigned use_clustering:1 */ \
}
#else /* LINUX_1_3 */
#else /* version >= v1.3.0 */
#define ADVANSYS { \
NULL, /* struct SHT *next */ \
NULL, /* long *usage_count */ \
......@@ -103,7 +105,9 @@ void advansys_setup(char *, int *);
advansys_queuecommand, \
/* int (*queuecommand)(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)) */ \
advansys_abort, /* int (*abort)(Scsi_Cmnd *) */ \
advansys_reset, /* int (*reset)(Scsi_Cmnd *) */ \
advansys_reset, \
/* version < v1.3.89 int (*reset)(Scsi_Cmnd *) */ \
/* version >= v1.3.89 int (*reset)(Scsi_Cmnd *, unsigned int) */ \
NULL, /* int (*slave_attach)(int, int) */ \
advansys_biosparam, /* int (* bios_param)(Disk *, kdev_t, int []) */ \
/* \
......@@ -127,5 +131,5 @@ void advansys_setup(char *, int *);
*/ \
DISABLE_CLUSTERING, /* unsigned use_clustering:1 */ \
}
#endif /* LINUX_1_3 */
#endif /* version >= v1.3.0 */
#endif /* _ADVANSYS_H */
This diff is collapsed.
......@@ -18,12 +18,12 @@
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: aic7xxx.h,v 3.1 1996/05/12 17:25:20 deang Exp $
* $Id: aic7xxx.h,v 3.2 1996/07/23 03:37:26 deang Exp $
*-M*************************************************************************/
#ifndef _aic7xxx_h
#define _aic7xxx_h
#define AIC7XXX_H_VERSION "$Revision: 3.1 $"
#define AIC7XXX_H_VERSION "$Revision: 3.2 $"
/*
* Scsi_Host_Template (see hosts.h) for AIC-7xxx - some fields
......@@ -58,7 +58,7 @@ extern int aic7xxx_biosparam(Disk *, kdev_t, int[]);
extern int aic7xxx_detect(Scsi_Host_Template *);
extern int aic7xxx_command(Scsi_Cmnd *);
extern int aic7xxx_abort(Scsi_Cmnd *);
extern int aic7xxx_reset(Scsi_Cmnd *, unsigned int resetFlags);
extern int aic7xxx_reset(Scsi_Cmnd *, unsigned int);
extern const char *aic7xxx_info(struct Scsi_Host *);
......
This diff is collapsed.
......@@ -24,7 +24,7 @@
*
* Dean W. Gehnert, deang@teleport.com, 05/01/96
*
* $Id: aic7xxx_proc.c,v 3.1 1996/05/12 17:25:56 deang Exp $
* $Id: aic7xxx_proc.c,v 3.2 1996/07/23 03:37:26 deang Exp $
*-M*************************************************************************/
#define BLS buffer + len + size
......@@ -151,10 +151,10 @@ aic7xxx_proc_info(char *buffer, char **start, off_t offset, int length,
#else
size += sprintf(BLS, " AIC7XXX_TAGGED_QUEUEING: Disabled\n");
#endif
#ifdef AIC7XXX_SHARE_IRQS
size += sprintf(BLS, " AIC7XXX_SHARE_IRQS : Enabled\n");
#ifdef AIC7XXX_PAGE_ENABLE
size += sprintf(BLS, " AIC7XXX_PAGE_ENABLE : Enabled\n");
#else
size += sprintf(BLS, " AIC7XXX_SHARE_IRQS : Disabled\n");
size += sprintf(BLS, " AIC7XXX_PAGE_ENABLE : Disabled\n");
#endif
#ifdef AIC7XXX_PROC_STATS
size += sprintf(BLS, " AIC7XXX_PROC_STATS : Enabled\n");
......@@ -171,7 +171,8 @@ aic7xxx_proc_info(char *buffer, char **start, off_t offset, int length,
size += sprintf(BLS, " Host Bus: %s\n", bus_names[p->bus_type]);
size += sprintf(BLS, " Base IO: %#.4x\n", p->base);
size += sprintf(BLS, " IRQ: %d\n", HBAptr->irq);
size += sprintf(BLS, " SCB: %d (%d)\n", p->numscb, p->maxscb);
size += sprintf(BLS, " SCBs: Used %d, HW %d, Page %d\n",
p->numscbs, p->maxhscbs, p->maxscbs);
size += sprintf(BLS, " Interrupts: %d", p->isr_count);
if (p->chip_type == AIC_777x)
{
......@@ -183,13 +184,13 @@ aic7xxx_proc_info(char *buffer, char **start, off_t offset, int length,
size += sprintf(BLS, "\n");
}
size += sprintf(BLS, " Serial EEPROM: %s\n",
p->have_seeprom ? "True" : "False");
(p->flags & HAVE_SEEPROM) ? "True" : "False");
size += sprintf(BLS, " Extended Translation: %sabled\n",
p->extended ? "En" : "Dis");
(p->flags & EXTENDED_TRANSLATION) ? "En" : "Dis");
size += sprintf(BLS, " SCSI Bus Reset: %sabled\n",
aic7xxx_no_reset ? "Dis" : "En");
size += sprintf(BLS, " Ultra SCSI: %sabled\n",
p->ultra_enabled ? "En" : "Dis");
(p->flags & ULTRA_ENABLED) ? "En" : "Dis");
size += sprintf(BLS, " Target Disconnect: %sabled\n",
p->discenable ? "En" : "Dis");
len += size; pos = begin + len; size = 0;
......
......@@ -18,7 +18,9 @@
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: aic7xxx_reg.h,v 3.0 1996/04/16 08:52:23 deang Exp $
* This version corresponds to version 1.12 of FreeBSDs aic7xxx_reg.h
*
* $Id: aic7xxx_reg.h,v 3.1 1996/07/23 03:37:26 deang Exp $
*-M*************************************************************************/
/*
......@@ -331,7 +333,6 @@
#define HCNT0 0x08c
#define HCNT1 0x08d
#define HCNT2 0x08e
/*
* SCB Pointer (p. 3-49)
* Gate one of the four SCBs into the SCBARRAY window.
......@@ -363,7 +364,6 @@
#define BUSTIME 0x085
#define BOFF 0xf0
#define BON 0x0f
#define BOFF_60BCLKS 0xf0
/*
* Bus Speed (p. 3-45)
......@@ -387,6 +387,7 @@
#define PAUSE 0x04
#define INTEN 0x02
#define CHIPRST 0x01
#define CHIPRSTACK 0x01
/*
* Interrupt Status (p. 3-50)
......@@ -425,6 +426,11 @@
* when we were expecting
* another msgin byte.
*/
#define DATA_OVERRUN 0xe1 /*
* Target attempted to write
* beyond the bounds of its
* command.
*/
#define BRKADRINT 0x08
#define SCSIINT 0x04
#define CMDCMPLT 0x02
......@@ -548,7 +554,9 @@
#define SCB_CMDPTR2 0x0b6
#define SCB_CMDPTR3 0x0b7
#define SCB_CMDLEN 0x0b8
#define SCB_NEXT_WAITING 0x0b9
#define SCB_TAG 0x0b9
#define SCB_NEXT 0x0ba
#define SCB_PREV 0x0bb
#ifdef linux
#define SG_SIZEOF 0x0c /* sizeof(struct scatterlist) */
......@@ -629,10 +637,12 @@
#define TARG_SCRATCH 0x020
/*
* The sequencer will stick the first byte of any rejected message here so
* we can see what is getting thrown away.
* The sequencer will stick the frist byte of any rejected message here so
* we can see what is getting thrown away. Extended messages put the
* extended message type in REJBYTE_EXT.
*/
#define REJBYTE 0x031
#define REJBYTE 0x030
#define REJBYTE_EXT 0x031
/*
* Bit vector of targets that have disconnection disabled.
......@@ -646,6 +656,7 @@
*/
#define MSG_LEN 0x034
/* We reserve 8bytes to store outgoing messages */
#define MSG0 0x035
#define COMP_MSG0 0xcb /* 2's complement of MSG0 */
#define MSG1 0x036
......@@ -653,70 +664,90 @@
#define MSG3 0x038
#define MSG4 0x039
#define MSG5 0x03a
#define MSG6 0x03b
#define MSG7 0x03c
/*
* These are offsets into the card's scratch ram. Some of the values are
* specified in the AHA2742 technical reference manual and are initialized
* by the BIOS at boot time.
*/
#define LASTPHASE 0x049
#define ARG_1 0x04a
#define RETURN_1 0x04a
#define SEND_SENSE 0x80
#define LASTPHASE 0x03d
#define ARG_1 0x03e
#define MAXOFFSET 0x01
#define RETURN_1 0x03f
#define SEND_WDTR 0x80
#define SEND_SDTR 0x80
#define SEND_REJ 0x40
#define SEND_SDTR 0x60
#define SEND_SENSE 0x40
#define SEND_REJ 0x20
#define SCB_PAGEDIN 0x10
#define SIGSTATE 0x04b
#define SIGSTATE 0x040
#define DMAPARAMS 0x04c /* Parameters for DMA Logic */
#define DMAPARAMS 0x041 /* Parameters for DMA Logic */
#define SG_COUNT 0x04d
#define SG_NEXT 0x04e /* working value of SG pointer */
#define SG_NEXT0 0x04e
#define SG_NEXT1 0x04f
#define SG_NEXT2 0x050
#define SG_NEXT3 0x051
#define SG_COUNT 0x042
#define SG_NEXT 0x043 /* working value of SG pointer */
#define SG_NEXT0 0x043
#define SG_NEXT1 0x044
#define SG_NEXT2 0x045
#define SG_NEXT3 0x046
#define SCBCOUNT 0x052 /*
#define SCBCOUNT 0x047 /*
* Number of SCBs supported by
* this card.
*/
#define FLAGS 0x053
#define COMP_SCBCOUNT 0x048 /*
* Two's compliment of SCBCOUNT
*/
#define QCNTMASK 0x049 /*
* Mask of bits to test against
* when looking at the Queue Count
* registers. Works around a bug
* on aic7850 chips.
*/
#define FLAGS 0x04a
#define SINGLE_BUS 0x00
#define TWIN_BUS 0x01
#define WIDE_BUS 0x02
#define DPHASE 0x04
#define MAXOFFSET 0x08
#define PAGESCBS 0x04
#define DPHASE 0x10
#define SELECTED 0x20
#define IDENTIFY_SEEN 0x40
#define RESELECTED 0x80
#define ACTIVE_A 0x054
#define ACTIVE_B 0x055
#define SAVED_TCL 0x056 /*
#define SAVED_TCL 0x04b /*
* Temporary storage for the
* target/channel/lun of a
* reconnecting target
*/
#define WAITING_SCBH 0x057 /*
#define ACTIVE_A 0x04c
#define ACTIVE_B 0x04d
#define WAITING_SCBH 0x04e /*
* head of list of SCBs awaiting
* selection
*/
#define QCNTMASK 0x058 /*
* Mask of bits to test against
* when looking at the Queue Count
* registers. Works around a bug
* on aic7850 chips.
#define DISCONNECTED_SCBH 0x04f /*
* head of list of SCBs that are
* disconnected. Used for SCB
* paging.
*/
#define COMP_SCBCOUNT 0x059
#define SCB_LIST_NULL 0xff
#define SAVED_LINKPTR 0x050
#define SAVED_SCBPTR 0x051
#define ULTRA_ENB 0x052
#define ULTRA_ENB_B 0x053
#define SCSICONF 0x05a
#define RESET_SCSI 0x40
#define HOSTCONF 0x05d
#define HA_274_BIOSCTRL 0x05f
#define BIOSMODE 0x30
#define BIOSDISABLED 0x30
#define CHANNEL_B_PRIMARY 0x08
/* Message codes */
#define MSG_EXTENDED 0x01
......@@ -731,6 +762,7 @@
#define MSG_NOP 0x08
#define MSG_MSG_PARITY_ERROR 0x09
#define MSG_BUS_DEVICE_RESET 0x0c
#define MSG_ABORT_TAG 0x0d
#define MSG_SIMPLE_TAG 0x20
#define MSG_IDENTIFY 0x80
......@@ -741,4 +773,3 @@
#define MAX_OFFSET_8BIT 0x0f
#define MAX_OFFSET_16BIT 0x08
......@@ -58,7 +58,7 @@
* Jagdis who did a lot of testing and found quite a number *
* of bugs during the development. *
************************************************************
* last change: 96/07/20 OS: Linux 2.0.8 *
* last change: 96/08/13 OS: Linux 2.0.12 *
************************************************************/
/* Look in eata_dma.h for configuration and revision information */
......@@ -855,6 +855,15 @@ static void eata_select_queue_depths(struct Scsi_Host *host,
} else /* ISA forces us to limit the QS because of bounce buffers*/
device->queue_depth = 2; /* I know this is cruel */
/*
* It showed that we need to set an upper limit of commands
* we can allow to queue for a single device on the bus.
* If we get above that limit, the broken midlevel SCSI code
* will produce bogus timeouts and aborts en masse. :-(
*/
if(device->queue_depth > UPPER_DEVICE_QUEUE_LIMIT)
device->queue_depth = UPPER_DEVICE_QUEUE_LIMIT;
printk(KERN_INFO "scsi%d: queue depth for target %d on channel %d "
"set to %d\n", host->host_no, device->id, device->channel,
device->queue_depth);
......
......@@ -4,7 +4,7 @@
* mike@i-Connect.Net *
* neuffer@mail.uni-mainz.de *
*********************************************************
* last change: 96/06/26 *
* last change: 96/08/14 *
********************************************************/
#ifndef _EATA_DMA_H
......@@ -17,7 +17,7 @@
#define VER_MAJOR 2
#define VER_MINOR 5
#define VER_SUB "8g"
#define VER_SUB "9a"
/************************************************************************
......
......@@ -5,7 +5,7 @@
* mike@i-Connect.Net *
* neuffer@mail.uni-mainz.de *
*********************************************************
* last change: 96/05/16 *
* last change: 96/08/14 *
********************************************************/
......@@ -68,6 +68,12 @@
#define SG_SIZE 64
#define SG_SIZE_BIG 252 /* max. 8096 elements, 64k */
#define UPPER_DEVICE_QUEUE_LIMIT 24 /* The limit we have to set for the
* device queue to keep the broken
* midlevel SCSI code from producing
* bogus timeouts
*/
#define TYPE_DISK_QUEUE 16
#define TYPE_TAPE_QUEUE 4
#define TYPE_ROM_QUEUE 4
......
......@@ -8142,7 +8142,7 @@ static int ncr_host_info(ncb_p np, char *ptr, off_t offset, int len)
copy_info(&info, " IO port address 0x%lx, ", (u_long) np->port);
copy_info(&info, "IRQ number %d\n", (int) np->irq);
#ifndef SCSI_NCR_IOMAPPED
#ifndef NCR_IOMAPPED
if (np->use_mmio)
copy_info(&info, " Using memory mapped IO at virtual address 0x%lx\n",
(u_long) np->reg_remapped);
......
......@@ -165,7 +165,7 @@ static int ioctl_internal_command(Scsi_Device *dev, char * cmd)
static int ioctl_command(Scsi_Device *dev, void *buffer)
{
char * buf;
char cmd[12];
unsigned char cmd[12];
char * cmd_in;
Scsi_Cmnd * SCpnt;
unsigned char opcode;
......@@ -187,10 +187,10 @@ static int ioctl_command(Scsi_Device *dev, void *buffer)
* The structure that we are passed should look like:
*
* struct sdata{
* int inlen;
* int outlen;
* char cmd[]; # However many bytes are used for cmd.
* char data[];
* unsigned int inlen;
* unsigned int outlen;
* unsigned char cmd[]; # However many bytes are used for cmd.
* unsigned char data[];
*/
inlen = get_user((unsigned int *) buffer);
outlen = get_user( ((unsigned int *) buffer) + 1);
......
......@@ -427,8 +427,8 @@ void sr_photocd(struct inode *inode)
printk(KERN_DEBUG "sr_photocd: use NEC code\n");
#endif
memset(buf,0,40);
*((unsigned long*)buf) = 0x0; /* we send nothing... */
*((unsigned long*)buf+1) = 0x16; /* and receive 0x16 bytes */
*((unsigned int*)buf) = 0x0; /* we send nothing... */
*((unsigned int*)buf+1) = 0x16; /* and receive 0x16 bytes */
cmd[0] = 0xde;
cmd[1] = 0x03;
cmd[2] = 0xb0;
......@@ -464,10 +464,10 @@ void sr_photocd(struct inode *inode)
/* we request some disc information (is it a XA-CD ?,
* where starts the last session ?) */
memset(buf,0,40);
*((unsigned long*)buf) = 0;
*((unsigned long*)buf+1) = 4; /* we receive 4 bytes from the drive */
cmd[0] = 0xc7;
cmd[1] = 3;
*((unsigned int*)buf) = (unsigned int) 0;
*((unsigned int*)buf+1) = (unsigned int) 4; /* receive 4 bytes */
cmd[0] = (unsigned char) 0x00c7;
cmd[1] = (unsigned char) 3;
rc = kernel_scsi_ioctl(scsi_CDs[MINOR(inode->i_rdev)].device,
SCSI_IOCTL_SEND_COMMAND, buf);
if (rc != 0) {
......@@ -499,11 +499,11 @@ void sr_photocd(struct inode *inode)
/* now we do a get_density... */
memset(buf,0,40);
*((unsigned long*)buf) = 0;
*((unsigned long*)buf+1) = 12;
cmd[0] = MODE_SENSE;
cmd[2] = 1;
cmd[4] = 12;
*((unsigned int*)buf) = (unsigned int) 0;
*((unsigned int*)buf+1) = (unsigned int) 12;
cmd[0] = (unsigned char) MODE_SENSE;
cmd[2] = (unsigned char) 1;
cmd[4] = (unsigned char) 12;
rc = kernel_scsi_ioctl(scsi_CDs[MINOR(inode->i_rdev)].device,
SCSI_IOCTL_SEND_COMMAND, buf);
if (rc != 0) {
......@@ -520,15 +520,17 @@ void sr_photocd(struct inode *inode)
printk(KERN_DEBUG "sr_photocd: doing set_density\n");
#endif
memset(buf,0,40);
*((unsigned long*)buf) = 12; /* sending 12 bytes... */
*((unsigned long*)buf+1) = 0;
cmd[0] = MODE_SELECT;
cmd[1] = (1 << 4);
cmd[4] = 12;
send = &cmd[6]; /* this is a 6-Byte command */
send[ 3] = 0x08; /* the data for the command */
send[ 4] = (is_xa) ? 0x81 : 0; /* density 0x81 for XA, 0 else */
send[10] = 0x08;
*((unsigned int*)buf) = (unsigned int) 12; /* send 12 bytes */
*((unsigned int*)buf+1) = (unsigned int) 0;
cmd[0] = (unsigned char) MODE_SELECT;
cmd[1] = (unsigned char) (1 << 4);
cmd[4] = (unsigned char) 12;
send = &cmd[6]; /* this is a 6-Byte command */
send[ 3] = (unsigned char) 0x08; /* data for cmd */
/* density 0x81 for XA, 0 else */
send[ 4] = (is_xa) ?
(unsigned char) 0x81 : (unsigned char) 0;
send[10] = (unsigned char) 0x08;
rc = kernel_scsi_ioctl(scsi_CDs[MINOR(inode->i_rdev)].device,
SCSI_IOCTL_SEND_COMMAND, buf);
if (rc != 0) {
......@@ -547,8 +549,8 @@ void sr_photocd(struct inode *inode)
#endif
get_sectorsize(MINOR(inode->i_rdev)); /* spinup (avoid timeout) */
memset(buf,0,40);
*((unsigned long*)buf) = 0x0; /* we send nothing... */
*((unsigned long*)buf+1) = 0x0c; /* and receive 0x0c bytes */
*((unsigned int*)buf) = 0x0; /* we send nothing... */
*((unsigned int*)buf+1) = 0x0c; /* and receive 0x0c bytes */
cmd[0] = READ_TOC;
cmd[8] = 0x0c;
cmd[9] = 0x40;
......
......@@ -41,6 +41,7 @@
#define MAJOR_NR SCSI_TAPE_MAJOR
#include <linux/blk.h>
#include "scsi.h"
#include "hosts.h"
#include <scsi/scsi_ioctl.h>
......
......@@ -623,7 +623,7 @@ attach_mad16_mpu (struct address_info *hw_config)
return;
}
#if (defined(CONFIG_MPU401) || defined(CONFIG_MPU_EMU)) && defined(CONFIG_MIDI)
#if defined(CONFIG_UART401) && defined(CONFIG_MIDI)
if (!already_initialized)
return;
......@@ -636,7 +636,7 @@ attach_mad16_mpu (struct address_info *hw_config)
int
probe_mad16_mpu (struct address_info *hw_config)
{
#if (defined(CONFIG_MPU401) || defined(CONFIG_MPU_EMU)) && defined(CONFIG_MIDI)
#if defined(CONFIG_UART401) && defined(CONFIG_MIDI)
static int mpu_attached = 0;
static int valid_ports[] =
{0x330, 0x320, 0x310, 0x300};
......
......@@ -500,9 +500,9 @@ sbpro_audio_prepare_for_output (int dev, int bsize, int bcount)
{
tmp = sb_getmixer (devc, 0x0e);
if (devc->channels == 1)
tmp &= ~0x20;
tmp &= ~0x02;
else
tmp |= 0x20;
tmp |= 0x02;
sb_setmixer (devc, 0x0e, tmp);
}
restore_flags (flags);
......
......@@ -427,6 +427,8 @@ unload_uart401 (struct address_info *hw_config)
if (devc == NULL)
return;
reset_uart401 (devc);
release_region (hw_config->io_base, 4);
if (!devc->share_irq)
......
......@@ -91,7 +91,7 @@ do_aout_core_dump(long signr, struct pt_regs * regs)
# define START_DATA(u) (u.u_tsize << PAGE_SHIFT)
#endif
if (!current->dumpable)
if (!current->dumpable || current->mm->count != 1)
return 0;
current->dumpable = 0;
......
......@@ -982,7 +982,7 @@ static int elf_core_dump(long signr, struct pt_regs * regs)
elf_fpregset_t fpu; /* NT_PRFPREG */
struct elf_prpsinfo psinfo; /* NT_PRPSINFO */
if (!current->dumpable || limit < PAGE_SIZE)
if (!current->dumpable || limit < PAGE_SIZE || current->mm->count != 1)
return 0;
current->dumpable = 0;
......
......@@ -25,7 +25,12 @@
#include <asm/system.h>
#include <asm/segment.h>
#define MULTI_VOLUME
/*
* We have no support for "multi volume" CDs, but more and more disks carry
* wrong information within the volume descriptors.
*/
#define IGNORE_WRONG_MULTI_VOLUME_SPECS
#ifdef LEAK_CHECK
static int check_malloc = 0;
static int check_bread = 0;
......@@ -161,7 +166,22 @@ static int parse_options(char *options, struct iso9660_options * popt)
/*
* look if the driver can tell the multi session redirection value
*
* don't change this if you don't know what you do, please!
* Multisession is legal only with XA disks.
* A non-XA disk with more than one volume descriptor may do it right, but
* usually is written in a nowhere standardized "multi-partition" manner.
* Multisession uses absolute addressing (solely the first frame of the whole
* track is #0), multi-partition uses relative addressing (each first frame of
* each track is #0), and a track is not a session.
*
* A broken CDwriter software or drive firmware does not set new standards,
* at least not if conflicting with the existing ones.
*
* emoenke@gwdg.de
*/
#define WE_OBEY_THE_WRITTEN_STANDARDS 1
static unsigned int isofs_get_last_session(kdev_t dev)
{
struct cdrom_multisession ms_info;
......@@ -189,7 +209,11 @@ static unsigned int isofs_get_last_session(kdev_t dev)
printk("isofs.inode: vol_desc_start = %d\n", ms_info.addr.lba);
}
#endif 0
if ((i==0)&&(ms_info.xa_flag)) vol_desc_start=ms_info.addr.lba;
if (i==0)
#if WE_OBEY_THE_WRITTEN_STANDARDS
if (ms_info.xa_flag) /* necessary for a valid ms_info.addr */
#endif WE_OBEY_THE_WRITTEN_STANDARDS
vol_desc_start=ms_info.addr.lba;
}
return vol_desc_start;
}
......@@ -305,23 +329,23 @@ struct super_block *isofs_read_super(struct super_block *s,void *data,
if(high_sierra){
rootp = (struct iso_directory_record *) h_pri->root_directory_record;
#ifndef IGNORE_WRONG_MULTI_VOLUME_SPECS
if (isonum_723 (h_pri->volume_set_size) != 1) {
#ifndef MULTI_VOLUME
printk("Multi-volume disks not (yet) supported.\n");
printk("Multi-volume disks not supported.\n");
goto out;
#endif
}
#endif IGNORE_WRONG_MULTI_VOLUME_SPECS
s->u.isofs_sb.s_nzones = isonum_733 (h_pri->volume_space_size);
s->u.isofs_sb.s_log_zone_size = isonum_723 (h_pri->logical_block_size);
s->u.isofs_sb.s_max_size = isonum_733(h_pri->volume_space_size);
} else {
rootp = (struct iso_directory_record *) pri->root_directory_record;
#ifndef IGNORE_WRONG_MULTI_VOLUME_SPECS
if (isonum_723 (pri->volume_set_size) != 1) {
#ifndef MULTI_VOLUME
printk("Multi-volume disks not (yet) supported.\n");
printk("Multi-volume disks not supported.\n");
goto out;
#endif
}
#endif IGNORE_WRONG_MULTI_VOLUME_SPECS
s->u.isofs_sb.s_nzones = isonum_733 (pri->volume_space_size);
s->u.isofs_sb.s_log_zone_size = isonum_723 (pri->logical_block_size);
s->u.isofs_sb.s_max_size = isonum_733(pri->volume_space_size);
......@@ -628,16 +652,16 @@ void isofs_read_inode(struct inode * inode)
*/
if (inode->i_sb->u.isofs_sb.s_cruft == 'n' &&
(volume_seq_no != 0) && (volume_seq_no != 1)) {
printk("Warning: defective cdrom. Enabling \"cruft\" mount option.\n");
printk("Warning: defective cdrom (volume sequence number). Enabling \"cruft\" mount option.\n");
inode->i_sb->u.isofs_sb.s_cruft = 'y';
}
#ifndef MULTI_VOLUME
#ifndef IGNORE_WRONG_MULTI_VOLUME_SPECS
if (inode->i_sb->u.isofs_sb.s_cruft != 'y' &&
(volume_seq_no != 0) && (volume_seq_no != 1)) {
printk("Multi volume CD somehow got mounted.\n");
} else
#endif
#endif IGNORE_WRONG_MULTI_VOLUME_SPECS
{
if (S_ISREG(inode->i_mode))
inode->i_op = &isofs_file_inode_operations;
......
......@@ -427,8 +427,8 @@ static unsigned long get_wchan(struct task_struct *p)
if (ebp < stack_page || ebp >= 4092+stack_page)
return 0;
eip = *(unsigned long *) (ebp+4);
if ((void *)eip != sleep_on &&
(void *)eip != interruptible_sleep_on)
if (eip < (unsigned long) interruptible_sleep_on
|| eip >= (unsigned long) add_timer)
return eip;
ebp = *(unsigned long *) ebp;
} while (count++ < 16);
......
......@@ -39,6 +39,7 @@ struct thread_struct {
*/
unsigned long flags;
unsigned long res1, res2;
unsigned long segment;
};
#define INIT_MMAP { &init_mm, 0xfffffc0000000000, 0xfffffc0010000000, \
......@@ -47,7 +48,7 @@ struct thread_struct {
#define INIT_TSS { \
0, 0, 0, \
0, 0, 0, \
0, 0, 0, \
0, 0, 0, KERNEL_DS, \
}
#define alloc_kernel_stack() get_free_page(GFP_KERNEL)
......@@ -74,11 +75,6 @@ extern inline unsigned long thread_saved_pc(struct thread_struct *t)
/*
* Do necessary setup to start up a newly executed thread.
*/
static inline void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp)
{
regs->pc = pc;
regs->ps = 8;
wrusp(sp);
}
extern void start_thread(struct pt_regs *, unsigned long, unsigned long);
#endif /* __ASM_ALPHA_PROCESSOR_H */
......@@ -111,18 +111,12 @@ static inline void memcpy_tofs(void * to, const void * from, unsigned long n)
#define KERNEL_DS 0
#define USER_DS 1
static inline unsigned long get_fs(void)
{
return 1;
}
#define get_fs() (current->tss.segment)
#define set_fs(x) (current->tss.segment=(x))
static inline unsigned long get_ds(void)
{
return 0;
}
static inline void set_fs(unsigned long val)
{
}
#endif /* _ASM_SEGMENT_H */
......@@ -94,15 +94,15 @@ enum machine_type {
#endif
#if !defined (N_DRELOFF)
#define N_DRELOFF(x) (N_TRELOFF(x) + (x).a_trsize)
#define N_DRELOFF(x) (N_TRELOFF(x) + N_TRSIZE(x))
#endif
#if !defined (N_SYMOFF)
#define N_SYMOFF(x) (N_DRELOFF(x) + (x).a_drsize)
#define N_SYMOFF(x) (N_DRELOFF(x) + N_DRSIZE(x))
#endif
#if !defined (N_STROFF)
#define N_STROFF(x) (N_SYMOFF(x) + (x).a_syms)
#define N_STROFF(x) (N_SYMOFF(x) + N_SYMSIZE(x))
#endif
/* Address of text segment in memory after it is loaded. */
......
......@@ -310,7 +310,8 @@ static void floppy_off(unsigned int nr);
#endif /* MAJOR_NR == whatever */
#if ((MAJOR_NR != SCSI_TAPE_MAJOR) && !defined(IDE_DRIVER))
#if (MAJOR_NR != SCSI_TAPE_MAJOR)
#if !defined(IDE_DRIVER)
#ifndef CURRENT
#define CURRENT (blk_dev[MAJOR_NR].current_request)
......@@ -362,12 +363,12 @@ static void (DEVICE_REQUEST)(void);
panic(DEVICE_NAME ": block not locked"); \
}
#endif /* (MAJOR_NR != SCSI_TAPE_MAJOR) && !defined(IDE_DRIVER) */
#endif /* !defined(IDE_DRIVER) */
/* end_request() - SCSI devices have their own version */
/* - IDE drivers have their own copy too */
#if ! SCSI_MAJOR(MAJOR_NR)
#if ! SCSI_BLK_MAJOR(MAJOR_NR)
#if defined(IDE_DRIVER) && !defined(_IDE_C) /* shared copy for IDE modules */
void ide_end_request(byte uptodate, ide_hwgroup_t *hwgroup);
......@@ -423,7 +424,8 @@ static void end_request(int uptodate) {
wake_up(&wait_for_request);
}
#endif /* defined(IDE_DRIVER) && !defined(_IDE_C) */
#endif /* ! SCSI_MAJOR(MAJOR_NR) */
#endif /* ! SCSI_BLK_MAJOR(MAJOR_NR) */
#endif /* (MAJOR_NR != SCSI_TAPE_MAJOR) */
#endif /* defined(MAJOR_NR) || defined(IDE_DRIVER) */
......
......@@ -18,10 +18,8 @@
#ifndef __LINUX_STRIP_H
#define __LINUX_STRIP_H
typedef union {
__u32 l;
__u16 s[2];
__u8 c[4];
typedef struct {
__u8 c[6];
} MetricomAddress;
#endif
......@@ -73,14 +73,12 @@
* Tests for SCSI devices.
*/
#define SCSI_MAJOR(M) \
#define SCSI_BLK_MAJOR(M) \
((M) == SCSI_DISK_MAJOR \
|| (M) == SCSI_TAPE_MAJOR \
|| (M) == SCSI_CDROM_MAJOR \
|| (M) == SCSI_GENERIC_MAJOR)
|| (M) == SCSI_CDROM_MAJOR)
static inline int scsi_major(int m) {
return SCSI_MAJOR(m);
static inline int scsi_blk_major(int m) {
return SCSI_BLK_MAJOR(m);
}
#endif
......@@ -556,6 +556,7 @@
#define PCI_VENDOR_ID_ADAPTEC 0x9004
#define PCI_DEVICE_ID_ADAPTEC_7850 0x5078
#define PCI_DEVICE_ID_ADAPTEC_7855 0x5578
#define PCI_DEVICE_ID_ADAPTEC_7860 0x6078
#define PCI_DEVICE_ID_ADAPTEC_7870 0x7078
#define PCI_DEVICE_ID_ADAPTEC_7871 0x7178
#define PCI_DEVICE_ID_ADAPTEC_7872 0x7278
......
......@@ -102,6 +102,8 @@ enum net_directory_inos {
PROC_NET_ALIAS_TYPES,
PROC_NET_ALIASES,
PROC_NET_IP_MASQ_APP,
PROC_NET_STRIP_STATUS,
PROC_NET_STRIP_TRACE,
PROC_NET_LAST
};
......
......@@ -106,16 +106,6 @@
/* Set this to 0 once you have configured your interface definitions right. */
#define DISTRIBUTION 1
#if DISTRIBUTION
#define READ_AUDIO 0
#define KLOGD_PAUSE 55
#else
/* max. number of audio frames to read with one */
/* request (allocates n* 2352 bytes kernel memory!) */
/* may be freely adjusted, f.e. 75 (= 1 sec.), at */
/* runtime by use of the CDROMAUDIOBUFSIZ ioctl. */
#define READ_AUDIO 75
/*
* Time to wait after giving a message.
* This gets important if you enable non-standard DBG_xxx flags.
......@@ -124,13 +114,26 @@
*/
#define KLOGD_PAUSE 1
/* tray control: eject tray if no disk is in (0 or 1) */
/* tray control: eject tray if no disk is in */
#if DISTRIBUTION
#define JUKEBOX 0
#else
#define JUKEBOX 1
#endif DISTRIBUTION
/* tray control: eject tray after last use (0 or 1) */
/* tray control: eject tray after last use */
#if DISTRIBUTION
#define EJECT 0
#else
#define EJECT 1
#endif DISTRIBUTION
/* max. number of audio frames to read with one */
/* request (allocates n* 2352 bytes kernel memory!) */
/* may be freely adjusted, f.e. 75 (= 1 sec.), at */
/* runtime by use of the CDROMAUDIOBUFSIZ ioctl. */
#define READ_AUDIO 0
/*==========================================================================*/
/*==========================================================================*/
/*
......@@ -450,6 +453,8 @@
#define MAX_TRACKS 99
#define ERR_DISKCHANGE 615
/*==========================================================================*/
/*
* To make conversions easier (machine dependent!)
......
......@@ -26,7 +26,7 @@ struct cdrom_device_ops {
/* specifications */
const int capability; /* capability flags */
int mask; /* mask of capability: disables them */
const float speed; /* maximum speed for reading data */
const int speed; /* maximum speed for reading data */
const int minors; /* number of minor devs supported */
const int capacity; /* number of discs in jukebox */
/* device-related storage */
......
......@@ -534,7 +534,6 @@ int remap_page_range(unsigned long from, unsigned long offset, unsigned long siz
static void put_page(pte_t * page_table, pte_t pte)
{
if (!pte_none(*page_table)) {
printk("put_page: page already exists %08lx\n", pte_val(*page_table));
free_page(pte_page(pte));
return;
}
......
......@@ -43,7 +43,7 @@ struct free_area_struct {
unsigned int * map;
};
#define memory_head(x) ((struct page *)x)
#define memory_head(x) ((struct page *)(x))
static struct free_area_struct free_area[NR_MEM_LISTS];
......
......@@ -428,7 +428,6 @@ void swap_tick(void)
if (!kswapd_awake && kswapd_ctl.maxpages > 0) {
wake_up(&kswapd_wait);
need_resched = 1;
kswapd_awake = 1;
}
next_swap_jiffies = jiffies + swapout_interval;
}
......
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