aboutsummaryrefslogblamecommitdiffstats
path: root/drivers/scsi/dtc.c
blob: c2677ba29c74619ad581b895018ffd07ee3ce9b5 (plain) (tree)











































































                                                                                    




                            
                     







                            












































                                                                                

                                                                          
      
                                          


                              


                        

                      
                                  


                               
                  

                                                   
                                            




                                                                     
  

                                                                         
   



















                                                                 
                                                              









                                                                   
                                                              




















                                                                                    
                                                                                                                    








                                                                                                                                                     
                                                                                                  






                                                           
                                                                    























                                                                                   
                                                                               



















































































































































































                                                                                                                                         
                                            






                                                                 
                                                    




                                                            






                                                             

#define AUTOSENSE
#define PSEUDO_DMA
#define DONT_USE_INTR
#define UNSAFE			/* Leave interrupts enabled during pseudo-dma I/O */
#define xNDEBUG (NDEBUG_INTR+NDEBUG_RESELECTION+\
		 NDEBUG_SELECTION+NDEBUG_ARBITRATION)
#define DMA_WORKS_RIGHT


/*
 * DTC 3180/3280 driver, by
 *	Ray Van Tassle	rayvt@comm.mot.com
 *
 *	taken from ...
 *	Trantor T128/T128F/T228 driver by...
 *
 * 	Drew Eckhardt
 *	Visionary Computing
 *	(Unix and Linux consulting and custom programming)
 *	drew@colorado.edu
 *      +1 (303) 440-4894
 *
 * DISTRIBUTION RELEASE 1.
 *
 * For more information, please consult 
 *
 * NCR 5380 Family
 * SCSI Protocol Controller
 * Databook
*/

/*
 * Options : 
 * AUTOSENSE - if defined, REQUEST SENSE will be performed automatically
 *      for commands that return with a CHECK CONDITION status. 
 *
 * PSEUDO_DMA - enables PSEUDO-DMA hardware, should give a 3-4X performance
 * increase compared to polled I/O.
 *
 * PARITY - enable parity checking.  Not supported.
 *
 * UNSAFE - leave interrupts enabled during pseudo-DMA transfers. 
 *		You probably want this.
 *
 * The card is detected and initialized in one of several ways : 
 * 1.  Autoprobe (default) - since the board is memory mapped, 
 *     a BIOS signature is scanned for to locate the registers.
 *     An interrupt is triggered to autoprobe for the interrupt
 *     line.
 *
 * 2.  With command line overrides - dtc=address,irq may be 
 *     used on the LILO command line to override the defaults.
 * 
*/

/*----------------------------------------------------------------*/
/* the following will set the monitor border color (useful to find
 where something crashed or gets stuck at */
/* 1 = blue
 2 = green
 3 = cyan
 4 = red
 5 = magenta
 6 = yellow
 7 = white
*/
#if 0
#define rtrc(i) {inb(0x3da); outb(0x31, 0x3c0); outb((i), 0x3c0);}
#else
#define rtrc(i) {}
#endif


#include <asm/system.h>
#include <linux/module.h>
#include <linux/signal.h>
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/stat.h>
#include <linux/string.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include "scsi.h"
#include <scsi/scsi_host.h>
#include "dtc.h"
#define AUTOPROBE_IRQ
#include "NCR5380.h"


#define DTC_PUBLIC_RELEASE 2

/*
 * The DTC3180 & 3280 boards are memory mapped.
 * 
 */

/*
 */
/* Offset from DTC_5380_OFFSET */
#define DTC_CONTROL_REG		0x100	/* rw */
#define D_CR_ACCESS		0x80	/* ro set=can access 3280 registers */
#define CSR_DIR_READ		0x40	/* rw direction, 1 = read 0 = write */

#define CSR_RESET              0x80	/* wo  Resets 53c400 */
#define CSR_5380_REG           0x80	/* ro  5380 registers can be accessed */
#define CSR_TRANS_DIR          0x40	/* rw  Data transfer direction */
#define CSR_SCSI_BUFF_INTR     0x20	/* rw  Enable int on transfer ready */
#define CSR_5380_INTR          0x10	/* rw  Enable 5380 interrupts */
#define CSR_SHARED_INTR        0x08	/* rw  Interrupt sharing */
#define CSR_HOST_BUF_NOT_RDY   0x04	/* ro  Host buffer not ready */
#define CSR_SCSI_BUF_RDY       0x02	/* ro  SCSI buffer ready */
#define CSR_GATED_5380_IRQ     0x01	/* ro  Last block xferred */
#define CSR_INT_BASE (CSR_SCSI_BUFF_INTR | CSR_5380_INTR)


