Commit 83879d61 authored by Linus Torvalds's avatar Linus Torvalds

Import 1.1.49

parent 69651a92
...@@ -405,6 +405,14 @@ S: S78 W16203 Woods Road ...@@ -405,6 +405,14 @@ S: S78 W16203 Woods Road
S: Muskego, Wisconsin 53150 S: Muskego, Wisconsin 53150
S: USA S: USA
N: Harald Milz
E: hm@ix.de
D: Linux Projects Map, Linux Commercial-HOWTO
D: general Linux publicity in Germany, vacation port
D: UUCP and CNEWS binary packages for LST
S: Editorial Board iX Mag
S: Helstorfer Str. 7, D-30625 Hannover
N: Corey Minyard N: Corey Minyard
E: minyard@wf-rch.cirr.com E: minyard@wf-rch.cirr.com
D: Sony CDU31A CDROM Driver D: Sony CDU31A CDROM Driver
......
VERSION = 1 VERSION = 1
PATCHLEVEL = 1 PATCHLEVEL = 1
SUBLEVEL = 48 SUBLEVEL = 49
ARCH = i386 ARCH = i386
......
This README belongs to release 2.5 of the SoundBlaster Pro (Matsushita, This README belongs to release 2.6 or newer of the SoundBlaster Pro
Kotobuki, Panasonic, CreativeLabs) CD-ROM driver for Linux. (Matsushita, Kotobuki, Panasonic, CreativeLabs) CD-ROM driver for Linux.
The driver is able to drive the whole family of "traditional" IDE-style (that The driver is able to drive the whole family of "traditional" IDE-style (that
has nothing to do with the new "Enhanced IDE" drive standard) Matsushita, has nothing to do with the new "Enhanced IDE" drive standard) Matsushita,
...@@ -14,7 +14,8 @@ It will work with the soundcard interfaces (SB Pro, SB 16, Galaxy, SoundFX, ...@@ -14,7 +14,8 @@ It will work with the soundcard interfaces (SB Pro, SB 16, Galaxy, SoundFX,
...) and/or with the "no-sound" cards (Panasonic CI-101P, LaserMate, ...) and/or with the "no-sound" cards (Panasonic CI-101P, LaserMate,
WDH-7001C, older Aztech cards, ...). WDH-7001C, older Aztech cards, ...).
It should work too now with the "configurable" interface "Sequoia S-1000", It should work too now with the "configurable" interface "Sequoia S-1000",
which is found on the Spea Media FX sound card. which is found on the Spea Media FX sound card. I still need feedback about
this.
The interface type has to get configured in /usr/include/linux/sbpcd.h, The interface type has to get configured in /usr/include/linux/sbpcd.h,
because the behavior is different. because the behavior is different.
...@@ -113,8 +114,10 @@ To install: ...@@ -113,8 +114,10 @@ To install:
sbpcd=0x330,SPEA sbpcd=0x330,SPEA
(these strings are case sensitive!). (these strings are case sensitive!).
This is especially useful if you install a fresh distribution. This is especially useful if you install a fresh distribution.
2. Do a "make config" and select "yes" for Matsushita CD-ROM support and for 2. "cd /usr/src/linux" and do a "make config" and select "y" for Matsushita
ISO9660 FileSystem support. CD-ROM support and for ISO9660 FileSystem support. If you do not have a
second, third, or fourth controller and/or did not prepare sbpcd2 etc.,
do not say "y" to the secondary Matsushita CD-ROM questions.
SCSI and/or SCSI CD-ROM support is not needed. SCSI and/or SCSI CD-ROM support is not needed.
3. Then do a "make dep", then make the kernel image ("make zlilo" or else). 3. Then do a "make dep", then make the kernel image ("make zlilo" or else).
...@@ -142,8 +145,13 @@ To install: ...@@ -142,8 +145,13 @@ To install:
5. Reboot with the new kernel. 5. Reboot with the new kernel.
You should now be able to do "mount -t iso9660 -o block=2048 /dev/sbpcd /mnt" You should now be able to do
and see the contents of your CD in the /mnt directory, and/or hear music with mkdir /CD
and
mount -t iso9660 -o ro /dev/sbpcd /CD
or
mount -t iso9660 -o ro,block=2048 /dev/sbpcd /CD
and see the contents of your CD in the /CD directory, and/or hear music with
"workman -c /dev/sbpcd &". "workman -c /dev/sbpcd &".
......
#ifndef _BLK_H #ifndef _BLK_H
#define _BLK_H #define _BLK_H
#include <linux/major.h> #include <linux/blkdev.h>
#include <linux/sched.h>
#include <linux/locks.h> #include <linux/locks.h>
#include <linux/genhd.h>
/* /*
* NR_REQUEST is the number of entries in the request-queue. * NR_REQUEST is the number of entries in the request-queue.
...@@ -18,26 +16,6 @@ ...@@ -18,26 +16,6 @@
*/ */
#define NR_REQUEST 64 #define NR_REQUEST 64
/*
* Ok, this is an expanded form so that we can use the same
* request for paging requests when that is implemented. In
* paging, 'bh' is NULL, and the semaphore is used to wait
* for read/write completion.
*/
struct request {
int dev; /* -1 if no request */
int cmd; /* READ or WRITE */
int errors;
unsigned long sector;
unsigned long nr_sectors;
unsigned long current_nr_sectors;
char * buffer;
struct semaphore * sem;
struct buffer_head * bh;
struct buffer_head * bhtail;
struct request * next;
};
/* /*
* This is used in the elevator algorithm: Note that * This is used in the elevator algorithm: Note that
* reads always go before writes. This is natural: reads * reads always go before writes. This is natural: reads
...@@ -48,17 +26,6 @@ struct request { ...@@ -48,17 +26,6 @@ struct request {
((s1)->dev < (s2)->dev || (((s1)->dev == (s2)->dev && \ ((s1)->dev < (s2)->dev || (((s1)->dev == (s2)->dev && \
(s1)->sector < (s2)->sector))))) (s1)->sector < (s2)->sector)))))
struct blk_dev_struct {
void (*request_fn)(void);
struct request * current_request;
};
struct sec_size {
unsigned block_size;
unsigned block_size_bits;
};
/* /*
* These will have to be changed to be aware of different buffer * These will have to be changed to be aware of different buffer
* sizes etc.. It actually needs a major cleanup. * sizes etc.. It actually needs a major cleanup.
...@@ -70,15 +37,6 @@ struct sec_size { ...@@ -70,15 +37,6 @@ struct sec_size {
#define SUBSECTOR(block) (CURRENT->current_nr_sectors > 0) #define SUBSECTOR(block) (CURRENT->current_nr_sectors > 0)
extern struct sec_size * blk_sec[MAX_BLKDEV];
extern struct blk_dev_struct blk_dev[MAX_BLKDEV];
extern struct wait_queue * wait_for_request;
extern void resetup_one_dev(struct gendisk *dev, int drive);
extern int * blk_size[MAX_BLKDEV];
extern int * blksize_size[MAX_BLKDEV];
extern unsigned long hd_init(unsigned long mem_start, unsigned long mem_end); extern unsigned long hd_init(unsigned long mem_start, unsigned long mem_end);
extern unsigned long cdu31a_init(unsigned long mem_start, unsigned long mem_end); extern unsigned long cdu31a_init(unsigned long mem_start, unsigned long mem_end);
extern unsigned long mcd_init(unsigned long mem_start, unsigned long mem_end); extern unsigned long mcd_init(unsigned long mem_start, unsigned long mem_end);
......
...@@ -127,7 +127,7 @@ static int initialising=1; ...@@ -127,7 +127,7 @@ static int initialising=1;
#define N_DRIVE 8 #define N_DRIVE 8
#else #else
#define N_FDC 1 #define N_FDC 1
#define N_DRIVE 4 #define N_DRIVE 2
#endif #endif
#define TYPE(x) ( ((x)>>2) & 0x1f ) #define TYPE(x) ( ((x)>>2) & 0x1f )
...@@ -298,11 +298,12 @@ static struct floppy_struct floppy_type[32] = { ...@@ -298,11 +298,12 @@ static struct floppy_struct floppy_type[32] = {
#define SECTSIZE ( _FD_SECTSIZE(*floppy)) #define SECTSIZE ( _FD_SECTSIZE(*floppy))
/* Auto-detection: Disk type used until the next media change occurs. */ /* Auto-detection: Disk type used until the next media change occurs. */
struct floppy_struct *current_type[N_DRIVE] = { NULL, NULL, NULL, NULL struct floppy_struct *current_type[N_DRIVE] = {
NULL, NULL
#ifdef HAVE_2_CONTROLLERS #ifdef HAVE_2_CONTROLLERS
,NULL, NULL, NULL, NULL ,NULL, NULL, NULL, NULL, NULL, NULL
#endif #endif
}; };
/* /*
* User-provided type information. current_type points to * User-provided type information. current_type points to
...@@ -483,7 +484,7 @@ static void reset_fdc_info(int mode) ...@@ -483,7 +484,7 @@ static void reset_fdc_info(int mode)
UDRS->track = NEED_2_RECAL; UDRS->track = NEED_2_RECAL;
} }
/* selects the fdc and drive, and enables the fdc's its input/dma. */ /* selects the fdc and drive, and enables the fdc's input/dma. */
static void set_fdc(int drive) static void set_fdc(int drive)
{ {
if ( drive >= 0 ){ if ( drive >= 0 ){
...@@ -544,10 +545,10 @@ static void motor_off_callback(unsigned long nr) ...@@ -544,10 +545,10 @@ static void motor_off_callback(unsigned long nr)
static struct timer_list motor_off_timer[N_DRIVE] = { static struct timer_list motor_off_timer[N_DRIVE] = {
{ NULL, NULL, 0, 0, motor_off_callback }, { NULL, NULL, 0, 0, motor_off_callback },
{ NULL, NULL, 0, 1, motor_off_callback }, { NULL, NULL, 0, 1, motor_off_callback }
{ NULL, NULL, 0, 2, motor_off_callback },
{ NULL, NULL, 0, 3, motor_off_callback }
#ifdef HAVE_2_CONTROLLERS #ifdef HAVE_2_CONTROLLERS
,{ NULL, NULL, 0, 2, motor_off_callback },
{ NULL, NULL, 0, 3, motor_off_callback }
,{ NULL, NULL, 0, 4, motor_off_callback }, ,{ NULL, NULL, 0, 4, motor_off_callback },
{ NULL, NULL, 0, 5, motor_off_callback }, { NULL, NULL, 0, 5, motor_off_callback },
{ NULL, NULL, 0, 6, motor_off_callback }, { NULL, NULL, 0, 6, motor_off_callback },
......
...@@ -307,8 +307,10 @@ static void identify_intr(void) ...@@ -307,8 +307,10 @@ static void identify_intr(void)
if (NULL != (hd_ident_info[dev] = (struct hd_driveid *)kmalloc(sizeof(id),GFP_ATOMIC))) if (NULL != (hd_ident_info[dev] = (struct hd_driveid *)kmalloc(sizeof(id),GFP_ATOMIC)))
*hd_ident_info[dev] = id; *hd_ident_info[dev] = id;
/* Quantum drives go weird at this point, so reset them! In */ /* Quantum drives go weird at this point, so reset them! */
/* fact, do a reset in any case in case we changed the geometry */ /* In fact, we should probably do a reset in any case in */
/* case we changed the geometry */
if (!strncmp(id.model, "QUANTUM", 7))
special_op[dev] += reset = 1; special_op[dev] += reset = 1;
/* flush remaining 384 (reserved/undefined) ID bytes: */ /* flush remaining 384 (reserved/undefined) ID bytes: */
...@@ -367,7 +369,8 @@ static void reset_controller(void) ...@@ -367,7 +369,8 @@ static void reset_controller(void)
outb_p(4,HD_CMD); outb_p(4,HD_CMD);
for(i = 0; i < 1000; i++) nop(); for(i = 0; i < 1000; i++) nop();
outb(hd_info[0].ctl & 0x0f ,HD_CMD); outb_p(hd_info[0].ctl & 0x0f,HD_CMD);
for(i = 0; i < 1000; i++) nop();
if (drive_busy()) if (drive_busy())
printk("HD-controller still busy\n"); printk("HD-controller still busy\n");
if ((hd_error = inb(HD_ERROR)) != 1) if ((hd_error = inb(HD_ERROR)) != 1)
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* and for "no-sound" interfaces like Lasermate and the * and for "no-sound" interfaces like Lasermate and the
* Panasonic CI-101P. * Panasonic CI-101P.
* *
* NOTE: This is release 2.5. * NOTE: This is release 2.6.
* It works with my SbPro & drive CR-521 V2.11 from 2/92 * It works with my SbPro & drive CR-521 V2.11 from 2/92
* and with the new CR-562-B V0.75 on a "naked" Panasonic * and with the new CR-562-B V0.75 on a "naked" Panasonic
* CI-101P interface. And vice versa. * CI-101P interface. And vice versa.
...@@ -119,13 +119,15 @@ ...@@ -119,13 +119,15 @@
* *
* 2.4 Use different names for device registering. * 2.4 Use different names for device registering.
* *
* 2.5 Added "#ifdef EJECT" code (default: enabled) to automatically eject * 2.5 Added "#if EJECT" code (default: enabled) to automatically eject
* the tray during last call to "sbpcd_release". * the tray during last call to "sbpcd_release".
* Added "#ifdef JUKEBOX" code (default: disabled) to automatically eject * Added "#if JUKEBOX" code (default: disabled) to automatically eject
* the tray during call to "sbpcd_open" if no disk is in. * the tray during call to "sbpcd_open" if no disk is in.
* Turn on the CD volume of "compatible" sound cards, too; just define * Turn on the CD volume of "compatible" sound cards, too; just define
* SOUND_BASE (in sbpcd.h) accordingly (default: disabled). * SOUND_BASE (in sbpcd.h) accordingly (default: disabled).
* *
* 2.6 Nothing new.
*
* TODO * TODO
* *
* disk change detection * disk change detection
...@@ -201,7 +203,7 @@ ...@@ -201,7 +203,7 @@
#include "blk.h" #include "blk.h"
#define VERSION "2.5 Eberhard Moenkeberg <emoenke@gwdg.de>" #define VERSION "2.6 Eberhard Moenkeberg <emoenke@gwdg.de>"
#define SBPCD_DEBUG #define SBPCD_DEBUG
...@@ -217,7 +219,7 @@ ...@@ -217,7 +219,7 @@
/* /*
* still testing around... * still testing around...
*/ */
#define JUKEBOX 0 /* tray control: eject if no disk is in */ #define JUKEBOX 0 /* tray control: eject tray if no disk is in */
#define EJECT 1 /* tray control: eject tray after last use */ #define EJECT 1 /* tray control: eject tray after last use */
#define LONG_TIMING 0 /* test against timeouts with "gold" CDs on CR-521 */ #define LONG_TIMING 0 /* test against timeouts with "gold" CDs on CR-521 */
#define MANY_SESSION 0 /* this will conflict with "true" multi-session! */ #define MANY_SESSION 0 /* this will conflict with "true" multi-session! */
...@@ -2561,7 +2563,7 @@ static int sbpcd_ioctl(struct inode *inode, struct file *file, u_int cmd, ...@@ -2561,7 +2563,7 @@ static int sbpcd_ioctl(struct inode *inode, struct file *file, u_int cmd,
case CDROMSTART: /* Spin up the drive */ case CDROMSTART: /* Spin up the drive */
DPRINTF((DBG_IOC,"SBPCD: ioctl: CDROMSTART entered.\n")); DPRINTF((DBG_IOC,"SBPCD: ioctl: CDROMSTART entered.\n"));
i=xx_SpinUp(); xx_SpinUp();
DriveStruct[d].audio_state=0; DriveStruct[d].audio_state=0;
return (0); return (0);
...@@ -3321,7 +3323,7 @@ static void sbpcd_release(struct inode * ip, struct file * file) ...@@ -3321,7 +3323,7 @@ static void sbpcd_release(struct inode * ip, struct file * file)
do do
i=yy_LockDoor(0); i=yy_LockDoor(0);
while (i!=0); while (i!=0);
#ifdef EJECT #if EJECT
if (new_drive) yy_SpinDown(); if (new_drive) yy_SpinDown();
#endif #endif
} }
......
...@@ -903,7 +903,7 @@ static void ni52_rcv_int(struct device *dev) ...@@ -903,7 +903,7 @@ static void ni52_rcv_int(struct device *dev)
} }
/********************************************************** /**********************************************************
* I never got this error , (which should occure if someone * I never got this error , (which should occur if someone
* wants to blast your machine) so I couldn't debug it for now. * wants to blast your machine) so I couldn't debug it for now.
* but we _try_ to fix the receiver not ready int. * but we _try_ to fix the receiver not ready int.
*/ */
...@@ -1095,7 +1095,7 @@ static struct enet_statistics *ni52_get_stats(struct device *dev) ...@@ -1095,7 +1095,7 @@ static struct enet_statistics *ni52_get_stats(struct device *dev)
{ {
struct priv *p = (struct priv *) dev->priv; struct priv *p = (struct priv *) dev->priv;
#ifdef DEBUG3 #ifdef DEBUG3
printk("ni52: errs, crc %d, align %d, ressource %d, ovrn %d.\n",(int) p->scb->crc_errs,(int) p->scb->aln_errs,(int) p->scb->rsc_errs,(int) p->scb->ovrn_errs); printk("ni52: errs, crc %d, align %d, resource %d, ovrn %d.\n",(int) p->scb->crc_errs,(int) p->scb->aln_errs,(int) p->scb->rsc_errs,(int) p->scb->ovrn_errs);
#endif #endif
return &p->stats; return &p->stats;
} }
...@@ -1108,7 +1108,7 @@ static void set_multicast_list(struct device *dev, int num_addrs, void *addrs) ...@@ -1108,7 +1108,7 @@ static void set_multicast_list(struct device *dev, int num_addrs, void *addrs)
*/ */
if(!num_addrs) if(!num_addrs)
printk("%s: Currently, the Ni52 driver doesn't support promiscous or multicast mode.\n",dev->name); printk("%s: Currently, the Ni52 driver doesn't support promiscuous or multicast mode.\n",dev->name);
#if 0 #if 0
p->scb->cmd = CUC_SUSPEND; p->scb->cmd = CUC_SUSPEND;
......
...@@ -50,7 +50,7 @@ struct scp_struct ...@@ -50,7 +50,7 @@ struct scp_struct
*/ */
struct iscp_struct struct iscp_struct
{ {
unsigned char busy; /* 586 clears after succesful init */ unsigned char busy; /* 586 clears after successful init */
unsigned char zero_dummy; /* hast to be zero */ unsigned char zero_dummy; /* hast to be zero */
unsigned short scb_offset; /* pointeroffset to the scb_base */ unsigned short scb_offset; /* pointeroffset to the scb_base */
char *scb_base; /* base-address of all 16-bit offsets */ char *scb_base; /* base-address of all 16-bit offsets */
...@@ -72,7 +72,7 @@ struct scb_struct ...@@ -72,7 +72,7 @@ struct scb_struct
}; };
/* /*
* possbile command values for the command word * possible command values for the command word
*/ */
#define RUC_MASK 0x0070 /* mask for RU commands */ #define RUC_MASK 0x0070 /* mask for RU commands */
#define RUC_NOP 0x0000 /* NOP-command */ #define RUC_NOP 0x0000 /* NOP-command */
...@@ -95,11 +95,11 @@ struct scb_struct ...@@ -95,11 +95,11 @@ struct scb_struct
#define ACK_RNR 0x1000 /* ack. STAT_RNR */ #define ACK_RNR 0x1000 /* ack. STAT_RNR */
/* /*
* possbile status values for the status word * possible status values for the status word
*/ */
#define STAT_MASK 0xf000 /* mask for cause of interrupt */ #define STAT_MASK 0xf000 /* mask for cause of interrupt */
#define STAT_CX 0x8000 /* CU finished cmd with its I bit set */ #define STAT_CX 0x8000 /* CU finished cmd with its I bit set */
#define STAT_FR 0x4000 /* RU finished receiveing a frame */ #define STAT_FR 0x4000 /* RU finished receiving a frame */
#define STAT_CNA 0x2000 /* CU left active state */ #define STAT_CNA 0x2000 /* CU left active state */
#define STAT_RNR 0x1000 /* RU left ready state */ #define STAT_RNR 0x1000 /* RU left ready state */
...@@ -130,7 +130,7 @@ struct rfd_struct ...@@ -130,7 +130,7 @@ struct rfd_struct
#define RFD_LAST 0x8000 /* last: last rfd in the list */ #define RFD_LAST 0x8000 /* last: last rfd in the list */
#define RFD_SUSP 0x4000 /* last: suspend RU after */ #define RFD_SUSP 0x4000 /* last: suspend RU after */
#define RFD_ERRMASK 0x0fe1 /* status: errormask */ #define RFD_ERRMASK 0x0fe1 /* status: errormask */
#define RFD_MATCHADD 0x0002 /* status: Destinationaddress !matchs IA */ #define RFD_MATCHADD 0x0002 /* status: Destinationaddress !matches IA */
#define RFD_RNR 0x0200 /* status: receiver out of resources */ #define RFD_RNR 0x0200 /* status: receiver out of resources */
/* /*
...@@ -140,7 +140,7 @@ struct rbd_struct ...@@ -140,7 +140,7 @@ struct rbd_struct
{ {
unsigned short status; /* status word,number of used bytes in buff */ unsigned short status; /* status word,number of used bytes in buff */
unsigned short next; /* pointeroffset to next RBD */ unsigned short next; /* pointeroffset to next RBD */
char *buffer; /* recevie buffer address pointer */ char *buffer; /* receive buffer address pointer */
unsigned short size; /* size of this buffer */ unsigned short size; /* size of this buffer */
unsigned short zero_dummy; /* dummy */ unsigned short zero_dummy; /* dummy */
}; };
...@@ -180,7 +180,7 @@ struct rbd_struct ...@@ -180,7 +180,7 @@ struct rbd_struct
*/ */
struct nop_cmd_struct struct nop_cmd_struct
{ {
unsigned short cmd_status; /* statius of this command */ unsigned short cmd_status; /* status of this command */
unsigned short cmd_cmd; /* the command itself (+bits) */ unsigned short cmd_cmd; /* the command itself (+bits) */
unsigned short cmd_link; /* offsetpointer to next command */ unsigned short cmd_link; /* offsetpointer to next command */
}; };
...@@ -247,7 +247,7 @@ struct transmit_cmd_struct ...@@ -247,7 +247,7 @@ struct transmit_cmd_struct
#define TCMD_MAXCOLLMASK 0x000f #define TCMD_MAXCOLLMASK 0x000f
#define TCMD_MAXCOLL 0x0020 #define TCMD_MAXCOLL 0x0020
#define TCMD_HEARTBEAT 0x0040 #define TCMD_HEARTBEAT 0x0040
#define TCMD_DEFFERED 0x0080 #define TCMD_DEFERRED 0x0080
#define TCMD_UNDERRUN 0x0100 #define TCMD_UNDERRUN 0x0100
#define TCMD_LOSTCTS 0x0200 #define TCMD_LOSTCTS 0x0200
#define TCMD_NOCARRIER 0x0400 #define TCMD_NOCARRIER 0x0400
...@@ -262,7 +262,7 @@ struct tdr_cmd_struct ...@@ -262,7 +262,7 @@ struct tdr_cmd_struct
}; };
#define TDR_LNK_OK 0x8000 /* No link problem identified */ #define TDR_LNK_OK 0x8000 /* No link problem identified */
#define TDR_XCVR_PRB 0x4000 /* indiactes a transceiver problem */ #define TDR_XCVR_PRB 0x4000 /* indicates a transceiver problem */
#define TDR_ET_OPN 0x2000 /* open, no correct termination */ #define TDR_ET_OPN 0x2000 /* open, no correct termination */
#define TDR_ET_SRT 0x1000 /* TDR detected a short circuit */ #define TDR_ET_SRT 0x1000 /* TDR detected a short circuit */
#define TDR_TIMEMASK 0x07ff /* mask for the time field */ #define TDR_TIMEMASK 0x07ff /* mask for the time field */
......
...@@ -298,7 +298,7 @@ static int ni65_probe1(struct device *dev,int ioaddr) ...@@ -298,7 +298,7 @@ static int ni65_probe1(struct device *dev,int ioaddr)
} }
} }
return 0; /* we've found everyting */ return 0; /* we've found everything */
} }
/* /*
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#define CSR0_CERR 0x2000 /* Collision Error (RC) */ #define CSR0_CERR 0x2000 /* Collision Error (RC) */
#define CSR0_MISS 0x1000 /* Missed packet (RC) */ #define CSR0_MISS 0x1000 /* Missed packet (RC) */
#define CSR0_MERR 0x0800 /* Memory Error (RC) */ #define CSR0_MERR 0x0800 /* Memory Error (RC) */
#define CSR0_RINT 0x0400 /* Reciever Interrupt (RC) */ #define CSR0_RINT 0x0400 /* Receiver Interrupt (RC) */
#define CSR0_TINT 0x0200 /* Transmit Interrupt (RC) */ #define CSR0_TINT 0x0200 /* Transmit Interrupt (RC) */
#define CSR0_IDON 0x0100 /* Initialization Done (RC) */ #define CSR0_IDON 0x0100 /* Initialization Done (RC) */
#define CSR0_INTR 0x0080 /* Interrupt Flag (R) */ #define CSR0_INTR 0x0080 /* Interrupt Flag (R) */
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#define M_DTCR 0x0008 /* Disable Transmit CRC) */ #define M_DTCR 0x0008 /* Disable Transmit CRC) */
#define M_LOOP 0x0004 /* Loopback */ #define M_LOOP 0x0004 /* Loopback */
#define M_DTX 0x0002 /* Disable the Transmitter */ #define M_DTX 0x0002 /* Disable the Transmitter */
#define M_DRX 0x0001 /* Disable the Reciever */ #define M_DRX 0x0001 /* Disable the Receiver */
/* /*
......
...@@ -798,7 +798,6 @@ static void sd_init_done (Scsi_Cmnd * SCpnt) ...@@ -798,7 +798,6 @@ static void sd_init_done (Scsi_Cmnd * SCpnt)
static int sd_init_onedisk(int i) static int sd_init_onedisk(int i)
{ {
int j = 0;
unsigned char cmd[10]; unsigned char cmd[10];
unsigned char *buffer; unsigned char *buffer;
char spintime; char spintime;
...@@ -969,7 +968,7 @@ static int sd_init_onedisk(int i) ...@@ -969,7 +968,7 @@ static int sd_init_onedisk(int i)
rscsi_disks[i].capacity = 0; rscsi_disks[i].capacity = 0;
} else { } else {
printk ("scsi : deleting disk entry.\n"); printk ("scsi : deleting disk entry.\n");
rscsi_disks[j].device = NULL; rscsi_disks[i].device = NULL;
sd_template.nr_dev--; sd_template.nr_dev--;
return i; return i;
}; };
......
...@@ -629,7 +629,7 @@ are any multiple of 512 bytes long. */ ...@@ -629,7 +629,7 @@ are any multiple of 512 bytes long. */
#endif #endif
/* Some dumb host adapters can speed transfers by knowing the /* Some dumb host adapters can speed transfers by knowing the
* minimum tranfersize in advance. * minimum transfersize in advance.
* *
* We shouldn't disconnect in the middle of a sector, but the cdrom * We shouldn't disconnect in the middle of a sector, but the cdrom
* sector size can be larger than the size of a buffer and the * sector size can be larger than the size of a buffer and the
......
...@@ -1061,7 +1061,7 @@ static unsigned long try_to_load_aligned(unsigned long address, ...@@ -1061,7 +1061,7 @@ static unsigned long try_to_load_aligned(unsigned long address,
buffermem += PAGE_SIZE; buffermem += PAGE_SIZE;
bh->b_this_page = tmp; bh->b_this_page = tmp;
mem_map[MAP_NR(address)]++; mem_map[MAP_NR(address)]++;
buffer_pages[address >> PAGE_SHIFT] = bh; buffer_pages[MAP_NR(address)] = bh;
read_buffers(arr,block); read_buffers(arr,block);
while (block-- > 0) while (block-- > 0)
brelse(arr[block]); brelse(arr[block]);
...@@ -1190,7 +1190,7 @@ static int grow_buffers(int pri, int size) ...@@ -1190,7 +1190,7 @@ static int grow_buffers(int pri, int size)
break; break;
} }
free_list[isize] = bh; free_list[isize] = bh;
buffer_pages[page >> PAGE_SHIFT] = bh; buffer_pages[MAP_NR(page)] = bh;
tmp->b_this_page = bh; tmp->b_this_page = bh;
wake_up(&buffer_wait); wake_up(&buffer_wait);
buffermem += PAGE_SIZE; buffermem += PAGE_SIZE;
...@@ -1234,7 +1234,7 @@ static int try_to_free(struct buffer_head * bh, struct buffer_head ** bhp) ...@@ -1234,7 +1234,7 @@ static int try_to_free(struct buffer_head * bh, struct buffer_head ** bhp)
put_unused_buffer_head(p); put_unused_buffer_head(p);
} while (tmp != bh); } while (tmp != bh);
buffermem -= PAGE_SIZE; buffermem -= PAGE_SIZE;
buffer_pages[page >> PAGE_SHIFT] = NULL; buffer_pages[MAP_NR(page)] = NULL;
free_page(page); free_page(page);
return !mem_map[MAP_NR(page)]; return !mem_map[MAP_NR(page)];
} }
...@@ -1538,7 +1538,7 @@ static unsigned long try_to_generate_cluster(dev_t dev, int block, int size) ...@@ -1538,7 +1538,7 @@ static unsigned long try_to_generate_cluster(dev_t dev, int block, int size)
break; break;
} }
buffermem += PAGE_SIZE; buffermem += PAGE_SIZE;
buffer_pages[page >> PAGE_SHIFT] = bh; buffer_pages[MAP_NR(page)] = bh;
bh->b_this_page = tmp; bh->b_this_page = tmp;
while (nblock-- > 0) while (nblock-- > 0)
brelse(arr[nblock]); brelse(arr[nblock]);
...@@ -1605,9 +1605,9 @@ void buffer_init(void) ...@@ -1605,9 +1605,9 @@ void buffer_init(void)
sizeof(struct buffer_head *)); sizeof(struct buffer_head *));
buffer_pages = (struct buffer_head **) vmalloc((high_memory >>PAGE_SHIFT) * buffer_pages = (struct buffer_head **) vmalloc(MAP_NR(high_memory) *
sizeof(struct buffer_head *)); sizeof(struct buffer_head *));
for (i = 0 ; i < high_memory >> PAGE_SHIFT ; i++) for (i = 0 ; i < MAP_NR(high_memory) ; i++)
buffer_pages[i] = NULL; buffer_pages[i] = NULL;
for (i = 0 ; i < nr_hash ; i++) for (i = 0 ; i < nr_hash ; i++)
......
...@@ -417,6 +417,7 @@ struct inode * get_pipe_inode(void) ...@@ -417,6 +417,7 @@ struct inode * get_pipe_inode(void)
inode->i_uid = current->fsuid; inode->i_uid = current->fsuid;
inode->i_gid = current->fsgid; inode->i_gid = current->fsgid;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
inode->i_blksize = PAGE_SIZE;
return inode; return inode;
} }
......
...@@ -85,21 +85,19 @@ int msdos_readdir( ...@@ -85,21 +85,19 @@ int msdos_readdir(
for (i = last = 0; i < 8; i++) { for (i = last = 0; i < 8; i++) {
if (!(c = de->name[i])) break; if (!(c = de->name[i])) break;
if (c >= 'A' && c <= 'Z') c += 32; if (c >= 'A' && c <= 'Z') c += 32;
if (c != ' '){ if (c != ' ')
last = i+1; last = i+1;
*ptname++ = c; ptname[i] = c;
}
} }
i = last; i = last;
*ptname++ = '.'; ptname[i] = '.';
i++; i++;
for (i2 = 0; i2 < 3; i2++) { for (i2 = 0; i2 < 3; i2++) {
if (!(c = de->ext[i2])) break; if (!(c = de->ext[i2])) break;
if (c >= 'A' && c <= 'Z') c += 32; if (c >= 'A' && c <= 'Z') c += 32;
if (c != ' '){ if (c != ' ')
last = i+1; last = i+1;
*ptname++ = c; ptname[i] = c;
}
i++; i++;
} }
if ((i = last) != 0) { if ((i = last) != 0) {
......
#ifndef _LINUX_BLKDEV_H
#define _LINUX_BLKDEV_H
#include <linux/major.h>
#include <linux/sched.h>
#include <linux/genhd.h>
/*
* Ok, this is an expanded form so that we can use the same
* request for paging requests when that is implemented. In
* paging, 'bh' is NULL, and the semaphore is used to wait
* for read/write completion.
*/
struct request {
int dev; /* -1 if no request */
int cmd; /* READ or WRITE */
int errors;
unsigned long sector;
unsigned long nr_sectors;
unsigned long current_nr_sectors;
char * buffer;
struct semaphore * sem;
struct buffer_head * bh;
struct buffer_head * bhtail;
struct request * next;
};
struct blk_dev_struct {
void (*request_fn)(void);
struct request * current_request;
};
struct sec_size {
unsigned block_size;
unsigned block_size_bits;
};
extern struct sec_size * blk_sec[MAX_BLKDEV];
extern struct blk_dev_struct blk_dev[MAX_BLKDEV];
extern struct wait_queue * wait_for_request;
extern void resetup_one_dev(struct gendisk *dev, int drive);
extern int * blk_size[MAX_BLKDEV];
extern int * blksize_size[MAX_BLKDEV];
#endif
...@@ -44,8 +44,11 @@ typedef unsigned short umode_t; ...@@ -44,8 +44,11 @@ typedef unsigned short umode_t;
typedef unsigned short nlink_t; typedef unsigned short nlink_t;
typedef int daddr_t; typedef int daddr_t;
typedef long off_t; typedef long off_t;
#ifndef __STRICT_ANSI__
#define _LOFF_T #define _LOFF_T
typedef long long loff_t; typedef long long loff_t;
#endif
/* bsd */ /* bsd */
typedef unsigned char u_char; typedef unsigned char u_char;
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <linux/autoconf.h> #include <linux/autoconf.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/blkdev.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/malloc.h> #include <linux/malloc.h>
...@@ -91,6 +92,14 @@ struct symbol_table symbol_table = { 0, 0, 0, /* for stacked module support */ ...@@ -91,6 +92,14 @@ struct symbol_table symbol_table = { 0, 0, 0, /* for stacked module support */
X(register_blkdev), X(register_blkdev),
X(unregister_blkdev), X(unregister_blkdev),
/* block device driver support */
X(block_read),
X(block_write),
X(block_fsync),
X(wait_for_request),
X(blksize_size),
X(blk_dev),
/* Module creation of serial units */ /* Module creation of serial units */
X(register_serial), X(register_serial),
X(unregister_serial), X(unregister_serial),
......
...@@ -286,7 +286,8 @@ void wake_up(struct wait_queue **q) ...@@ -286,7 +286,8 @@ void wake_up(struct wait_queue **q)
} }
} }
if (!tmp->next) { if (!tmp->next) {
printk("wait_queue is bad (eip = %08lx)\n",((unsigned long *) q)[-1]); printk("wait_queue is bad (eip = %p)\n",
__builtin_return_address(0));
printk(" q = %p\n",q); printk(" q = %p\n",q);
printk(" *q = %p\n",*q); printk(" *q = %p\n",*q);
printk(" tmp = %p\n",tmp); printk(" tmp = %p\n",tmp);
...@@ -312,7 +313,8 @@ void wake_up_interruptible(struct wait_queue **q) ...@@ -312,7 +313,8 @@ void wake_up_interruptible(struct wait_queue **q)
} }
} }
if (!tmp->next) { if (!tmp->next) {
printk("wait_queue is bad (eip = %08lx)\n",((unsigned long *) q)[-1]); printk("wait_queue is bad (eip = %p)\n",
__builtin_return_address(0));
printk(" q = %p\n",q); printk(" q = %p\n",q);
printk(" *q = %p\n",*q); printk(" *q = %p\n",*q);
printk(" tmp = %p\n",tmp); printk(" tmp = %p\n",tmp);
...@@ -377,8 +379,8 @@ void add_timer(struct timer_list * timer) ...@@ -377,8 +379,8 @@ void add_timer(struct timer_list * timer)
#if SLOW_BUT_DEBUGGING_TIMERS #if SLOW_BUT_DEBUGGING_TIMERS
if (timer->next || timer->prev) { if (timer->next || timer->prev) {
printk("add_timer() called with non-zero list from %08lx\n", printk("add_timer() called with non-zero list from %p\n",
((unsigned long *) &timer)[-1]); __builtin_return_address(0));
return; return;
} }
#endif #endif
...@@ -416,8 +418,8 @@ int del_timer(struct timer_list * timer) ...@@ -416,8 +418,8 @@ int del_timer(struct timer_list * timer)
} }
} }
if (timer->next || timer->prev) if (timer->next || timer->prev)
printk("del_timer() called from %08lx with timer not initialized\n", printk("del_timer() called from %p with timer not initialized\n",
((unsigned long *) &timer)[-1]); __builtin_return_address(0));
restore_flags(flags); restore_flags(flags);
return 0; return 0;
#else #else
......
...@@ -171,8 +171,8 @@ void * kmalloc (size_t size, int priority) ...@@ -171,8 +171,8 @@ void * kmalloc (size_t size, int priority)
if (intr_count && priority != GFP_ATOMIC) { if (intr_count && priority != GFP_ATOMIC) {
static int count = 0; static int count = 0;
if (++count < 5) { if (++count < 5) {
printk("kmalloc called nonatomically from interrupt %08lx\n", printk("kmalloc called nonatomically from interrupt %p\n",
((unsigned long *)&size)[-1]); __builtin_return_address(0));
priority = GFP_ATOMIC; priority = GFP_ATOMIC;
} }
} }
......
...@@ -618,8 +618,8 @@ unsigned long __get_free_pages(int priority, unsigned long order) ...@@ -618,8 +618,8 @@ unsigned long __get_free_pages(int priority, unsigned long order)
if (intr_count && priority != GFP_ATOMIC) { if (intr_count && priority != GFP_ATOMIC) {
static int count = 0; static int count = 0;
if (++count < 5) { if (++count < 5) {
printk("gfp called nonatomically from interrupt %08lx\n", printk("gfp called nonatomically from interrupt %p\n",
((unsigned long *)&priority)[-1]); __builtin_return_address(0));
priority = GFP_ATOMIC; priority = GFP_ATOMIC;
} }
} }
......
...@@ -159,7 +159,6 @@ void skb_queue_head_init(struct sk_buff_head *list) ...@@ -159,7 +159,6 @@ void skb_queue_head_init(struct sk_buff_head *list)
/* /*
* Insert an sk_buff at the start of a list. * Insert an sk_buff at the start of a list.
*/ */
void skb_queue_head(struct sk_buff_head *list_,struct sk_buff *newsk) void skb_queue_head(struct sk_buff_head *list_,struct sk_buff *newsk)
{ {
unsigned long flags; unsigned long flags;
...@@ -187,7 +186,6 @@ void skb_queue_head(struct sk_buff_head *list_,struct sk_buff *newsk) ...@@ -187,7 +186,6 @@ void skb_queue_head(struct sk_buff_head *list_,struct sk_buff *newsk)
/* /*
* Insert an sk_buff at the end of a list. * Insert an sk_buff at the end of a list.
*/ */
void skb_queue_tail(struct sk_buff_head *list_, struct sk_buff *newsk) void skb_queue_tail(struct sk_buff_head *list_, struct sk_buff *newsk)
{ {
unsigned long flags; unsigned long flags;
...@@ -249,7 +247,6 @@ struct sk_buff *skb_dequeue(struct sk_buff_head *list_) ...@@ -249,7 +247,6 @@ struct sk_buff *skb_dequeue(struct sk_buff_head *list_)
/* /*
* Insert a packet before another one in a list. * Insert a packet before another one in a list.
*/ */
void skb_insert(struct sk_buff *old, struct sk_buff *newsk) void skb_insert(struct sk_buff *old, struct sk_buff *newsk)
{ {
unsigned long flags; unsigned long flags;
...@@ -277,7 +274,6 @@ void skb_insert(struct sk_buff *old, struct sk_buff *newsk) ...@@ -277,7 +274,6 @@ void skb_insert(struct sk_buff *old, struct sk_buff *newsk)
/* /*
* Place a packet after a given packet in a list. * Place a packet after a given packet in a list.
*/ */
void skb_append(struct sk_buff *old, struct sk_buff *newsk) void skb_append(struct sk_buff *old, struct sk_buff *newsk)
{ {
unsigned long flags; unsigned long flags;
...@@ -309,7 +305,6 @@ void skb_append(struct sk_buff *old, struct sk_buff *newsk) ...@@ -309,7 +305,6 @@ void skb_append(struct sk_buff *old, struct sk_buff *newsk)
* MUST EXIST when you unlink. Thus a list must have its contents unlinked * MUST EXIST when you unlink. Thus a list must have its contents unlinked
* _FIRST_. * _FIRST_.
*/ */
void skb_unlink(struct sk_buff *skb) void skb_unlink(struct sk_buff *skb)
{ {
unsigned long flags; unsigned long flags;
...@@ -342,8 +337,8 @@ void kfree_skb(struct sk_buff *skb, int rw) ...@@ -342,8 +337,8 @@ void kfree_skb(struct sk_buff *skb, int rw)
{ {
if (skb == NULL) if (skb == NULL)
{ {
printk("kfree_skb: skb = NULL (from %08lx)\n", printk("kfree_skb: skb = NULL (from %p)\n",
((unsigned long *) &skb)[-1]); __builtin_return_address(0));
return; return;
} }
IS_SKB(skb); IS_SKB(skb);
...@@ -354,11 +349,11 @@ void kfree_skb(struct sk_buff *skb, int rw) ...@@ -354,11 +349,11 @@ void kfree_skb(struct sk_buff *skb, int rw)
return; return;
} }
if (skb->free == 2) if (skb->free == 2)
printk("Warning: kfree_skb passed an skb that nobody set the free flag on! (from %08lx)\n", printk("Warning: kfree_skb passed an skb that nobody set the free flag on! (from %p)\n",
((unsigned long *) &skb)[-1]); __builtin_return_address(0));
if (skb->next) if (skb->next)
printk("Warning: kfree_skb passed an skb still on a list (from %08lx).\n", printk("Warning: kfree_skb passed an skb still on a list (from %p).\n",
((unsigned long *) &skb)[-1]); __builtin_return_address(0));
if (skb->sk) if (skb->sk)
{ {
if(skb->sk->prot!=NULL) if(skb->sk->prot!=NULL)
...@@ -399,17 +394,16 @@ void kfree_skb(struct sk_buff *skb, int rw) ...@@ -399,17 +394,16 @@ void kfree_skb(struct sk_buff *skb, int rw)
* Allocate a new skbuff. We do this ourselves so we can fill in a few 'private' * Allocate a new skbuff. We do this ourselves so we can fill in a few 'private'
* fields and also do memory statistics to find all the [BEEP] leaks. * fields and also do memory statistics to find all the [BEEP] leaks.
*/ */
struct sk_buff *alloc_skb(unsigned int size,int priority)
struct sk_buff *alloc_skb(unsigned int size,int priority) {
{
struct sk_buff *skb; struct sk_buff *skb;
unsigned long flags; unsigned long flags;
if (intr_count && priority!=GFP_ATOMIC) { if (intr_count && priority!=GFP_ATOMIC) {
static int count = 0; static int count = 0;
if (++count < 5) { if (++count < 5) {
printk("alloc_skb called nonatomically from interrupt %08lx\n", printk("alloc_skb called nonatomically from interrupt %p\n",
((unsigned long *)&size)[-1]); __builtin_return_address(0));
priority = GFP_ATOMIC; priority = GFP_ATOMIC;
} }
} }
......
...@@ -365,7 +365,7 @@ static int tcp_readable(struct sock *sk) ...@@ -365,7 +365,7 @@ static int tcp_readable(struct sock *sk)
sum = skb->len -(counted - skb->h.th->seq); /* Length - header but start from where we are up to (avoid overlaps) */ sum = skb->len -(counted - skb->h.th->seq); /* Length - header but start from where we are up to (avoid overlaps) */
if (skb->h.th->syn) if (skb->h.th->syn)
sum++; sum++;
if (sum >= 0) if (sum > 0)
{ /* Add it up, move on */ { /* Add it up, move on */
amount += sum; amount += sum;
if (skb->h.th->syn) if (skb->h.th->syn)
...@@ -3389,7 +3389,6 @@ static inline int tcp_urg(struct sock *sk, struct tcphdr *th, ...@@ -3389,7 +3389,6 @@ static inline int tcp_urg(struct sock *sk, struct tcphdr *th,
* If we are in FINWAIT-2, a received FIN moves us to TIME-WAIT. * If we are in FINWAIT-2, a received FIN moves us to TIME-WAIT.
* *
*/ */
static int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th, static int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th,
unsigned long saddr, struct device *dev) unsigned long saddr, struct device *dev)
{ {
......
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