Commit a4c91676 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://linux-scsi.bkbits.net/scsi-for-linus-2.6

into home.osdl.org:/home/torvalds/v2.5/linux
parents 13d06909 14cf42d2
SUBJECT
-------
AM53/79C974 PC-SCSI Driver
DISCLAIMER
----------
*** THIS SHOULD BE CONSIDERED AS BETA SOFTWARE ***
*** USE AT YOUR OWN RISK! ***
Copyright
---------
The architecture and much of the code of this device driver was
originally developed by Drew Eckhardt for the NCR5380. The
following copyrights apply:
For the architecture and all pieces of code which can also be found
in the NCR5380 device driver:
Copyright 1993, Drew Eckhardt
Visionary Computing
(Unix and Linux consulting and custom programming)
drew@colorado.edu
+1 (303) 666-5836
The AM53C974_nobios_detect code was originally developed by
Robin Cutshaw (robin@xfree86.org) and is used here in a
slightly modified form.
For the remaining code:
Copyright 1994, D. Frieauff
EMail: fri@rsx42sun0.dofn.de
Phone: x49-7545-8-2256 , x49-7541-42305
Version
-------
AM53/79C974 (PC-SCSI) Linux driver ALPHA release 0.5, 19 November 1995
Changelog
---------
0.1 -> 0.2:
- Extended message handling re-written to eliminate 'invalid message 17' bug
- Parameters of AM53C974_intr adapted
- Debug messages structured
- Spelling improved
0.2 -> 0.3:
- README file updated -- please read this file up to the end!
- Automatic scanning of io_port and irq implemented; no need for BIOS32
anymore
- Improved configuration (now via LILO parameter string)
- Cleanup of probing and initialization code
- Improved sync. negotiation (can be setup individually for every device)
- Improved/ debugged code for reception of ext. messages
0.3 -> 0.4:
- Improved PCI probing and initialization code
- Compatibility changes for Linux 1.3.x
0.4 -> 0.5:
- Compatibility changes for Linux 1.3.42
Bugs & Todo
-----------
- Add proc info function
- Support SCSI-2 tagged queuing
- Finalize abort code
Features
--------
This driver supports asynchronous and synchronous SCSI-I and SCSI-II
devices. It is capable of transfer rate and synchronous negotiation
(see below). The driver supports scatter-gather. Transfers are DMA
based, but do not (yet) make use of the AM53/79C974 MDL mode.
Max. transfer rate is 10MHz (whatever this is in real life). The
transfer rate is negotiated with each device (see dmesg output). The
AM53/79C974 has a 96-byte DMA FIFO to the PCI bus and a 16-byte SCSI
FIFO. It provides active negation and glitch suppression functions.
Burst DMA transfer rate is 132 MBytes/sec.
Configuration
-------------
The following communication characteristics can be set individually
for every SCSI device on the bus:
- enable/disable sync. negotiation
- transfer rate
- asynchronous or synchronous communication
- in case of sync. communication, the sync. offset
The sync. offset specifies the number of bytes that can be sent or
received from the SCSI bus without ACK resp. REQ signal.
CAUTION: USING SYNCHRONOUS MODE ON LONG SCSI CABLES MAY CAUSE
COMMUNICATION PROBLEMS LEADING TO LOSS OF DATA.
The default setting of the SCSI communication parameters is as follows:
- no negotiation
- 5.0 MHz transfer rate
- asynchronous mode
- zero offset
The parameters can be modified by passing a string with the following
syntax to the kernel:
AM53C974=host-scsi-id,target-scsi-id,max-rate,max-offset
The parameters will be used by the driver as negotiation basis. The
range of the rate parameter is 3 to 10 MHz. The range of the
sync. offset parameter is 0 to 15 bytes. A value of 0 denotes
asynchronous comm. mode. If the target cannot cope with the specified
transfer rate, sync. mode or sync. offset, the negotiation result
will differ from the specified values. The negotiation result is
printed out at the end of the negotiation process (to read it, use the
dmesg program or the appropriate syslog). The parameter strings
(blank separated) can be passed to the kernel at the LILO prompt, or
as part of the LILO configuration file.
For example, the string "AM53C974=7,2,8,15" would be interpreted as
follows:
For communication between the controller with SCSI-ID 7 and the
device with SCSI-ID 2 a transfer rate of 8MHz in synchronous mode with
max. 15 bytes offset should be negotiated.
As an example, here my LILO configuration file:
boot = /dev/sda
compact
#prompt
delay = 50 # optional, for systems that boot very quickly
vga = normal # force sane state
ramdisk = 0 # paranoia setting
root = current # use "current" root
image = /usr/src/linux/arch/i386/boot/zImage
label = linux
append = "AM53C974=7,0,10,0 AM53C974=7,1,10,0 AM53C974=7,2,10,15 AM53C974=7,4,10,0 AM53C974=7,5,10,0"
read-only
other = /dev/sda4
label = os2
other = /dev/sdb3
loader = /boot/any_d.b
table = /dev/sdb
label = setup
The same parameters at the LILO prompt:
LILO boot: linux AM53C974=7,0,10,0 AM53C974=7,1,10,0 AM53C974=7,2,10,15 AM53C974=7,4,10,0 AM53C974=7,5,10,0
You can override parameters specified in the LILO configuration file
by parameters specified on the LILO command line.
BIOS usage
----------
Version 0.4 of the driver will use the BIOS, if available. Otherwise
it will try its internal PCI scan and access routines. The driver
assumes that the controller's SCSI-ID (usually 7) has been correctly
loaded by the BIOS into the controller's register during system
boot. If the driver detects that the controller's SCSI ID is not '7'
it will print out a warning. If this happens to you please correct
setting of the controller's SCSI-ID. If it is wrong, then edit the
AM53C974_SCSI_ID definition in file AM53C974.h accordingly.
Test environment
----------------
This driver was tested on a Compaq XL566 with the following SCSI configuration:
2 x HP C2247 fixed disk (internal, rate=10MHz, async.)
1 x Micropolis 1624 fixed disk (external, rate=8MHz, sync., offset=15 bytes)
1 x Wangtek W5525ES cartridge streamer (internal, rate=5MHz, async.)
1 x Toshiba XM-3301B CD-ROM (external, rate=5MHz, async.)
Known problems
--------------
- Compaq/Matsushita CD-ROM:
Use of this device with AM53C974 driver version 0.2 caused the kernel to
hang during Linux boot. If you encounter the problem, don't enable sync.
negotiation with the CD-ROM, i.e. simply don't specify comm. parameters
for this device on the LILO command line or configuration file.
The driver will thus use its default for the CD-ROM, which is 5MHz
transfer rate async and no sync. negotiation.
- Some disks cause problems.
What to do if there is a SCSI problem possibly related to the driver
--------------------------------------------------------------------
Read Klaus Liedl's WWW page (http://www-c724.uibk.ac.at/XL/). In case
this does not help: Send me a complete description of the problem,
including your SCSI configuration plus as much debugging information
as possible. Don't wait until I ask you for this information. To
enable the generation of debugging output, remove the comments from
the following definitions in the AM53C974.h file:
AM53C974_DEBUG
AM53C974_DEBUG_MSG
AM53C974_DEBUG_KEYWAIT
AM53C974_DEBUG_INFO
AM53C974_DEBUG_INTR
With these definitions enabled, the driver will enter single-step mode
during Linux boot. Use the spacebar for stepping. Take note of at
least the last 10 printout sections (marked by dashes) before the
crash/hangup or whatever happens and send me all of this information
via email. If the system can boot, use the syslogd daemon to record
the debugging output. Maybe you can use the ramdisk for this purpose
too (if necessary, kindly ask K. Liedl (Klaus.Liedl@uibk.ac.at) for
support, he knows how to do it -- I never tried). Stay in email
contact with me. Be aware that the following weeks/months could be the
worst of your life. Note: If single-stepping takes up too much time,
you can try to let the driver catch the problem by pressing the 'r'
key. The driver will automatically enter single-step mode if it has
detected something weird.
Author's Contact Address
-----------------------
Email: fri@rsx42sun0.dofn.de
Phone: x49-7545-2256 (office), x49-7541-42305 (home)
Home address: D. Frieauff, Stockerholzstr. 27, 88048 Friedrichshafen, Germany
!!!! Important Notice !!!!
-----------------------------
- Klaus Liedl maintains an excellent WWW page about Linux on Compaq XL.
It includes an FAQ, lots of tips & tricks as well as downloadable
boot disk images. The URL is: http://www-c724.uibk.ac.at/XL/
- Volunteer wanted for further maintenance of this driver software. I
don't have the time anymore to do serious support as some of you will know.
Literature
----------
- AMD AM53C974 PC-SCSI Technical Manual, publication #18624B
- Amendment to the AMD AM53C974 PC-SCSI Technical Manual
- AMD AM79C974 PC-NET Datasheet, publication #18681
- Amendment to the AMD AM79C974 PC-NET Datasheet
THANKS to
---------
- Drew Eckhardt, Robin Cutshaw, K. Liedl, Robert J. Pappas, A. Grenier,
Mark Stockton, David C. Niemi, Ben Craft, and many others who have helped
......@@ -40,10 +40,9 @@ My primary goals in writing this completely new BusLogic driver for Linux are
to achieve the full performance that BusLogic SCSI Host Adapters and modern
SCSI peripherals are capable of, and to provide a highly robust driver that can
be depended upon for high performance mission critical applications. All of
the major performance and error recovery features can be configured from the
Linux kernel command line or at module initialization time, allowing individual
installations to tune driver performance and error recovery to their particular
needs.
the major performance features can be configured from the Linux kernel command
line or at module initialization time, allowing individual installations to
tune driver performance and error recovery to their particular needs.
The latest information on Linux support for BusLogic SCSI Host Adapters, as
well as the most recent release of this driver and the latest firmware for the
......@@ -95,10 +94,10 @@ o Configuration Reporting and Testing
adapter hardware configuration, including the synchronous transfer parameters
requested and negotiated with each target device. AutoSCSI settings for
Synchronous Negotiation, Wide Negotiation, and Disconnect/Reconnect are
reported for each target device, as well as the status of Tagged Queuing and
Error Recovery. If the same setting is in effect for all target devices,
then a single word or phrase is used; otherwise, a letter is provided for
each target device to indicate the individual status. The following examples
reported for each target device, as well as the status of Tagged Queuing.
If the same setting is in effect for all target devices, then a single word
or phrase is used; otherwise, a letter is provided for each target device to
indicate the individual status. The following examples
should clarify this reporting format:
Synchronous Negotiation: Ultra
......@@ -131,9 +130,6 @@ o Configuration Reporting and Testing
The status of Wide Negotiation, Disconnect/Reconnect, and Tagged Queuing
are reported as "Enabled", Disabled", or a sequence of "Y" and "N" letters.
The Error Recovery option is reported as "Default", "Hard Reset",
"Bus Device Reset", "None" or a sequence of "D", "H", "B", and "N" letters.
o Performance Features
BusLogic SCSI Host Adapters directly implement SCSI-2 Tagged Queuing, and so
......@@ -477,48 +473,6 @@ TaggedQueuing:<Target-Spec>
does not cover all the Target Devices, unspecified characters are assumed
to be "X".
The BusLogic Driver Error Recovery Option allows for explicitly specifying
the Error Recovery action to be performed when BusLogic_ResetCommand is
called due to a SCSI Command failing to complete successfully. The following
options are available:
ErrorRecovery:Default
The "ErrorRecovery:Default" or "ER:Default" option selects between the Hard
Reset and Bus Device Reset options based on the recommendation of the SCSI
Subsystem.
ErrorRecovery:HardReset
The "ErrorRecovery:HardReset" or "ER:HardReset" option will initiate a Host
Adapter Hard Reset which also causes a SCSI Bus Reset.
ErrorRecovery:BusDeviceReset
The "ErrorRecovery:BusDeviceReset" or "ER:BusDeviceReset" option will send
a Bus Device Reset message to the individual Target Device causing the
error. If Error Recovery is again initiated for this Target Device and no
SCSI Command to this Target Device has completed successfully since the Bus
Device Reset message was sent, then a Hard Reset will be attempted.
ErrorRecovery:None
The "ErrorRecovery:None" or "ER:None" option suppresses Error Recovery.
This option should only be selected if a SCSI Bus Reset or Bus Device Reset
will cause the Target Device or a critical operation to suffer a complete
and unrecoverable failure.
ErrorRecovery:<Target-Spec>
The "ErrorRecovery:<Target-Spec>" or "ER:<Target-Spec>" option controls
Error Recovery individually for each Target Device. <Target-Spec> is a
sequence of "D", "H", "B", and "N" characters. "D" selects Default, "H"
selects Hard Reset, "B" selects Bus Device Reset, and "N" selects None.
The first character refers to Target Device 0, the second to Target Device
1, and so on; if the sequence of "D", "H", "B", and "N" characters does not
cover all the possible Target Devices, unspecified characters are assumed
to be "D".
The BusLogic Driver Miscellaneous Options comprise the following:
BusSettleTime:<seconds>
......
......@@ -1091,14 +1091,44 @@ Details:
* @scp: pointer to scsi command object
* @done: function pointer to be invoked on completion
*
* Returns 0 on success and 1 if the LLD or the HBA is busy (i.e. run
* out of resources to queue further commands). Other types of errors
* that are detected immediately are flagged by setting scp->result
* to an appropriate value, invoking the 'done' callback, and then
* returning 0 from this function. If the command is not performed
* immediately (and the LLD is starting (or will start) the given
* command) then this function should place 0 in scp->result and
* return 0.
* Returns 0 on success.
*
* If there's a failure, return either:
*
* SCSI_MLQUEUE_DEVICE_BUSY if the device queue is full, or
* SCSI_MLQUEUE_HOST_BUSY if the entire host queue is full
*
* On both of these returns, the mid-layer will requeue the I/O
*
* - if the return is SCSI_MLQUEUE_DEVICE_BUSY, only that particular
* device will be paused, and it will be unpaused when a command to
* the device returns (or after a brief delay if there are no more
* outstanding commands to it). Commands to other devices continue
* to be processed normally.
*
* - if the return is SCSI_MLQUEUE_HOST_BUSY, all I/O to the host
* is paused and will be unpaused when any command returns from
* the host (or after a brief delay if there are no outstanding
* commands to the host).
*
* For compatibility with earlier versions of queuecommand, any
* other return value is treated the same as
* SCSI_MLQUEUE_HOST_BUSY.
*
* Other types of errors that are detected immediately may be
* flagged by setting scp->result to an appropriate value,
* invoking the 'done' callback, and then returning 0 from this
* function. If the command is not performed immediately (and the
* LLD is starting (or will start) the given command) then this
* function should place 0 in scp->result and return 0.
*
* Command ownership. If the driver returns zero, it owns the
* command and must take responsibility for ensuring the 'done'
* callback is executed. Note: the driver may call done before
* returning zero, but after it has called done, it may not
* return any value other than zero. If the driver makes a
* non-zero return, it must not execute the command's done
* callback at any time.
*
* Locks: struct Scsi_Host::host_lock held on entry (with "irqsave")
* and is expected to be held on return.
......
......@@ -46,14 +46,14 @@ const unsigned char scsi_command_size[8] =
#define SCSI_SENSE_BUFFERSIZE 64
#endif
static int blk_do_rq(request_queue_t *q, struct block_device *bdev,
static int blk_do_rq(request_queue_t *q, struct gendisk *bd_disk,
struct request *rq)
{
char sense[SCSI_SENSE_BUFFERSIZE];
DECLARE_COMPLETION(wait);
int err = 0;
rq->rq_disk = bdev->bd_disk;
rq->rq_disk = bd_disk;
/*
* we need an extra reference to the request, so we can look at
......@@ -142,7 +142,7 @@ static int sg_emulated_host(request_queue_t *q, int *p)
return put_user(1, p);
}
static int sg_io(request_queue_t *q, struct block_device *bdev,
static int sg_io(request_queue_t *q, struct gendisk *bd_disk,
struct sg_io_hdr *hdr)
{
unsigned long start_time;
......@@ -190,7 +190,7 @@ static int sg_io(request_queue_t *q, struct block_device *bdev,
* first try to map it into a bio. reading from device will
* be a write to vm.
*/
bio = bio_map_user(bdev, (unsigned long) hdr->dxferp,
bio = bio_map_user(q, NULL, (unsigned long) hdr->dxferp,
hdr->dxfer_len, reading);
/*
......@@ -246,7 +246,7 @@ static int sg_io(request_queue_t *q, struct block_device *bdev,
* (if he doesn't check that is his problem).
* N.B. a non-zero SCSI status is _not_ necessarily an error.
*/
blk_do_rq(q, bdev, rq);
blk_do_rq(q, bd_disk, rq);
if (bio)
bio_unmap_user(bio, reading);
......@@ -296,7 +296,7 @@ static int sg_io(request_queue_t *q, struct block_device *bdev,
#define READ_DEFECT_DATA_TIMEOUT (60 * HZ )
#define OMAX_SB_LEN 16 /* For backward compatibility */
static int sg_scsi_ioctl(request_queue_t *q, struct block_device *bdev,
static int sg_scsi_ioctl(request_queue_t *q, struct gendisk *bd_disk,
Scsi_Ioctl_Command *sic)
{
struct request *rq;
......@@ -369,7 +369,7 @@ static int sg_scsi_ioctl(request_queue_t *q, struct block_device *bdev,
rq->data_len = bytes;
rq->flags |= REQ_BLOCK_PC;
blk_do_rq(q, bdev, rq);
blk_do_rq(q, bd_disk, rq);
err = rq->errors & 0xff; /* only 8 bit SCSI status */
if (err) {
if (rq->sense_len && rq->sense) {
......@@ -389,13 +389,13 @@ static int sg_scsi_ioctl(request_queue_t *q, struct block_device *bdev,
return err;
}
int scsi_cmd_ioctl(struct block_device *bdev, unsigned int cmd, unsigned long arg)
int scsi_cmd_ioctl(struct gendisk *bd_disk, unsigned int cmd, unsigned long arg)
{
request_queue_t *q;
struct request *rq;
int close = 0, err;
q = bdev_get_queue(bdev);
q = bd_disk->queue;
if (!q)
return -ENXIO;
......@@ -446,7 +446,7 @@ int scsi_cmd_ioctl(struct block_device *bdev, unsigned int cmd, unsigned long ar
old_cdb = hdr.cmdp;
hdr.cmdp = cdb;
err = sg_io(q, bdev, &hdr);
err = sg_io(q, bd_disk, &hdr);
hdr.cmdp = old_cdb;
if (copy_to_user((struct sg_io_hdr *) arg, &hdr, sizeof(hdr)))
......@@ -493,7 +493,7 @@ int scsi_cmd_ioctl(struct block_device *bdev, unsigned int cmd, unsigned long ar
hdr.timeout = cgc.timeout;
hdr.cmdp = cgc.cmd;
hdr.cmd_len = sizeof(cgc.cmd);
err = sg_io(q, bdev, &hdr);
err = sg_io(q, bd_disk, &hdr);
if (hdr.status)
err = -EIO;
......@@ -514,7 +514,8 @@ int scsi_cmd_ioctl(struct block_device *bdev, unsigned int cmd, unsigned long ar
if (!arg)
break;
err = sg_scsi_ioctl(q, bdev, (Scsi_Ioctl_Command *)arg);
err = sg_scsi_ioctl(q, bd_disk,
(Scsi_Ioctl_Command *)arg);
break;
case CDROMCLOSETRAY:
close = 1;
......@@ -528,7 +529,7 @@ int scsi_cmd_ioctl(struct block_device *bdev, unsigned int cmd, unsigned long ar
rq->cmd[0] = GPCMD_START_STOP_UNIT;
rq->cmd[4] = 0x02 + (close != 0);
rq->cmd_len = 6;
err = blk_do_rq(q, bdev, rq);
err = blk_do_rq(q, bd_disk, rq);
blk_put_request(rq);
break;
default:
......
......@@ -1799,7 +1799,7 @@ int cdrom_ioctl(struct cdrom_device_info *cdi, struct inode *ip,
int ret;
/* Try the generic SCSI command ioctl's first.. */
ret = scsi_cmd_ioctl(ip->i_bdev, cmd, arg);
ret = scsi_cmd_ioctl(ip->i_bdev->bd_disk, cmd, arg);
if (ret != -ENOTTY)
return ret;
......
......@@ -1689,7 +1689,7 @@ int generic_ide_ioctl(struct block_device *bdev, unsigned int cmd,
case CDROMEJECT:
case CDROMCLOSETRAY:
return scsi_cmd_ioctl(bdev, cmd, arg);
return scsi_cmd_ioctl(bdev->bd_disk, cmd, arg);
case HDIO_GET_BUSSTATE:
if (!capable(CAP_SYS_ADMIN))
......
This diff is collapsed.
......@@ -80,8 +80,8 @@
#define COPYRIGHT "Copyright (c) 1999-2003 " MODULEAUTHOR
#endif
#define MPT_LINUX_VERSION_COMMON "2.05.00.06"
#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-2.05.00.06"
#define MPT_LINUX_VERSION_COMMON "3.00.02"
#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.00.02"
#define WHAT_MAGIC_STRING "@" "(" "#" ")"
#define show_mptmod_ver(s,ver) \
......@@ -180,6 +180,16 @@ typedef enum {
MPTUNKNOWN_DRIVER
} MPT_DRIVER_CLASS;
struct mpt_pci_driver{
int (*probe) (struct pci_dev *dev, const struct pci_device_id *id);
void (*remove) (struct pci_dev *dev);
void (*shutdown) (struct device * dev);
#ifdef CONFIG_PM
int (*suspend) (struct pci_dev *dev, u32 state);
int (*resume) (struct pci_dev *dev);
#endif
};
/*
* MPT adapter / port / bus / device info structures...
*/
......@@ -629,6 +639,9 @@ typedef struct _MPT_ADAPTER
FCPortPage0_t fc_port_page0[2];
LANPage0_t lan_cnfg_page0;
LANPage1_t lan_cnfg_page1;
#ifdef CONFIG_PM
u32 PciState[64]; /* save PCI state to this area */
#endif
u8 FirstWhoInit;
u8 upload_fw; /* If set, do a fw upload */
u8 reload_fw; /* Force a FW Reload on next reset */
......@@ -1001,6 +1014,8 @@ extern int mpt_event_register(int cb_idx, MPT_EVHANDLER ev_cbfunc);
extern void mpt_event_deregister(int cb_idx);
extern int mpt_reset_register(int cb_idx, MPT_RESETHANDLER reset_func);
extern void mpt_reset_deregister(int cb_idx);
extern int mpt_device_driver_register(struct mpt_pci_driver * dd_cbfunc, int cb_idx);
extern void mpt_device_driver_deregister(int cb_idx);
extern int mpt_register_ascqops_strings(void *ascqTable, int ascqtbl_sz, const char **opsTable);
extern void mpt_deregister_ascqops_strings(void);
extern MPT_FRAME_HDR *mpt_get_msg_frame(int handle, int iocid);
......
This diff is collapsed.
......@@ -98,13 +98,14 @@
#define MPT_SCSI_SG_DEPTH 40
#endif
/* To disable domain validation, uncomment the
/* To disable domain validation, comment the
* following line. No effect for FC devices.
* For SCSI devices, driver will negotiate to
* NVRAM settings (if available) or to maximum adapter
* capabilities.
*/
/* #define MPTSCSIH_DISABLE_DOMAIN_VALIDATION */
#define MPTSCSIH_ENABLE_DOMAIN_VALIDATION
/* SCSI driver setup structure. Settings can be overridden
......@@ -137,15 +138,6 @@ struct mptscsih_driver_setup
* So here are various HACKS to work around them.
*/
/*
* Conditionalizing with "#ifdef MODULE/#endif" around:
* static Scsi_Host_Template driver_template = XX;
* #include <../../scsi/scsi_module.c>
* lines was REMOVED @ lk-2.4.0-test9
* Issue discovered 20001213 by: sshirron
*/
#define MPT_SCSIHOST_NEED_ENTRY_EXIT_HOOKUPS 1
/*
* tq_scheduler disappeared @ lk-2.4.0-test12
* (right when <linux/sched.h> newly defined TQ_ACTIVE)
......@@ -160,8 +152,6 @@ struct mptscsih_driver_setup
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#define x_scsi_detect mptscsih_detect
#define x_scsi_release mptscsih_release
#define x_scsi_info mptscsih_info
#define x_scsi_queuecommand mptscsih_qcmd
#define x_scsi_abort mptscsih_abort
......@@ -170,9 +160,6 @@ struct mptscsih_driver_setup
#define x_scsi_host_reset mptscsih_host_reset
#define x_scsi_bios_param mptscsih_bios_param
#define x_scsi_taskmgmt_bh mptscsih_taskmgmt_bh
#define x_scsi_old_abort mptscsih_old_abort
#define x_scsi_old_reset mptscsih_old_reset
#define x_scsi_slave_alloc mptscsih_slave_alloc
#define x_scsi_slave_configure mptscsih_slave_configure
#define x_scsi_slave_destroy mptscsih_slave_destroy
......@@ -182,8 +169,6 @@ struct mptscsih_driver_setup
/*
* MPT SCSI Host / Initiator decls...
*/
extern int x_scsi_detect(Scsi_Host_Template *);
extern int x_scsi_release(struct Scsi_Host *host);
extern const char *x_scsi_info(struct Scsi_Host *);
extern int x_scsi_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
extern int x_scsi_abort(Scsi_Cmnd *);
......@@ -191,8 +176,7 @@ extern int x_scsi_bus_reset(Scsi_Cmnd *);
extern int x_scsi_dev_reset(Scsi_Cmnd *);
extern int x_scsi_host_reset(Scsi_Cmnd *);
extern int x_scsi_bios_param(struct scsi_device * sdev, struct block_device *bdev,
sector_t capacity, int *ip);
extern void x_scsi_taskmgmt_bh(void *);
sector_t capacity, int geom[]);
extern int x_scsi_slave_alloc(Scsi_Device *);
extern int x_scsi_slave_configure(Scsi_Device *);
extern void x_scsi_slave_destroy(Scsi_Device *);
......
This diff is collapsed.
/* AM53/79C974 (PCscsi) driver release 0.5
* The architecture and much of the code of this device
* driver was originally developed by Drew Eckhardt for
* the NCR5380. The following copyrights apply:
* For the architecture and all parts similar to the NCR5380:
* Copyright 1993, Drew Eckhardt
* Visionary Computing
* (Unix and Linux consulting and custom programming)
* drew@colorado.edu
* +1 (303) 666-5836
*
* The AM53C974_nobios_detect code was originally developed by
* Robin Cutshaw (robin@xfree86.org) and is used here in a
* modified form.
*
* For the other parts:
* Copyright 1994, D. Frieauff
* EMail: fri@rsx42sun0.dofn.de
* Phone: x49-7545-8-2256 , x49-7541-42305
*/
/*
* $Log: AM53C974.h,v $
*/
#ifndef AM53C974_H
#define AM53C974_H
#include <scsi/scsicam.h>
struct AM53C974_hostdata {
volatile unsigned in_reset:1; /* flag, says bus reset pending */
volatile unsigned aborted:1; /* flag, says aborted */
volatile unsigned selecting:1; /* selection started, but not yet finished */
volatile unsigned disconnecting: 1; /* disconnection started, but not yet finished */
volatile unsigned dma_busy:1; /* dma busy when service request for info transfer received */
volatile unsigned char msgout[10]; /* message to output in MSGOUT_PHASE */
volatile unsigned char last_message[10]; /* last message OUT */
volatile Scsi_Cmnd *issue_queue; /* waiting to be issued */
volatile Scsi_Cmnd *disconnected_queue; /* waiting for reconnect */
volatile Scsi_Cmnd *sel_cmd; /* command for selection */
volatile Scsi_Cmnd *connected; /* currently connected command */
volatile unsigned char busy[8]; /* index = target, bit = lun */
unsigned char sync_per[8]; /* synchronous transfer period (in effect) */
unsigned char sync_off[8]; /* synchronous offset (in effect) */
unsigned char sync_neg[8]; /* sync. negotiation performed (in effect) */
unsigned char sync_en[8]; /* sync. negotiation performed (in effect) */
unsigned char max_rate[8]; /* max. transfer rate (setup) */
unsigned char max_offset[8]; /* max. sync. offset (setup), only valid if corresponding sync_en is nonzero */
};
static int AM53C974_pci_detect(Scsi_Host_Template * tpnt);
static int AM53C974_release(struct Scsi_Host *shp);
static const char *AM53C974_info(struct Scsi_Host *);
static int AM53C974_command(Scsi_Cmnd * SCpnt);
static int AM53C974_queue_command(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *));
static int AM53C974_abort(Scsi_Cmnd * cmd);
static int AM53C974_reset(Scsi_Cmnd * cmd, unsigned int);
#endif /* AM53C974_H */
This diff is collapsed.
This diff is collapsed.
......@@ -12053,14 +12053,14 @@ UCHAR CalcLrc(UCHAR buffer[])
*/
static inline unsigned char
FlashPoint__ProbeHostAdapter(FlashPoint_Info_T *FlashPointInfo)
FlashPoint__ProbeHostAdapter(struct FlashPoint_Info *FlashPointInfo)
{
return FlashPoint_ProbeHostAdapter((PSCCBMGR_INFO) FlashPointInfo);
}
static inline FlashPoint_CardHandle_T
FlashPoint__HardwareResetHostAdapter(FlashPoint_Info_T *FlashPointInfo)
FlashPoint__HardwareResetHostAdapter(struct FlashPoint_Info *FlashPointInfo)
{
return FlashPoint_HardwareResetHostAdapter((PSCCBMGR_INFO) FlashPointInfo);
}
......@@ -12073,14 +12073,14 @@ FlashPoint__ReleaseHostAdapter(FlashPoint_CardHandle_T CardHandle)
static inline void
FlashPoint__StartCCB(FlashPoint_CardHandle_T CardHandle, BusLogic_CCB_T *CCB)
FlashPoint__StartCCB(FlashPoint_CardHandle_T CardHandle, struct BusLogic_CCB *CCB)
{
FlashPoint_StartCCB(CardHandle, (PSCCB) CCB);
}
static inline void
FlashPoint__AbortCCB(FlashPoint_CardHandle_T CardHandle, BusLogic_CCB_T *CCB)
FlashPoint__AbortCCB(FlashPoint_CardHandle_T CardHandle, struct BusLogic_CCB *CCB)
{
FlashPoint_AbortCCB(CardHandle, (PSCCB) CCB);
}
......@@ -12143,11 +12143,11 @@ void FlashPoint_InquireTargetInfo(FlashPoint_CardHandle_T CardHandle,
Define prototypes for the FlashPoint SCCB Manager Functions.
*/
extern unsigned char FlashPoint_ProbeHostAdapter(FlashPoint_Info_T *);
extern unsigned char FlashPoint_ProbeHostAdapter(struct FlashPoint_Info *);
extern FlashPoint_CardHandle_T
FlashPoint_HardwareResetHostAdapter(FlashPoint_Info_T *);
extern void FlashPoint_StartCCB(FlashPoint_CardHandle_T, BusLogic_CCB_T *);
extern int FlashPoint_AbortCCB(FlashPoint_CardHandle_T, BusLogic_CCB_T *);
FlashPoint_HardwareResetHostAdapter(struct FlashPoint_Info *);
extern void FlashPoint_StartCCB(FlashPoint_CardHandle_T, struct BusLogic_CCB *);
extern int FlashPoint_AbortCCB(FlashPoint_CardHandle_T, struct BusLogic_CCB *);
extern boolean FlashPoint_InterruptPending(FlashPoint_CardHandle_T);
extern int FlashPoint_HandleInterrupt(FlashPoint_CardHandle_T);
extern void FlashPoint_ReleaseHostAdapter(FlashPoint_CardHandle_T);
......
......@@ -376,23 +376,6 @@ config SCSI_IN2000
To compile this driver as a module, choose M here: the
module will be called in2000.
# does not use pci dma and seems to be onboard only for old machines
config SCSI_AM53C974
tristate "AM53/79C974 PCI SCSI support"
depends on X86 && PCI && SCSI && BROKEN
---help---
This is support for the AM53/79C974 SCSI host adapters. Please read
<file:Documentation/scsi/AM53C974.txt> for details. Also, the
SCSI-HOWTO, available from
<http://www.tldp.org/docs.html#howto>, is for you.
Note that there is another driver for AM53C974 based adapters:
"Tekram DC390(T) and Am53/79C974 (PCscsi) SCSI support", above. You
can pick either one.
To compile this driver as a module, choose M here: the
module will be called AM53C974.
config SCSI_MEGARAID
tristate "AMI MegaRAID support"
depends on PCI && SCSI
......@@ -903,7 +886,7 @@ config SCSI_SYM53C8XX_2
language. It does not support LSI53C10XX Ultra-320 PCI-X SCSI
controllers; you need to use the Fusion MPT driver for that.
Please read <file:drivers/scsi/sym53c8xx_2/Documentation.txt> for more
Please read <file:Documentation/scsi/sym53c8xx_2.txt> for more
information.
config SCSI_SYM53C8XX_DMA_ADDRESSING_MODE
......@@ -1172,23 +1155,6 @@ config SCSI_QLOGIC_ISP
To compile this driver as a module, choose M here: the
module will be called qlogicisp.
config SCSI_QLOGIC_FC
tristate "Qlogic ISP FC SCSI support"
depends on PCI && SCSI
help
This is a driver for the QLogic ISP2100 SCSI-FCP host adapter.
To compile this driver as a module, choose M here: the
module will be called qlogicfc.
config SCSI_QLOGIC_FC_FIRMWARE
bool "Include loadable firmware in driver"
depends on SCSI_QLOGIC_FC
help
Say Y to include ISP2X00 Fabric Initiator/Target Firmware, with
expanded LUN addressing and FcTape (FCP-2) support, in the
qlogicfc driver. This is required on some platforms.
config SCSI_QLOGIC_1280
tristate "Qlogic QLA 1280 SCSI support"
depends on PCI && SCSI
......
......@@ -69,7 +69,6 @@ obj-$(CONFIG_SCSI_NCR_Q720) += NCR_Q720_mod.o
obj-$(CONFIG_SCSI_SYM53C416) += sym53c416.o
obj-$(CONFIG_SCSI_QLOGIC_FAS) += qlogicfas.o
obj-$(CONFIG_SCSI_QLOGIC_ISP) += qlogicisp.o
obj-$(CONFIG_SCSI_QLOGIC_FC) += qlogicfc.o
obj-$(CONFIG_SCSI_QLOGIC_1280) += qla1280.o
obj-$(CONFIG_SCSI_QLA2XXX) += qla2xxx/
obj-$(CONFIG_SCSI_PAS16) += pas16.o
......@@ -87,7 +86,6 @@ 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_AM53C974) += AM53C974.o
obj-$(CONFIG_SCSI_MEGARAID) += megaraid.o
obj-$(CONFIG_SCSI_ACARD) += atp870u.o
obj-$(CONFIG_SCSI_SUNESP) += esp.o
......
This diff is collapsed.
......@@ -2,14 +2,14 @@
#define _AHA152X_H
/*
* $Id: aha152x.h,v 2.5 2002/04/14 11:24:12 fischer Exp $
* $Id: aha152x.h,v 2.7 2004/01/24 11:39:03 fischer Exp $
*/
/* number of queueable commands
(unless we support more than 1 cmd_per_lun this should do) */
#define AHA152X_MAXQUEUE 7
#define AHA152X_REVID "Adaptec 152x SCSI driver; $Revision: 2.5 $"
#define AHA152X_REVID "Adaptec 152x SCSI driver; $Revision: 2.7 $"
/* port addresses */
#define SCSISEQ (HOSTIOPORT0+0x00) /* SCSI sequence control */
......@@ -331,6 +331,7 @@ struct aha152x_setup {
};
struct Scsi_Host *aha152x_probe_one(struct aha152x_setup *);
int aha152x_host_reset(struct scsi_cmnd *);
void aha152x_release(struct Scsi_Host *);
int aha152x_host_reset(Scsi_Cmnd *);
#endif /* _AHA152X_H */
......@@ -704,11 +704,14 @@ static int aha1542_queuecommand(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
#endif
int i;
ccb[mbo].op = 2; /* SCSI Initiator Command w/scatter-gather */
SCpnt->host_scribble = (unsigned char *) kmalloc(512, GFP_DMA);
SCpnt->host_scribble = (unsigned char *) kmalloc(512, GFP_KERNEL | GFP_DMA);
sgpnt = (struct scatterlist *) SCpnt->request_buffer;
cptr = (struct chain *) SCpnt->host_scribble;
if (cptr == NULL)
panic("aha1542.c: unable to allocate DMA memory\n");
if (cptr == NULL) {
/* free the claimed mailbox slot */
HOSTDATA(SCpnt->device->host)->SCint[mbo] = NULL;
return SCSI_MLQUEUE_HOST_BUSY;
}
for (i = 0; i < SCpnt->use_sg; i++) {
if (sgpnt[i].length == 0 || SCpnt->use_sg > 16 ||
(((int) sgpnt[i].offset) & 1) || (sgpnt[i].length & 1)) {
......
This diff is collapsed.
......@@ -78,7 +78,7 @@ static int irq_list[4] = { -1 };
static int host_id = 7;
static int reconnect = 1;
static int parity = 1;
static int synchronous = 0;
static int synchronous = 1;
static int reset_delay = 100;
static int ext_trans = 0;
......@@ -244,9 +244,6 @@ static void aha152x_config_cs(dev_link_t *link)
CS_CHECK(RequestIRQ, pcmcia_request_irq(handle, &link->irq));
CS_CHECK(RequestConfiguration, pcmcia_request_configuration(handle, &link->conf));
/* A bad hack... */
release_region(link->io.BasePort1, link->io.NumPorts1);
/* Set configuration options for the aha152x driver */
memset(&s, 0, sizeof(s));
s.conf = "PCMCIA setup";
......@@ -266,9 +263,6 @@ static void aha152x_config_cs(dev_link_t *link)
goto cs_failed;
}
scsi_add_host(host, NULL); /* XXX handle failure */
scsi_scan_host(host);
sprintf(info->node.dev_name, "scsi%d", host->host_no);
link->dev = &info->node;
info->host = host;
......@@ -286,7 +280,7 @@ static void aha152x_release_cs(dev_link_t *link)
{
scsi_info_t *info = link->priv;
scsi_remove_host(info->host);
aha152x_release(info->host);
link->dev = NULL;
pcmcia_release_configuration(link->handle);
......@@ -294,7 +288,6 @@ static void aha152x_release_cs(dev_link_t *link)
pcmcia_release_irq(link->handle, &link->irq);
link->state &= ~DEV_CONFIG;
scsi_unregister(info->host);
}
static int aha152x_event(event_t event, int priority,
......
......@@ -3,27 +3,39 @@ config SCSI_QLA2XXX_CONFIG
default (SCSI && PCI)
depends on SCSI && PCI
config SCSI_QLA2XXX
tristate
config SCSI_QLA21XX
tristate "Qlogic ISP2100 host adapter family support"
select SCSI_QLA2XXX
tristate "QLogic ISP2100 host adapter family support"
depends on SCSI_QLA2XXX_CONFIG
---help---
This driver supports the QLogic 21xx (ISP2100) host adapter family.
config SCSI_QLA22XX
tristate "Qlogic ISP2200 host adapter family support"
select SCSI_QLA2XXX
tristate "QLogic ISP2200 host adapter family support"
depends on SCSI_QLA2XXX_CONFIG
---help---
This driver supports the QLogic 22xx (ISP2200) host adapter family.
config SCSI_QLA23XX
tristate "Qlogic ISP23xx host adapter family support"
select SCSI_QLA2XXX
config SCSI_QLA2300
tristate "QLogic ISP2300 host adapter family support"
depends on SCSI_QLA2XXX_CONFIG
---help---
This driver supports the QLogic 2300 (ISP2300, and ISP2312) host
adapter family.
config SCSI_QLA2322
tristate "QLogic ISP2322 host adapter family support"
depends on SCSI_QLA2XXX_CONFIG
---help---
This driver supports the QLogic 2322 (ISP2322) host adapter family.
config SCSI_QLA6312
tristate "QLogic ISP6312 host adapter family support"
depends on SCSI_QLA2XXX_CONFIG
---help---
This driver supports the QLogic 6312 (ISP6312) host adapter family.
config SCSI_QLA6322
tristate "QLogic ISP6322 host adapter family support"
depends on SCSI_QLA2XXX_CONFIG
---help---
This driver supports the QLogic 23xx (ISP2300, ISP2312, and ISP2322)
host adapter family.
This driver supports the QLogic 6322 (ISP6322) host adapter family.
EXTRA_CFLAGS += -g -Idrivers/scsi -DUNIQUE_FW_NAME
EXTRA_CFLAGS += -Idrivers/scsi -DUNIQUE_FW_NAME
qla2xxx-y := qla_os.o qla_init.o qla_mbx.o qla_iocb.o qla_isr.o qla_gs.o \
qla_dbg.o qla_sup.o qla_rscn.o
qla2100-y := ql2100.o ql2100_fw.o
qla2200-y := ql2200.o ql2200_fw.o
qla2300-y := ql2300.o ql2300_fw.o #ql2322_fw.o
qla2300-y := ql2300.o ql2300_fw.o
qla2322-y := ql2322.o ql2322_fw.o
qla6312-y := ql6312.o ql6312_fw.o
qla6322-y := ql6322.o ql6322_fw.o
obj-$(CONFIG_SCSI_QLA21XX) += qla2xxx.o qla2100.o
obj-$(CONFIG_SCSI_QLA22XX) += qla2xxx.o qla2200.o
obj-$(CONFIG_SCSI_QLA23XX) += qla2xxx.o qla2300.o
obj-$(CONFIG_SCSI_QLA2300) += qla2xxx.o qla2300.o
obj-$(CONFIG_SCSI_QLA2322) += qla2xxx.o qla2322.o
obj-$(CONFIG_SCSI_QLA6312) += qla2xxx.o qla6312.o
obj-$(CONFIG_SCSI_QLA6322) += qla2xxx.o qla6322.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.
......@@ -22,8 +22,6 @@
*/
#define DEBUG_QLA2100 0 /* For Debug of qla2x00 */
#define MEMORY_MAPPED_IO 1
#define STOP_ON_ERROR 0 /* Stop on aborts and resets */
#define STOP_ON_RESET 0
#define USE_ABORT_TGT 1 /* Use Abort Target mbx cmd */
......
This diff is collapsed.
......@@ -19,9 +19,9 @@
/*
* Driver version
*/
#define QLA2XXX_VERSION "8.00.00b8"
#define QLA2XXX_VERSION "8.00.00b10"
#define QLA_DRIVER_MAJOR_VER 8
#define QLA_DRIVER_MINOR_VER 0
#define QLA_DRIVER_PATCH_VER 0
#define QLA_DRIVER_BETA_VER 8
#define QLA_DRIVER_BETA_VER 10
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -554,7 +554,7 @@ static int sd_ioctl(struct inode * inode, struct file * filp,
case SCSI_IOCTL_GET_BUS_NUMBER:
return scsi_ioctl(sdp, cmd, (void *)arg);
default:
error = scsi_cmd_ioctl(bdev, cmd, arg);
error = scsi_cmd_ioctl(disk, cmd, arg);
if (error != -ENOTTY)
return error;
}
......
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