#define DTC_BLK_CNT		0x101	/* rw 
					 * # of 128-byte blocks to transfer */


#define D_CR_ACCESS             0x80	/* ro set=can access 3280 registers */

#define DTC_SWITCH_REG		0x3982	/* ro - DIP switches */
#define DTC_RESUME_XFER		0x3982	/* wo - resume data xfer 
					 * after disconnect/reconnect*/

#define DTC_5380_OFFSET		0x3880	/* 8 registers here, see NCR5380.h */

/*!!!! for dtc, it's a 128 byte buffer at 3900 !!! */
#define DTC_DATA_BUF		0x3900	/* rw 128 bytes long */

static struct override {
	unsigned int address;
	int irq;
} overrides
#ifdef OVERRIDE
[] __initdata = OVERRIDE;
#else
[4] __initdata = {
	{ 0, IRQ_AUTO }, { 0, IRQ_AUTO }, { 0, IRQ_AUTO }, { 0, IRQ_AUTO }
};
#endif

#define NO_OVERRIDES ARRAY_SIZE(overrides)

static struct base {
	unsigned long address;
	int noauto;
} bases[] __initdata = {
	{ 0xcc000, 0 },
	{ 0xc8000, 0 },
	{ 0xdc000, 0 },
	{ 0xd8000, 0 }
};

#define NO_BASES ARRAY_SIZE(bases)

static const struct signature {
	const char *string;
	int offset;
} signatures[] = {
	{"DATA TECHNOLOGY CORPORATION BIOS", 0x25},
};

#define NO_SIGNATURES ARRAY_SIZE(signatures)

#ifndef MODULE
/*
 * Function : dtc_setup(char *str, int *ints)
 *
 * Purpose : LILO command line initialization of the overrides array,
 *
 * Inputs : str - unused, ints - array of integer parameters with ints[0]
 *	equal to the number of ints.
 *
 */

static void __init dtc_setup(char *str, int *ints)
{
	static int commandline_current = 0;
	int i;
	if (ints[0] != 2)
		printk("dtc_setup: usage dtc=address,irq\n");
	else if (commandline_current < NO_OVERRIDES) {
		overrides[commandline_current].address = ints[1];
		overrides[commandline_current].irq = ints[2];
		for (i = 0; i < NO_BASES; ++i)
			if (bases[i].address == ints[1]) {
				bases[i].noauto = 1;
				break;
			}
		++commandline_current;
	}
}
#endif

/* 
 * Function : int dtc_detect(struct scsi_host_template * tpnt)
 *
 * Purpose : detects and initializes DTC 3180/3280 controllers
 *	that were autoprobed, overridden on the LILO command line, 
 *	or specified at compile time.
 *
 * Inputs : tpnt - template for this SCSI adapter.
 * 
 * Returns : 1 if a host adapter was found, 0 if not.
 *
*/

static int __init dtc_detect(struct scsi_host_template * tpnt)
{
	static int current_override = 0, current_base = 0;
	struct Scsi_Host *instance;
	unsigned int addr;
	void __iomem *base;
	int sig, count;

	tpnt->proc_name = "dtc3x80";
	tpnt->proc_info = &dtc_proc_info;

	for (count = 0; current_override < NO_OVERRIDES; ++current_override) {
		addr = 0;
		base = NULL;

		if (overrides[current_override].address) {
			addr = overrides[current_override].address;
			base = ioremap(addr, 0x2000);
			if (!base)
				addr = 0;
		} else
			for (; !addr && (current_base < NO_BASES); ++current_base) {
#if (DTCDEBUG & DTCDEBUG_INIT)
				printk(KERN_DEBUG "scsi-dtc : probing address %08x\n", bases[current_base].address);
#endif
				if (bases[current_base].noauto)
					continue;
				base = ioremap(bases[current_base].address, 0x2000);
				if (!base)
					continue;
				for (sig = 0; sig < NO_SIGNATURES; ++sig) {
					if (check_signature(base + signatures[sig].offset, signatures[sig].string, strlen(signatures[sig].string))) {
						addr = bases[current_base].address;
#if (DTCDEBUG & DTCDEBUG_INIT)
						printk(KERN_DEBUG "scsi-dtc : detected board.\n");
#endif
						goto found;
					}
				}
				iounmap(base);
			}

#if defined(DTCDEBUG) && (DTCDEBUG & DTCDEBUG_INIT)
		printk(KERN_DEBUG "scsi-dtc : base = %08x\n", addr);
#endif

		if (!addr)
			break;

found:
		instance = scsi_register(tpnt, sizeof(struct NCR5380_hostdata));
		if (instance == NULL)
			break;

		instance->base = addr;
		((struct NCR5380_hostdata *)(instance)->hostdata)->base = base;

		NCR5380_init(instance, 0);

		NCR5380_write(DTC_CONTROL_REG, CSR_5380_INTR);	/* Enable int's */
		if (overrides[current_override].irq != IRQ_AUTO)
			instance->irq = overrides[current_override].irq;
		else
			instance->irq = NCR5380_probe_irq(instance, DTC_IRQS);

#ifndef DONT_USE_INTR
		/* With interrupts enabled, it will sometimes hang when doing heavy
		 * reads. So better not enable them until I finger it out. */
		if (instance->irq != SCSI_IRQ_NONE)
			if (request_irq(instance->irq, dtc_intr, IRQF_DISABLED,
					"dtc", instance)) {
				printk(KERN_ERR "scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq);
				instance->irq = SCSI_IRQ_NONE;
			}

		if (instance->irq == SCSI_IRQ_NONE) {
			printk(KERN_WARNING "scsi%d : interrupts not enabled. for better interactive performance,\n", instance->host_no);
			printk(KERN_WARNING "scsi%d : please jumper the board for a free IRQ.\n", instance->host_no);
		}
#else
		if (instance->irq != SCSI_IRQ_NONE)
			printk(KERN_WARNING "scsi%d : interrupts not used. Might as well not jumper it.\n", instance->host_no);
		instance->irq = SCSI_IRQ_NONE;
#endif
#if defined(DTCDEBUG) && (DTCDEBUG & DTCDEBUG_INIT)
		printk("scsi%d : irq = %d\n", instance->host_no, instance->irq);
#endif

		printk(KERN_INFO "scsi%d : at 0x%05X", instance->host_no, (int) instance->base);
		if (instance->irq == SCSI_IRQ_NONE)
			printk(" interrupts disabled");
		else
			printk(" irq %d", instance->irq);
		printk(" options CAN_QUEUE=%d  CMD_PER_LUN=%d release=%d", CAN_QUEUE, CMD_PER_LUN, DTC_PUBLIC_RELEASE);
		NCR5380_print_options(instance);
		printk("\n");

		++current_override;
		++count;
	}
	return count;
}

/*
 * Function : int dtc_biosparam(Disk * disk, struct block_device *dev, int *ip)
 *
 * Purpose : Generates a BIOS / DOS compatible H-C-S mapping for 
 *	the specified device / size.
 * 
 * Inputs : size = size of device in sectors (512 bytes), dev = block device
 *	major / minor, ip[] = {heads, sectors, cylinders}  
 *
 * Returns : always 0 (success), initializes ip
 *	
*/

/* 
 * XXX Most SCSI boards use this mapping, I could be incorrect.  Some one
 * using hard disks on a trantor should verify that this mapping corresponds
 * to that used by the BIOS / ASPI driver by running the linux fdisk program
 * and matching the H_C_S coordinates to what DOS uses.
*/

static int dtc_biosparam(struct scsi_device *sdev, struct block_device *dev,
			 sector_t capacity, int *ip)
{
	int size = capacity;

	ip[0] = 64;
	ip[1] = 32;
	ip[2] = size >> 11;
	return 0;
}


/****************************************************************
 * Function : int NCR5380_pread (struct Scsi_Host *instance, 
 *	unsigned char *dst, int len)
 *
 * Purpose : Fast 5380 pseudo-dma read function, reads len bytes to 
 *	dst
 * 
 * Inputs : dst = destination, len = length in bytes
 *
 * Returns : 0 on success, non zero on a failure such as a watchdog 
 * 	timeout.
*/

static int dtc_maxi = 0;
static int dtc_wmaxi = 0;

static inline int NCR5380_pread(struct Scsi_Host *instance, unsigned char *dst, int len)
{
	unsigned char *d = dst;
	int i;			/* For counting time spent in the poll-loop */
	NCR5380_local_declare();
	NCR5380_setup(instance);

	i = 0;
	NCR5380_read(RESET_PARITY_INTERRUPT_REG);
	NCR5380_write(MODE_REG, MR_ENABLE_EOP_INTR | MR_DMA_MODE);
	if (instance->irq == SCSI_IRQ_NONE)
		NCR5380_write(DTC_CONTROL_REG, CSR_DIR_READ);
	else
		NCR5380_write(DTC_CONTROL_REG, CSR_DIR_READ | CSR_INT_BASE);
	NCR5380_write(DTC_BLK_CNT, len >> 7);	/* Block count */
	rtrc(1);
	while (len > 0) {
		rtrc(2);
		while (NCR5380_read(DTC_CONTROL_REG) & CSR_HOST_BUF_NOT_RDY)
			++i;
		rtrc(3);
		memcpy_fromio(d, base + DTC_DATA_BUF, 128);
		d += 128;
		len -= 128;
		rtrc(7);
		/*** with int's on, it sometimes hangs after here.
		 * Looks like something makes HBNR go away. */
	}
	rtrc(4);
	while (!(NCR5380_read(DTC_CONTROL_REG) & D_CR_ACCESS))
		++i;
	NCR5380_write(MODE_REG, 0);	/* Clear the operating mode */
	rtrc(0);
	NCR5380_read(RESET_PARITY_INTERRUPT_REG);
	if (i > dtc_maxi)
		dtc_maxi = i;
	return (0);
}

/****************************************************************
 * Function : int NCR5380_pwrite (struct Scsi_Host *instance, 
 *	unsigned char *src, int len)
 *
 * Purpose : Fast 5380 pseudo-dma write function, transfers len bytes from
 *	src
 * 
 * Inputs : src = source, len = length in bytes
 *
 * Returns : 0 on success, non zero on a failure such as a watchdog 
 * 	timeout.
*/

static inline int NCR5380_pwrite(struct Scsi_Host *instance, unsigned char *src, int len)
{
	int i;
	NCR5380_local_declare();
	NCR5380_setup(instance);

	NCR5380_read(RESET_PARITY_INTERRUPT_REG);
	NCR5380_write(MODE_REG, MR_ENABLE_EOP_INTR | MR_DMA_MODE);
	/* set direction (write) */
	if (instance->irq == SCSI_IRQ_NONE)
		NCR5380_write(DTC_CONTROL_REG, 0);
	else
		NCR5380_write(DTC_CONTROL_REG, CSR_5380_INTR);
	NCR5380_write(DTC_BLK_CNT, len >> 7);	/* Block count */
	for (i = 0; len > 0; ++i) {
		rtrc(5);
		/* Poll until the host buffer can accept data. */
		while (NCR5380_read(DTC_CONTROL_REG) & CSR_HOST_BUF_NOT_RDY)
			++i;
		rtrc(3);
		memcpy_toio(base + DTC_DATA_BUF, src, 128);
		src += 128;
		len -= 128;
	}
	rtrc(4);
	while (!(NCR5380_read(DTC_CONTROL_REG) & D_CR_ACCESS))
		++i;
	rtrc(6);
	/* Wait until the last byte has been sent to the disk */
	while (!(NCR5380_read(TARGET_COMMAND_REG) & TCR_LAST_BYTE_SENT))
		++i;
	rtrc(7);
	/* Check for parity error here. fixme. */
	NCR5380_write(MODE_REG, 0);	/* Clear the operating mode */
	rtrc(0);
	if (i > dtc_wmaxi)
		dtc_wmaxi = i;
	return (0);
}

MODULE_LICENSE("GPL");

#include "NCR5380.c"

static int dtc_release(struct Scsi_Host *shost)
{
	NCR5380_local_declare();
	NCR5380_setup(shost);
	if (shost->irq)
		free_irq(shost->irq, shost);
	NCR5380_exit(shost);
	if (shost->io_port && shost->n_io_port)
		release_region(shost->io_port, shost->n_io_port);
	scsi_unregister(shost);
	iounmap(base);
	return 0;
}

static struct scsi_host_template driver_template = {
	.name				= "DTC 3180/3280 ",
	.detect				= dtc_detect,
	.release			= dtc_release,
	.queuecommand			= dtc_queue_command,
	.eh_abort_handler		= dtc_abort,
	.eh_bus_reset_handler		= dtc_bus_reset,
	.bios_param     		= dtc_biosparam,
	.can_queue      		= CAN_QUEUE,
	.this_id        		= 7,
	.sg_tablesize   		= SG_ALL,
	.cmd_per_lun    		= CMD_PER_LUN,
	.use_clustering 		= DISABLE_CLUSTERING,
};
#include "scsi_module.c"
odisconnect [HW,SCSI,M68K] Disables SCSI disconnects. noexec [IA-64] noexec [IA-32, X86-64] noexec=on: enable non-executable mappings (default) noexec=off: disable nn-executable mappings nofxsr [BUGS=IA-32] nohlt [BUGS=ARM] no-hlt [BUGS=IA-32] Tells the kernel that the hlt instruction doesn't work correctly and not to use it. nohalt [IA-64] Tells the kernel not to use the power saving function PAL_HALT_LIGHT when idle. This increases power-consumption. On the positive side, it reduces interrupt wake-up latency, which may improve performance in certain environments such as networked servers or real-time systems. noirqdebug [IA-32] Disables the code which attempts to detect and disable unhandled interrupt sources. noisapnp [ISAPNP] Disables ISA PnP code. noinitrd [RAM] Tells the kernel not to load any configured initial RAM disk. nointroute [IA-64] nolapic [IA-32,APIC] Do not enable or use the local APIC. noltlbs [PPC] Do not use large page/tlb entries for kernel lowmem mapping on PPC40x. nomce [IA-32] Machine Check Exception noresidual [PPC] Don't use residual data on PReP machines. noresume [SWSUSP] Disables resume and restore original swap space. no-scroll [VGA] Disables scrollback. This is required for the Braillex ib80-piezo Braille reader made by F.H. Papenmeier (Germany). nosbagart [IA-64] nosmp [SMP] Tells an SMP kernel to act as a UP kernel. nosync [HW,M68K] Disables sync negotiation for all devices. notsc [BUGS=IA-32] Disable Time Stamp Counter nousb [USB] Disable the USB subsystem nowb [ARM] opl3= [HW,OSS] Format: <io> opl3sa= [HW,OSS] Format: <io>,<irq>,<dma>,<dma2>,<mpu_io>,<mpu_irq> opl3sa2= [HW,OSS] Format: <io>,<irq>,<dma>,<dma2>,<mss_io>,<mpu_io>,<ymode>,<loopback>[,<isapnp>,<multiple] oprofile.timer= [HW] Use timer interrupt instead of performance counters optcd= [HW,CD] Format: <io> osst= [HW,SCSI] SCSI Tape Driver Format: <buffer_size>,<write_threshold> See also Documentation/scsi/st.txt. panic= [KNL] Kernel behaviour on panic Format: <timeout> parkbd.port= [HW] Parallel port number the keyboard adapter is connected to, default is 0. Format: <parport#> parkbd.mode= [HW] Parallel port keyboard adapter mode of operation, 0 for XT, 1 for AT (default is AT). Format: <mode> parport=0 [HW,PPT] Specify parallel ports. 0 disables. parport=auto Use 'auto' to force the driver to use parport=0xBBB[,IRQ[,DMA]] any IRQ/DMA settings detected (the default is to ignore detected IRQ/DMA settings because of possible conflicts). You can specify the base address, IRQ, and DMA settings; IRQ and DMA should be numbers, or 'auto' (for using detected settings on that particular port), or 'nofifo' (to avoid using a FIFO even if it is detected). Parallel ports are assigned in the order they are specified on the command line, starting with parport0. parport_init_mode= [HW,PPT] Configure VIA parallel port to operate in specific mode. This is necessary on Pegasos computer where firmware has no options for setting up parallel port mode and sets it to spp. Currently this function knows 686a and 8231 chips. Format: [spp|ps2|epp|ecp|ecpepp] pas2= [HW,OSS] Format: <io>,<irq>,<dma>,<dma16>,<sb_io>,<sb_irq>,<sb_dma>,<sb_dma16> pas16= [HW,SCSI] See header of drivers/scsi/pas16.c. pcbit= [HW,ISDN] pcd. [PARIDE] See header of drivers/block/paride/pcd.c. See also Documentation/paride.txt. pci=option[,option...] [PCI] various PCI subsystem options: off [IA-32] don't probe for the PCI bus bios [IA-32] force use of PCI BIOS, don't access the hardware directly. Use this if your machine has a non-standard PCI host bridge. nobios [IA-32] disallow use of PCI BIOS, only direct hardware access methods are allowed. Use this if you experience crashes upon bootup and you suspect they are caused by the BIOS. conf1 [IA-32] Force use of PCI Configuration Mechanism 1. conf2 [IA-32] Force use of PCI Configuration Mechanism 2. nosort [IA-32] Don't sort PCI devices according to order given by the PCI BIOS. This sorting is done to get a device order compatible with older kernels. biosirq [IA-32] Use PCI BIOS calls to get the interrupt routing table. These calls are known to be buggy on several machines and they hang the machine when used, but on other computers it's the only way to get the interrupt routing table. Try this option if the kernel is unable to allocate IRQs or discover secondary PCI buses on your motherboard. rom [IA-32] Assign address space to expansion ROMs. Use with caution as certain devices share address decoders between ROMs and other resources. irqmask=0xMMMM [IA-32] Set a bit mask of IRQs allowed to be assigned automatically to PCI devices. You can make the kernel exclude IRQs of your ISA cards this way. pirqaddr=0xAAAAA [IA-32] Specify the physical address of the PIRQ table (normally generated by the BIOS) if it is outside the F0000h-100000h range. lastbus=N [IA-32] Scan all buses till bus #N. Can be useful if the kernel is unable to find your secondary buses and you want to tell it explicitly which ones they are. assign-busses [IA-32] Always assign all PCI bus numbers ourselves, overriding whatever the firmware may have done. usepirqmask [IA-32] Honor the possible IRQ mask stored in the BIOS $PIR table. This is needed on some systems with broken BIOSes, notably some HP Pavilion N5400 and Omnibook XE3 notebooks. This will have no effect if ACPI IRQ routing is enabled. noacpi [IA-32] Do not use ACPI for IRQ routing or for PCI scanning. routeirq Do IRQ routing for all PCI devices. This is normally done in pci_enable_device(), so this option is a temporary workaround for broken drivers that don't call it. firmware [ARM] Do not re-enumerate the bus but instead just use the configuration from the bootloader. This is currently used on IXP2000 systems where the bus has to be configured a certain way for adjunct CPUs. pcmv= [HW,PCMCIA] BadgePAD 4 pd. [PARIDE] See Documentation/paride.txt. pdcchassis= [PARISC,HW] Disable/Enable PDC Chassis Status codes at boot time. Format: { 0 | 1 } See arch/parisc/kernel/pdc_chassis.c pf. [PARIDE] See Documentation/paride.txt. pg. [PARIDE] See Documentation/paride.txt. pirq= [SMP,APIC] Manual mp-table setup See Documentation/i386/IO-APIC.txt. plip= [PPT,NET] Parallel port network link Format: { parport<nr> | timid | 0 } See also Documentation/parport.txt. pnpacpi= [ACPI] { off } pnpbios= [ISAPNP] { on | off | curr | res | no-curr | no-res } pnp_reserve_irq= [ISAPNP] Exclude IRQs for the autoconfiguration pnp_reserve_dma= [ISAPNP] Exclude DMAs for the autoconfiguration pnp_reserve_io= [ISAPNP] Exclude I/O ports for the autoconfiguration Ranges are in pairs (I/O port base and size). pnp_reserve_mem= [ISAPNP] Exclude memory regions for the autoconfiguration Ranges are in pairs (memory base and size). profile= [KNL] Enable kernel profiling via /proc/profile { schedule | <number> } (param: schedule - profile schedule points} (param: profile step/bucket size as a power of 2 for statistical time based profiling) processor.max_cstate= [HW, ACPI] Limit processor to maximum C-state max_cstate=9 overrides any DMI blacklist limit. prompt_ramdisk= [RAM] List of RAM disks to prompt for floppy disk before loading. See Documentation/ramdisk.txt. psmouse.proto= [HW,MOUSE] Highest PS2 mouse protocol extension to probe for (bare|imps|exps|lifebook|any). psmouse.rate= [HW,MOUSE] Set desired mouse report rate, in reports per second. psmouse.resetafter= [HW,MOUSE] Try to reset the device after so many bad packets (0 = never). psmouse.resolution= [HW,MOUSE] Set desired mouse resolution, in dpi. psmouse.smartscroll= [HW,MOUSE] Controls Logitech smartscroll autorepeat, 0 = disabled, 1 = enabled (default). pss= [HW,OSS] Personal Sound System (ECHO ESC614) Format: <io>,<mss_io>,<mss_irq>,<mss_dma>,<mpu_io>,<mpu_irq> pt. [PARIDE] See Documentation/paride.txt. quiet= [KNL] Disable log messages r128= [HW,DRM] raid= [HW,RAID] See Documentation/md.txt. ramdisk= [RAM] Sizes of RAM disks in kilobytes [deprecated] See Documentation/ramdisk.txt. ramdisk_blocksize= [RAM] See Documentation/ramdisk.txt. ramdisk_size= [RAM] Sizes of RAM disks in kilobytes New name for the ramdisk parameter. See Documentation/ramdisk.txt. rdinit= [KNL] Format: <full_path> Run specified binary instead of /init from the ramdisk, used for early userspace startup. See initrd. reboot= [BUGS=IA-32,BUGS=ARM,BUGS=IA-64] Rebooting mode Format: <reboot_mode>[,<reboot_mode2>[,...]] See arch/*/kernel/reboot.c. reserve= [KNL,BUGS] Force the kernel to ignore some iomem area resume= [SWSUSP] Specify the partition device for software suspension rhash_entries= [KNL,NET] Set number of hash buckets for route cache riscom8= [HW,SERIAL] Format: <io_board1>[,<io_board2>[,...<io_boardN>]] ro [KNL] Mount root device read-only on boot root= [KNL] Root filesystem rootdelay= [KNL] Delay (in seconds) to pause before attempting to mount the root filesystem rootflags= [KNL] Set root filesystem mount option string rootfstype= [KNL] Set root filesystem type rw [KNL] Mount root device read-write on boot S [KNL] Run init in single mode sa1100ir [NET] See drivers/net/irda/sa1100_ir.c. sb= [HW,OSS] Format: <io>,<irq>,<dma>,<dma2> sbni= [NET] Granch SBNI12 leased line adapter sbpcd= [HW,CD] Soundblaster CD adapter Format: <io>,<type> See a comment before function sbpcd_setup() in drivers/cdrom/sbpcd.c. sc1200wdt= [HW,WDT] SC1200 WDT (watchdog) driver Format: <io>[,<timeout>[,<isapnp>]] scsi_debug_*= [SCSI] See drivers/scsi/scsi_debug.c. scsi_default_dev_flags= [SCSI] SCSI default device flags Format: <integer> scsi_dev_flags= [SCSI] Black/white list entry for vendor and model Format: <vendor>:<model>:<flags> (flags are integer value) scsi_logging= [SCSI] selinux [SELINUX] Disable or enable SELinux at boot time. Format: { "0" | "1" } See security/selinux/Kconfig help text. 0 -- disable. 1 -- enable. Default value is set via kernel config option. If enabled at boot time, /selinux/disable can be used later to disable prior to initial policy load. serialnumber [BUGS=IA-32] sg_def_reserved_size= [SCSI] sgalaxy= [HW,OSS] Format: <io>,<irq>,<dma>,<dma2>,<sgbase> shapers= [NET] Maximal number of shapers. sim710= [SCSI,HW] See header of drivers/scsi/sim710.c. simeth= [IA-64] simscsi= sjcd= [HW,CD] Format: <io>,<irq>,<dma> See header of drivers/cdrom/sjcd.c. slram= [HW,MTD] smart2= [HW] Format: <io1>[,<io2>[,...,<io8>]] snd-ad1816a= [HW,ALSA] snd-ad1848= [HW,ALSA] snd-ali5451= [HW,ALSA] snd-als100= [HW,ALSA] snd-als4000= [HW,ALSA] snd-azt2320= [HW,ALSA] snd-cmi8330= [HW,ALSA] snd-cmipci= [HW,ALSA] snd-cs4231= [HW,ALSA] snd-cs4232= [HW,ALSA] snd-cs4236= [HW,ALSA] snd-cs4281= [HW,ALSA] snd-cs46xx= [HW,ALSA] snd-dt019x= [HW,ALSA] snd-dummy= [HW,ALSA] snd-emu10k1= [HW,ALSA] snd-ens1370= [HW,ALSA] snd-ens1371= [HW,ALSA] snd-es968= [HW,ALSA] snd-es1688= [HW,ALSA] snd-es18xx= [HW,ALSA] snd-es1938= [HW,ALSA] snd-es1968= [HW,ALSA] snd-fm801= [HW,ALSA] snd-gusclassic= [HW,ALSA] snd-gusextreme= [HW,ALSA] snd-gusmax= [HW,ALSA] snd-hdsp= [HW,ALSA] snd-ice1712= [HW,ALSA] snd-intel8x0= [HW,ALSA] snd-interwave= [HW,ALSA] snd-interwave-stb= [HW,ALSA] snd-korg1212= [HW,ALSA] snd-maestro3= [HW,ALSA] snd-mpu401= [HW,ALSA] snd-mtpav= [HW,ALSA] snd-nm256= [HW,ALSA] snd-opl3sa2= [HW,ALSA] snd-opti92x-ad1848= [HW,ALSA] snd-opti92x-cs4231= [HW,ALSA] snd-opti93x= [HW,ALSA] snd-pmac= [HW,ALSA] snd-rme32= [HW,ALSA] snd-rme96= [HW,ALSA] snd-rme9652= [HW,ALSA] snd-sb8= [HW,ALSA] snd-sb16= [HW,ALSA] snd-sbawe= [HW,ALSA] snd-serial= [HW,ALSA] snd-sgalaxy= [HW,ALSA] snd-sonicvibes= [HW,ALSA] snd-sun-amd7930= [HW,ALSA] snd-sun-cs4231= [HW,ALSA] snd-trident= [HW,ALSA] snd-usb-audio= [HW,ALSA,USB] snd-via82xx= [HW,ALSA] snd-virmidi= [HW,ALSA] snd-wavefront= [HW,ALSA] snd-ymfpci= [HW,ALSA] sonicvibes= [HW,OSS] Format: <reverb> sonycd535= [HW,CD] Format: <io>[,<irq>] sonypi.*= [HW] Sony Programmable I/O Control Device driver See Documentation/sonypi.txt specialix= [HW,SERIAL] Specialix multi-serial port adapter See Documentation/specialix.txt. spia_io_base= [HW,MTD] spia_fio_base= spia_pedr= spia_peddr= sscape= [HW,OSS] Format: <io>,<irq>,<dma>,<mpu_io>,<mpu_irq> st= [HW,SCSI] SCSI tape parameters (buffers, etc.) See Documentation/scsi/st.txt. st0x= [HW,SCSI] See header of drivers/scsi/seagate.c. sti= [PARISC,HW] Format: <num> Set the STI (builtin display/keyboard on the HP-PARISC machines) console (graphic card) which should be used as the initial boot-console. See also comment in drivers/video/console/sticore.c. sti_font= [HW] See comment in drivers/video/console/sticore.c. stifb= [HW] Format: bpp:<bpp1>[:<bpp2>[:<bpp3>...]] stram_swap= [HW,M68k] swiotlb= [IA-64] Number of I/O TLB slabs switches= [HW,M68k] sym53c416= [HW,SCSI] See header of drivers/scsi/sym53c416.c. t128= [HW,SCSI] See header of drivers/scsi/t128.c. tdfx= [HW,DRM] thash_entries= [KNL,NET] Set number of hash buckets for TCP connection time Show timing data prefixed to each printk message line tipar.timeout= [HW,PPT] Set communications timeout in tenths of a second (default 15). tipar.delay= [HW,PPT] Set inter-bit delay in microseconds (default 10). tmc8xx= [HW,SCSI] See header of drivers/scsi/seagate.c. tmscsim= [HW,SCSI] See comment before function dc390_setup() in drivers/scsi/tmscsim.c. tp720= [HW,PS2] trix= [HW,OSS] MediaTrix AudioTrix Pro Format: <io>,<irq>,<dma>,<dma2>,<sb_io>,<sb_irq>,<sb_dma>,<mpu_io>,<mpu_irq> tsdev.xres= [TS] Horizontal screen resolution. tsdev.yres= [TS] Vertical screen resolution. turbografx.map[2|3]= [HW,JOY] TurboGraFX parallel port interface Format: <port#>,<js1>,<js2>,<js3>,<js4>,<js5>,<js6>,<js7> See also Documentation/input/joystick-parport.txt u14-34f= [HW,SCSI] UltraStor 14F/34F SCSI host adapter See header of drivers/scsi/u14-34f.c. uart401= [HW,OSS] Format: <io>,<irq> uart6850= [HW,OSS] Format: <io>,<irq> usb-handoff [HW] Enable early USB BIOS -> OS handoff usbhid.mousepoll= [USBHID] The interval which mice are to be polled at. video= [FB] Frame buffer configuration See Documentation/fb/modedb.txt. vga= [BOOT,IA-32] Select a particular video mode See Documentation/i386/boot.txt and Documentation/svga.txt. Use vga=ask for menu. This is actually a boot loader parameter; the value is passed to the kernel using a special protocol. vmalloc=nn[KMG] [KNL,BOOT] forces the vmalloc area to have an exact size of <nn>. This can be used to increase the minimum size (128MB on x86). It can also be used to decrease the size and leave more room for directly mapped kernel RAM. vmhalt= [KNL,S390] vmpoff= [KNL,S390] waveartist= [HW,OSS] Format: <io>,<irq>,<dma>,<dma2> wd33c93= [HW,SCSI] See header of drivers/scsi/wd33c93.c. wd7000= [HW,SCSI] See header of drivers/scsi/wd7000.c. wdt= [WDT] Watchdog See Documentation/watchdog/watchdog.txt. xd= [HW,XT] Original XT pre-IDE (RLL encoded) disks. xd_geo= See header of drivers/block/xd.c. xirc2ps_cs= [NET,PCMCIA] Format: <irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]] Changelog: The last known update (for 2.4.0) - the changelog was not kept before. 2000-06-?? Mr. Unknown Update for 2.5.49, description for most of the options introduced, references to other documentation (C files, READMEs, ..), added S390, PPC, SPARC, MTD, ALSA and OSS category. Minor corrections and reformatting. 2002-11-24 Petr Baudis <pasky@ucw.cz> Randy Dunlap <randy.dunlap@verizon.net> TODO: Add documentation for ALSA options. Add more DRM drivers.