Commit df31c021 authored by Steve French's avatar Steve French

Merge bk://linux.bkbits.net/linux-2.5

into hostme.bitkeeper.com:/repos/c/cifs/linux-2.5cifs
parents a97fe143 2ac5f852
Linux I2O Support (c) Copyright 1999 Red Hat Software
and others.
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.
AUTHORS (so far)
Alan Cox, Building Number Three Ltd.
Core code, SCSI and Block OSMs
Steve Ralston, LSI Logic Corp.
Debugging SCSI and Block OSM
Deepak Saxena, Intel Corp.
Various core/block extensions
/proc interface, bug fixes
Ioctl interfaces for control
Debugging LAN OSM
Philip Rumpf
Fixed assorted dumb SMP locking bugs
Juha Sievanen, University of Helsinki Finland
LAN OSM code
/proc interface to LAN class
Bug fixes
Core code extensions
Auvo Häkkinen, University of Helsinki Finland
LAN OSM code
/Proc interface to LAN class
Bug fixes
Core code extensions
Taneli Vähäkangas, University of Helsinki Finland
Fixes to i2o_config
CREDITS
This work was made possible by
Red Hat Software
Funding for the Building #3 part of the project
Symbios Logic (Now LSI)
Host adapters, hints, known to work platforms when I hit
compatibility problems
BoxHill Corporation
Loan of initial FibreChannel disk array used for development work.
European Comission
Funding the work done by the University of Helsinki
SysKonnect
Loan of FDDI and Gigabit Ethernet cards
ASUSTeK
Loan of I2O motherboard
This diff is collapsed.
### Version 2.00.3
Wed Jan 29 09:13:44 EST 200 - Atul Mukker <atulm@lsil.com>
i. Change the handshake in ISR while acknowledging interrupts. Write the
valid interrupt pattern 0x10001234 as soon as it is read from the
outdoor register. In existing driver and on certain platform, invalid
command ids were being returned.
Release Date : Tue Aug 24 09:43:35 EDT 2004 - Atul Mukker <atulm@lsil.com>
Current Version : 2.20.3.1 (scsi module), 2.20.2.0 (cmm module)
Older Version : 2.20.3.0 (scsi module), 2.20.2.0 (cmm module)
Also, do not wait on status be become 0xFF, since FW can return this
status in certain circumstances.
i. Function reordering so that inline functions are defined before they
are actually used. It is now mandatory for GCC 3.4.1 (current stable)
Initialize the numstatus field of mailbox to 0xFF so that we can wait
on this wait in next interrupt. Firmware does not change its value
unless there are some status to be posted
Declare some heavy-weight functions to be non-inlined,
megaraid_mbox_build_cmd, megaraid_mbox_runpendq,
megaraid_mbox_prepare_pthru, megaraid_mbox_prepare_epthru,
megaraid_busywait_mbox
ii. Specify the logical drive number while issuing the RESERVATION_STATUS
- Andrew Morton <akpm@osdl.org>, 08.19.2004
linux-scsi mailing list
iii. Reduce the default mailbox busy wait time from 300us to 10us. This is
done to avaoid a possible deadlock in FW because of longer bust waits.
"Something else to clean up after inclusion: every instance of an
inline function is actually rendered as a full function call, because
the function is always used before it is defined. Atul, please
re-arrange the code to eliminate the need for most (all) of the
function prototypes at the top of each file, and define (not just
declare with a prototype) each inline function before its first use"
iv. The max outstanding commands are reduced to 126 because that't the
safest value on all FW.
- Matt Domsch <Matt_Domsch@dell.com>, 07.27.2004
linux-scsi mailing list
v. Number of sectors per IO are reduced to 128 (64kb), becuase FW needs
resources in special circumstances like check consistency, rebuilds
etc.
vi. max_commands is no longer a module parameter because of iv.
ii. Display elapsed time (countdown) while waiting for FW to boot.
### Version: 2.00.2
i. Intermediate release with kernel specific code
iii. Module compilation reorder in Makefile so that unresolved symbols do
not occur when driver is compiled non-modular.
Patrick J. LoPresti <patl@users.sourceforge.net>, 8.22.2004
linux-scsi mailing list
### Version: 2.00.1i
Wed Dec 4 14:34:51 EST 2002 - Atul Mukker <atulm@lsil.com>
i. Making the older IO based controllers to work with this driver
Release Date : Thu Aug 19 09:58:33 EDT 2004 - Atul Mukker <atulm@lsil.com>
Current Version : 2.20.3.0 (scsi module), 2.20.2.0 (cmm module)
Older Version : 2.20.2.0 (scsi module), 2.20.1.0 (cmm module)
### Version 2.00.1
Fri Nov 15 10:59:44 EST 2002 - Atul Mukker <atulm@lsil.com>
i. Release host lock before issuing internal command to reset
reservations in megaraid_reset() and reacquire after internal command
is completed.
i. When copying the mailbox packets, copy only first 14 bytes (for 32-bit
mailboxes) and only first 22 bytes (for 64-bit mailboxes). This is to
avoid getting the stale values for busy bit. We want to set the busy
bit just before issuing command to the FW.
ii. In the reset handling, if the reseted command is not owned by the
driver, do not (wrongly) print information for the "attached" driver
packet.
iii. Have extended wait when issuing command in synchronous mode. This is
required for the cases where the option ROM is disabled and there is
no BIOS to start the controller. The FW starts to boot after receiving
the first command from the driver. The current driver has 1 second
timeout for the synchronous commands, which is far less than what is
actually required. We now wait up to MBOX_RESET_TIME (180 seconds) for
FW boot process.
iv. In megaraid_mbox_product_info, clear the mailbox contents completely
before preparing the command for inquiry3. This is to ensure that the
FW does not get junk values in the command.
v. Do away with the redundant LSI_CONFIG_COMPAT redefinition for
CONFIG_COMPAT. Replace <asm/ioctl32.h> with <linux/ioctl32.h>
- James Bottomley <James.Bottomley@SteelEye.com>, 08.17.2004
linux-scsi mailing list
vi. Add support for 64-bit applications. Current drivers assume only
32-bit applications, even on 64-bit platforms. Use the "data" and
"buffer" fields of the mimd_t structure, instead of embedded 32-bit
addresses in application mailbox and passthru structures.
vii. Move the function declarations for the management module from
megaraid_mm.h to megaraid_mm.c
- Andrew Morton <akpm@osdl.org>, 08.19.2004
linux-scsi mailing list
viii. Change default values for MEGARAID_NEWGEN, MEGARAID_MM, and
MEGARAID_MAILBOX to 'n' in Kconfig.megaraid
- Andrew Morton <akpm@osdl.org>, 08.19.2004
linux-scsi mailing list
ix. replace udelay with msleep
x. Typos corrected in comments and whitespace adjustments, explicit
grouping of expressions.
Release Date : Fri Jul 23 15:22:07 EDT 2004 - Atul Mukker <atulm@lsil.com>
Current Version : 2.20.2.0 (scsi module), 2.20.1.0 (cmm module)
Older Version : 2.20.1.0 (scsi module), 2.20.0.0 (cmm module)
i. Add PCI ids for Acer ROMB 2E solution
ii. Add PCI ids for I4
iii. Typo corrected for subsys id for megaraid sata 300-4x
iv. Remove yield() while mailbox handshake in synchronous commands
"My other main gripe is things like this:
+ // wait for maximum 1 second for status to post
+ for (i = 0; i < 40000; i++) {
+ if (mbox->numstatus != 0xFF) break;
+ udelay(25); yield();
+ }
which litter the driver. Use of yield() in drivers is deprecated."
- James Bottomley <James.Bottomley@SteelEye.com>, 07.14.2004
linux-scsi mailing list
v. Remove redundant __megaraid_busywait_mbox routine
vi. Fix bug in the managment module, which causes a system lockup when the
IO module is loaded and then unloaded, followed by executing any
management utility. The current version of management module does not
handle the adapter unregister properly.
Specifically, it still keeps a reference to the unregistered
controllers. To avoid this, the static array adapters has been
replaced by a dynamic list, which gets updated every time an adapter
is added or removed.
Also, during unregistration of the IO module, the resources are
now released in the exact reverse order of the allocation time
sequence.
Release Date : Fri Jun 25 18:58:43 EDT 2004 - Atul Mukker <atulm@lsil.com>
Current Version : 2.20.1.0
Older Version : megaraid 2.20.0.1
i. Stale list pointer in adapter causes kernel panic when module
megaraid_mbox is unloaded
Release Date : Thu Jun 24 20:37:11 EDT 2004 - Atul Mukker <atulm@lsil.com>
Current Version : 2.20.0.1
Older Version : megaraid 2.20.0.00
i. Modules are not 'y' by default, but depend on current definition of
SCSI & PCI.
ii. Redundant structure mraid_driver_t removed.
iii. Miscellaneous indentation and goto/label fixes.
- Christoph Hellwig <hch@infradead.org>, 06.24.2004 linux-scsi
iv. scsi_host_put(), do just before completing HBA shutdown.
Release Date : Mon Jun 21 19:53:54 EDT 2004 - Atul Mukker <atulm@lsil.com>
Current Version : 2.20.0.0
Older Version : megaraid 2.20.0.rc2 and 2.00.3
i. Independent module to interact with userland applications and
multiplex command to low level RAID module(s).
"Shared code in a third module, a "library module", is an acceptable
solution. modprobe automatically loads dependent modules, so users
running "modprobe driver1" or "modprobe driver2" would automatically
load the shared library module."
- Jeff Garzik <jgarzik@pobox.com> 02.25.2004 LKML
"As Jeff hinted, if your userspace<->driver API is consistent between
your new MPT-based RAID controllers and your existing megaraid driver,
then perhaps you need a single small helper module (lsiioctl or some
better name), loaded by both mptraid and megaraid automatically, which
handles registering the /dev/megaraid node dynamically. In this case,
both mptraid and megaraid would register with lsiioctl for each
adapter discovered, and lsiioctl would essentially be a switch,
redirecting userspace tool ioctls to the appropriate driver."
- Matt Domsch <Matt_Domsch@dell.com> 02.25.2004 LKML
ii. Remove C99 initializations from pci_device id.
"pci_id_table_g would be much more readable when not using C99
initializers.
PCI table doesn't change, there's lots of users that prefer the more
readable variant. And it's really far less and much easier to grok
lines without C99 initializers."
- Christoph Hellwig <hch@infradead.org>, 05.28.2004 linux-scsi
iii. Many fixes as suggested by Christoph Hellwig <hch@infradead.org> on
linux-scsi, 05.28.2004
iv. We now support up to 32 parallel ioctl commands instead of current 1.
There is a conscious effort to let memory allocation not fail for ioctl
commands.
v. Do away with internal memory management. Use pci_pool_(create|alloc)
instead.
vi. Kill tasklet when unloading the driver.
vii. Do not use "host_lock', driver has fine-grain locks now to protect all
data structures.
viii. Optimize the build scatter-gather list routine. The callers already
know the data transfer address and length.
ix. Better implementation of error handling and recovery. Driver now
performs extended errors recovery for instances like scsi cable pull.
x. Disassociate the management commands with an overlaid scsi command.
Driver now treats the management packets as special packets and has a
dedicated callback routine.
Notes on Management Module
~~~~~~~~~~~~~~~~~~~~~~~~~~
Overview:
--------
Different classes of controllers from LSI Logic, accept and respond to the
user applications in a similar way. They understand the same firmware control
commands. Furthermore, the applications also can treat different classes of
the controllers uniformly. Hence it is logical to have a single module that
interefaces with the applications on one side and all the low level drivers
on the other.
The advantages, though obvious, are listed for completeness:
i. Avoid duplicate code from the low level drivers.
ii. Unburden the low level drivers from having to export the
character node device and related handling.
iii. Implement any policy mechanisms in one place.
iv. Applications have to interface with only module instead of
multiple low level drivers.
Currently this module (called Common Management Module) is used only to issue
ioctl commands. But this module is envisioned to handle all user space level
interactions. So any 'proc', 'sysfs' implementations will be localized in this
common module.
Credits:
-------
"Shared code in a third module, a "library module", is an acceptable
solution. modprobe automatically loads dependent modules, so users
running "modprobe driver1" or "modprobe driver2" would automatically
load the shared library module."
- Jeff Garzik (jgarzik@pobox.com), 02.25.2004 LKML
"As Jeff hinted, if your userspace<->driver API is consistent between
your new MPT-based RAID controllers and your existing megaraid driver,
then perhaps you need a single small helper module (lsiioctl or some
better name), loaded by both mptraid and megaraid automatically, which
handles registering the /dev/megaraid node dynamically. In this case,
both mptraid and megaraid would register with lsiioctl for each
adapter discovered, and lsiioctl would essentially be a switch,
redirecting userspace tool ioctls to the appropriate driver."
- Matt Domsch, (Matt_Domsch@dell.com), 02.25.2004 LKML
Design:
------
The Common Management Module is implemented in megaraid_mm.[ch] files. This
module acts as a registry for low level hba drivers. The low level drivers
(currently only megaraid) register each controller with the common module.
The applications interface with the common module via the character device
node exported by the module.
The lower level drivers now understand only a new improved ioctl packet called
uioc_t. The management module converts the older ioctl packets from the older
applications into uioc_t. After driver handles the uioc_t, the common module
will convert that back into the old format before returning to applications.
As new applications evolve and replace the old ones, the old packet format
will be retired.
Common module dedicates one uioc_t packet to each controller registered. This
can easily be more than one. But since megaraid is the only low level driver
today, and it can handle only one ioctl, there is no reason to have more. But
as new controller classes get added, this will be tuned appropriately.
This diff is collapsed.
......@@ -627,6 +627,8 @@ DC390/AM53C974 SCSI driver
P: Kurt Garloff
M: garloff@suse.de
W: http://www.garloff.de/kurt/linux/dc390/
P: Guennadi Liakhovetski
M: g.liakhovetski@gmx.de
S: Maintained
DECnet NETWORK LAYER
......@@ -957,6 +959,12 @@ L: sensors@stimpy.netroedge.com
W: http://www.lm-sensors.nu/
S: Maintained
I2O
P: Markus Lidel
M: markus.lidel@shadowconnect.com
W: http://i2o.shadowconnect.com/
S: Maintained
i386 BOOT CODE
P: Riley H. Williams
M: Riley@Williams.Name
......
......@@ -538,6 +538,7 @@ int scsi_cmd_ioctl(struct file *file, struct gendisk *bd_disk, unsigned int cmd,
* old junk scsi send command ioctl
*/
case SCSI_IOCTL_SEND_COMMAND:
printk(KERN_WARNING "program %s is using a deprecated SCSI ioctl, please convert it to SG_IO\n", current->comm);
err = -EINVAL;
if (!arg)
break;
......
......@@ -595,39 +595,6 @@ config HVCS
which will also be compiled when this driver is built as a
module.
config QIC02_TAPE
tristate "QIC-02 tape support"
help
If you have a non-SCSI tape drive like that, say Y.
To compile this driver as a module, choose M here: the
module will be called tpqic02.
config QIC02_DYNCONF
bool "Do you want runtime configuration for QIC-02"
depends on QIC02_TAPE
help
You can either configure this driver once and for all by editing a
header file (<file:include/linux/tpqic02.h>), in which case you
should say N, or you can fetch a program via anonymous FTP which is
able to configure this driver during runtime. The program to do
this is called 'qic02conf' and it is part of the
tpqic02-support-X.Y.tar.gz support package.
If you want to use the qic02conf program, say Y.
comment "Edit configuration parameters in ./include/linux/tpqic02.h!"
depends on QIC02_TAPE && !QIC02_DYNCONF
comment "Setting runtime QIC-02 configuration is done with qic02conf"
depends on QIC02_TAPE && QIC02_DYNCONF
comment "from the tpqic02-support package. It is available at"
depends on QIC02_TAPE && QIC02_DYNCONF
comment "metalab.unc.edu or ftp://titus.cfw.com/pub/Linux/util/"
depends on QIC02_TAPE && QIC02_DYNCONF
source "drivers/char/ipmi/Kconfig"
source "drivers/char/watchdog/Kconfig"
......
......@@ -1809,11 +1809,9 @@ static int idedisk_attach(ide_drive_t *drive)
if ((!drive->head || drive->head > 16) && !drive->select.b.lba) {
printk(KERN_ERR "%s: INVALID GEOMETRY: %d PHYSICAL HEADS?\n",
drive->name, drive->head);
ide_cacheflush_p(drive);
ide_unregister_subdriver(drive);
DRIVER(drive)->busy--;
goto failed;
}
drive->attach = 0;
} else
drive->attach = 1;
DRIVER(drive)->busy--;
g->minors = 1 << PARTN_BITS;
strcpy(g->devfs_name, drive->devfs_name);
......@@ -1821,7 +1819,6 @@ static int idedisk_attach(ide_drive_t *drive)
g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0;
set_capacity(g, current_capacity(drive));
g->fops = &idedisk_ops;
drive->attach = 1;
add_disk(g);
return 0;
failed:
......
......@@ -635,12 +635,11 @@ static void hwif_register (ide_hwif_t *hwif)
device_register(&hwif->gendev);
}
#ifdef CONFIG_PPC
static int wait_hwif_ready(ide_hwif_t *hwif)
{
int rc;
printk(KERN_INFO "Probing IDE interface %s...\n", hwif->name);
printk(KERN_DEBUG "Probing IDE interface %s...\n", hwif->name);
/* Let HW settle down a bit from whatever init state we
* come from */
......@@ -671,7 +670,6 @@ static int wait_hwif_ready(ide_hwif_t *hwif)
return rc;
}
#endif
/*
* This routine only knows how to look for drive units 0 and 1
......@@ -717,7 +715,6 @@ static void probe_hwif(ide_hwif_t *hwif)
local_irq_set(flags);
#ifdef CONFIG_PPC
/* This is needed on some PPCs and a bunch of BIOS-less embedded
* platforms. Typical cases are:
*
......@@ -738,8 +735,7 @@ static void probe_hwif(ide_hwif_t *hwif)
* BenH.
*/
if (wait_hwif_ready(hwif))
printk(KERN_WARNING "%s: Wait for ready failed before probe !\n", hwif->name);
#endif /* CONFIG_PPC */
printk(KERN_DEBUG "%s: Wait for ready failed before probe !\n", hwif->name);
/*
* Second drive should only exist if first drive was found,
......@@ -749,6 +745,18 @@ static void probe_hwif(ide_hwif_t *hwif)
ide_drive_t *drive = &hwif->drives[unit];
drive->dn = (hwif->channel ? 2 : 0) + unit;
(void) probe_for_drive(drive);
if (drive->present && hwif->present && unit == 1) {
if (strcmp(hwif->drives[0].id->model, drive->id->model) == 0 &&
/* Don't do this for noprobe or non ATA */
strcmp(drive->id->model, "UNKNOWN") &&
/* And beware of confused Maxtor drives that go "M0000000000"
"The SN# is garbage in the ID block..." [Eric] */
strncmp(drive->id->serial_no, "M0000000000000000000", 20) &&
strncmp(hwif->drives[0].id->serial_no, drive->id->serial_no, 20) == 0) {
printk(KERN_WARNING "ide-probe: ignoring undecoded slave\n");
drive->present = 0;
}
}
if (drive->present && !hwif->present) {
hwif->present = 1;
if (hwif->chipset != ide_4drives ||
......
......@@ -530,7 +530,6 @@ typedef struct os_dat_s {
*/
#define IDETAPE_DEBUG_INFO 0
#define IDETAPE_DEBUG_LOG 0
#define IDETAPE_DEBUG_LOG_VERBOSE 0
#define IDETAPE_DEBUG_BUGS 1
/*
......@@ -1260,70 +1259,6 @@ typedef struct {
*/
static idetape_chrdev_t idetape_chrdevs[MAX_HWIFS * MAX_DRIVES];
#if IDETAPE_DEBUG_LOG_VERBOSE
/*
* DO NOT REMOVE, BUILDING A VERBOSE DEBUG SCHEME FOR ATAPI
*/
char *idetape_sense_key_verbose(u8 idetape_sense_key)
{
switch (idetape_sense_key) {
default: {
char buf[22];
sprintf(buf, "IDETAPE_SENSE (0x%02x)", idetape_sense_key);
return(buf);
}
}
}
char *idetape_command_key_verbose(u8 idetape_command_key)
{
switch (idetape_command_key) {
case IDETAPE_TEST_UNIT_READY_CMD:
return("TEST_UNIT_READY_CMD");
case IDETAPE_REWIND_CMD:
return("REWIND_CMD");
case IDETAPE_REQUEST_SENSE_CMD:
return("REQUEST_SENSE_CMD");
case IDETAPE_READ_CMD:
return("READ_CMD");
case IDETAPE_WRITE_CMD:
return("WRITE_CMD");
case IDETAPE_WRITE_FILEMARK_CMD:
return("WRITE_FILEMARK_CMD");
case IDETAPE_SPACE_CMD:
return("SPACE_CMD");
case IDETAPE_INQUIRY_CMD:
return("INQUIRY_CMD");
case IDETAPE_ERASE_CMD:
return("ERASE_CMD");
case IDETAPE_MODE_SENSE_CMD:
return("MODE_SENSE_CMD");
case IDETAPE_MODE_SELECT_CMD:
return("MODE_SELECT_CMD");
case IDETAPE_LOAD_UNLOAD_CMD:
return("LOAD_UNLOAD_CMD");
case IDETAPE_PREVENT_CMD:
return("PREVENT_CMD");
case IDETAPE_LOCATE_CMD:
return("LOCATE_CMD");
case IDETAPE_READ_POSITION_CMD:
return("READ_POSITION_CMD");
case IDETAPE_READ_BUFFER_CMD:
return("READ_BUFFER_CMD");
case IDETAPE_SET_SPEED_CMD:
return("SET_SPEED_CMD");
default: {
char buf[20];
sprintf(buf, "CMD (0x%02x)", idetape_command_key);
return(buf);
}
}
}
#endif /* IDETAPE_DEBUG_LOG_VERBOSE */
/*
* Function declarations
*
......@@ -1507,15 +1442,6 @@ static void idetape_analyze_error (ide_drive_t *drive, idetape_request_sense_res
"asc = %x, ascq = %x\n",
pc->c[0], result->sense_key,
result->asc, result->ascq);
#if IDETAPE_DEBUG_LOG_VERBOSE
if (tape->debug_level >= 1)
printk(KERN_INFO "ide-tape: pc = %s, sense key = %x, "
"asc = %x, ascq = %x\n",
idetape_command_key_verbose((byte) pc->c[0]),
result->sense_key,
result->asc,
result->ascq);
#endif /* IDETAPE_DEBUG_LOG_VERBOSE */
#endif /* IDETAPE_DEBUG_LOG */
/*
......
......@@ -1348,23 +1348,6 @@ static int set_xfer_rate (ide_drive_t *drive, int arg)
return err;
}
int ide_atapi_to_scsi (ide_drive_t *drive, int arg)
{
if (drive->media == ide_disk) {
drive->scsi = 0;
return 0;
}
if (DRIVER(drive)->cleanup(drive)) {
drive->scsi = 0;
return 0;
}
drive->scsi = (u8) arg;
ata_attach(drive);
return 0;
}
void ide_add_generic_settings (ide_drive_t *drive)
{
/*
......@@ -1379,8 +1362,6 @@ void ide_add_generic_settings (ide_drive_t *drive)
ide_add_setting(drive, "init_speed", SETTING_RW, -1, -1, TYPE_BYTE, 0, 70, 1, 1, &drive->init_speed, NULL);
ide_add_setting(drive, "current_speed", SETTING_RW, -1, -1, TYPE_BYTE, 0, 70, 1, 1, &drive->current_speed, set_xfer_rate);
ide_add_setting(drive, "number", SETTING_RW, -1, -1, TYPE_BYTE, 0, 3, 1, 1, &drive->dn, NULL);
if (drive->media != ide_disk)
ide_add_setting(drive, "ide-scsi", SETTING_RW, -1, HDIO_SET_IDE_SCSI, TYPE_BYTE, 0, 1, 1, 1, &drive->scsi, ide_atapi_to_scsi);
}
int system_bus_clock (void)
......
......@@ -10,6 +10,5 @@ obj-$(CONFIG_BLK_DEV_IDECS) += ide-cs.o
# Last of all
obj-$(CONFIG_BLK_DEV_HD) += hd.o
obj-$(CONFIG_BLK_DEV_HD98) += hd98.o
EXTRA_CFLAGS := -Idrivers/ide
......@@ -354,15 +354,6 @@ static ide_startstop_t promise_read_intr (ide_drive_t *drive)
(unsigned long)rq->nr_sectors - nsect);
#endif /* DEBUG_READ */
#ifdef CONFIG_IDE_TASKFILE_IO
task_bio_sectors(drive, rq, nsect, IDE_PIO_IN);
/* FIXME: can we check status after transfer on pdc4030? */
/* Complete previously submitted bios. */
while (rq->bio != rq->cbio)
if (!DRIVER(drive)->end_request(drive, 1, bio_sectors(rq->bio)))
return ide_stopped;
#else /* CONFIG_IDE_TASKFILE_IO */
HWIF(drive)->ata_input_data(drive, rq->buffer, nsect * SECTOR_WORDS);
rq->buffer += nsect<<9;
rq->sector += nsect;
......@@ -370,7 +361,6 @@ static ide_startstop_t promise_read_intr (ide_drive_t *drive)
rq->nr_sectors -= nsect;
if (!rq->current_nr_sectors)
DRIVER(drive)->end_request(drive, 1, 0);
#endif /* CONFIG_IDE_TASKFILE_IO */
/*
* Now the data has been read in, do the following:
......@@ -421,12 +411,8 @@ static ide_startstop_t promise_read_intr (ide_drive_t *drive)
static ide_startstop_t promise_complete_pollfunc(ide_drive_t *drive)
{
ide_hwgroup_t *hwgroup = HWGROUP(drive);
#ifdef CONFIG_IDE_TASKFILE_IO
struct request *rq = hwgroup->rq;
#else
struct request *rq = &hwgroup->wrq;
struct bio *bio = rq->bio;
#endif
if ((HWIF(drive)->INB(IDE_STATUS_REG)) & BUSY_STAT) {
if (time_before(jiffies, hwgroup->poll_timeout)) {
......@@ -450,15 +436,10 @@ static ide_startstop_t promise_complete_pollfunc(ide_drive_t *drive)
printk(KERN_DEBUG "%s: Write complete - end_request\n", drive->name);
#endif /* DEBUG_WRITE */
#ifdef CONFIG_IDE_TASKFILE_IO
/* Complete previously submitted bios. */
while (rq->bio != rq->cbio)
(void) DRIVER(drive)->end_request(drive, 1, bio_sectors(rq->bio));
#else
bio->bi_idx = bio->bi_vcnt - rq->nr_cbio_segments;
rq = hwgroup->rq;
DRIVER(drive)->end_request(drive, 1, rq->hard_nr_sectors);
#endif
return ide_stopped;
}
......@@ -466,27 +447,6 @@ static ide_startstop_t promise_complete_pollfunc(ide_drive_t *drive)
* promise_multwrite() transfers a block of up to mcount sectors of data
* to a drive as part of a disk multiple-sector write operation.
*/
#ifdef CONFIG_IDE_TASKFILE_IO
static void promise_multwrite (ide_drive_t *drive, unsigned int msect)
{
struct request* rq = HWGROUP(drive)->rq;
unsigned int nsect;
rq->errors = 0;
do {
nsect = rq->current_nr_sectors;
if (nsect > msect)
nsect = msect;
task_bio_sectors(drive, rq, nsect, IDE_PIO_OUT);
if (!rq->nr_sectors)
msect = 0;
else
msect -= nsect;
} while (msect);
}
#else /* CONFIG_IDE_TASKFILE_IO */
static void promise_multwrite (ide_drive_t *drive, unsigned int mcount)
{
ide_hwgroup_t *hwgroup = HWGROUP(drive);
......@@ -537,7 +497,6 @@ static void promise_multwrite (ide_drive_t *drive, unsigned int mcount)
taskfile_output_data(drive, buffer, nsect<<7);
} while (mcount);
}
#endif
/*
* promise_write_pollfunc() is the handler for disk write completion polling.
......@@ -545,12 +504,8 @@ static void promise_multwrite (ide_drive_t *drive, unsigned int mcount)
static ide_startstop_t promise_write_pollfunc (ide_drive_t *drive)
{
ide_hwgroup_t *hwgroup = HWGROUP(drive);
#ifdef CONFIG_IDE_TASKFILE_IO
struct request *rq = hwgroup->rq;
#else
struct request *rq = &hwgroup->wrq;
struct bio *bio = rq->bio;
#endif
if (HWIF(drive)->INB(IDE_NSECTOR_REG) != 0) {
if (time_before(jiffies, hwgroup->poll_timeout)) {
......@@ -564,19 +519,11 @@ static ide_startstop_t promise_write_pollfunc (ide_drive_t *drive)
}
hwgroup->poll_timeout = 0;
printk(KERN_ERR "%s: write timed-out!\n",drive->name);
#ifndef CONFIG_IDE_TASKFILE_IO
bio->bi_idx = bio->bi_vcnt - rq->nr_cbio_segments;
#endif
return DRIVER(drive)->error(drive, "write timeout",
HWIF(drive)->INB(IDE_STATUS_REG));
}
#ifdef CONFIG_IDE_TASKFILE_IO
/* Complete previously submitted bios. */
while (rq->bio != rq->cbio)
(void) DRIVER(drive)->end_request(drive, 1, bio_sectors(rq->bio));
#endif
/*
* Now write out last 4 sectors and poll for not BUSY
*/
......@@ -602,11 +549,7 @@ static ide_startstop_t promise_write_pollfunc (ide_drive_t *drive)
static ide_startstop_t promise_write (ide_drive_t *drive)
{
ide_hwgroup_t *hwgroup = HWGROUP(drive);
#ifdef CONFIG_IDE_TASKFILE_IO
struct request *rq = hwgroup->rq;
#else
struct request *rq = &hwgroup->wrq;
#endif
#ifdef DEBUG_WRITE
printk(KERN_DEBUG "%s: %s: sectors(%lu-%lu)\n",
......@@ -654,39 +597,14 @@ static ide_startstop_t promise_write (ide_drive_t *drive)
* 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.
*/
#ifndef CONFIG_IDE_TASKFILE_IO
ide_startstop_t do_pdc4030_io (ide_drive_t *drive, struct request *rq)
{
ide_startstop_t startstop;
unsigned long timeout;
u8 stat = 0;
#else
static ide_startstop_t do_pdc4030_io (ide_drive_t *drive, ide_task_t *task)
{
struct request *rq = HWGROUP(drive)->rq;
task_struct_t *taskfile = (task_struct_t *) task->tfRegister;
ide_startstop_t startstop;
unsigned long timeout;
u8 stat = 0;
if (IDE_CONTROL_REG)
HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG); /* clear nIEN */
SELECT_MASK(drive, 0);
HWIF(drive)->OUTB(taskfile->feature, IDE_FEATURE_REG);
HWIF(drive)->OUTB(taskfile->sector_count, IDE_NSECTOR_REG);
/* refers to number of sectors to transfer */
HWIF(drive)->OUTB(taskfile->sector_number, IDE_SECTOR_REG);
/* refers to sector offset or start sector */
HWIF(drive)->OUTB(taskfile->low_cylinder, IDE_LCYL_REG);
HWIF(drive)->OUTB(taskfile->high_cylinder, IDE_HCYL_REG);
HWIF(drive)->OUTB(taskfile->device_head, IDE_SELECT_REG);
HWIF(drive)->OUTB(taskfile->command, IDE_COMMAND_REG);
#endif
if (rq_data_dir(rq) == READ) {
#ifndef CONFIG_IDE_TASKFILE_IO
HWIF(drive)->OUTB(PROMISE_READ, IDE_COMMAND_REG);
#endif
/*
* The card's behaviour is odd at this point. If the data is
* available, DRQ will be true, and no interrupt will be
......@@ -722,9 +640,7 @@ static ide_startstop_t do_pdc4030_io (ide_drive_t *drive, ide_task_t *task)
"waiting - Odd!\n", drive->name);
return ide_stopped;
} else {
#ifndef CONFIG_IDE_TASKFILE_IO
HWIF(drive)->OUTB(PROMISE_WRITE, IDE_COMMAND_REG);
#endif
if (ide_wait_stat(&startstop, drive, DATA_READY,
drive->bad_wstat, WAIT_DRQ)) {
printk(KERN_ERR "%s: no DRQ after issuing "
......@@ -733,9 +649,7 @@ static ide_startstop_t do_pdc4030_io (ide_drive_t *drive, ide_task_t *task)
}
if (!drive->unmask)
local_irq_disable();
#ifndef CONFIG_IDE_TASKFILE_IO
HWGROUP(drive)->wrq = *rq; /* scratchpad */
#endif
return promise_write(drive);
}
}
......@@ -749,14 +663,9 @@ static ide_startstop_t promise_rw_disk (ide_drive_t *drive, struct request *rq,
*/
ide_hwif_t *hwif = HWIF(drive);
int drive_number = (hwif->channel << 1) + drive->select.b.unit;
#ifdef CONFIG_IDE_TASKFILE_IO
struct hd_drive_task_hdr taskfile;
ide_task_t args;
#endif
BUG_ON(rq->nr_sectors > 127);
#ifndef CONFIG_IDE_TASKFILE_IO
if (IDE_CONTROL_REG)
hwif->OUTB(drive->ctl, IDE_CONTROL_REG);
hwif->OUTB(drive_number, IDE_FEATURE_REG);
......@@ -767,27 +676,4 @@ static ide_startstop_t promise_rw_disk (ide_drive_t *drive, struct request *rq,
hwif->OUTB(((block>>8)&0x0f)|drive->select.all,IDE_SELECT_REG);
return do_pdc4030_io(drive, rq);
#else /* !CONFIG_IDE_TASKFILE_IO */
memset(&taskfile, 0, sizeof(struct hd_drive_task_hdr));
taskfile.feature = drive_number;
taskfile.sector_count = rq->nr_sectors;
taskfile.sector_number = block;
taskfile.low_cylinder = (block>>=8);
taskfile.high_cylinder = (block>>=8);
taskfile.device_head = ((block>>8)&0x0f)|drive->select.all;
taskfile.command = (rq->cmd==READ)?PROMISE_READ:PROMISE_WRITE;
memcpy(args.tfRegister, &taskfile, sizeof(struct hd_drive_task_hdr));
memset(args.hobRegister, 0, sizeof(struct hd_drive_hob_hdr));
/*
* Setup the bits of args that we do need.
* Note that we don't use the generic interrupt handlers.
*/
args.handler = NULL;
args.rq = (struct request *) rq;
rq->special = (ide_task_t *)&args;
return do_pdc4030_io(drive, &args);
#endif /* !CONFIG_IDE_TASKFILE_IO */
}
......@@ -290,7 +290,10 @@ static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_devic
return 1;
}
pci_set_master(dev);
pci_set_dma_mask(dev, 0xFFFFFFFF);
if (pci_set_dma_mask(dev, 0xFFFFFFFF)) {
printk(KERN_WARNING "cs5520: No suitable DMA available.\n");
return -ENODEV;
}
init_chipset_cs5520(dev, d->name);
index.all = 0xf0f0;
......
......@@ -27,39 +27,6 @@ config FUSION_MAX_SGE
necessary (or recommended) unless the user will be running
large I/O's via the raw interface.
config FUSION_ISENSE
tristate "Enhanced SCSI error reporting"
depends on MODULES && FUSION && m
---help---
The isense module (roughly stands for Interpret SENSE data) is
completely optional. It simply provides extra English readable
strings in SCSI Error Report(s) that might be generated from the
Fusion MPT SCSI Host driver, for example when a target device
returns a SCSI check condition on a I/O. Without this module
loaded you might see:
SCSI Error Report =-=-= (ioc0,scsi5:0)
SCSI_Status=02h (CHECK_CONDITION)
Original_CDB[]: 2A 00 00 00 00 41 00 00 02 00
SenseData[12h]: 70 00 02 00 00 00 00 0A 00 00 00 00 04 02 02 00 00 00
SenseKey=2h (NOT READY); FRU=02h
ASC/ASCQ=29h/00h
Where otherwise, if this module had been loaded, you would see:
SCSI Error Report =-=-= (ioc0,scsi5:0)
SCSI_Status=02h (CHECK_CONDITION)
Original_CDB[]: 2A 00 00 00 00 41 00 00 02 00 - "WRITE(10)"
SenseData[12h]: 70 00 02 00 00 00 00 0A 00 00 00 00 04 02 02 00 00 00
SenseKey=2h (NOT READY); FRU=02h
ASC/ASCQ=29h/00h "LOGICAL UNIT NOT READY, INITIALIZING CMD. REQUIRED"
Say M for "Enhanced SCSI error reporting" to compile this optional module,
creating a driver named: isense.
NOTE: Support for building this feature into the kernel is not
available, due to kernel size considerations.
config FUSION_CTL
tristate "Fusion MPT misc device (ioctl) driver"
depends on MODULES && FUSION && m
......
......@@ -2,7 +2,7 @@
# Makefile for the LSI Logic Fusion MPT (Message Passing Technology) drivers.
#
# Note! If you want to turn on various debug defines for an extended period of
# time but don't want them lingering around in the Makefile when you pass it on
# time but don't want them lingering around in the Makefile when you pass it on
# to someone else, use the MPT_CFLAGS env variable (thanks Steve). -nromer
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-{ LSI_LOGIC
......@@ -48,6 +48,5 @@ EXTRA_CFLAGS += ${MPT_CFLAGS}
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-} LSI_LOGIC
obj-$(CONFIG_FUSION) += mptbase.o mptscsih.o
obj-$(CONFIG_FUSION_ISENSE) += isense.o
obj-$(CONFIG_FUSION_CTL) += mptctl.o
obj-$(CONFIG_FUSION_LAN) += mptlan.o
This diff is collapsed.
#!/bin/sh
#
# ascq_tbl.sh - Translate SCSI t10.org's "asc-num.txt" file of
# SCSI Additional Sense Code & Qualifiers (ASC/ASCQ's)
# into something useful in C, creating "ascq_tbl.c" file.
#
#*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*#
PREF_INFILE="t10.org/asc-num.txt" # From SCSI t10.org
PREF_OUTFILE="ascq_tbl.c"
#*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*#
xlate_ascq() {
cat | awk '
BEGIN {
DQ = "\042";
OUTFILE = "'"${PREF_OUTFILE}"'";
TRUE = 1;
FALSE = 0;
#debug = TRUE;
# read and discard all lines up to and including the one that begins
# with the "magic token" of "------- -------------- ---"...
headers_gone = FALSE;
while (!headers_gone) {
if (getline <= 0)
exit 1;
header_line[++hdrs] = $0;
if (debug)
printf("header_line[%d] = :%s:\n", ++hdrs, $0);
if ($0 ~ /^------- -------------- ---/) {
headers_gone = TRUE;
}
}
outcount = 0;
}
(NF > 1) {
++outcount;
if (debug)
printf( "DBG: %s\n", $0 );
ASC[outcount] = substr($0,1,2);
ASCQ[outcount] = substr($0,5,2);
devtypes = substr($0,10,14);
gsub(/ /, ".", devtypes);
DESCRIP[outcount] = substr($0,26);
if (!(devtypes in DevTypesVoodoo)) {
DevTypesVoodoo[devtypes] = ++voodoo;
DevTypesIdx[voodoo] = devtypes;
}
DEVTYPES[outcount] = DevTypesVoodoo[devtypes];
# Handle 0xNN exception stuff...
if (ASCQ[outcount] == "NN" || ASCQ[outcount] == "nn")
ASCQ[outcount] = "FF";
}
END {
printf("#ifndef SCSI_ASCQ_TBL_C_INCLUDED\n") > OUTFILE;
printf("#define SCSI_ASCQ_TBL_C_INCLUDED\n") >> OUTFILE;
printf("\n/* AuToMaGiCaLlY generated from: %s'"${FIN}"'%s\n", DQ, DQ) >> OUTFILE;
printf(" *******************************************************************************\n") >> OUTFILE;
for (i=1; i<=hdrs; i++) {
printf(" * %s\n", header_line[i]) >> OUTFILE;
}
printf(" */\n") >> OUTFILE;
printf("\n") >> OUTFILE;
for (i=1; i<=voodoo; i++) {
printf("static char SenseDevTypes%03d[] = %s%s%s;\n", i, DQ, DevTypesIdx[i], DQ) >> OUTFILE;
}
printf("\nstatic ASCQ_Table_t ASCQ_Table[] = {\n") >> OUTFILE;
for (i=1; i<=outcount; i++) {
printf(" {\n") >> OUTFILE;
printf(" 0x%s, 0x%s,\n", ASC[i], ASCQ[i]) >> OUTFILE;
printf(" SenseDevTypes%03d,\n", DEVTYPES[i]) >> OUTFILE;
printf(" %s%s%s\n", DQ, DESCRIP[i], DQ) >> OUTFILE;
printf(" },\n") >> OUTFILE;
}
printf( "};\n\n" ) >> OUTFILE;
printf( "static int ASCQ_TableSize = %d;\n\n", outcount ) >> OUTFILE;
printf( "Total of %d ASC/ASCQ records generated\n", outcount );
printf("\n#endif\n") >> OUTFILE;
close(OUTFILE);
}'
return
}
#*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*#
# main()
if [ $# -lt 1 ]; then
echo "INFO: No input filename supplied - using: $PREF_INFILE" >&2
FIN=$PREF_INFILE
else
FIN="$1"
if [ "$FIN" != "$PREF_INFILE" ]; then
echo "INFO: Ok, I'll try chewing on '$FIN' for SCSI ASC/ASCQ combos..." >&2
fi
shift
fi
cat $FIN | xlate_ascq
exit 0
/*
* linux/drivers/message/fusion/isense.c
* Little linux driver / shim that interfaces with the Fusion MPT
* Linux base driver to provide english readable strings in SCSI
* Error Report logging output. This module implements SCSI-3
* Opcode lookup and a sorted table of SCSI-3 ASC/ASCQ strings.
*
* Copyright (c) 1991-2004 Steven J. Ralston
* Written By: Steven J. Ralston
* (yes I wrote some of the orig. code back in 1991!)
* (mailto:sjralston1@netscape.net)
* (mailto:mpt_linux_developer@lsil.com)
*
* $Id: isense.c,v 1.33 2002/02/27 18:44:19 sralston Exp $
*/
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*
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; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
NO WARRANTY
THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT
LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is
solely responsible for determining the appropriateness of using and
distributing the Program and assumes all risks associated with its
exercise of rights under this Agreement, including but not limited to
the risks and costs of program errors, damage to or loss of data,
programs or equipment, and unavailability or interruption of operations.
DISCLAIMER OF LIABILITY
NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <asm/io.h>
#define MODULEAUTHOR "Steven J. Ralston"
#define COPYRIGHT "Copyright (c) 2001-2004 " MODULEAUTHOR
#include "mptbase.h"
#include "isense.h"
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*
* Private data...
*/
/*
* YIKES! I don't usually #include C source files, but..
* The following #include's pulls in our needed ASCQ_Table[] array,
* ASCQ_TableSz integer, and ScsiOpcodeString[] array!
*/
#include "ascq_tbl.c"
#include "scsiops.c"
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#define my_NAME "SCSI-3 Opcodes & ASC/ASCQ Strings"
#define my_VERSION MPT_LINUX_VERSION_COMMON
#define MYNAM "isense"
MODULE_AUTHOR(MODULEAUTHOR);
MODULE_DESCRIPTION(my_NAME);
MODULE_LICENSE("GPL");
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
int __init isense_init(void)
{
show_mptmod_ver(my_NAME, my_VERSION);
/*
* Install our handler
*/
if (mpt_register_ascqops_strings(&ASCQ_Table[0], ASCQ_TableSize, ScsiOpcodeString) != 1)
{
printk(KERN_ERR MYNAM ": ERROR: Can't register with Fusion MPT base driver!\n");
return -EBUSY;
}
printk(KERN_INFO MYNAM ": Registered SCSI-3 Opcodes & ASC/ASCQ Strings\n");
return 0;
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
static void isense_exit(void)
{
#ifdef MODULE
mpt_deregister_ascqops_strings();
#endif
printk(KERN_INFO MYNAM ": Deregistered SCSI-3 Opcodes & ASC/ASCQ Strings\n");
}
module_init(isense_init);
module_exit(isense_exit);
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#ifndef ISENSE_H_INCLUDED
#define ISENSE_H_INCLUDED
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#ifdef __KERNEL__
#include <linux/types.h> /* needed for u8, etc. */
#include <linux/string.h> /* needed for strcat */
#include <linux/kernel.h> /* needed for sprintf */
#else
#ifndef U_STUFF_DEFINED
#define U_STUFF_DEFINED
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
#endif
#endif
#include "scsi3.h" /* needed for all things SCSI */
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*
* Defines and typedefs...
*/
#ifdef __KERNEL__
#define PrintF(x) printk x
#else
#define PrintF(x) printf x
#endif
#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif
#define RETRY_STATUS ((int) 1)
#define PUT_STATUS ((int) 0)
/*
* A generic structure to hold info about IO request that caused
* a Request Sense to be performed, and the resulting Sense Data.
*/
typedef struct IO_Info
{
char *DevIDStr; /* String of chars which identifies the device. */
u8 *cdbPtr; /* Pointer (Virtual/Logical addr) to CDB bytes of
IO request that caused ContAllegianceCond. */
u8 *sensePtr; /* Pointer (Virtual/Logical addr) to Sense Data
returned by Request Sense operation. */
u8 *dataPtr; /* Pointer (Virtual/Logical addr) to Data buffer
of IO request caused ContAllegianceCondition. */
u8 *inqPtr; /* Pointer (Virtual/Logical addr) to Inquiry Data for
IO *Device* that caused ContAllegianceCondition. */
u8 SCSIStatus; /* SCSI status byte of IO request that caused
Contingent Allegiance Condition. */
u8 DoDisplay; /* Shall we display any messages? */
u16 rsvd_align1;
u32 ComplCode; /* Four-byte OS-dependent completion code. */
u32 NotifyL; /* Four-byte OS-dependent notification field. */
} IO_Info_t;
/*
* SCSI Additional Sense Code and Additional Sense Code Qualifier table.
*/
typedef struct ASCQ_Table
{
u8 ASC;
u8 ASCQ;
char *DevTypes;
char *Description;
} ASCQ_Table_t;
#if 0
/*
* SCSI Opcodes table.
*/
typedef struct SCSI_OPS_Table
{
u8 OpCode;
char *DevTypes;
char *ScsiCmndStr;
} SCSI_OPS_Table_t;
#endif
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*
* Public entry point prototypes
*/
/* in scsiherr.c, needed by mptscsih.c */
extern int mpt_ScsiHost_ErrorReport(IO_Info_t *ioop);
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#endif
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.
......@@ -5,6 +5,7 @@
# In the future, some of these should be built conditionally.
#
i2o_core-y += iop.o driver.o device.o debug.o pci.o exec-osm.o
obj-$(CONFIG_I2O) += i2o_core.o
obj-$(CONFIG_I2O_CONFIG)+= i2o_config.o
obj-$(CONFIG_I2O_BLOCK) += i2o_block.o
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* Block OSM structures/API
*
* Copyright (C) 1999-2002 Red Hat Software
*
* Written by Alan Cox, Building Number Three Ltd
*
* 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.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* For the purpose of avoiding doubt the preferred form of the work
* for making modifications shall be a standards compliant form such
* gzipped tar and not one requiring a proprietary or patent encumbered
* tool to unpack.
*
* Fixes/additions:
* Steve Ralston:
* Multiple device handling error fixes,
* Added a queue depth.
* Alan Cox:
* FC920 has an rmw bug. Dont or in the end marker.
* Removed queue walk, fixed for 64bitness.
* Rewrote much of the code over time
* Added indirect block lists
* Handle 64K limits on many controllers
* Don't use indirects on the Promise (breaks)
* Heavily chop down the queue depths
* Deepak Saxena:
* Independent queues per IOP
* Support for dynamic device creation/deletion
* Code cleanup
* Support for larger I/Os through merge* functions
* (taken from DAC960 driver)
* Boji T Kannanthanam:
* Set the I2O Block devices to be detected in increasing
* order of TIDs during boot.
* Search and set the I2O block device that we boot off
* from as the first device to be claimed (as /dev/i2o/hda)
* Properly attach/detach I2O gendisk structure from the
* system gendisk list. The I2O block devices now appear in
* /proc/partitions.
* Markus Lidel <Markus.Lidel@shadowconnect.com>:
* Minor bugfixes for 2.6.
*/
#ifndef I2O_BLOCK_OSM_H
#define I2O_BLOCK_OSM_H
#define I2O_BLOCK_RETRY_TIME HZ/4
#define I2O_BLOCK_MAX_OPEN_REQUESTS 50
/* I2O Block OSM mempool struct */
struct i2o_block_mempool {
kmem_cache_t *slab;
mempool_t *pool;
};
/* I2O Block device descriptor */
struct i2o_block_device {
struct i2o_device *i2o_dev; /* pointer to I2O device */
struct gendisk *gd;
spinlock_t lock; /* queue lock */
struct list_head open_queue; /* list of transfered, but unfinished
requests */
unsigned int open_queue_depth; /* number of requests in the queue */
int rcache; /* read cache flags */
int wcache; /* write cache flags */
int flags;
int power; /* power state */
int media_change_flag; /* media changed flag */
};
/* I2O Block device request */
struct i2o_block_request
{
struct list_head queue;
struct request *req; /* corresponding request */
struct i2o_block_device *i2o_blk_dev; /* I2O block device */
int sg_dma_direction; /* direction of DMA buffer read/write */
int sg_nents; /* number of SG elements */
struct scatterlist sg_table[I2O_MAX_SEGMENTS]; /* SG table */
};
/* I2O Block device delayed request */
struct i2o_block_delayed_request
{
struct work_struct work;
struct request_queue *queue;
};
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -225,10 +225,22 @@
1000 0530 MegaRAID 530 SCSI 320-0X RAID Controller
1000 0531 MegaRAID 531 SCSI 320-4X RAID Controller
1000 0532 MegaRAID 532 SCSI 320-2X RAID Controller
1028 0533 PowerEdge Expandable RAID Controller 4/QC
8086 0532 Storage RAID Controller SRCU42X
1028 0531 PowerEdge Expandable RAID Controller 4/QC
8086 0530 MegaRAID Intel RAID Controller SRCZCRX
8086 0532 MegaRAID Intel RAID Controller SRCU42X
0408 MegaRAID
1028 0002 PowerEdge Expandable RAID Controller 4e/DC
1000 0001 MegaRAID SCSI 320-1E RAID Controller
1000 0002 MegaRAID SCSI 320-2E RAID Controller
1028 0001 Dell PowerEdge RAID Controller PERC4e/SC
1028 0002 Dell PowerEdge RAID Controller PERC4e/DC
1734 1065 FSC MegaRAID PCI Express ROMB
8086 0002 MegaRAID Intel RAID Controller SRCU42E
0409 MegaRAID
1000 3004 MegaRAID SATA 300-4X RAID Controller
1000 3008 MegaRAID SATA 300-8X RAID Controller
8086 3008 MegaRAID Intel RAID Controller SRCS28X
8086 3431 MegaRAID Intel RAID Controller Alief SROMBU42E
8086 3499 MegaRAID Intel RAID Controller Harwich SROMBU42E
0621 FC909 Fibre Channel Adapter
0622 FC929 Fibre Channel Adapter
1000 1020 44929 O Dual Fibre Channel card
......@@ -252,7 +264,7 @@
1960 MegaRAID
1000 0518 MegaRAID 518 SCSI 320-2 Controller
1000 0520 MegaRAID 520 SCSI 320-1 Controller
1000 0522 MegaRAID 522 i4133 RAID Controller
1000 0522 MegaRAID 522 i4 133 RAID Controller
1000 0523 MegaRAID SATA 150-6 RAID Controller
1000 4523 MegaRAID SATA 150-4 RAID Controller
1000 a520 MegaRAID ZCR SCSI 320-0 Controller
......@@ -260,6 +272,8 @@
1028 0520 MegaRAID 520 DELL PERC 4/SC RAID Controller
1028 0531 PowerEdge Expandable RAID Controller 4/QC
1028 0533 PowerEdge Expandable RAID Controller 4/QC
8086 0520 MegaRAID Intel RAID Controller SRCU41L
8086 0523 MegaRAID Intel RAID Controller SRCS16
1001 Kolter Electronic
0010 PCI 1616 Measurement card with 32 digital I/O lines
0011 OPTO-PCI Opto-Isolated digital I/O board
......@@ -959,6 +973,7 @@
0180 Snipe chipset SCSI controller
1014 0241 iSeries 2757 DASD IOA
1014 0264 Quad Channel PCI-X U320 SCSI RAID Adapter (2780)
1014 02BD Quad Channel PCI-X U320 DDR SCSI RAID Adapter (570F)
01a7 PCI-X to PCI-X Bridge
01bd ServeRAID Controller
1014 01be ServeRAID-4M
......@@ -981,6 +996,8 @@
0266 PCI-X Dual Channel SCSI
0268 Gigabit Ethernet-SX Adapter (PCI-X)
0269 10/100/1000 Base-TX Ethernet Adapter (PCI-X)
028C Citrine chipset SCSI controller
1014 02BE Dual Channel PCI-X U320 DDR SCSI RAID Adapter (571B)
0302 X-Architecture Bridge [Summit]
ffff MPIC-2 interrupt controller
1015 LSI Logic Corp of Canada
......@@ -1244,6 +1261,8 @@
1028 016c PowerEdge Expandable RAID Controller 4e/Si
1028 016d PowerEdge Expandable RAID Controller 4e/Di
1028 016e PowerEdge Expandable RAID Controller 4e/Di
1028 016f PowerEdge Expandable RAID Controller 4e/Di
1028 0170 PowerEdge Expandable RAID Controller 4e/Di
0014 Remote Access Card 4 Daughter Card SMIC interface
1029 Siemens Nixdorf IS
102a LSI Logic
......@@ -2118,6 +2137,8 @@
1014 0242 iSeries 2872 DASD IOA
1014 0266 Dual Channel PCI-X U320 SCSI Adapter
1014 0278 Dual Channel PCI-X U320 SCSI RAID Adapter
1014 02D3 Dual Channel PCI-X U320 SCSI Adapter
1014 02D4 Dual Channel PCI-X U320 SCSI RAID Adapter
ba55 eXtremeRAID 1100 support Device
ba56 eXtremeRAID 2000/3000 support Device
106a Aten Research Inc
......
This diff is collapsed.
......@@ -95,7 +95,8 @@ obj-$(CONFIG_SCSI_IBMMCA) += ibmmca.o
obj-$(CONFIG_SCSI_EATA) += eata.o
obj-$(CONFIG_SCSI_DC395x) += dc395x.o
obj-$(CONFIG_SCSI_DC390T) += tmscsim.o
obj-$(CONFIG_SCSI_MEGARAID) += megaraid.o
obj-$(CONFIG_MEGARAID_LEGACY) += megaraid.o
obj-$(CONFIG_MEGARAID_NEWGEN) += megaraid/
obj-$(CONFIG_SCSI_ACARD) += atp870u.o
obj-$(CONFIG_SCSI_SUNESP) += esp.o
obj-$(CONFIG_SCSI_GDTH) += gdth.o
......@@ -119,6 +120,7 @@ obj-$(CONFIG_SCSI_CPQFCTS) += cpqfc.o
obj-$(CONFIG_SCSI_LASI700) += 53c700.o lasi700.o
obj-$(CONFIG_SCSI_NSP32) += nsp32.o
obj-$(CONFIG_SCSI_IPR) += ipr.o
obj-$(CONFIG_SCSI_IBMVSCSI) += ibmvscsi/
obj-$(CONFIG_SCSI_SATA_SVW) += libata.o sata_svw.o
obj-$(CONFIG_SCSI_ATA_PIIX) += libata.o ata_piix.o
obj-$(CONFIG_SCSI_SATA_PROMISE) += libata.o sata_promise.o
......
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.
obj-$(CONFIG_MEGARAID_MM) += megaraid_mm.o
obj-$(CONFIG_MEGARAID_MAILBOX) += megaraid_mbox.o
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