Commit 7f563ad6 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.1.68

parent 496d46a0
......@@ -43,6 +43,15 @@ S: 4390 Albany Dr. #46
S: San Jose, California 95129
S: USA
N: Andrea Arcangeli
E: arcangeli@mbox.queen.it
W: http://www-linux.deis.unibo.it/~mirror/
P: 1024/CB4660B9 CC A0 71 81 F4 A0 63 AC C0 4B 81 1D 8C 15 C8 E5
D: parport sharing fix. Various other kernel hacks.
S: Via Ciaclini 26
S: Imola 40026
S: Italy
N: Derek Atkins
E: warlord@MIT.EDU
D: Linux-AFS Port, random kernel hacker,
......
......@@ -304,13 +304,12 @@ CONFIG_BLK_DEV_RZ1000
things will operate 100% reliably. If unsure, say Y.
Intel 82371 PIIX (Triton I/II), VIA VP-1 DMA support
CONFIG_BLK_DEV_TRITON
If your PCI system uses an IDE harddrive (as opposed to SCSI, say)
and includes the Intel Triton I/II IDE interface chipset (i82371FB,
i82371SB or i82371AB), or the VIA VP-1 IDE interface chipset
(VT82C586), you will want to enable this option to allow use of
CONFIG_BLK_DEV_IDEDMA
If your PCI system uses IDE drive(s) (as opposed to SCSI, say)
and is capable of bus-master DMA operation (most Pentium PCI
systems), you will want to enable this option to allow use of
bus-mastering DMA data transfers. Read the comments at the
beginning of drivers/block/triton.c and Documentation/ide.txt.
beginning of drivers/block/idedma.c and Documentation/ide.txt.
You can get the latest version of the hdparm utility via
ftp (user: anonymous) from
sunsite.unc.edu/pub/Linux/kernel/patches/diskdrives/; it is
......@@ -343,18 +342,19 @@ CONFIG_BLK_DEV_HT6560B
See the Documentation/ide.txt and ht6560b.c files for more info.
PROMISE DC4030 support (EXPERIMENTAL)
CONFIG_BLK_DEV_PROMISE
CONFIG_BLK_DEV_PDC4030
This driver provides support for the secondary IDE interface and
cache of Promise IDE chipsets, e.g. DC4030 and DC5030. This driver
is known to incur timeouts/retries during heavy I/O to drives
attached to the secondary interface. CDROM and TAPE devices are not
supported yet. This driver is enabled at runtime using the
"ide0=dc4030" kernel boot parameter. See the Documentation/ide.txt
and drivers/block/promise.c files for more info.
and drivers/block/pdc4030.c files for more info.
OPTi 82C621 support (EXPERIMENTAL)
CONFIG_BLK_DEV_OPTI621
This is a driver for the OPTi 82C621 EIDE controller.
This driver allows use of hdparm to change the PIO timings
for drives attached to an OPTi MIDE controller.
Please read the comments at the top of drivers/block/opti621.c.
QDI QD6580 support
......
ide.txt -- Information regarding the Enhanced IDE drive in Linux 2.1.xx
ide.txt -- Information regarding the Enhanced IDE drive in Linux 2.1.68+
===============================================================================
Supported by:
Mark Lord <mlord@pobox.com> -- disks, interfaces, probing
......@@ -56,17 +56,19 @@ NEW! - support for IDE ATAPI *floppy* drives
(courtesy of Juha Laiho <jlaiho@ichaos.nullnet.fi>).
- auto-detect of disk translations by examining partition table
- ide-cd.c now compiles separate from ide.c
- Bus-Master DMA support for Intel PCI Triton chipset IDE interfaces
- for details, see comments at top of triton.c
- ide-cd.c now supports door locking and auto-loading.
- Also preliminary support for multisession
and direct reads of audio data.
- experimental support for Promise DC4030VL caching interface card
- email thanks/problems to: peterd@pnd-pc.demon.co.uk
- the hdparm-3.1 package can be used to set PIO modes for some chipsets.
NEW! - support for the OPTi 82C621 chipset, courtesy of Jaromir Koutek.
NEW! - support for setting PIO modes with the OPTi 82C621, courtesy of Jaromir Koutek.
NEW! - support for loadable modules
NEW! - optional SCSI host adapter emulation for ATAPI devices
NEW! - generic PCI Bus-Master DMA support
NEW! - works with most Pentium PCI systems, chipsets, add-on cards
NEW! - works with regular DMA as well as Ultra DMA
NEW! - automatically probes for all PCI IDE interfaces
For work in progress, see the comments in ide.c, ide-cd.c, triton.c, ...
......
......@@ -58,7 +58,7 @@ CONFIG_BLK_DEV_IDECD=y
CONFIG_BLK_DEV_CMD640=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
CONFIG_BLK_DEV_RZ1000=y
CONFIG_BLK_DEV_TRITON=y
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDE_CHIPSETS is not set
#
......@@ -74,22 +74,27 @@ CONFIG_BLK_DEV_TRITON=y
#
# Networking options
#
# CONFIG_PACKET is not set
# CONFIG_NETLINK is not set
# CONFIG_FIREWALL is not set
# CONFIG_NET_ALIAS is not set
CONFIG_UNIX=y
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
# CONFIG_IP_ACCT is not set
# CONFIG_IP_MASQUERADE is not set
# CONFIG_IP_ROUTER is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_ALIAS is not set
# CONFIG_SYN_COOKIES is not set
#
# (it is safe to leave these untouched)
#
# CONFIG_INET_PCTCP is not set
# CONFIG_INET_RARP is not set
CONFIG_PATH_MTU_DISCOVERY=y
CONFIG_IP_NOSR=y
CONFIG_SKB_LARGE=y
......
......@@ -23,7 +23,12 @@ else
fi
if [ "$CONFIG_PCI" = "y" ]; then
bool ' RZ1000 chipset bugfix/support' CONFIG_BLK_DEV_RZ1000
bool ' Intel PIIX/PIIX3/PIIX4 (Triton 430FX/HX/VX/TX, 440FX) DMA support' CONFIG_BLK_DEV_TRITON
bool ' PCI bus-master DMA support' CONFIG_BLK_DEV_IDEDMA
if [ "$CONFIG_BLK_DEV_IDEDMA" = "y" ]; then
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
bool ' OPTi 82C621 enhanced support (EXPERIMENTAL)' CONFIG_BLK_DEV_OPTI621
fi
fi
fi
bool ' Other IDE chipset support' CONFIG_IDE_CHIPSETS
if [ "$CONFIG_IDE_CHIPSETS" = "y" ]; then
......@@ -32,10 +37,7 @@ else
bool ' DTC-2278 support' CONFIG_BLK_DEV_DTC2278
bool ' Holtek HT6560B support' CONFIG_BLK_DEV_HT6560B
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
bool ' PROMISE DC4030 support (EXPERIMENTAL)' CONFIG_BLK_DEV_PROMISE
if [ "$CONFIG_PCI" = "y" ]; then
bool ' OPTi 82C621 support (EXPERIMENTAL)' CONFIG_BLK_DEV_OPTI621
fi
bool ' PROMISE DC4030 support (EXPERIMENTAL)' CONFIG_BLK_DEV_PDC4030
fi
bool ' QDI QD6580 support' CONFIG_BLK_DEV_QD6580
bool ' UMC 8672 support' CONFIG_BLK_DEV_UMC8672
......
......@@ -96,8 +96,8 @@ ifeq ($(CONFIG_BLK_DEV_CMD640),y)
L_OBJS += cmd640.o
endif
ifeq ($(CONFIG_BLK_DEV_TRITON),y)
L_OBJS += triton.o
ifeq ($(CONFIG_BLK_DEV_IDEDMA),y)
L_OBJS += ide-dma.o
endif
ifeq ($(CONFIG_BLK_DEV_PS2),y)
......@@ -125,8 +125,8 @@ ifeq ($(CONFIG_BLK_DEV_ALI14XX),y)
L_OBJS += ali14xx.o
endif
ifeq ($(CONFIG_BLK_DEV_PROMISE),y)
L_OBJS += promise.o
ifeq ($(CONFIG_BLK_DEV_PDC4030),y)
L_OBJS += pdc4030.o
endif
ifeq ($(CONFIG_BLK_DEV_OPTI621),y)
......
......@@ -4065,7 +4065,7 @@ static int floppy_grab_irq_and_dma(void)
if (FDCS->address != -1){
if (check_region(FDCS->address, 6) < 0 ||
check_region(FDCS->address+7, 1) < 0) {
DPRINT("Floppy io-port 0x%04x in use\n", FDCS->address);
DPRINT("Floppy io-port 0x%04lx in use\n", FDCS->address);
fd_free_irq();
fd_free_dma();
while(--fdc >= 0) {
......
/*
* linux/drivers/block/ide-disk.c Version 1.01 Nov 25, 1996
* linux/drivers/block/ide-disk.c Version 1.02 Nov 29, 1997
*
* Copyright (C) 1994-1996 Linus Torvalds & authors (see below)
* Copyright (C) 1994-1998 Linus Torvalds & authors (see below)
*/
/*
......@@ -39,6 +39,7 @@
* Version 1.00 move disk only code from ide.c to ide-disk.c
* support optional byte-swapping of all data
* Version 1.01 fix previous byte-swapping code
* Verions 1.02 remove ", LBA" from drive identification msgs
*/
#undef REALLY_SLOW_IO /* most systems can safely undef this */
......@@ -308,23 +309,23 @@ static void recal_intr (ide_drive_t *drive)
*/
static void do_rw_disk (ide_drive_t *drive, struct request *rq, unsigned long block)
{
#ifdef CONFIG_BLK_DEV_PROMISE
#ifdef CONFIG_BLK_DEV_PDC4030
ide_hwif_t *hwif = HWIF(drive);
int use_promise_io = 0;
#endif /* CONFIG_BLK_DEV_PROMISE */
int use_pdc4030_io = 0;
#endif /* CONFIG_BLK_DEV_PDC4030 */
OUT_BYTE(drive->ctl,IDE_CONTROL_REG);
OUT_BYTE(rq->nr_sectors,IDE_NSECTOR_REG);
#ifdef CONFIG_BLK_DEV_PROMISE
if (IS_PROMISE_DRIVE) {
if (hwif->is_promise2 || rq->cmd == READ) {
use_promise_io = 1;
#ifdef CONFIG_BLK_DEV_PDC4030
if (IS_PDC4030_DRIVE) {
if (hwif->is_pdc4030_2 || rq->cmd == READ) {
use_pdc4030_io = 1;
}
}
if (drive->select.b.lba || use_promise_io) {
#else /* !CONFIG_BLK_DEV_PROMISE */
if (drive->select.b.lba || use_pdc4030_io) {
#else /* !CONFIG_BLK_DEV_PDC4030 */
if (drive->select.b.lba) {
#endif /* CONFIG_BLK_DEV_PROMISE */
#endif /* CONFIG_BLK_DEV_PDC4030 */
#ifdef DEBUG
printk("%s: %sing: LBAsect=%ld, sectors=%ld, buffer=0x%08lx\n",
drive->name, (rq->cmd==READ)?"read":"writ",
......@@ -350,26 +351,27 @@ static void do_rw_disk (ide_drive_t *drive, struct request *rq, unsigned long bl
head, sect, rq->nr_sectors, (unsigned long) rq->buffer);
#endif
}
#ifdef CONFIG_BLK_DEV_PROMISE
if (use_promise_io) {
do_promise_io (drive, rq);
#ifdef CONFIG_BLK_DEV_PDC4030
if (use_pdc4030_io) {
extern void do_pdc4030_io(ide_drive_t *, struct request *);
do_pdc4030_io (drive, rq);
return;
}
#endif /* CONFIG_BLK_DEV_PROMISE */
#endif /* CONFIG_BLK_DEV_PDC4030 */
if (rq->cmd == READ) {
#ifdef CONFIG_BLK_DEV_TRITON
#ifdef CONFIG_BLK_DEV_IDEDMA
if (drive->using_dma && !(HWIF(drive)->dmaproc(ide_dma_read, drive)))
return;
#endif /* CONFIG_BLK_DEV_TRITON */
#endif /* CONFIG_BLK_DEV_IDEDMA */
ide_set_handler(drive, &read_intr, WAIT_CMD);
OUT_BYTE(drive->mult_count ? WIN_MULTREAD : WIN_READ, IDE_COMMAND_REG);
return;
}
if (rq->cmd == WRITE) {
#ifdef CONFIG_BLK_DEV_TRITON
#ifdef CONFIG_BLK_DEV_IDEDMA
if (drive->using_dma && !(HWIF(drive)->dmaproc(ide_dma_write, drive)))
return;
#endif /* CONFIG_BLK_DEV_TRITON */
#endif /* CONFIG_BLK_DEV_IDEDMA */
OUT_BYTE(drive->mult_count ? WIN_MULTWRITE : WIN_WRITE, IDE_COMMAND_REG);
if (ide_wait_stat(drive, DATA_READY, drive->bad_wstat, WAIT_DRQ)) {
printk(KERN_ERR "%s: no DRQ after issuing %s\n", drive->name,
......@@ -459,17 +461,17 @@ static void idedisk_special (ide_drive_t *drive)
OUT_BYTE(drive->cyl,IDE_LCYL_REG);
OUT_BYTE(drive->cyl>>8,IDE_HCYL_REG);
OUT_BYTE(((drive->head-1)|drive->select.all)&0xBF,IDE_SELECT_REG);
if (!IS_PROMISE_DRIVE)
if (!IS_PDC4030_DRIVE)
ide_cmd(drive, WIN_SPECIFY, drive->sect, &set_geometry_intr);
} else if (s->b.recalibrate) {
s->b.recalibrate = 0;
if (!IS_PROMISE_DRIVE)
if (!IS_PDC4030_DRIVE)
ide_cmd(drive, WIN_RESTORE, drive->sect, &recal_intr);
} else if (s->b.set_multmode) {
s->b.set_multmode = 0;
if (drive->id && drive->mult_req > drive->id->max_multsect)
drive->mult_req = drive->id->max_multsect;
if (!IS_PROMISE_DRIVE)
if (!IS_PDC4030_DRIVE)
ide_cmd(drive, WIN_SETMULT, drive->mult_req, &set_multmode_intr);
} else if (s->all) {
int special = s->all;
......@@ -602,12 +604,16 @@ static void idedisk_setup (ide_drive_t *drive)
(void) idedisk_capacity (drive); /* initialize LBA selection */
printk (KERN_INFO "%s: %.40s, %ldMB w/%dkB Cache, %sCHS=%d/%d/%d%s\n",
printk (KERN_INFO "%s: %.40s, %ldMB w/%dkB Cache, CHS=%d/%d/%d",
drive->name, id->model, idedisk_capacity(drive)/2048L, id->buf_size/2,
drive->select.b.lba ? "LBA, " : "",
drive->bios_cyl, drive->bios_head, drive->bios_sect,
drive->using_dma ? ", DMA" : "");
drive->bios_cyl, drive->bios_head, drive->bios_sect);
if (drive->using_dma) {
if ((id->field_valid & 4) && (id->dma_ultra & (id->dma_ultra >> 8) & 7))
printk(", UDMA");
else
printk(", DMA");
}
printk("\n");
drive->mult_count = 0;
if (id->max_multsect) {
drive->mult_req = INITIAL_MULT_COUNT;
......
......@@ -532,7 +532,7 @@ static void idefloppy_output_buffers (ide_drive_t *drive, idefloppy_pc_t *pc, un
}
}
#ifdef CONFIG_BLK_DEV_TRITON
#ifdef CONFIG_BLK_DEV_IDEDMA
static void idefloppy_update_buffers (ide_drive_t *drive, idefloppy_pc_t *pc)
{
struct request *rq = pc->rq;
......@@ -541,7 +541,7 @@ static void idefloppy_update_buffers (ide_drive_t *drive, idefloppy_pc_t *pc)
while ((bh = rq->bh) != NULL)
idefloppy_end_request (1, HWGROUP(drive));
}
#endif /* CONFIG_BLK_DEV_TRITON */
#endif /* CONFIG_BLK_DEV_IDEDMA */
/*
* idefloppy_queue_pc_head generates a new packet command request in front
......@@ -681,7 +681,7 @@ static void idefloppy_pc_intr (ide_drive_t *drive)
printk (KERN_INFO "ide-floppy: Reached idefloppy_pc_intr interrupt handler\n");
#endif /* IDEFLOPPY_DEBUG_LOG */
#ifdef CONFIG_BLK_DEV_TRITON
#ifdef CONFIG_BLK_DEV_IDEDMA
if (test_bit (PC_DMA_IN_PROGRESS, &pc->flags)) {
if (HWIF(drive)->dmaproc(ide_dma_status_bad, drive)) {
set_bit (PC_DMA_ERROR, &pc->flags);
......@@ -694,7 +694,7 @@ static void idefloppy_pc_intr (ide_drive_t *drive)
printk (KERN_INFO "ide-floppy: DMA finished\n");
#endif /* IDEFLOPPY_DEBUG_LOG */
}
#endif /* CONFIG_BLK_DEV_TRITON */
#endif /* CONFIG_BLK_DEV_IDEDMA */
status.all = GET_STAT(); /* Clear the interrupt */
......@@ -725,7 +725,7 @@ static void idefloppy_pc_intr (ide_drive_t *drive)
pc->callback(drive); /* Command finished - Call the callback function */
return;
}
#ifdef CONFIG_BLK_DEV_TRITON
#ifdef CONFIG_BLK_DEV_IDEDMA
if (test_and_clear_bit (PC_DMA_IN_PROGRESS, &pc->flags)) {
printk (KERN_ERR "ide-floppy: The floppy wants to issue more interrupts in DMA mode\n");
printk (KERN_ERR "ide-floppy: DMA disabled, reverting to PIO\n");
......@@ -733,7 +733,7 @@ static void idefloppy_pc_intr (ide_drive_t *drive)
ide_do_reset (drive);
return;
}
#endif /* CONFIG_BLK_DEV_TRITON */
#endif /* CONFIG_BLK_DEV_IDEDMA */
bcount.b.high=IN_BYTE (IDE_BCOUNTH_REG); /* Get the number of bytes to transfer */
bcount.b.low=IN_BYTE (IDE_BCOUNTL_REG); /* on this interrupt */
ireason.all=IN_BYTE (IDE_IREASON_REG);
......@@ -841,14 +841,14 @@ static void idefloppy_issue_pc (ide_drive_t *drive, idefloppy_pc_t *pc)
pc->current_position=pc->buffer;
bcount.all=pc->request_transfer; /* Request to transfer the entire buffer at once */
#ifdef CONFIG_BLK_DEV_TRITON
#ifdef CONFIG_BLK_DEV_IDEDMA
if (test_and_clear_bit (PC_DMA_ERROR, &pc->flags)) {
printk (KERN_WARNING "ide-floppy: DMA disabled, reverting to PIO\n");
HWIF(drive)->dmaproc(ide_dma_off, drive);
}
if (test_bit (PC_DMA_RECOMMENDED, &pc->flags) && drive->using_dma)
dma_ok=!HWIF(drive)->dmaproc(test_bit (PC_WRITING, &pc->flags) ? ide_dma_write : ide_dma_read, drive);
#endif /* CONFIG_BLK_DEV_TRITON */
#endif /* CONFIG_BLK_DEV_IDEDMA */
OUT_BYTE (drive->ctl,IDE_CONTROL_REG);
OUT_BYTE (dma_ok ? 1:0,IDE_FEATURE_REG); /* Use PIO/DMA */
......@@ -856,12 +856,12 @@ static void idefloppy_issue_pc (ide_drive_t *drive, idefloppy_pc_t *pc)
OUT_BYTE (bcount.b.low,IDE_BCOUNTL_REG);
OUT_BYTE (drive->select.all,IDE_SELECT_REG);
#ifdef CONFIG_BLK_DEV_TRITON
#ifdef CONFIG_BLK_DEV_IDEDMA
if (dma_ok) { /* Begin DMA, if necessary */
set_bit (PC_DMA_IN_PROGRESS, &pc->flags);
(void) (HWIF(drive)->dmaproc(ide_dma_begin, drive));
}
#endif /* CONFIG_BLK_DEV_TRITON */
#endif /* CONFIG_BLK_DEV_IDEDMA */
if (test_bit (IDEFLOPPY_DRQ_INTERRUPT, &floppy->flags)) {
ide_set_handler (drive, &idefloppy_transfer_pc, WAIT_CMD);
......
......@@ -114,13 +114,13 @@ static inline void do_identify (ide_drive_t *drive, byte cmd)
if (cmd == WIN_PIDENTIFY) {
byte type = (id->config >> 8) & 0x1f;
printk("ATAPI ");
#ifdef CONFIG_BLK_DEV_PROMISE
if (HWIF(drive)->is_promise2) {
#ifdef CONFIG_BLK_DEV_PDC4030
if (HWIF(drive)->is_pdc4030_2) {
printk(" -- not supported on 2nd Promise port\n");
drive->present = 0;
return;
}
#endif /* CONFIG_BLK_DEV_PROMISE */
#endif /* CONFIG_BLK_DEV_PDC4030 */
switch (type) {
case ide_floppy:
if (!strstr(id->model, "oppy") && !strstr(id->model, "poyp") && !strstr(id->model, "ZIP"))
......@@ -192,15 +192,16 @@ static int try_to_identify (ide_drive_t *drive, byte cmd)
} else
hd_status = IDE_ALTSTATUS_REG; /* use non-intrusive polling */
#if CONFIG_BLK_DEV_PROMISE
if (IS_PROMISE_DRIVE) {
if (promise_cmd(drive,PROMISE_IDENTIFY)) {
#if CONFIG_BLK_DEV_PDC4030
if (IS_PDC4030_DRIVE) {
extern int pdc4030_cmd(ide_drive_t *, byte);
if (pdc4030_cmd(drive,PROMISE_IDENTIFY)) {
if (irqs)
(void) probe_irq_off(irqs);
return 1;
}
} else
#endif /* CONFIG_BLK_DEV_PROMISE */
#endif /* CONFIG_BLK_DEV_PDC4030 */
OUT_BYTE(cmd,IDE_COMMAND_REG); /* ask drive for ID */
timeout = ((cmd == WIN_IDENTIFY) ? WAIT_WORSTCASE : WAIT_PIDENTIFY) / 2;
timeout += jiffies;
......@@ -363,10 +364,10 @@ static void probe_cmos_for_drives (ide_hwif_t *hwif)
byte cmos_disks, *BIOS = (byte *) &drive_info;
int unit;
#ifdef CONFIG_BLK_DEV_PROMISE
if (hwif->is_promise2)
#ifdef CONFIG_BLK_DEV_PDC4030
if (hwif->is_pdc4030_2)
return;
#endif /* CONFIG_BLK_DEV_PROMISE */
#endif /* CONFIG_BLK_DEV_PDC4030 */
outb_p(0x12,0x70); /* specify CMOS address 0x12 */
cmos_disks = inb_p(0x71); /* read the data from 0x12 */
/* Extract drive geometry from CMOS+BIOS if not already setup */
......@@ -397,12 +398,12 @@ static void probe_hwif (ide_hwif_t *hwif)
return;
if (hwif->io_ports[IDE_DATA_OFFSET] == HD_DATA)
probe_cmos_for_drives (hwif);
#if CONFIG_BLK_DEV_PROMISE
if (!hwif->is_promise2 &&
#if CONFIG_BLK_DEV_PDC4030
if (!hwif->is_pdc4030_2 &&
(ide_check_region(hwif->io_ports[IDE_DATA_OFFSET],8) || ide_check_region(hwif->io_ports[IDE_CONTROL_OFFSET],1))) {
#else
if (ide_check_region(hwif->io_ports[IDE_DATA_OFFSET],8) || ide_check_region(hwif->io_ports[IDE_CONTROL_OFFSET],1)) {
#endif /* CONFIG_BLK_DEV_PROMISE */
#endif /* CONFIG_BLK_DEV_PDC4030 */
int msgout = 0;
for (unit = 0; unit < MAX_DRIVES; ++unit) {
ide_drive_t *drive = &hwif->drives[unit];
......
......@@ -170,13 +170,13 @@
* unit, making performance almost independent of the
* chosen user block size.
* Some improvements in error recovery.
* By cooperating with triton.c, bus mastering DMA can
* By cooperating with ide-dma.c, bus mastering DMA can
* now sometimes be used with IDE tape drives as well.
* Bus mastering DMA has the potential to dramatically
* reduce the CPU's overhead when accessing the device,
* and can be enabled by using hdparm -d1 on the tape's
* block device interface. For more info, read the
* comments in triton.c.
* comments in ide-dma.c.
* Ver 1.4 Mar 13 96 Fixed serialize support.
* Ver 1.5 Apr 12 96 Fixed shared interface operation, broken in 1.3.85.
* Fixed pipelined read mode inefficiency.
......@@ -1093,7 +1093,7 @@ static void idetape_output_buffers (ide_drive_t *drive, idetape_pc_t *pc, unsign
}
}
#ifdef CONFIG_BLK_DEV_TRITON
#ifdef CONFIG_BLK_DEV_IDEDMA
static void idetape_update_buffers (idetape_pc_t *pc)
{
struct buffer_head *bh = pc->bh;
......@@ -1116,7 +1116,7 @@ static void idetape_update_buffers (idetape_pc_t *pc)
}
pc->bh = bh;
}
#endif /* CONFIG_BLK_DEV_TRITON */
#endif /* CONFIG_BLK_DEV_IDEDMA */
/*
* idetape_postpone_request postpones the current request so that
......@@ -1610,7 +1610,7 @@ static void idetape_analyze_error (ide_drive_t *drive,idetape_request_sense_resu
printk (KERN_INFO "ide-tape: pc = %x, sense key = %x, asc = %x, ascq = %x\n",pc->c[0],result->sense_key,result->asc,result->ascq);
#endif /* IDETAPE_DEBUG_LOG */
#ifdef CONFIG_BLK_DEV_TRITON
#ifdef CONFIG_BLK_DEV_IDEDMA
/*
* Correct pc->actually_transferred by asking the tape.
......@@ -1619,7 +1619,7 @@ static void idetape_analyze_error (ide_drive_t *drive,idetape_request_sense_resu
pc->actually_transferred = pc->request_transfer - tape->tape_block_size * ntohl (get_unaligned (&result->information));
idetape_update_buffers (pc);
}
#endif /* CONFIG_BLK_DEV_TRITON */
#endif /* CONFIG_BLK_DEV_IDEDMA */
if (pc->c[0] == IDETAPE_READ_CMD && result->filemark) {
pc->error = IDETAPE_ERROR_FILEMARK;
set_bit (PC_ABORT, &pc->flags);
......@@ -1721,7 +1721,7 @@ static void idetape_pc_intr (ide_drive_t *drive)
printk (KERN_INFO "ide-tape: Reached idetape_pc_intr interrupt handler\n");
#endif /* IDETAPE_DEBUG_LOG */
#ifdef CONFIG_BLK_DEV_TRITON
#ifdef CONFIG_BLK_DEV_IDEDMA
if (test_bit (PC_DMA_IN_PROGRESS, &pc->flags)) {
if (HWIF(drive)->dmaproc(ide_dma_status_bad, drive)) {
set_bit (PC_DMA_ERROR, &pc->flags);
......@@ -1739,7 +1739,7 @@ static void idetape_pc_intr (ide_drive_t *drive)
printk (KERN_INFO "ide-tape: DMA finished\n");
#endif /* IDETAPE_DEBUG_LOG */
}
#endif /* CONFIG_BLK_DEV_TRITON */
#endif /* CONFIG_BLK_DEV_IDEDMA */
status.all = GET_STAT(); /* Clear the interrupt */
......@@ -1776,7 +1776,7 @@ static void idetape_pc_intr (ide_drive_t *drive)
pc->callback(drive); /* Command finished - Call the callback function */
return;
}
#ifdef CONFIG_BLK_DEV_TRITON
#ifdef CONFIG_BLK_DEV_IDEDMA
if (test_and_clear_bit (PC_DMA_IN_PROGRESS, &pc->flags)) {
printk (KERN_ERR "ide-tape: The tape wants to issue more interrupts in DMA mode\n");
printk (KERN_ERR "ide-tape: DMA disabled, reverting to PIO\n");
......@@ -1784,7 +1784,7 @@ static void idetape_pc_intr (ide_drive_t *drive)
ide_do_reset (drive);
return;
}
#endif /* CONFIG_BLK_DEV_TRITON */
#endif /* CONFIG_BLK_DEV_IDEDMA */
bcount.b.high=IN_BYTE (IDE_BCOUNTH_REG); /* Get the number of bytes to transfer */
bcount.b.low=IN_BYTE (IDE_BCOUNTL_REG); /* on this interrupt */
ireason.all=IN_BYTE (IDE_IREASON_REG);
......@@ -1915,14 +1915,14 @@ static void idetape_issue_packet_command (ide_drive_t *drive, idetape_pc_t *pc)
pc->current_position=pc->buffer;
bcount.all=pc->request_transfer; /* Request to transfer the entire buffer at once */
#ifdef CONFIG_BLK_DEV_TRITON
#ifdef CONFIG_BLK_DEV_IDEDMA
if (test_and_clear_bit (PC_DMA_ERROR, &pc->flags)) {
printk (KERN_WARNING "ide-tape: DMA disabled, reverting to PIO\n");
HWIF(drive)->dmaproc(ide_dma_off, drive);
}
if (test_bit (PC_DMA_RECOMMENDED, &pc->flags) && drive->using_dma)
dma_ok=!HWIF(drive)->dmaproc(test_bit (PC_WRITING, &pc->flags) ? ide_dma_write : ide_dma_read, drive);
#endif /* CONFIG_BLK_DEV_TRITON */
#endif /* CONFIG_BLK_DEV_IDEDMA */
OUT_BYTE (drive->ctl,IDE_CONTROL_REG);
OUT_BYTE (dma_ok ? 1:0,IDE_FEATURE_REG); /* Use PIO/DMA */
......@@ -1952,12 +1952,12 @@ static void idetape_issue_packet_command (ide_drive_t *drive, idetape_pc_t *pc)
return;
}
atapi_output_bytes (drive,pc->c,12); /* Send the actual packet */
#ifdef CONFIG_BLK_DEV_TRITON
#ifdef CONFIG_BLK_DEV_IDEDMA
if (dma_ok) { /* Begin DMA, if necessary */
set_bit (PC_DMA_IN_PROGRESS, &pc->flags);
(void) (HWIF(drive)->dmaproc(ide_dma_begin, drive));
}
#endif /* CONFIG_BLK_DEV_TRITON */
#endif /* CONFIG_BLK_DEV_IDEDMA */
}
static void idetape_media_access_finished (ide_drive_t *drive)
......
This diff is collapsed.
......@@ -3,7 +3,7 @@
/*
* linux/drivers/block/ide.h
*
* Copyright (C) 1994-1996 Linus Torvalds & authors
* Copyright (C) 1994-1998 Linus Torvalds & authors
*/
#include <linux/config.h>
......@@ -164,7 +164,7 @@ typedef unsigned char byte; /* used everywhere */
#define WAIT_CMD (10*HZ) /* 10sec - maximum wait for an IRQ to happen */
#define WAIT_MIN_SLEEP (2*HZ/100) /* 20msec - minimum sleep time */
#if defined(CONFIG_BLK_DEV_HT6560B) || defined(CONFIG_BLK_DEV_PROMISE)
#if defined(CONFIG_BLK_DEV_HT6560B) || defined(CONFIG_BLK_DEV_PDC4030)
#define SELECT_DRIVE(hwif,drive) \
{ \
if (hwif->selectproc) \
......@@ -174,7 +174,7 @@ typedef unsigned char byte; /* used everywhere */
}
#else
#define SELECT_DRIVE(hwif,drive) OUT_BYTE((drive)->select.all, hwif->io_ports[IDE_SELECT_OFFSET]);
#endif /* CONFIG_BLK_DEV_HT6560B || CONFIG_BLK_DEV_PROMISE */
#endif /* CONFIG_BLK_DEV_HT6560B || CONFIG_BLK_DEV_PDC4030 */
/*
* Now for the data we need to maintain per-drive: ide_drive_t
......@@ -244,6 +244,7 @@ typedef struct ide_drive_s {
byte bios_sect; /* BIOS/fdisk/LILO sectors per track */
unsigned short bios_cyl; /* BIOS/fdisk/LILO number of cyls */
unsigned short cyl; /* "real" number of cyls */
unsigned int timing_data; /* for use by tuneproc()'s */
void *hwif; /* actually (ide_hwif_t *) */
struct wait_queue *wqueue; /* used to wait for drive in open() */
struct hd_driveid *id; /* drive model identification info */
......@@ -268,7 +269,7 @@ typedef enum { ide_dma_read = 0, ide_dma_write = 1,
ide_dma_abort = 2, ide_dma_check = 3,
ide_dma_status_bad = 4, ide_dma_transferred = 5,
ide_dma_begin = 6, ide_dma_on = 7,
ide_dma_off = 8 }
ide_dma_off = 8, ide_dma_off_quietly = 9 }
ide_dma_action_t;
typedef int (ide_dmaproc_t)(ide_dma_action_t, ide_drive_t *);
......@@ -288,7 +289,7 @@ typedef int (ide_dmaproc_t)(ide_dma_action_t, ide_drive_t *);
typedef void (ide_tuneproc_t)(ide_drive_t *, byte);
/*
* This is used to provide HT6560B & PROMISE interface support.
* This is used to provide HT6560B & PDC4030 interface support.
*/
typedef void (ide_selectproc_t) (ide_drive_t *);
......@@ -296,10 +297,10 @@ typedef void (ide_selectproc_t) (ide_drive_t *);
* hwif_chipset_t is used to keep track of the specific hardware
* chipset used by each IDE interface, if known.
*/
typedef enum { ide_unknown, ide_generic, ide_triton,
typedef enum { ide_unknown, ide_generic, ide_pci,
ide_cmd640, ide_dtc2278, ide_ali14xx,
ide_qd6580, ide_umc8672, ide_ht6560b,
ide_promise, ide_via }
ide_pdc4030, ide_rz1000 }
hwif_chipset_t;
typedef struct hwif_s {
......@@ -309,7 +310,7 @@ typedef struct hwif_s {
ide_drive_t drives[MAX_DRIVES]; /* drive info */
struct gendisk *gd; /* gendisk structure */
ide_tuneproc_t *tuneproc; /* routine to tune PIO mode for drives */
#if defined(CONFIG_BLK_DEV_HT6560B) || defined(CONFIG_BLK_DEV_PROMISE)
#if defined(CONFIG_BLK_DEV_HT6560B) || defined(CONFIG_BLK_DEV_PDC4030)
ide_selectproc_t *selectproc; /* tweaks hardware to select drive */
#endif
ide_dmaproc_t *dmaproc; /* dma read/write/abort routine */
......@@ -324,9 +325,9 @@ typedef struct hwif_s {
unsigned present : 1; /* this interface exists */
unsigned serialized : 1; /* serialized operation with mate hwif */
unsigned sharing_irq: 1; /* 1 = sharing irq with another hwif */
#ifdef CONFIG_BLK_DEV_PROMISE
unsigned is_promise2: 1; /* 2nd i/f on promise DC4030 */
#endif /* CONFIG_BLK_DEV_PROMISE */
#ifdef CONFIG_BLK_DEV_PDC4030
unsigned is_pdc4030_2: 1;/* 2nd i/f on pdc4030 */
#endif /* CONFIG_BLK_DEV_PDC4030 */
unsigned reset : 1; /* reset after probe */
#if (DISK_RECOVERY_TIME > 0)
unsigned long last_time; /* time when previous rq was done */
......@@ -609,23 +610,15 @@ ide_drive_t *ide_scan_devices (byte media, ide_driver_t *driver, int n);
int ide_register_subdriver (ide_drive_t *drive, ide_driver_t *driver, int version);
int ide_unregister_subdriver (ide_drive_t *drive);
#ifdef CONFIG_BLK_DEV_TRITON
void ide_init_triton (byte, byte);
#endif /* CONFIG_BLK_DEV_TRITON */
#ifdef CONFIG_BLK_DEV_OPTI621
void ide_init_opti621 (byte, byte);
#endif /* CONFIG_BLK_DEV_OPTI621 */
#ifdef CONFIG_BLK_DEV_IDE
int ideprobe_init (void);
#endif /* CONFIG_BLK_DEV_IDE */
#ifdef CONFIG_BLK_DEV_PROMISE
#include "promise.h"
#define IS_PROMISE_DRIVE (HWIF(drive)->chipset == ide_promise)
#ifdef CONFIG_BLK_DEV_PDC4030
#include "pdc4030.h"
#define IS_PDC4030_DRIVE (HWIF(drive)->chipset == ide_pdc4030)
#else
#define IS_PROMISE_DRIVE (0) /* auto-NULLs out Promise code */
#endif /* CONFIG_BLK_DEV_PROMISE */
#define IS_PDC4030_DRIVE (0) /* auto-NULLs out pdc4030 code */
#endif /* CONFIG_BLK_DEV_PDC4030 */
#endif /* _IDE_H */
This diff is collapsed.
/* -*- linux-c -*-
* linux/drivers/block/promise.c Version 0.07 Mar 26, 1996
* linux/drivers/block/pdc4030.c Version 0.08 Nov 30, 1997
*
* Copyright (C) 1995-1996 Linus Torvalds & authors (see below)
* Copyright (C) 1995-1998 Linus Torvalds & authors (see below)
*/
/*
......@@ -28,6 +28,7 @@
* Version 0.06 Ooops. Add hwgroup to direct call of ide_intr() -ml
* Version 0.07 Added support for DC4030 variants
* Secondary interface autodetection
* Version 0.08 Renamed to pdc4030.c
*/
/*
......@@ -56,7 +57,7 @@
#include <asm/io.h>
#include <asm/irq.h>
#include "ide.h"
#include "promise.h"
#include "pdc4030.h"
/* This is needed as the controller may not interrupt if the required data is
available in the cache. We have to simulate an interrupt. Ugh! */
......@@ -73,15 +74,15 @@ static void promise_selectproc (ide_drive_t *drive)
OUT_BYTE(drive->select.all,IDE_SELECT_REG);
udelay(1); /* paranoia */
number = ((HWIF(drive)->is_promise2)<<1) + drive->select.b.unit;
number = ((HWIF(drive)->is_pdc4030_2)<<1) + drive->select.b.unit;
OUT_BYTE(number,IDE_FEATURE_REG);
}
/*
* promise_cmd handles the set of vendor specific commands that are initiated
* pdc4030_cmd handles the set of vendor specific commands that are initiated
* by command F0. They all have the same success/failure notification.
*/
int promise_cmd(ide_drive_t *drive, byte cmd)
int pdc4030_cmd(ide_drive_t *drive, byte cmd)
{
unsigned long timeout, timer;
byte status_val;
......@@ -111,17 +112,17 @@ int promise_cmd(ide_drive_t *drive, byte cmd)
ide_hwif_t *hwif_required = NULL;
void setup_dc4030 (ide_hwif_t *hwif)
void setup_pdc4030 (ide_hwif_t *hwif)
{
hwif_required = hwif;
}
/*
init_dc4030: Test for presence of a Promise caching controller card.
init_pdc4030: Test for presence of a Promise caching controller card.
Returns: 0 if no Promise card present at this io_base
1 if Promise card found
*/
int init_dc4030 (void)
int init_pdc4030 (void)
{
ide_hwif_t *hwif = hwif_required;
ide_drive_t *drive;
......@@ -133,7 +134,7 @@ int init_dc4030 (void)
drive = &hwif->drives[0];
second_hwif = &ide_hwifs[hwif->index+1];
if(hwif->is_promise2) /* we've already been found ! */
if(hwif->is_pdc4030_2) /* we've already been found ! */
return 1;
if(IN_BYTE(IDE_NSECTOR_REG) == 0xFF || IN_BYTE(IDE_SECTOR_REG) == 0xFF)
......@@ -141,7 +142,7 @@ int init_dc4030 (void)
return 0;
}
OUT_BYTE(0x08,IDE_CONTROL_REG);
if(promise_cmd(drive,PROMISE_GET_CONFIG)) {
if(pdc4030_cmd(drive,PROMISE_GET_CONFIG)) {
return 0;
}
if(ide_wait_stat(drive,DATA_READY,BAD_W_STAT,WAIT_DRQ)) {
......@@ -168,7 +169,7 @@ int init_dc4030 (void)
default: hwif->irq = 15; break;
}
printk("on IRQ %d\n",hwif->irq);
hwif->chipset = second_hwif->chipset = ide_promise;
hwif->chipset = second_hwif->chipset = ide_pdc4030;
hwif->selectproc = second_hwif->selectproc = &promise_selectproc;
/* Shift the remaining interfaces down by one */
for (i=MAX_HWIFS-1 ; i > hwif->index+1 ; i--) {
......@@ -179,7 +180,7 @@ int init_dc4030 (void)
h->io_ports[IDE_CONTROL_OFFSET] = (h-1)->io_ports[IDE_CONTROL_OFFSET];
h->noprobe = (h-1)->noprobe;
}
second_hwif->is_promise2 = 1;
second_hwif->is_pdc4030_2 = 1;
ide_init_hwif_ports(second_hwif->io_ports, hwif->io_ports[IDE_DATA_OFFSET], NULL);
second_hwif->io_ports[IDE_CONTROL_OFFSET] = hwif->io_ports[IDE_CONTROL_OFFSET];
second_hwif->irq = hwif->irq;
......@@ -304,11 +305,11 @@ static void promise_write (ide_drive_t *drive)
}
/*
* do_promise_io() is called from do_rw_disk, having had the block number
* do_pdc4030_io() is called from do_rw_disk, having had the block number
* already set up. It issues a READ or WRITE command to the Promise
* controller, assuming LBA has been used to set up the block number.
*/
void do_promise_io (ide_drive_t *drive, struct request *rq)
void do_pdc4030_io (ide_drive_t *drive, struct request *rq)
{
unsigned long timeout;
byte stat;
......
/*
* linux/drivers/block/promise.h
* linux/drivers/block/pdc4030.h
*
* Copyright (C) 1995-6 Linus Torvalds & authors
* Copyright (C) 1995-1998 Linus Torvalds & authors
*/
/*
......@@ -41,12 +41,4 @@ struct dc_ident {
u8 pad[SECTOR_WORDS*4 - 32];
};
/*
* Routines exported to ide.c:
*/
void do_promise_io (ide_drive_t *, struct request *);
int promise_cmd(ide_drive_t *, byte);
void setup_dc4030 (ide_hwif_t *);
int init_dc4030 (void);
#endif IDE_PROMISE_H
......@@ -26,34 +26,42 @@
#include <linux/pci.h>
#include "ide.h"
static void ide_pci_access_error (int rc)
static void init_rz1000 (byte bus, byte fn, const char *name)
{
printk("ide: pcibios access failed - %s\n", pcibios_strerror(rc));
unsigned short reg, h;
printk("%s: buggy IDE controller: ", name);
if (!pcibios_read_config_word (bus, fn, PCI_COMMAND, &reg) && !(reg & 1)) {
printk("disabled (BIOS)\n");
return;
}
if (!pcibios_read_config_word (bus, fn, 0x40, &reg)
&& !pcibios_write_config_word(bus, fn, 0x40, reg & 0xdfff))
{
printk("disabled read-ahead\n");
} else {
printk("\n");
for (h = 0; h < MAX_HWIFS; ++h) {
ide_hwif_t *hwif = &ide_hwifs[h];
if ((hwif->io_ports[IDE_DATA_OFFSET] == 0x1f0 || hwif->io_ports[IDE_DATA_OFFSET] == 0x170)
&& (hwif->chipset == ide_unknown || hwif->chipset == ide_generic))
{
hwif->chipset = ide_rz1000;
hwif->serialized = 1;
hwif->drives[0].no_unmask = 1;
hwif->drives[1].no_unmask = 1;
printk(" %s: serialized, disabled unmasking\n", hwif->name);
}
}
}
}
void init_rz1000 (byte bus, byte fn)
void ide_probe_for_rz100x (void)
{
int rc;
unsigned short reg;
byte index, bus, fn;
printk("ide0: buggy RZ1000 interface: ");
if ((rc = pcibios_read_config_word (bus, fn, PCI_COMMAND, &reg))) {
ide_pci_access_error (rc);
} else if (!(reg & 1)) {
printk("not enabled\n");
} else {
if ((rc = pcibios_read_config_word(bus, fn, 0x40, &reg))
|| (rc = pcibios_write_config_word(bus, fn, 0x40, reg & 0xdfff)))
{
ide_hwifs[0].drives[0].no_unmask = 1;
ide_hwifs[0].drives[1].no_unmask = 1;
ide_hwifs[1].drives[0].no_unmask = 1;
ide_hwifs[1].drives[1].no_unmask = 1;
ide_hwifs[0].serialized = 1;
ide_hwifs[1].serialized = 1;
ide_pci_access_error (rc);
printk("serialized, disabled unmasking\n");
} else
printk("disabled read-ahead\n");
}
for (index = 0; !pcibios_find_device (PCI_VENDOR_ID_PCTECH, PCI_DEVICE_ID_PCTECH_RZ1000, index, &bus, &fn); ++index)
init_rz1000 (bus, fn, "RZ1000");
for (index = 0; !pcibios_find_device (PCI_VENDOR_ID_PCTECH, PCI_DEVICE_ID_PCTECH_RZ1001, index, &bus, &fn); ++index)
init_rz1000 (bus, fn, "RZ1001");
}
......@@ -128,7 +128,7 @@ static inline int lp_char(char lpchar, int minor, int use_polling)
do {
status = r_str(minor);
count++;
if (resched_needed())
if (need_resched)
lp_schedule (minor);
} while (((use_polling && !LP_READY(minor, status)) ||
(!use_polling && !(status & LP_PBUSY))) &&
......@@ -356,7 +356,7 @@ static ssize_t lp_read(struct file * file, char * buf,
status=(r_str(minor) & 0x40);
udelay(50);
counter++;
if (resched_needed())
if (need_resched)
schedule ();
} while ( (status == 0x40) && (counter < 20) );
if ( counter == 20 ) { /* Timeout */
......@@ -375,7 +375,7 @@ static ssize_t lp_read(struct file * file, char * buf,
status=(r_str(minor) & 0x40);
udelay(20);
counter++;
if (resched_needed())
if (need_resched)
schedule ();
} while ( (status == 0) && (counter < 20) );
if (counter == 20) { /* Timeout */
......
......@@ -249,7 +249,7 @@ int videodev_init(void)
return 0;
}
#ifdef MODULE
int init_module(void)
{
return videodev_init();
......@@ -260,5 +260,7 @@ void cleanup_module(void)
unregister_chrdev(VIDEO_MAJOR, "video_capture");
}
#endif
EXPORT_SYMBOL(video_register_device);
EXPORT_SYMBOL(video_unregister_device);
......@@ -140,9 +140,9 @@ if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
fi
fi
#if [ ! "$CONFIG_PARPORT" = "n" ]; then
# dep_tristate 'PLIP (parallel port) support' CONFIG_PLIP $CONFIG_PARPORT
#fi
if [ ! "$CONFIG_PARPORT" = "n" ]; then
dep_tristate 'PLIP (parallel port) support' CONFIG_PLIP $CONFIG_PARPORT
fi
tristate 'PPP (point-to-point) support' CONFIG_PPP
if [ ! "$CONFIG_PPP" = "n" ]; then
......@@ -181,13 +181,8 @@ if [ "$CONFIG_NET_RADIO" != "n" ]; then
bool 'HFmodem support for Soundblaster and compatible cards' CONFIG_HFMODEM_SBC
bool 'HFmodem support for WSS and Crystal cards' CONFIG_HFMODEM_WSS
fi
tristate 'Shortwave radio modem driver' CONFIG_HFMODEM
if [ "$CONFIG_HFMODEM" != "n" ]; then
bool 'HFmodem support for Soundblaster and compatible cards' CONFIG_HFMODEM_SBC
bool 'HFmodem support for WSS and Crystal cards' CONFIG_HFMODEM_WSS
fi
fi
# tristate 'STRIP (Metricom starmode radio IP)' CONFIG_STRIP
tristate 'STRIP (Metricom starmode radio IP)' CONFIG_STRIP
tristate 'AT&T WaveLAN & DEC RoamAbout DS support' CONFIG_WAVELAN
fi
......
......@@ -38,8 +38,8 @@
#include <linux/trdevice.h>
#include <linux/if_arp.h>
#include <linux/fddidevice.h>
#include <linux/net_alias.h>
#include <linux/if_ltalk.h>
#include <linux/rtnetlink.h>
/* The network devices currently exist only in the socket namespace, so these
entries are unused. The only ones that make sense are
......@@ -112,7 +112,7 @@ init_etherdev(struct device *dev, int sizeof_priv)
new_device = 1;
}
found: /* From the double loop above. */
found: /* From the double loop above. */
if (dev->name &&
((dev->name[0] == '\0') || (dev->name[0] == ' '))) {
......@@ -126,14 +126,9 @@ init_etherdev(struct device *dev, int sizeof_priv)
ether_setup(dev); /* Hmmm, should this be called here? */
if (new_device) {
/* Append the device to the device queue. */
struct device **old_devp = &dev_base;
while ((*old_devp)->next)
old_devp = & (*old_devp)->next;
(*old_devp)->next = dev;
dev->next = 0;
}
if (new_device)
register_netdevice(dev);
return dev;
}
......@@ -173,8 +168,6 @@ void ether_setup(struct device *dev)
int i;
/* Fill in the fields of the device structure with ethernet-generic values.
This should be in a common file instead of per-driver. */
dev_init_buffers(dev);
/* register boot-defined "eth" devices */
if (dev->name && (strncmp(dev->name, "eth", 3) == 0)) {
......@@ -195,6 +188,7 @@ void ether_setup(struct device *dev)
dev->set_mac_address = eth_mac_addr;
dev->hard_header_cache = eth_header_cache;
dev->header_cache_update= eth_header_cache_update;
dev->hard_header_parse = eth_header_parse;
dev->type = ARPHRD_ETHER;
dev->hard_header_len = ETH_HLEN;
......@@ -206,11 +200,8 @@ void ether_setup(struct device *dev)
/* New-style flags. */
dev->flags = IFF_BROADCAST|IFF_MULTICAST;
dev->family = AF_INET;
dev->pa_addr = 0;
dev->pa_brdaddr = 0;
dev->pa_mask = 0;
dev->pa_alen = 4;
dev_init_buffers(dev);
}
#ifdef CONFIG_FDDI
......@@ -222,8 +213,6 @@ void fddi_setup(struct device *dev)
* This should be in a common file instead of per-driver.
*/
dev_init_buffers(dev);
dev->change_mtu = fddi_change_mtu;
dev->hard_header = fddi_header;
dev->rebuild_header = fddi_rebuild_header;
......@@ -238,11 +227,9 @@ void fddi_setup(struct device *dev)
/* New-style flags */
dev->flags = IFF_BROADCAST | IFF_MULTICAST;
dev->family = AF_INET;
dev->pa_addr = 0;
dev->pa_brdaddr = 0;
dev->pa_mask = 0;
dev->pa_alen = 4;
dev_init_buffers(dev);
return;
}
......@@ -264,8 +251,6 @@ static int ltalk_mac_addr(struct device *dev, void *addr)
void ltalk_setup(struct device *dev)
{
/* Fill in the fields of the device structure with localtalk-generic values. */
dev_init_buffers(dev);
dev->change_mtu = ltalk_change_mtu;
dev->hard_header = NULL;
......@@ -283,11 +268,8 @@ void ltalk_setup(struct device *dev)
dev->broadcast[0] = 0xFF;
dev->flags = IFF_BROADCAST|IFF_MULTICAST|IFF_NOARP;
dev->family = AF_APPLETALK;
dev->pa_addr = 0;
dev->pa_brdaddr = 0;
dev->pa_mask = 0;
dev->pa_alen = 1;
dev_init_buffers(dev);
}
#endif
......@@ -309,134 +291,61 @@ int ether_config(struct device *dev, struct ifmap *map)
return 0;
}
int register_netdev(struct device *dev)
static int etherdev_get_index(struct device *dev)
{
struct device *d = dev_base;
unsigned long flags;
int i=MAX_ETH_CARDS;
save_flags(flags);
cli();
if (dev) {
if (dev->name &&
((dev->name[0] == '\0') || (dev->name[0] == ' '))) {
for (i = 0; i < MAX_ETH_CARDS; ++i)
if (ethdev_index[i] == NULL) {
sprintf(dev->name, "eth%d", i);
printk("loading device '%s'...\n", dev->name);
ethdev_index[i] = dev;
break;
}
}
if (dev->init) {
sti(); /* device probes assume interrupts enabled */
if (dev->init(dev) != 0) {
if (i < MAX_ETH_CARDS) ethdev_index[i] = NULL;
restore_flags(flags);
return -EIO;
}
cli();
}
/* Add device to end of chain */
if (dev_base) {
while (d->next)
d = d->next;
d->next = dev;
for (i = 0; i < MAX_ETH_CARDS; ++i) {
if (ethdev_index[i] == NULL) {
sprintf(dev->name, "eth%d", i);
printk("loading device '%s'...\n", dev->name);
ethdev_index[i] = dev;
return i;
}
else
dev_base = dev;
dev->next = NULL;
dev->ifindex = dev_new_index();
}
restore_flags(flags);
return 0;
return -1;
}
void unregister_netdev(struct device *dev)
static void etherdev_put_index(struct device *dev)
{
struct device *d = dev_base;
unsigned long flags;
int i;
save_flags(flags);
cli();
if (dev == NULL)
{
printk("was NULL\n");
restore_flags(flags);
return;
}
/* else */
if (dev->start)
printk("ERROR '%s' busy and not MOD_IN_USE.\n", dev->name);
/*
* must jump over main_device+aliases
* avoid alias devices unregistration so that only
* net_alias module manages them
*/
#ifdef CONFIG_NET_ALIAS
if (dev_base == dev)
dev_base = net_alias_nextdev(dev);
else
{
while(d && (net_alias_nextdev(d) != dev)) /* skip aliases */
d = net_alias_nextdev(d);
if (d && (net_alias_nextdev(d) == dev))
{
/*
* Critical: Bypass by consider devices as blocks (maindev+aliases)
*/
net_alias_nextdev_set(d, net_alias_nextdev(dev));
}
#else
if (dev_base == dev)
dev_base = dev->next;
else
{
while (d && (d->next != dev))
d = d->next;
if (d && (d->next == dev))
{
d->next = dev->next;
}
#endif
else
{
printk("unregister_netdev: '%s' not found\n", dev->name);
restore_flags(flags);
return;
}
}
for (i = 0; i < MAX_ETH_CARDS; ++i)
{
if (ethdev_index[i] == dev)
{
for (i = 0; i < MAX_ETH_CARDS; ++i) {
if (ethdev_index[i] == dev) {
ethdev_index[i] = NULL;
break;
}
}
}
int register_netdev(struct device *dev)
{
int i=-1;
restore_flags(flags);
rtnl_lock();
/*
* You can i.e use a interfaces in a route though it is not up.
* We call close_dev (which is changed: it will down a device even if
* dev->flags==0 (but it will not call dev->stop if IFF_UP
* is not set).
* This will call notifier_call_chain(&netdev_chain, NETDEV_DOWN, dev),
* dev_mc_discard(dev), ....
*/
dev_close(dev);
if (dev->name &&
(dev->name[0] == '\0' || dev->name[0] == ' '))
i = etherdev_get_index(dev);
if (register_netdevice(dev)) {
if (i >= 0)
etherdev_put_index(dev);
rtnl_unlock();
return -EIO;
}
rtnl_unlock();
return 0;
}
void unregister_netdev(struct device *dev)
{
rtnl_lock();
unregister_netdevice(dev);
etherdev_put_index(dev);
rtnl_unlock();
}
#ifdef CONFIG_TR
/* The list of used and available "tr" slots */
#define MAX_TR_CARDS 16
......@@ -488,15 +397,6 @@ struct device *init_trdev(struct device *dev, int sizeof_priv)
break;
}
if (new_device) {
/* Append the device to the device queue. */
struct device **old_devp = &dev_base;
while ((*old_devp)->next)
old_devp = & (*old_devp)->next;
(*old_devp)->next = dev;
dev->next = 0;
}
dev->hard_header = tr_header;
dev->rebuild_header = tr_rebuild_header;
......@@ -511,11 +411,9 @@ struct device *init_trdev(struct device *dev, int sizeof_priv)
/* New-style flags. */
dev->flags = IFF_BROADCAST;
dev->family = AF_INET;
dev->pa_addr = 0;
dev->pa_brdaddr = 0;
dev->pa_mask = 0;
dev->pa_alen = 4;
if (new_device)
register_netdevice(dev);
return dev;
}
......@@ -553,99 +451,21 @@ void tr_freedev(struct device *dev)
int register_trdev(struct device *dev)
{
unsigned long flags;
dev_init_buffers(dev);
save_flags(flags);
if (dev && dev->init) {
sti(); /* device probes assume interrupts enabled */
if (dev->init(dev) != 0) {
unregister_trdev(dev);
restore_flags(flags);
return -EIO;
}
cli();
if (dev->init && dev->init(dev) != 0) {
unregister_trdev(dev);
return -EIO;
}
restore_flags(flags);
return 0;
}
void unregister_trdev(struct device *dev)
{
struct device *d = dev_base;
unsigned long flags;
save_flags(flags);
cli();
if (dev == NULL)
{
printk("was NULL\n");
restore_flags(flags);
return;
}
/* else */
if (dev->start)
printk("ERROR '%s' busy and not MOD_IN_USE.\n", dev->name);
/*
* must jump over main_device+aliases
* avoid alias devices unregistration so that only
* net_alias module manages them
*/
#ifdef CONFIG_NET_ALIAS
if (dev_base == dev)
dev_base = net_alias_nextdev(dev);
else
{
while(d && (net_alias_nextdev(d) != dev)) /* skip aliases */
d = net_alias_nextdev(d);
if (d && (net_alias_nextdev(d) == dev))
{
/*
* Critical: Bypass by consider devices as blocks (maindev+aliases)
*/
net_alias_nextdev_set(d, net_alias_nextdev(dev));
}
#else
if (dev_base == dev)
dev_base = dev->next;
else
{
while (d && (d->next != dev))
d = d->next;
if (d && (d->next == dev))
{
d->next = dev->next;
}
#endif
else
{
printk("unregister_trdev: '%s' not found\n", dev->name);
restore_flags(flags);
return;
}
}
rtnl_lock();
unregister_netdevice(dev);
rtnl_unlock();
tr_freedev(dev);
restore_flags(flags);
/*
* You can i.e use a interfaces in a route though it is not up.
* We call close_dev (which is changed: it will down a device even if
* dev->flags==0 (but it will not call dev->stop if IFF_UP
* is not set).
* This will call notifier_call_chain(&netdev_chain, NETDEV_DOWN, dev),
* dev_mc_discard(dev), ....
*/
dev_close(dev);
}
#endif
......@@ -655,6 +475,5 @@ void unregister_trdev(struct device *dev)
* compile-command: "gcc -D__KERNEL__ -I/usr/src/linux/net/inet -Wall -Wstrict-prototypes -O6 -m486 -c net_init.c"
* version-control: t
* kept-new-versions: 5
* tab-width: 4
* End:
*/
#warning This wont work until we merge the networking changes
#if 0
/* $Id: plip.c,v 1.3.6.2 1997/04/16 15:07:56 phil Exp $ */
/* PLIP: A parallel port "network" driver for Linux. */
/* This driver is for parallel port with 5-bit cable (LapLink (R) cable). */
......@@ -1238,4 +1236,3 @@ plip_init(void))
* compile-command: "gcc -DMODULE -DMODVERSIONS -D__KERNEL__ -Wall -Wstrict-prototypes -O2 -g -fomit-frame-pointer -pipe -m486 -c plip.c"
* End:
*/
#endif
......@@ -83,6 +83,7 @@
#include <linux/if_ether.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/rtnetlink.h>
#include <linux/inet.h>
#include <linux/ioctl.h>
#include <linux/init.h>
......@@ -682,10 +683,12 @@ ppp_release (struct ppp *ppp)
if (tty != NULL && tty->disc_data == ppp)
tty->disc_data = NULL; /* Break the tty->ppp link */
rtnl_lock();
/* Strong layering violation. */
if (dev && dev->flags & IFF_UP) {
dev_close (dev); /* close the device properly */
}
if (dev && dev->flags & IFF_UP) {
dev_close (dev); /* close the device properly */
}
rtnl_unlock();
ppp_free_buf (ppp->rbuf);
ppp_free_buf (ppp->wbuf);
......@@ -3017,8 +3020,8 @@ ppp_dev_xmit (sk_buff *skb, struct device *dev)
*/
if (!ppp->inuse) {
dev_kfree_skb (skb, FREE_WRITE);
printk("I am dying to know, are you still alive?\n");
#ifdef main_got_it_is_something
printk(KERN_WARNING "ppp: I am dying to know, are you still alive?\n");
#if 0
dev_close (dev);
#endif
return 0;
......
......@@ -68,6 +68,7 @@
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/rtnetlink.h>
#include <linux/if_arp.h>
#include <linux/if_slip.h>
#include <linux/init.h>
......@@ -733,6 +734,7 @@ slip_close(struct tty_struct *tty)
return;
}
rtnl_lock();
if (sl->dev->flags & IFF_UP)
{
/* STRONG layering violation! --ANK */
......@@ -749,6 +751,8 @@ slip_close(struct tty_struct *tty)
(void)del_timer (&sl->outfill_timer);
#endif
sl_free(sl);
unregister_netdevice(sl->dev);
rtnl_unlock();
MOD_DEC_USE_COUNT;
}
......
#warning "will not compile until the networking is merged"
#if 0
/*
* Copyright 1996 The Board of Trustees of The Leland Stanford
* Junior University. All Rights Reserved.
......@@ -2782,4 +2780,3 @@ void cleanup_module(void)
printk(KERN_INFO "STRIP: Module Unloaded\n");
}
#endif /* MODULE */
#endif
......@@ -162,7 +162,7 @@ struct pci_dev_info dev_info[] = {
DEVICE( MOTOROLA, MOTOROLA_MPC105,"MPC105 Eagle"),
DEVICE( MOTOROLA, MOTOROLA_MPC106,"MPC106 Grackle"),
DEVICE( MOTOROLA, MOTOROLA_RAVEN, "Raven"),
DEVICE( PROMISE, PROMISE_IDE_UDMA,"IDE Ultra DMA/33"),
DEVICE( PROMISE, PROMISE_20246, "IDE UltraDMA/33"),
DEVICE( PROMISE, PROMISE_5300, "DC5030"),
DEVICE( N9, N9_I128, "Imagine 128"),
DEVICE( N9, N9_I128_2, "Imagine 128v2"),
......
......@@ -34,7 +34,7 @@ kernelconfig:
else
ifeq (.defines,$(wildcard .defines))
#include .defines
include .defines
include .objects
endif
......
......@@ -551,7 +551,7 @@ int attach_awe(void)
INIT_TABLE(samples, max_samples, AWE_MAX_SAMPLES, awe_sample_list);
INIT_TABLE(infos, max_infos, AWE_MAX_INFOS, awe_voice_list);
if (my_dev=sound_alloc_synthdev())
if ((my_dev=sound_alloc_synthdev())!=-1)
printk(KERN_WARNING "AWE32 Error: too many synthesizers\n");
else {
voice_alloc = &awe_operations.alloc;
......@@ -560,7 +560,7 @@ int attach_awe(void)
}
#ifdef CONFIG_AWE32_MIXER
if (my_mixerdev=sound_alloc_mixerdev()) {
if ((my_mixerdev=sound_alloc_mixerdev())!=-1) {
mixer_devs[my_mixerdev] = &awe_mixer_operations;
}
#endif
......
......@@ -23,7 +23,7 @@
* specific encoding system used.
*/
typedef u16 comp_t;
typedef __u16 comp_t;
/*
* accounting file record
......@@ -41,10 +41,10 @@ struct acct
* No binary format break with 2.0 - but when we hit 32bit uid we'll
* have to bite one
*/
u16 ac_uid; /* Accounting Real User ID */
u16 ac_gid; /* Accounting Real Group ID */
u16 ac_tty; /* Accounting Control Terminal */
u32 ac_btime; /* Accounting Process Creation Time */
__u16 ac_uid; /* Accounting Real User ID */
__u16 ac_gid; /* Accounting Real Group ID */
__u16 ac_tty; /* Accounting Control Terminal */
__u32 ac_btime; /* Accounting Process Creation Time */
comp_t ac_utime; /* Accounting User Time */
comp_t ac_stime; /* Accounting System Time */
comp_t ac_etime; /* Accounting Elapsed Time */
......@@ -54,7 +54,7 @@ struct acct
comp_t ac_minflt; /* Accounting Minor Pagefaults */
comp_t ac_majflt; /* Accounting Major Pagefaults */
comp_t ac_swaps; /* Accounting Number of Swaps */
u32 ac_exitcode; /* Accounting Exitcode */
__u32 ac_exitcode; /* Accounting Exitcode */
char ac_comm[ACCT_COMM + 1]; /* Accounting Command Name */
char ac_pad[10]; /* Accounting Padding Bytes */
};
......
......@@ -38,6 +38,8 @@ extern void eth_header_cache_update(struct hh_cache *hh, struct device *dev,
extern int eth_header_cache(struct dst_entry *dst,
struct neighbour *neigh,
struct hh_cache *hh);
extern int eth_header_parse(struct sk_buff *skb,
unsigned char *haddr);
extern struct device * init_etherdev(struct device *, int);
#ifdef CONFIG_IP_ROUTER
......
......@@ -73,7 +73,8 @@
#define ABRT_ERR 0x04 /* Command aborted */
#define ID_ERR 0x10 /* ID field not found */
#define ECC_ERR 0x40 /* Uncorrectable ECC error */
#define BBD_ERR 0x80 /* block marked bad */
#define BBD_ERR 0x80 /* pre-EIDE meaning: block marked bad */
#define ICRC_ERR 0x80 /* new meaning: CRC error during transfer */
struct hd_geometry {
unsigned char heads;
......@@ -149,11 +150,28 @@ struct hd_driveid {
unsigned short eide_dma_time; /* recommended mword dma cycle time (ns) */
unsigned short eide_pio; /* min cycle time (ns), no IORDY */
unsigned short eide_pio_iordy; /* min cycle time (ns), with IORDY */
unsigned short reserved69; /* reserved (word 69) */
unsigned short reserved70; /* reserved (word 70) */
/* unsigned short reservedxx[57];*/ /* reserved (words 71-127) */
/* unsigned short vendor7 [32];*/ /* vendor unique (words 128-159) */
/* unsigned short reservedyy[96];*/ /* reserved (words 160-255) */
unsigned short word69;
unsigned short word70;
/* HDIO_GET_IDENTITY currently returns only words 0 through 70 */
unsigned short word71;
unsigned short word72;
unsigned short word73;
unsigned short word74;
unsigned short word75;
unsigned short word76;
unsigned short word77;
unsigned short word78;
unsigned short word79;
unsigned short word80;
unsigned short word81;
unsigned short word82;
unsigned short word83;
unsigned short word84;
unsigned short word85;
unsigned short word86;
unsigned short word87;
unsigned short dma_ultra;
unsigned short reserved[167];
};
/*
......
#ifndef _IF_TUNNEL_H_
#define _IF_TUNNEL_H_
#define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0)
#define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1)
#define SIOCDELTUNNEL (SIOCDEVPRIVATE + 2)
#define SIOCCHGTUNNEL (SIOCDEVPRIVATE + 3)
#define GRE_CSUM __constant_htons(0x8000)
#define GRE_ROUTING __constant_htons(0x4000)
#define GRE_KEY __constant_htons(0x2000)
#define GRE_SEQ __constant_htons(0x1000)
#define GRE_STRICT __constant_htons(0x0800)
#define GRE_REC __constant_htons(0x0700)
#define GRE_FLAGS __constant_htons(0x00F8)
#define GRE_VERSION __constant_htons(0x0007)
struct ip_tunnel_parm
{
char name[IFNAMSIZ];
int link;
__u16 i_flags;
__u16 o_flags;
__u32 i_key;
__u32 o_key;
struct iphdr iph;
};
#endif /* _IF_TUNNEL_H_ */
......@@ -38,7 +38,7 @@ struct igmphdr
#define IGMP_PIM 0x14 /* PIM routing */
#define IGMP_TRACE 0x15
#define IGMP_HOST_NEW_MEMBERSHIP_REPORT 0x16 /* New version of 0x11 */
#define IGMP_HOST_LEAVE_MESSAGE 0x17 /* An extra BSD seems to send */
#define IGMP_HOST_LEAVE_MESSAGE 0x17
#define IGMP_MTRACE_RESP 0x1e
#define IGMP_MTRACE 0x1f
......@@ -54,9 +54,6 @@ struct igmphdr
#define IGMP_SLEEPING_MEMBER 0x04
#define IGMP_AWAKENING_MEMBER 0x05
#define IGMP_OLD_ROUTER 0x00
#define IGMP_NEW_ROUTER 0x01
#define IGMP_MINLEN 8
#define IGMP_MAX_HOST_REPORT_DELAY 10 /* max delay for response to */
......@@ -65,7 +62,7 @@ struct igmphdr
#define IGMP_TIMER_SCALE 10 /* denotes that the igmphdr->timer field */
/* specifies time in 10th of seconds */
#define IGMP_AGE_THRESHOLD 540 /* If this host don't hear any IGMP V1 */
#define IGMP_AGE_THRESHOLD 400 /* If this host don't hear any IGMP V1 */
/* message in this period of time, */
/* revert to IGMP v2 router. */
......@@ -79,40 +76,53 @@ struct igmphdr
*/
#ifdef __KERNEL__
/* ip_mc_socklist is real list now. Speed is not argument;
this list never used in fast path code
*/
struct ip_mc_socklist
{
unsigned long multiaddr[IP_MAX_MEMBERSHIPS]; /* This is a speed trade off */
struct device *multidev[IP_MAX_MEMBERSHIPS];
struct ip_mc_socklist *next;
int count;
struct ip_mreqn multi;
};
struct ip_mc_list
{
struct device *interface;
unsigned long multiaddr;
struct ip_mc_list *next;
struct timer_list timer;
int users;
char tm_running;
char reporter;
struct in_device *interface;
unsigned long multiaddr;
struct ip_mc_list *next;
struct timer_list timer;
int users;
char tm_running;
char reporter;
char unsolicit_count;
};
struct ip_router_info
extern __inline__ int ip_check_mc(struct device *dev, u32 mc_addr)
{
struct device *dev;
int type; /* type of router which is querier on this interface */
int time; /* # of slow timeouts since last old query */
struct timer_list timer;
struct ip_router_info *next;
};
extern struct ip_mc_list *ip_mc_head;
struct in_device *in_dev = dev->ip_ptr;
struct ip_mc_list *im;
if (in_dev) {
for (im=in_dev->mc_list; im; im=im->next)
if (im->multiaddr == mc_addr)
return 1;
}
return 0;
}
extern int igmp_rcv(struct sk_buff *, unsigned short);
extern void ip_mc_drop_device(struct device *dev);
extern int ip_mc_join_group(struct sock *sk, struct device *dev, unsigned long addr);
extern int ip_mc_leave_group(struct sock *sk, struct device *dev,unsigned long addr);
extern int ip_mc_join_group(struct sock *sk, struct ip_mreqn *imr);
extern int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr);
extern void ip_mc_drop_socket(struct sock *sk);
extern void ip_mr_init(void);
extern void ip_mc_init_dev(struct in_device *);
extern void ip_mc_destroy_dev(struct in_device *);
extern void ip_mc_up(struct in_device *);
extern void ip_mc_down(struct in_device *);
extern int ip_mc_dec_group(struct in_device *in_dev, u32 addr);
extern void ip_mc_inc_group(struct in_device *in_dev, u32 addr);
#endif
#endif
......@@ -31,9 +31,13 @@ enum {
IPPROTO_PUP = 12, /* PUP protocol */
IPPROTO_UDP = 17, /* User Datagram Protocol */
IPPROTO_IDP = 22, /* XNS IDP protocol */
IPPROTO_RSVP = 46, /* RSVP protocol */
IPPROTO_GRE = 47, /* Cisco GRE tunnels (rfc 1701,1702) */
IPPROTO_IPV6 = 41, /* IPv6-in-IPv4 tunnelling */
IPPROTO_PIM = 103, /* Protocol Independent Multicast */
IPPROTO_RAW = 255, /* Raw IP packets */
IPPROTO_MAX
};
......@@ -48,15 +52,15 @@ struct in_addr {
#define IP_TTL 2
#define IP_HDRINCL 3
#define IP_OPTIONS 4
#define IP_LOCALADDR 5 /* Cannot remove; a lot of apps still use it. ANK */
#define IP_ROUTER_ALERT 5
#define IP_RECVOPTS 6
#define IP_RETOPTS 7
#define IP_RXINFO 8
#define IP_TXINFO IP_RXINFO
/* Gated uses it. Remove later or preserve for 4.4BSD compatibility??? */
#define IP_RECVDSTADDR 9
#define IP_PKTINFO 8
#define IP_PKTOPTIONS 9
#define IP_PMTUDISC 10
#define IP_RECVERR 11
#define IP_RECVTTL 12
#define IP_RECVTOS 13
/* BSD compatibility */
#define IP_RECVRETOPTS IP_RETOPTS
......@@ -71,9 +75,6 @@ struct in_addr {
#define IP_MULTICAST_LOOP 34
#define IP_ADD_MEMBERSHIP 35
#define IP_DROP_MEMBERSHIP 36
#define IP_MULTICAST_IFN 37
#define IP_ADD_MEMBERSHIPN 38
#define IP_DROP_MEMBERSHIPN 39
/* These need to appear somewhere around here */
#define IP_DEFAULT_MULTICAST_TTL 1
......
#ifndef _LINUX_IN_ROUTE_H
#define _LINUX_IN_ROUTE_H
/* IPv4 routing cache flags */
#define RTCF_DEAD RTNH_F_DEAD
#define RTCF_ONLINK RTNH_F_ONLINK
#define RTCF_NOPMTUDISC RTM_F_NOPMTUDISC
#define RTCF_NOTIFY 0x00010000
#define RTCF_DIRECTDST 0x00020000
#define RTCF_REDIRECTED 0x00040000
#define RTCF_VALVE 0x00200000
#define RTCF_MASQ 0x00400000
#define RTCF_SNAT 0x00800000
#define RTCF_DOREDIRECT 0x01000000
#define RTCF_LOG 0x02000000
#define RTCF_DIRECTSRC 0x04000000
#define RTCF_DNAT 0x08000000
#define RTCF_BROADCAST 0x10000000
#define RTCF_MULTICAST 0x20000000
#define RTCF_REJECT 0x40000000
#define RTCF_LOCAL 0x80000000
#define RTCF_NAT (RTCF_DNAT|RTCF_SNAT)
#define RT_TOS(tos) ((tos)&IPTOS_TOS_MASK)
#endif /* _LINUX_IN_ROUTE_H */
#ifndef _LINUX_INETDEVICE_H
#define _LINUX_INETDEVICE_H
/* IPv4 specific flags. They are initialized from global sysctl variables,
when IPv4 is initialized.
*/
#define IFF_IP_FORWARD 1
#define IFF_IP_PROXYARP 2
#define IFF_IP_RXREDIRECTS 4
#define IFF_IP_TXREDIRECTS 8
#define IFF_IP_SHAREDMEDIA 0x10
#define IFF_IP_MFORWARD 0x20
#define IFF_IP_RPFILTER 0x40
#ifdef __KERNEL__
struct in_device
{
struct device *dev;
struct in_ifaddr *ifa_list; /* IP ifaddr chain */
struct ip_mc_list *mc_list; /* IP multicast filter chain */
unsigned long mr_v1_seen;
unsigned flags;
};
#define IN_DEV_RPFILTER(in_dev) (ipv4_config.rfc1812_filter && ((in_dev)->flags&IFF_IP_RPFILTER))
#define IN_DEV_MFORWARD(in_dev) (ipv4_config.multicast_route && ((in_dev)->flags&IFF_IP_MFORWARD))
#define IN_DEV_PROXY_ARP(in_dev) ((in_dev)->flags&IFF_IP_PROXYARP)
#if 1
#define IN_DEV_FORWARD(in_dev) (IS_ROUTER)
#define IN_DEV_RX_REDIRECTS(in_dev) (ipv4_config.accept_redirects)
#define IN_DEV_TX_REDIRECTS(in_dev) (1)
#define IN_DEV_SHARED_MEDIA(in_dev) (ipv4_config.rfc1620_redirects)
#else
#define IN_DEV_FORWARD(in_dev) (ipv4_config.ip_forwarding==1 && ((in_dev)->flags&IFF_IP_FORWARD))
#define IN_DEV_RX_REDIRECTS(in_dev) ((in_dev)->flags&IFF_IP_RXREDIRECTS)
#define IN_DEV_TX_REDIRECTS(in_dev) ((in_dev)->flags&IFF_IP_TXREDIRECTS)
#define IN_DEV_SHARED_MEDIA(in_dev) ((in_dev)->flags&IFF_IP_SHAREDMEDIA)
#endif
struct in_ifaddr
{
struct in_ifaddr *ifa_next;
struct in_device *ifa_dev;
u32 ifa_local;
u32 ifa_address;
u32 ifa_mask;
u32 ifa_broadcast;
u32 ifa_anycast;
unsigned char ifa_scope;
unsigned char ifa_flags;
unsigned char ifa_prefixlen;
char ifa_label[IFNAMSIZ];
};
extern int register_inetaddr_notifier(struct notifier_block *nb);
extern int unregister_inetaddr_notifier(struct notifier_block *nb);
extern struct device *ip_dev_find(u32 addr);
extern struct in_ifaddr *inet_addr_onlink(struct in_device *in_dev, u32 a, u32 b);
extern int devinet_ioctl(unsigned int cmd, void *);
extern void devinet_init(void);
extern struct in_device *inetdev_init(struct device *dev);
extern struct in_device *inetdev_by_index(int);
extern u32 inet_select_addr(struct device *dev, u32 dst, int scope);
extern struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, u32 prefix, u32 mask);
extern int inet_add_bootp_addr(struct device *dev);
extern void inet_del_bootp_addr(struct device *dev);
extern __inline__ int inet_ifa_match(u32 addr, struct in_ifaddr *ifa)
{
return !((addr^ifa->ifa_address)&ifa->ifa_mask);
}
/*
* Check if a mask is acceptable.
*/
extern __inline__ int bad_mask(u32 mask, u32 addr)
{
if (addr & (mask = ~mask))
return 1;
mask = ntohl(mask);
if (mask & (mask+1))
return 1;
return 0;
}
#define for_primary_ifa(in_dev) { struct in_ifaddr *ifa; \
for (ifa = (in_dev)->ifa_list; ifa && !(ifa->ifa_flags&IFA_F_SECONDARY); ifa = ifa->ifa_next)
#define for_ifa(in_dev) { struct in_ifaddr *ifa; \
for (ifa = (in_dev)->ifa_list; ifa; ifa = ifa->ifa_next)
#define endfor_ifa(in_dev) }
#endif /* __KERNEL__ */
extern __inline__ __u32 inet_make_mask(int logmask)
{
if (logmask)
return htonl(~((1<<(32-logmask))-1));
return 0;
}
extern __inline__ int inet_mask_len(__u32 mask)
{
if (!(mask = ntohl(mask)))
return 0;
return 32 - ffz(~mask);
}
#endif /* _LINUX_INETDEVICE_H */
......@@ -10,6 +10,9 @@
*
* See the mrouted code for the original history.
*
* Protocol Independent Multicast (PIM) data structures included
* Carlos Picoto (cap@di.fc.ul.pt)
*
*/
#define MRT_BASE 200
......@@ -57,16 +60,9 @@ struct vifctl {
struct in_addr vifc_rmt_addr; /* IPIP tunnel addr */
};
#define VIFF_TUNNEL 0x1 /* IPIP tunnel */
#define VIFF_SRCRT 0x2 /* NI */
/* PIM Vif Flags */
#define VIFF_DR 0x0010 /* designated router */
#define VIFF_NOMRT 0x0020 /* no neighbor on vif */
#define VIFF_DOWN 0x0040 /* interface is down */
#define VIFF_DISABLED 0x0080 /* disabled interafce */
#define VIFF_REGISTER 0x00A0 /* MIssing cap@di.fc.ul.pt */
#define VIFF_TUNNEL 0x1 /* IPIP tunnel */
#define VIFF_SRCRT 0x2 /* NI */
#define VIFF_REGISTER 0x4 /* register vif */
/*
* Cache manipulation structures for mrouted and PIMd
......@@ -110,16 +106,6 @@ struct sioc_vif_req
unsigned long obytes; /* Out bytes */
};
/*
* To get RPF from unicast routing table (PIM: cap@di.fc.ul.pt)
*/
struct sioc_rpf_req
{
unsigned long source; /* Source address */
unsigned long rpfneighbor; /* RPF */
vifi_t iif; /* Incoming Interface */
};
/*
* This is the format the mroute daemon expects to see IGMP control
* data. Magically happens to be like an IP packet as per the original
......@@ -127,7 +113,7 @@ struct sioc_rpf_req
struct igmpmsg
{
unsigned long unused1,unused2;
__u32 unused1,unused2;
unsigned char im_msgtype; /* What is this */
unsigned char im_mbz; /* Must be zero */
unsigned char im_vif; /* Interface (this ought to be a vifi_t!) */
......@@ -147,22 +133,19 @@ extern int ipmr_ioctl(struct sock *sk, int cmd, unsigned long arg);
extern void mroute_close(struct sock *sk);
extern void ipmr_forward(struct sk_buff *skb, int is_frag);
extern int ip_mr_find_tunnel(__u32, __u32);
extern void ip_mr_init(void);
struct vif_device
{
union
{
struct device *dev; /* Device we are using */
struct rtable *rt; /* Route for tunnel */
} u;
struct device *dev; /* Device we are using */
unsigned long bytes_in,bytes_out;
unsigned long pkt_in,pkt_out; /* Statistics */
unsigned long rate_limit; /* Traffic shaping (NI) */
unsigned char threshold; /* TTL threshold */
unsigned short flags; /* Control flags */
unsigned long local,remote; /* Addresses(remote for tunnels)*/
unsigned long uptime;
__u32 local,remote; /* Addresses(remote for tunnels)*/
int link; /* Physical interface index */
};
struct mfc_cache
......@@ -175,11 +158,9 @@ struct mfc_cache
int mfc_flags; /* Flags on line */
struct sk_buff_head mfc_unresolved; /* Unresolved buffers */
int mfc_queuelen; /* Unresolved buffer counter */
unsigned mfc_last_assert;
unsigned long mfc_last_assert;
int mfc_minvif;
int mfc_maxvif;
unsigned long uptime;
unsigned long expire;
unsigned long mfc_bytes;
unsigned long mfc_pkt;
unsigned long mfc_wrong_if;
......@@ -188,6 +169,7 @@ struct mfc_cache
#define MFC_QUEUED 1
#define MFC_RESOLVED 2
#define MFC_NOTIFY 4
#define MFC_LINES 64
......@@ -211,4 +193,31 @@ struct mfc_cache
#define IGMPMSG_WRONGVIF 2 /* For PIM assert processing (unused) */
#define IGMPMSG_WHOLEPKT 3 /* For PIM Register processing */
#ifdef __KERNEL__
#define PIM_V1_VERSION __constant_htonl(0x10000000)
#define PIM_V1_REGISTER 1
#define PIM_VERSION 2
#define PIM_REGISTER 1
#define PIM_NULL_REGISTER __constant_htonl(0x40000000)
/* PIMv2 register message header layout (ietf-draft-idmr-pimvsm-v2-00.ps */
struct pimreghdr
{
__u8 type;
__u8 reserved;
__u16 csum;
__u32 flags;
};
extern int pim_rcv(struct sk_buff * , unsigned short);
extern int pim_rcv_v1(struct sk_buff * , unsigned short len);
struct rtmsg;
extern int ipmr_get_route(struct sk_buff *skb, struct rtmsg *rtm);
#endif
#endif
......@@ -18,11 +18,11 @@
#ifndef _LINUX_NET_H
#define _LINUX_NET_H
#include <linux/wait.h>
#include <linux/socket.h>
#define NPROTO 16 /* should be enough for now.. */
struct poll_table_struct;
#define NPROTO 32 /* should be enough for now.. */
#define SYS_SOCKET 1 /* sys_socket(2) */
......@@ -93,7 +93,7 @@ struct proto_ops {
int flags);
int (*getname) (struct socket *sock, struct sockaddr *uaddr,
int *usockaddr_len, int peer);
unsigned int (*poll) (struct socket *sock, poll_table *wait);
unsigned int (*poll) (struct socket *sock, struct poll_table_struct *wait);
int (*ioctl) (struct socket *sock, unsigned int cmd,
unsigned long arg);
int (*listen) (struct socket *sock, int len);
......
/*
* NET_ALIAS network device aliasing definitions.
*
*
* Version: @(#)net_alias.h 0.43 12/20/95
*
* Author: Juan Jose Ciarlante, <jjciarla@raiz.uncu.edu.ar>
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
*/
#ifndef _NET_ALIAS_H
#define _NET_ALIAS_H
#include <linux/config.h>
#ifdef CONFIG_NET_ALIAS
#include <linux/types.h>
#include <linux/if.h>
#include <linux/netdevice.h>
/*
* max. alias slot number allowed
*/
#define NET_ALIAS_MAX_SLOT 256
struct net_alias;
struct net_alias_info;
struct net_alias_type;
/*
* Main alias structure
* Note that *defines* dev & devname.
*/
struct net_alias
{
struct device dev; /* alias device defn*/
char name[IFNAMSIZ]; /* device name defn */
unsigned hash; /* my hash value: for quick rehash */
unsigned slot; /* slot number */
void *data; /* private data */
struct device *main_dev; /* pointer to main device */
struct net_alias_type *nat; /* alias type object bound */
struct net_alias *next; /* next alias (hashed linked list) */
};
/*
* alias structure pointed by main device
* it holds main device's alias hash table
*/
struct net_alias_info
{
int n_aliases; /* num aliases */
struct device *taildev; /* my last (alias) device */
struct net_alias *hash_tab[16]; /* hashed alias table */
};
/*
* net_alias_type class
* Declares a generic (AF_ independent) structure that will
* manage generic to family-specific behavior.
*/
struct net_alias_type
{
int type; /* aliasing type: address family */
int n_attach; /* number of aliases attached */
char name[16]; /* af_name */
__u32 (*get_addr32) /* get __u32 addr 'representation'*/
(struct net_alias_type *this, struct sockaddr*);
int (*dev_addr_chk) /* address checking func: */
(struct net_alias_type *this, struct device *, struct sockaddr *);
struct device * (*dev_select) /* closest alias selector*/
(struct net_alias_type *this, struct device *, struct sockaddr *sa);
int (*alias_init_1) /* called after alias creation: */
(struct net_alias_type *this,struct net_alias *alias, struct sockaddr *sa);
int (*alias_done_1) /* called before alias deletion */
(struct net_alias_type *this, struct net_alias *alias);
int (*alias_print_1)
(struct net_alias_type *this, struct net_alias *alias, char *buf, int len);
struct net_alias_type *next; /* link */
};
/*
* is dev an alias?
*/
#ifdef CONFIG_NET_ALIAS
extern __inline__ int net_alias_is(struct device *dev)
{
return (dev->my_alias != NULL);
}
/*
* Does dev have aliases?
*/
extern __inline__ int net_alias_has(struct device *dev)
{
return (dev->alias_info != NULL);
}
/*
* Returns MY 'true' main device
* intended for alias devices
*/
extern __inline__ struct device *net_alias_main_dev(struct device *dev)
{
return (net_alias_is(dev))? dev->my_alias->main_dev : dev;
}
/*
* Returns NEXT 'true' device
* intended for true devices
*/
extern __inline__ struct device *net_alias_nextdev(struct device *dev)
{
return (dev->alias_info)? dev->alias_info->taildev->next : dev->next;
}
/*
* Sets NEXT 'true' device
* Intended for main devices (treat main device as block: dev+aliases).
*/
extern __inline__ struct device *net_alias_nextdev_set(struct device *dev, struct device *nextdev)
{
struct device *pdev = dev;
if (net_alias_has(dev))
{
pdev = dev->alias_info->taildev; /* point to last dev alias */
}
pdev->next = nextdev;
return nextdev;
}
#else
#define net_alias_has(dev) (0)
#define net_alias_is(dev) (0)
#define net_alias_main_dev(dev) (dev)
#endif
extern void net_alias_init(void);
extern struct device * net_alias_dev_get(char *dev_name, int aliasing_ok, int *err, struct sockaddr *sa, void *data);
extern int net_alias_dev_rehash(struct device *dev, struct sockaddr *sa);
extern int net_alias_getinfo(char *buf, char **, off_t , int , int );
extern int net_alias_types_getinfo(char *buf, char **, off_t , int , int );
extern int register_net_alias_type(struct net_alias_type *nat, int type);
extern int unregister_net_alias_type(struct net_alias_type *nat);
extern struct device * net_alias_dev_chk(struct device *main_dev, struct sockaddr *sa, int flags_on, int flags_off);
extern struct device * net_alias_dev_chk32(struct device *main_dev, int family, __u32 addr32, int flags_on, int flags_off);
extern struct device * net_alias_dev_rcv_sel(struct device *main_dev, struct sockaddr *sa_src, struct sockaddr *sa_dst);
extern struct device * net_alias_dev_rcv_sel32(struct device *main_dev, int family, __u32 src, __u32 dst);
#else
#define net_alias_is(a) 0
#define net_alias_main_dev(dev) (dev)
#define net_alias_has(dev) 0
#endif
#endif /* _NET_ALIAS_H */
......@@ -27,6 +27,7 @@
#include <linux/config.h>
#include <linux/if.h>
#include <linux/if_ether.h>
#include <linux/if_packet.h>
#include <asm/atomic.h>
......@@ -34,7 +35,6 @@
* For future expansion when we will have different priorities.
*/
#define DEV_NUMBUFFS 3 /* Number of queues per device */
#define MAX_ADDR_LEN 7 /* Largest hardware address length */
/*
......@@ -59,18 +59,6 @@
#define MAX_HEADER (LL_MAX_HEADER + 48)
#endif
#define IS_MYADDR 1 /* address is (one of) our own */
#define IS_LOOPBACK 2 /* address is for LOOPBACK */
#define IS_BROADCAST 3 /* address is a valid broadcast */
#define IS_INVBCAST 4 /* Wrong netmask bcast not for us (unused)*/
#define IS_MULTICAST 5 /* Multicast IP address */
/* NOTE: move to ipv4_device.h */
#define IFF_IP_ADDR_OK 1
#define IFF_IP_MASK_OK 2
#define IFF_IP_BRD_OK 4
struct neighbour;
/*
......@@ -188,10 +176,11 @@ struct device
/* The device initialization function. Called only once. */
int (*init)(struct device *dev);
void (*destructor)(struct device *dev);
/* Interface index. Unique device identifier */
int ifindex;
struct device *next_up;
int iflink;
/*
* Some hardware also needs these fields, but they are not
......@@ -215,7 +204,7 @@ struct device
unsigned long last_rx; /* Time of last Rx */
unsigned short flags; /* interface flags (a la BSD) */
unsigned short family; /* address family ID (AF_INET) */
unsigned short gflags;
unsigned short metric; /* routing metric (not used) */
unsigned short mtu; /* interface MTU value */
unsigned short type; /* interface hardware type */
......@@ -227,34 +216,25 @@ struct device
unsigned char pad; /* make dev_addr aligned to 8 bytes */
unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address */
unsigned char addr_len; /* hardware address length */
unsigned long pa_addr; /* protocol address */
unsigned long pa_brdaddr; /* protocol broadcast addr */
unsigned long pa_dstaddr; /* protocol P-P other side addr */
unsigned long pa_mask; /* protocol netmask */
unsigned short pa_alen; /* protocol address length */
struct dev_mc_list *mc_list; /* Multicast mac addresses */
int mc_count; /* Number of installed mcasts */
struct ip_mc_list *ip_mc_list; /* IP multicast filter chain */
unsigned ip_flags; /* IP layer control flags */
__u32 tx_queue_len; /* Max frames per queue allowed */
int promiscuity;
int allmulti;
/* For load balancing driver pair support */
unsigned long pkt_queue; /* Packets queued */
struct device *slave; /* Slave device */
struct net_alias_info *alias_info; /* main dev alias info */
struct net_alias *my_alias; /* alias devs */
/* Protocol specific pointers */
void *atalk_ptr; /* Appletalk link */
void *ip_ptr; /* Not used yet */
void *ip_ptr; /* IPv4 specific data */
/* Pointer to the interface buffers. */
struct sk_buff_head buffs[DEV_NUMBUFFS];
struct Qdisc *qdisc;
struct Qdisc *qdisc_sleeping;
unsigned long tx_queue_len; /* Max frames per queue allowed */
/* Pointers to interface service routines. */
int (*open)(struct device *dev);
......@@ -289,6 +269,8 @@ struct device
#define HAVE_CHANGE_MTU
int (*change_mtu)(struct device *dev, int new_mtu);
int (*hard_header_parse)(struct sk_buff *skb,
unsigned char *haddr);
};
......@@ -309,16 +291,8 @@ struct packet_type
extern struct device loopback_dev; /* The loopback */
extern struct device *dev_base; /* All devices */
extern struct packet_type *ptype_base[16]; /* Hashed types */
/* NOTE: move to INET specific header;
__ip_chk_addr is deprecated, do not use if it's possible.
*/
extern int __ip_chk_addr(unsigned long addr);
extern struct device *ip_dev_find(unsigned long addr, char *name);
/* This is the wrong place but it'll do for the moment */
extern void ip_mc_allhost(struct device *dev);
extern int devinet_ioctl(unsigned int cmd, void *);
extern int netdev_dropping;
extern int net_cpu_congestion;
extern struct device *dev_getbyhwaddr(unsigned short type, char *hwaddr);
extern void dev_add_pack(struct packet_type *pt);
......@@ -330,16 +304,28 @@ extern int dev_open(struct device *dev);
extern int dev_close(struct device *dev);
extern int dev_queue_xmit(struct sk_buff *skb);
extern void dev_loopback_xmit(struct sk_buff *skb);
extern int register_netdevice(struct device *dev);
extern int unregister_netdevice(struct device *dev);
extern int register_netdevice_notifier(struct notifier_block *nb);
extern int unregister_netdevice_notifier(struct notifier_block *nb);
extern int dev_new_index(void);
extern struct device *dev_get_by_index(int ifindex);
extern int register_gifconf(int family, int (*func)(struct device *dev, char *bufptr, int len));
extern int dev_restart(struct device *dev);
#define HAVE_NETIF_RX 1
extern void netif_rx(struct sk_buff *skb);
extern void net_bh(void);
extern void dev_tint(struct device *dev);
extern int dev_get_info(char *buffer, char **start, off_t offset, int length, int dummy);
extern int dev_ioctl(unsigned int cmd, void *);
extern int dev_change_flags(struct device *, unsigned);
extern void dev_queue_xmit_nit(struct sk_buff *skb, struct device *dev);
extern void dev_init(void);
extern int netdev_nit;
/* Locking protection for page faults during outputs to devices unloaded during the fault */
extern atomic_t dev_lockct;
......@@ -365,30 +351,24 @@ extern __inline__ void dev_unlock_list(void)
*
* FIXME: What if this is being run as a real time process ??
* Linus: We need a way to force a yield here ?
*
* FIXME: Though dev_lockct is atomic varible, locking procedure
* is not atomic.
*/
extern __inline__ void dev_lock_wait(void)
{
while(atomic_read(&dev_lockct))
while (atomic_read(&dev_lockct)) {
current->counter = 0;
schedule();
}
}
/*
* Buffer initialisation function. This used to appear in all the
* drivers but is now an inline in case we ever want to change the
* schemes used.
*/
extern __inline__ void dev_init_buffers(struct device *dev)
{
int i;
for(i=0;i<DEV_NUMBUFFS;i++)
{
skb_queue_head_init(&dev->buffs[i]);
}
/* DO NOTHING */
}
/* These functions live elsewhere (drivers/net/net_init.c, but related) */
extern void ether_setup(struct device *dev);
......@@ -399,8 +379,6 @@ extern int ether_config(struct device *dev, struct ifmap *map);
/* Support for loadable net-drivers */
extern int register_netdev(struct device *dev);
extern void unregister_netdev(struct device *dev);
extern int register_netdevice_notifier(struct notifier_block *nb);
extern int unregister_netdevice_notifier(struct notifier_block *nb);
extern int register_trdev(struct device *dev);
extern void unregister_trdev(struct device *dev);
/* Functions used for multicast support */
......@@ -408,10 +386,11 @@ extern void dev_mc_upload(struct device *dev);
extern void dev_mc_delete(struct device *dev, void *addr, int alen, int all);
extern void dev_mc_add(struct device *dev, void *addr, int alen, int newonly);
extern void dev_mc_discard(struct device *dev);
extern void dev_set_promiscuity(struct device *dev, int inc);
extern void dev_set_allmulti(struct device *dev, int inc);
/* Load a device via the kerneld */
extern void dev_load(const char *name);
extern int dev_new_index(void);
extern struct device * dev_get_by_index(int ifindex);
#endif /* __KERNEL__ */
......
#ifndef __LINUX_NETLINK_H
#define __LINUX_NETLINK_H
#define NETLINK_ROUTE 0 /* Routing/device hook */
#define NETLINK_SKIP 1 /* Reserved for ENskip */
#define NETLINK_USERSOCK 2 /* Reserved for user mode socket protocols */
#define NETLINK_FIREWALL 3 /* Firewalling hook */
#define NETLINK_ARPD 8
#define NETLINK_ROUTE6 11 /* af_inet6 route comm channel */
#define NETLINK_IP6_FW 13
#define NETLINK_TAPBASE 16 /* 16 to 31 are ethertap */
#define MAX_LINKS 32
struct sockaddr_nl
{
sa_family_t nl_family; /* AF_NETLINK */
unsigned short nl_pad; /* zero */
__kernel_pid_t nl_pid; /* process pid */
unsigned nl_groups; /* multicast groups mask */
};
struct nlmsghdr
{
unsigned long nlmsg_len; /* Length of message including header */
unsigned long nlmsg_type; /* Message type */
unsigned long nlmsg_seq; /* Sequence number */
unsigned long nlmsg_pid; /* Sending process PID */
unsigned char nlmsg_data[0];
__u32 nlmsg_len; /* Length of message including header */
__u16 nlmsg_type; /* Message content */
__u16 nlmsg_flags; /* Additional flags */
__u32 nlmsg_seq; /* Sequence number */
__kernel_pid_t nlmsg_pid; /* Sending process PID */
};
/* Flags values */
#define NLM_F_REQUEST 1 /* It is request message. */
#define NLM_F_MULTI 2 /* Multipart message, terminated by NLMSG_DONE */
#define NLM_F_ACK 4 /* If succeed, reply with ack */
#define NLM_F_ECHO 8 /* Echo this request */
/* Modifiers to GET request */
#define NLM_F_ROOT 0x100 /* specify tree root */
#define NLM_F_MATCH 0x200 /* return all matching */
#define NLM_F_ATOMIC 0x400 /* atomic GET */
#define NLM_F_DUMP (NLM_F_ROOT|NLM_F_MATCH)
/* Modifiers to NEW request */
#define NLM_F_REPLACE 0x100 /* Override existing */
#define NLM_F_EXCL 0x200 /* Do not touch, if it exists */
#define NLM_F_CREATE 0x400 /* Create, if it does not exist */
/*
4.4BSD ADD NLM_F_CREATE|NLM_F_EXCL
4.4BSD CHANGE NLM_F_REPLACE
True CHANGE NLM_F_CREATE|NLM_F_REPLACE
Append NLM_F_CREATE
Check NLM_F_EXCL
*/
#define NLMSG_ALIGNTO 4
#define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) )
#define NLMSG_LENGTH(len) ((len)+NLMSG_ALIGN(sizeof(struct nlmsghdr)))
#define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len))
#define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0)))
#define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
(struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
#define NLMSG_OK(nlh,len) ((nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
(nlh)->nlmsg_len <= (len))
#define NLMSG_NOOP 0x1 /* Nothing. */
#define NLMSG_ERROR 0x2 /* Error */
#define NLMSG_DONE 0x3 /* End of a dump */
#define NLMSG_OVERRUN 0x4 /* Data lost */
struct nlmsgerr
{
int error;
struct nlmsghdr msg;
};
#define NET_MAJOR 36 /* Major 36 is reserved for networking */
#ifdef __KERNEL__
struct netlink_skb_parms
{
struct ucred creds; /* Skb credentials */
pid_t pid;
unsigned groups;
pid_t dst_pid;
unsigned dst_groups;
};
#define NLMSG_ALIGN(len) ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) )
#define NETLINK_CB(skb) (*(struct netlink_skb_parms*)&((skb)->cb))
#define NETLINK_CREDS(skb) (&NETLINK_CB((skb)).creds)
#define NLMSG_ACK 0x01 /* int - error code */
#define NLMSG_OVERRUN 0x02 /* unsigned long[2] - start and end
* of lost message sequence numbers.
*/
extern int netlink_attach(int unit, int (*function)(int,struct sk_buff *skb));
extern void netlink_detach(int unit);
extern int netlink_post(int unit, struct sk_buff *skb);
extern int init_netlink(void);
extern struct sock *netlink_kernel_create(int unit, void (*input)(struct sock *sk, int len));
extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err);
extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, pid_t pid, int nonblock);
extern void netlink_broadcast(struct sock *ssk, struct sk_buff *skb, pid_t pid,
unsigned group, int allocation);
extern void netlink_set_err(struct sock *ssk, pid_t pid, unsigned group, int code);
/*
* skb should fit one page. This choice is good for headerless malloc.
*
* FIXME: What is the best size for SLAB???? --ANK
*/
#define NLMSG_GOODSIZE (PAGE_SIZE - ((sizeof(struct sk_buff)+0xF)&~0xF))
struct netlink_callback
{
struct sk_buff *skb;
struct nlmsghdr *nlh;
int (*dump)(struct sk_buff * skb, struct netlink_callback *cb);
int (*done)(struct netlink_callback *cb);
long args[4];
};
#if 0
void* nlmsg_broadcast(struct sock*, unsigned long type, int len, unsigned groups);
struct skb_buff *nlmsg_alloc(unsigned long type, int len,
unsigned long seq, unsigned long pid, int allocation);
void __nlmsg_transmit(struct sock*, int allocation);
extern __inline__ void nlmsg_release(struct sk_buff *skb)
{
atomic_dec(skb->users);
}
extern __inline__ void nlmsg_transmit(struct sk_buff *sk, int allocation)
{
if (sk->write_queue.qlen)
__nlmsg_transmit(sk, allocation);
}
#endif
extern __inline__ struct nlmsghdr *
__nlmsg_put(struct sk_buff *skb, pid_t pid, u32 seq, int type, int len)
{
struct nlmsghdr *nlh;
int size = NLMSG_LENGTH(len);
nlh = (struct nlmsghdr*)skb_put(skb, NLMSG_ALIGN(size));
nlh->nlmsg_type = type;
nlh->nlmsg_len = size;
nlh->nlmsg_flags = 0;
nlh->nlmsg_pid = pid;
nlh->nlmsg_seq = seq;
return nlh;
}
#define NLMSG_PUT(skb, pid, seq, type, len) \
({ if (skb_tailroom(skb) < NLMSG_SPACE(len)) goto nlmsg_failure; \
__nlmsg_put(skb, pid, seq, type, len); })
extern int netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
struct nlmsghdr *nlh,
int (*dump)(struct sk_buff *skb, struct netlink_callback*),
int (*done)(struct netlink_callback*));
extern void netlink_proto_init(struct net_proto *pro);
#endif /* __KERNEL__ */
#endif /* __LINUX_NETLINK_H */
......@@ -404,7 +404,7 @@
#define PCI_DEVICE_ID_MOTOROLA_RAVEN 0x4801
#define PCI_VENDOR_ID_PROMISE 0x105a
#define PCI_DEVICE_ID_PROMISE_IDE_UDMA 0x4d33
#define PCI_DEVICE_ID_PROMISE_20246 0x4d33
#define PCI_DEVICE_ID_PROMISE_5300 0x5300
#define PCI_VENDOR_ID_N9 0x105d
......
#ifndef __LINUX_PKT_SCHED_H
#define __LINUX_PKT_SCHED_H
#define PSCHED_TC_INIT 1
#define PSCHED_TC_DESTROY 2
#define PSCHED_TC_ATTACH 3
#define PSCHED_TC_DETACH 4
/* "Logical" priority bands, not depending of concrete packet scheduler.
Every scheduler will map them to real traffic classes, if it have
no more precise machanism.
*/
#define TC_PRIO_BESTEFFORT 0
#define TC_PRIO_FILLER 1
#define TC_PRIO_BULK 2
#define TC_PRIO_INTERACTIVE_BULK 4
#define TC_PRIO_INTERACTIVE 6
#define TC_PRIO_CONTROL 7
struct pschedctl
{
int command;
int handle;
int child;
int ifindex;
char id[IFNAMSIZ];
int arglen;
char args[0];
};
/* CBQ section */
#define CBQ_MAXPRIO 8
#define CBQ_MAXLEVEL 8
/* CSZ section */
struct cszctl
{
int flow_id;
int handle;
unsigned long rate;
unsigned long max_bytes;
unsigned long depth;
unsigned long L_tab[256];
};
struct cszinitctl
{
int flows;
unsigned cell_log;
};
/* TBF section */
struct tbfctl
{
unsigned cell_log;
unsigned long bytes;
unsigned long depth;
unsigned long L_tab[256];
};
/* SFQ section */
struct sfqctl
{
unsigned quantum;
unsigned depth;
unsigned divisor;
unsigned flows;
};
/* RED section */
struct redctl
{
unsigned qmaxbytes; /* HARD maximal queue length */
unsigned qth_min; /* Min average length threshold: A scaled */
unsigned qth_max; /* Max average length threshold: A scaled */
char Alog; /* Point position in average lengths */
char Wlog; /* log(W) */
char Rlog; /* random number bits */
char C1log; /* log(1/C1) */
char Slog;
char Stab[256];
};
#endif
......@@ -81,9 +81,6 @@ enum net_directory_inos {
PROC_NET_UNIX = 128,
PROC_NET_ARP,
PROC_NET_ROUTE,
PROC_NET_RTCLASSES,
PROC_NET_RTLOCAL,
PROC_NET_RTRULES,
PROC_NET_DEV,
PROC_NET_RAW,
PROC_NET_RAW6,
......@@ -118,8 +115,6 @@ enum net_directory_inos {
PROC_NET_SOCKSTAT6,
PROC_NET_RTCACHE,
PROC_NET_AX25_BPQETHER,
PROC_NET_ALIAS_TYPES,
PROC_NET_ALIASES,
PROC_NET_IP_MASQ_APP,
PROC_NET_RT6,
PROC_NET_RT6_TREE,
......
......@@ -33,9 +33,7 @@ struct rtentry
unsigned short rt_flags;
short rt_pad2;
unsigned long rt_pad3;
unsigned char rt_tos;
unsigned char rt_class;
short rt_pad4;
void *rt_pad4;
short rt_metric; /* +1 for binary compatibility! */
char *rt_dev; /* forcing the device at add */
unsigned long rt_mtu; /* per route MTU/Window */
......@@ -44,13 +42,11 @@ struct rtentry
#endif
unsigned long rt_window; /* Window clamping */
unsigned short rt_irtt; /* Initial RTT */
};
#define RTF_UP 0x0001 /* route usable */
#define RTF_GATEWAY 0x0002 /* destination is a gateway */
#define RTF_HOST 0x0004 /* host entry (net otherwise) */
#define RTF_REINSTATE 0x0008 /* reinstate route after tmout */
#define RTF_DYNAMIC 0x0010 /* created dyn. (by redirect) */
......@@ -60,138 +56,12 @@ struct rtentry
#define RTF_WINDOW 0x0080 /* per route window clamping */
#define RTF_IRTT 0x0100 /* Initial round trip time */
#define RTF_REJECT 0x0200 /* Reject route */
#define RTF_STATIC 0x0400 /* Manually injected route */
#define RTF_XRESOLVE 0x0800 /* External resolver */
#define RTF_NOFORWARD 0x1000 /* Forwarding inhibited */
#define RTF_THROW 0x2000 /* Go to next class */
#define RTF_NOPMTUDISC 0x4000 /* Do not send packets with DF */
#define RTF_MAGIC 0x8000 /* Route added/deleted authomatically,
* when interface changes its state.
*/
/*
* <linux/ipv6_route.h> uses RTF values >= 64k
*/
#define RTCF_VALVE 0x00200000
#define RTCF_MASQ 0x00400000
#define RTCF_NAT 0x00800000
#define RTCF_DOREDIRECT 0x01000000
#define RTCF_LOG 0x02000000
#define RTCF_DIRECTSRC 0x04000000
#define RTF_LOCAL 0x80000000
#define RTF_INTERFACE 0x40000000
#define RTF_MULTICAST 0x20000000
#define RTF_BROADCAST 0x10000000
#define RTF_NAT 0x08000000
#define RTF_ADDRCLASSMASK 0xF8000000
#define RT_ADDRCLASS(flags) ((__u32)flags>>23)
#define RT_TOS(tos) ((tos)&IPTOS_TOS_MASK)
#define RT_LOCALADDR(flags) ((flags&RTF_ADDRCLASSMASK) == (RTF_LOCAL|RTF_INTERFACE))
#define RT_CLASS_UNSPEC 0
#define RT_CLASS_DEFAULT 253
#define RT_CLASS_MAIN 254
#define RT_CLASS_LOCAL 255
#define RT_CLASS_MAX 255
#ifdef _LINUX_IN_H /* hack to check that in.h included */
/*
* This structure is passed from the kernel to user space by netlink
* routing/device announcements
*/
struct in_rtmsg
{
struct in_addr rtmsg_prefix;
struct in_addr rtmsg_gateway;
unsigned rtmsg_flags;
unsigned long rtmsg_mtu;
unsigned long rtmsg_window;
unsigned short rtmsg_rtt;
short rtmsg_metric;
unsigned char rtmsg_tos;
unsigned char rtmsg_class;
unsigned char rtmsg_prefixlen;
unsigned char rtmsg_reserved;
int rtmsg_ifindex;
};
struct in_ifmsg
{
struct sockaddr ifmsg_lladdr;
struct in_addr ifmsg_prefix;
struct in_addr ifmsg_brd;
unsigned ifmsg_flags;
unsigned long ifmsg_mtu;
short ifmsg_metric;
unsigned char ifmsg_prefixlen;
unsigned char ifmsg_reserved;
int ifmsg_index;
char ifmsg_name[16];
};
enum rtrule_actions
{
RTP_GO,
RTP_NAT,
RTP_DROP,
RTP_UNREACHABLE,
RTP_PROHIBIT,
RTP_MASQUERADE
};
#define RTRF_LOG 1 /* Log route creations */
#define RTRF_VALVE 2 /* One-way route */
struct in_rtrulemsg
{
struct in_addr rtrmsg_src;
struct in_addr rtrmsg_dst;
struct in_addr rtrmsg_srcmap;
int rtrmsg_ifindex;
unsigned char rtrmsg_srclen;
unsigned char rtrmsg_dstlen;
unsigned char rtrmsg_tos;
unsigned char rtrmsg_class;
unsigned char rtrmsg_flags;
unsigned char rtrmsg_action;
unsigned char rtrmsg_preference;
unsigned char rtrmsg_rtmsgs;
struct in_rtmsg rtrmsg_rtmsg[1];
};
struct in_rtctlmsg
{
unsigned rtcmsg_flags;
int rtcmsg_delay;
};
#define RTCTL_ECHO 1 /* Echo route changes */
#define RTCTL_FLUSH 2 /* Send flush updates */
#define RTCTL_ACK 4 /* Send acks */
#define RTCTL_DELAY 8 /* Set netlink delay */
#define RTCTL_OWNER 0x10 /* Set netlink reader */
#endif
#define RTMSG_ACK NLMSG_ACK
#define RTMSG_OVERRUN NLMSG_OVERRUN
#define RTMSG_NEWDEVICE 0x11
#define RTMSG_DELDEVICE 0x12
#define RTMSG_NEWROUTE 0x21
#define RTMSG_DELROUTE 0x22
#define RTMSG_NEWRULE 0x31
#define RTMSG_DELRULE 0x32
#define RTMSG_CONTROL 0x40
#define RTMSG_AR_FAILED 0x51 /* Address Resolution failed */
#endif /* _LINUX_ROUTE_H */
This diff is collapsed.
......@@ -90,15 +90,10 @@ struct sk_buff
arp; /* Has IP/ARP resolution finished */
unsigned char tries, /* Times tried */
inclone, /* Inline clone */
priority,
pkt_type, /* Packet class */
pkt_bridged, /* Tracker for bridging */
ip_summed; /* Driver fed us an IP checksum */
#define PACKET_HOST 0 /* To us */
#define PACKET_BROADCAST 1 /* To all */
#define PACKET_MULTICAST 2 /* To group */
#define PACKET_OTHERHOST 3 /* To someone else */
#define PACKET_NDISC 17 /* Outgoing NDISC packet */
__u32 priority;
atomic_t users; /* User count - see datagram.c,tcp.c */
unsigned short protocol; /* Packet protocol from driver. */
unsigned short security; /* Security level of packet */
......@@ -447,13 +442,17 @@ here: ;
return skb->data;
}
extern __inline__ unsigned char * skb_pull(struct sk_buff *skb, unsigned int len)
extern __inline__ char *__skb_pull(struct sk_buff *skb, unsigned int len)
{
skb->len-=len;
return skb->data+=len;
}
extern __inline__ unsigned char * skb_pull(struct sk_buff *skb, unsigned int len)
{
if (len > skb->len)
return NULL;
skb->data+=len;
skb->len-=len;
return skb->data;
return __skb_pull(skb,len);
}
extern __inline__ int skb_headroom(struct sk_buff *skb)
......@@ -472,11 +471,16 @@ extern __inline__ void skb_reserve(struct sk_buff *skb, unsigned int len)
skb->tail+=len;
}
extern __inline__ void __skb_trim(struct sk_buff *skb, unsigned int len)
{
skb->len = len;
skb->tail = skb->data+len;
}
extern __inline__ void skb_trim(struct sk_buff *skb, unsigned int len)
{
if (skb->len > len) {
skb->len = len;
skb->tail = skb->data+len;
__skb_trim(skb, len);
}
}
......@@ -515,8 +519,15 @@ extern __inline__ void skb_orphan(struct sk_buff *skb)
skb->sk = NULL;
}
extern __inline__ void skb_queue_purge(struct sk_buff_head *list)
{
struct sk_buff *skb;
while ((skb=skb_dequeue(list))!=NULL)
kfree_skb(skb,0);
}
extern struct sk_buff * skb_recv_datagram(struct sock *sk,unsigned flags,int noblock, int *err);
extern unsigned int datagram_poll(struct socket *sock, poll_table *wait);
extern unsigned int datagram_poll(struct socket *sock, struct poll_table_struct *wait);
extern int skb_copy_datagram(struct sk_buff *from, int offset, char *to,int size);
extern int skb_copy_datagram_iovec(struct sk_buff *from, int offset, struct iovec *to,int size);
extern void skb_free_datagram(struct sock * sk, struct sk_buff *skb);
......
This diff is collapsed.
......@@ -53,18 +53,19 @@
#define SIOCSIFSLAVE 0x8930
#define SIOCADDMULTI 0x8931 /* Multicast address lists */
#define SIOCDELMULTI 0x8932
#define SIOGIFINDEX 0x8933 /* name -> if_index mapping */
#define SIOGIFNAME 0x8934 /* if_index -> name mapping */
#define SIOCGIFCOUNT 0x8935 /* get number of interfaces */
#define SIOCGIFINDEX 0x8933 /* name -> if_index mapping */
#define SIOGIFINDEX SIOCGIFINDEX /* misprint compatibility :-) */
#define SIOCSIFPFLAGS 0x8934 /* set/get extended flags set */
#define SIOCGIFPFLAGS 0x8935
#define SIOCDIFADDR 0x8936 /* delete PA address */
#define SIOCSIFHWBROADCAST 0x8937 /* set hardware broadcast addr */
#define SIOCGIFCOUNT 0x8938 /* get number of devices */
#define SIOCGIFBR 0x8940 /* Bridging support */
#define SIOCSIFBR 0x8941 /* Set bridging options */
/* ARP cache control calls. */
#define OLD_SIOCDARP 0x8950 /* old delete ARP table entry */
#define OLD_SIOCGARP 0x8951 /* old get ARP table entry */
#define OLD_SIOCSARP 0x8952 /* old set ARP table entry */
/* 0x8950 - 0x8952 * obsolete calls, don't re-use */
#define SIOCDARP 0x8953 /* delete ARP table entry */
#define SIOCGARP 0x8954 /* get ARP table entry */
#define SIOCSARP 0x8955 /* set ARP table entry */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -33,6 +33,9 @@ extern int icmp_rcv(struct sk_buff *skb, unsigned short len);
extern int icmp_ioctl(struct sock *sk, int cmd, unsigned long arg);
extern void icmp_init(struct net_proto_family *ops);
/* Move into dst.h ? */
extern int xrlim_allow(struct dst_entry *dst, int timeout);
/* CONFIG_IP_TRANSPARENT_PROXY */
extern int icmp_chkaddr(struct sk_buff *skb);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -1412,7 +1412,6 @@ static int ax25_sendmsg(struct socket *sock, struct msghdr *msg, int len, struct
/* Datagram frames go straight out of the door as UI */
skb->dev = sk->protinfo.ax25->ax25_dev->dev;
skb->priority = SOPRI_NORMAL;
ax25_queue_xmit(skb);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment