Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6

This commit is contained in:
Linus Torvalds 2005-11-11 14:04:37 -08:00
commit d72d6f1b56
143 changed files with 1733 additions and 5102 deletions

View file

@ -343,7 +343,7 @@ static void NCR53c7x0_soft_reset (struct Scsi_Host *host);
/* Size of event list (per host adapter) */
static int track_events = 0;
static struct Scsi_Host *first_host = NULL; /* Head of list of NCR boards */
static Scsi_Host_Template *the_template = NULL;
static struct scsi_host_template *the_template = NULL;
/* NCR53c710 script handling code */
@ -1103,7 +1103,7 @@ NCR53c7x0_init (struct Scsi_Host *host) {
}
/*
* Function : int ncr53c7xx_init(Scsi_Host_Template *tpnt, int board, int chip,
* Function : int ncr53c7xx_init(struct scsi_host_template *tpnt, int board, int chip,
* unsigned long base, int io_port, int irq, int dma, long long options,
* int clock);
*
@ -1118,7 +1118,7 @@ NCR53c7x0_init (struct Scsi_Host *host) {
*/
int
ncr53c7xx_init (Scsi_Host_Template *tpnt, int board, int chip,
ncr53c7xx_init (struct scsi_host_template *tpnt, int board, int chip,
unsigned long base, int io_port, int irq, int dma,
long long options, int clock)
{

View file

@ -1600,7 +1600,7 @@ struct NCR53c7x0_hostdata {
/* Paranoid people could use panic() here. */
#define FATAL(host) shutdown((host));
extern int ncr53c7xx_init(Scsi_Host_Template *tpnt, int board, int chip,
extern int ncr53c7xx_init(struct scsi_host_template *tpnt, int board, int chip,
unsigned long base, int io_port, int irq, int dma,
long long options, int clock);

View file

@ -1295,27 +1295,6 @@ config SCSI_QLOGIC_FAS
To compile this driver as a module, choose M here: the
module will be called qlogicfas.
config SCSI_QLOGIC_ISP
tristate "Qlogic ISP SCSI support (old driver)"
depends on PCI && SCSI && BROKEN
---help---
This driver works for all QLogic PCI SCSI host adapters (IQ-PCI,
IQ-PCI-10, IQ_PCI-D) except for the PCI-basic card. (This latter
card is supported by the "AM53/79C974 PCI SCSI" driver.)
If you say Y here, make sure to choose "BIOS" at the question "PCI
access mode".
Please read the file <file:Documentation/scsi/qlogicisp.txt>. You
should also read the SCSI-HOWTO, available from
<http://www.tldp.org/docs.html#howto>.
To compile this driver as a module, choose M here: the
module will be called qlogicisp.
These days the hardware is also supported by the more modern qla1280
driver. In doubt use that one instead of qlogicisp.
config SCSI_QLOGIC_FC
tristate "Qlogic ISP FC SCSI support"
depends on PCI && SCSI
@ -1342,14 +1321,6 @@ config SCSI_QLOGIC_1280
To compile this driver as a module, choose M here: the
module will be called qla1280.
config SCSI_QLOGIC_1280_1040
bool "Qlogic QLA 1020/1040 SCSI support"
depends on SCSI_QLOGIC_1280 && SCSI_QLOGIC_ISP!=y
help
Say Y here if you have a QLogic ISP1020/1040 SCSI host adapter and
do not want to use the old driver. This option enables support in
the qla1280 driver for those host adapters.
config SCSI_QLOGICPTI
tristate "PTI Qlogic, ISP Driver"
depends on SBUS && SCSI

View file

@ -78,7 +78,6 @@ obj-$(CONFIG_SCSI_NCR_Q720) += NCR_Q720_mod.o
obj-$(CONFIG_SCSI_SYM53C416) += sym53c416.o
obj-$(CONFIG_SCSI_QLOGIC_FAS) += qlogicfas408.o qlogicfas.o
obj-$(CONFIG_PCMCIA_QLOGIC) += qlogicfas408.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/

View file

@ -529,7 +529,7 @@ void esp_bootup_reset(struct NCR_ESP *esp, struct ESP_regs *eregs)
/* Allocate structure and insert basic data such as SCSI chip frequency
* data and a pointer to the device
*/
struct NCR_ESP* esp_allocate(Scsi_Host_Template *tpnt, void *esp_dev)
struct NCR_ESP* esp_allocate(struct scsi_host_template *tpnt, void *esp_dev)
{
struct NCR_ESP *esp, *elink;
struct Scsi_Host *esp_host;
@ -1006,7 +1006,7 @@ static void esp_exec_cmd(struct NCR_ESP *esp)
struct ESP_regs *eregs = esp->eregs;
struct esp_device *esp_dev;
Scsi_Cmnd *SCptr;
Scsi_Device *SDptr;
struct scsi_device *SDptr;
volatile unchar *cmdp = esp->esp_command;
unsigned char the_esp_command;
int lun, target;
@ -1687,7 +1687,7 @@ static inline int reconnect_lun(struct NCR_ESP *esp, struct ESP_regs *eregs)
static inline void esp_connect(struct NCR_ESP *esp, struct ESP_regs *eregs,
Scsi_Cmnd *sp)
{
Scsi_Device *dp = sp->device;
struct scsi_device *dp = sp->device;
struct esp_device *esp_dev = dp->hostdata;
if(esp->prev_soff != esp_dev->sync_max_offset ||
@ -3605,7 +3605,7 @@ out:
}
#endif
int esp_slave_alloc(Scsi_Device *SDptr)
int esp_slave_alloc(struct scsi_device *SDptr)
{
struct esp_device *esp_dev =
kmalloc(sizeof(struct esp_device), GFP_ATOMIC);
@ -3617,7 +3617,7 @@ int esp_slave_alloc(Scsi_Device *SDptr)
return 0;
}
void esp_slave_destroy(Scsi_Device *SDptr)
void esp_slave_destroy(struct scsi_device *SDptr)
{
struct NCR_ESP *esp = (struct NCR_ESP *) SDptr->host->hostdata;

View file

@ -653,7 +653,7 @@ extern int nesps, esps_in_use, esps_running;
/* External functions */
extern void esp_bootup_reset(struct NCR_ESP *esp, struct ESP_regs *eregs);
extern struct NCR_ESP *esp_allocate(Scsi_Host_Template *, void *);
extern struct NCR_ESP *esp_allocate(struct scsi_host_template *, void *);
extern void esp_deallocate(struct NCR_ESP *);
extern void esp_release(void);
extern void esp_initialize(struct NCR_ESP *);
@ -664,6 +664,6 @@ extern int esp_abort(Scsi_Cmnd *);
extern int esp_reset(Scsi_Cmnd *);
extern int esp_proc_info(struct Scsi_Host *shost, char *buffer, char **start, off_t offset, int length,
int inout);
extern int esp_slave_alloc(Scsi_Device *);
extern void esp_slave_destroy(Scsi_Device *);
extern int esp_slave_alloc(struct scsi_device *);
extern void esp_slave_destroy(struct scsi_device *);
#endif /* !(NCR53C9X_H) */

View file

@ -447,7 +447,7 @@ static __inline__ int NCR53c406a_pio_write(unsigned char *request, unsigned int
}
#endif /* USE_PIO */
static int __init NCR53c406a_detect(Scsi_Host_Template * tpnt)
static int __init NCR53c406a_detect(struct scsi_host_template * tpnt)
{
int present = 0;
struct Scsi_Host *shpnt = NULL;
@ -1057,7 +1057,7 @@ MODULE_LICENSE("GPL");
* Use SG_NONE if DMA mode is enabled!
*/
static Scsi_Host_Template driver_template =
static struct scsi_host_template driver_template =
{
.proc_name = "NCR53c406a" /* proc_name */,
.name = "NCR53c406a" /* name */,

View file

@ -172,7 +172,7 @@ static void dma_stop (struct Scsi_Host *instance, Scsi_Cmnd *SCpnt,
}
}
int __init a2091_detect(Scsi_Host_Template *tpnt)
int __init a2091_detect(struct scsi_host_template *tpnt)
{
static unsigned char called = 0;
struct Scsi_Host *instance;
@ -233,7 +233,7 @@ static int a2091_bus_reset(Scsi_Cmnd *cmd)
#define HOSTS_C
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "A2901",
.name = "Commodore A2091/A590 SCSI",
.detect = a2091_detect,

View file

@ -11,7 +11,7 @@
#include <linux/types.h>
int a2091_detect(Scsi_Host_Template *);
int a2091_detect(struct scsi_host_template *);
int a2091_release(struct Scsi_Host *);
const char *wd33c93_info(void);
int wd33c93_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));

View file

@ -168,7 +168,7 @@ static void dma_stop (struct Scsi_Host *instance, Scsi_Cmnd *SCpnt,
}
}
int __init a3000_detect(Scsi_Host_Template *tpnt)
int __init a3000_detect(struct scsi_host_template *tpnt)
{
wd33c93_regs regs;
@ -221,7 +221,7 @@ static int a3000_bus_reset(Scsi_Cmnd *cmd)
#define HOSTS_C
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "A3000",
.name = "Amiga 3000 built-in SCSI",
.detect = a3000_detect,

View file

@ -11,7 +11,7 @@
#include <linux/types.h>
int a3000_detect(Scsi_Host_Template *);
int a3000_detect(struct scsi_host_template *);
int a3000_release(struct Scsi_Host *);
const char *wd33c93_info(void);
int wd33c93_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));

View file

@ -1579,18 +1579,10 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd)
break;
{
u64 capacity;
char cp[12];
unsigned int offset = 0;
char cp[13];
dprintk((KERN_DEBUG "READ CAPACITY_16 command.\n"));
capacity = fsa_dev_ptr[cid].size - 1;
if (scsicmd->cmnd[13] > 12) {
offset = scsicmd->cmnd[13] - 12;
if (offset > sizeof(cp))
break;
memset(cp, 0, offset);
aac_internal_transfer(scsicmd, cp, 0, offset);
}
cp[0] = (capacity >> 56) & 0xff;
cp[1] = (capacity >> 48) & 0xff;
cp[2] = (capacity >> 40) & 0xff;
@ -1603,7 +1595,18 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd)
cp[9] = 0;
cp[10] = 2;
cp[11] = 0;
aac_internal_transfer(scsicmd, cp, offset, sizeof(cp));
cp[12] = 0;
aac_internal_transfer(scsicmd, cp, 0,
min((unsigned int)scsicmd->cmnd[13], sizeof(cp)));
if (sizeof(cp) < scsicmd->cmnd[13]) {
unsigned int len, offset = sizeof(cp);
memset(cp, 0, offset);
do {
len = min(scsicmd->cmnd[13]-offset, sizeof(cp));
aac_internal_transfer(scsicmd, cp, offset, len);
} while ((offset += len) < scsicmd->cmnd[13]);
}
/* Do not cache partition table for arrays */
scsicmd->device->removable = 1;

View file

@ -820,7 +820,7 @@ static void aac_handle_aif(struct aac_dev * dev, struct fib * fibptr)
break;
/*
* Find the Scsi_Device associated with the SCSI
* Find the scsi_device associated with the SCSI
* address. Make sure we have the right array, and if
* so set the flag to initiate a new re-config once we
* see an AifEnConfigChange AIF come through.
@ -987,7 +987,7 @@ static void aac_handle_aif(struct aac_dev * dev, struct fib * fibptr)
/*
* Find the Scsi_Device associated with the SCSI address,
* Find the scsi_device associated with the SCSI address,
* and mark it as changed, invalidating the cache. This deals
* with changes to existing device IDs.
*/

View file

@ -114,7 +114,7 @@
#include "advansys.h"
#endif
and after "static Scsi_Host_Template builtin_scsi_hosts[] =":
and after "static struct scsi_host_template builtin_scsi_hosts[] =":
#ifdef CONFIG_SCSI_ADVANSYS
ADVANSYS,
@ -160,7 +160,7 @@
--- Driver Structures
--- Driver Data
--- Driver Function Prototypes
--- Linux 'Scsi_Host_Template' and advansys_setup() Functions
--- Linux 'struct scsi_host_template' and advansys_setup() Functions
--- Loadable Driver Support
--- Miscellaneous Driver Functions
--- Functions Required by the Asc Library
@ -4068,7 +4068,7 @@ STATIC void asc_prt_hex(char *f, uchar *, int);
/*
* --- Linux 'Scsi_Host_Template' and advansys_setup() Functions
* --- Linux 'struct scsi_host_template' and advansys_setup() Functions
*/
#ifdef CONFIG_PROC_FS

View file

@ -19,7 +19,7 @@
#define _ADVANSYS_H
/*
* Scsi_Host_Template function prototypes.
* struct scsi_host_template function prototypes.
*/
int advansys_detect(struct scsi_host_template *);
int advansys_release(struct Scsi_Host *);

View file

@ -424,7 +424,7 @@ MODULE_DEVICE_TABLE(isapnp, id_table);
static int registered_count=0;
static struct Scsi_Host *aha152x_host[2];
static Scsi_Host_Template aha152x_driver_template;
static struct scsi_host_template aha152x_driver_template;
/*
* internal states of the host
@ -3464,7 +3464,7 @@ static int aha152x_proc_info(struct Scsi_Host *shpnt, char *buffer, char **start
return thislength < length ? thislength : length;
}
static Scsi_Host_Template aha152x_driver_template = {
static struct scsi_host_template aha152x_driver_template = {
.module = THIS_MODULE,
.name = AHA152X_REVID,
.proc_name = "aha152x",

View file

@ -1021,7 +1021,7 @@ __setup("aha1542=",do_setup);
#endif
/* return non-zero on detection */
static int __init aha1542_detect(Scsi_Host_Template * tpnt)
static int __init aha1542_detect(struct scsi_host_template * tpnt)
{
unsigned char dma_chan;
unsigned char irq_level;
@ -1789,7 +1789,7 @@ static int aha1542_biosparam(struct scsi_device *sdev,
MODULE_LICENSE("GPL");
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "aha1542",
.name = "Adaptec 1542",
.detect = aha1542_detect,

View file

@ -131,7 +131,7 @@ struct ccb { /* Command Control Block 5.3 */
/* REQUEST SENSE */
};
static int aha1542_detect(Scsi_Host_Template *);
static int aha1542_detect(struct scsi_host_template *);
static int aha1542_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
static int aha1542_bus_reset(Scsi_Cmnd * SCpnt);
static int aha1542_dev_reset(Scsi_Cmnd * SCpnt);

View file

@ -570,7 +570,7 @@ static int aha1740_eh_abort_handler (Scsi_Cmnd *dummy)
return 0;
}
static Scsi_Host_Template aha1740_template = {
static struct scsi_host_template aha1740_template = {
.module = THIS_MODULE,
.proc_name = "aha1740",
.proc_info = aha1740_proc_info,

View file

@ -436,29 +436,20 @@ ahd_linux_queue(struct scsi_cmnd * cmd, void (*scsi_done) (struct scsi_cmnd *))
{
struct ahd_softc *ahd;
struct ahd_linux_device *dev = scsi_transport_device_data(cmd->device);
int rtn = SCSI_MLQUEUE_HOST_BUSY;
unsigned long flags;
ahd = *(struct ahd_softc **)cmd->device->host->hostdata;
/*
* Close the race of a command that was in the process of
* being queued to us just as our simq was frozen. Let
* DV commands through so long as we are only frozen to
* perform DV.
*/
if (ahd->platform_data->qfrozen != 0) {
printf("%s: queue frozen\n", ahd_name(ahd));
ahd_lock(ahd, &flags);
if (ahd->platform_data->qfrozen == 0) {
cmd->scsi_done = scsi_done;
cmd->result = CAM_REQ_INPROG << 16;
rtn = ahd_linux_run_command(ahd, dev, cmd);
return SCSI_MLQUEUE_HOST_BUSY;
}
/*
* Save the callback on completion function.
*/
cmd->scsi_done = scsi_done;
cmd->result = CAM_REQ_INPROG << 16;
return ahd_linux_run_command(ahd, dev, cmd);
ahd_unlock(ahd, &flags);
return rtn;
}
static inline struct scsi_target **
@ -1081,7 +1072,6 @@ ahd_linux_register_host(struct ahd_softc *ahd, struct scsi_host_template *templa
*((struct ahd_softc **)host->hostdata) = ahd;
ahd_lock(ahd, &s);
scsi_assign_lock(host, &ahd->platform_data->spin_lock);
ahd->platform_data->host = host;
host->can_queue = AHD_MAX_QUEUE;
host->cmd_per_lun = 2;
@ -2062,6 +2052,7 @@ ahd_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag)
int wait;
int disconnected;
ahd_mode_state saved_modes;
unsigned long flags;
pending_scb = NULL;
paused = FALSE;
@ -2077,7 +2068,7 @@ ahd_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag)
printf(" 0x%x", cmd->cmnd[cdb_byte]);
printf("\n");
spin_lock_irq(&ahd->platform_data->spin_lock);
ahd_lock(ahd, &flags);
/*
* First determine if we currently own this command.
@ -2291,7 +2282,8 @@ done:
int ret;
ahd->platform_data->flags |= AHD_SCB_UP_EH_SEM;
spin_unlock_irq(&ahd->platform_data->spin_lock);
ahd_unlock(ahd, &flags);
init_timer(&timer);
timer.data = (u_long)ahd;
timer.expires = jiffies + (5 * HZ);
@ -2305,9 +2297,8 @@ done:
printf("Timer Expired\n");
retval = FAILED;
}
spin_lock_irq(&ahd->platform_data->spin_lock);
}
spin_unlock_irq(&ahd->platform_data->spin_lock);
ahd_unlock(ahd, &flags);
return (retval);
}

View file

@ -476,26 +476,20 @@ ahc_linux_queue(struct scsi_cmnd * cmd, void (*scsi_done) (struct scsi_cmnd *))
{
struct ahc_softc *ahc;
struct ahc_linux_device *dev = scsi_transport_device_data(cmd->device);
int rtn = SCSI_MLQUEUE_HOST_BUSY;
unsigned long flags;
ahc = *(struct ahc_softc **)cmd->device->host->hostdata;
/*
* Save the callback on completion function.
*/
cmd->scsi_done = scsi_done;
ahc_lock(ahc, &flags);
if (ahc->platform_data->qfrozen == 0) {
cmd->scsi_done = scsi_done;
cmd->result = CAM_REQ_INPROG << 16;
rtn = ahc_linux_run_command(ahc, dev, cmd);
}
ahc_unlock(ahc, &flags);
/*
* Close the race of a command that was in the process of
* being queued to us just as our simq was frozen. Let
* DV commands through so long as we are only frozen to
* perform DV.
*/
if (ahc->platform_data->qfrozen != 0)
return SCSI_MLQUEUE_HOST_BUSY;
cmd->result = CAM_REQ_INPROG << 16;
return ahc_linux_run_command(ahc, dev, cmd);
return rtn;
}
static inline struct scsi_target **
@ -1079,7 +1073,6 @@ ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *templa
*((struct ahc_softc **)host->hostdata) = ahc;
ahc_lock(ahc, &s);
scsi_assign_lock(host, &ahc->platform_data->spin_lock);
ahc->platform_data->host = host;
host->can_queue = AHC_MAX_QUEUE;
host->cmd_per_lun = 2;
@ -2111,6 +2104,7 @@ ahc_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag)
int paused;
int wait;
int disconnected;
unsigned long flags;
pending_scb = NULL;
paused = FALSE;
@ -2125,7 +2119,7 @@ ahc_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag)
printf(" 0x%x", cmd->cmnd[cdb_byte]);
printf("\n");
spin_lock_irq(&ahc->platform_data->spin_lock);
ahc_lock(ahc, &flags);
/*
* First determine if we currently own this command.
@ -2357,7 +2351,8 @@ done:
int ret;
ahc->platform_data->flags |= AHC_UP_EH_SEMAPHORE;
spin_unlock_irq(&ahc->platform_data->spin_lock);
ahc_unlock(ahc, &flags);
init_timer(&timer);
timer.data = (u_long)ahc;
timer.expires = jiffies + (5 * HZ);
@ -2371,10 +2366,8 @@ done:
printf("Timer Expired\n");
retval = FAILED;
}
spin_lock_irq(&ahc->platform_data->spin_lock);
}
spin_unlock_irq(&ahc->platform_data->spin_lock);
} else
ahc_unlock(ahc, &flags);
return (retval);
}

View file

@ -6514,7 +6514,7 @@ do_aic7xxx_isr(int irq, void *dev_id, struct pt_regs *regs)
static void
aic7xxx_init_transinfo(struct aic7xxx_host *p, struct aic_dev_data *aic_dev)
{
Scsi_Device *sdpnt = aic_dev->SDptr;
struct scsi_device *sdpnt = aic_dev->SDptr;
unsigned char tindex;
tindex = sdpnt->id | (sdpnt->channel << 3);
@ -6581,7 +6581,7 @@ aic7xxx_init_transinfo(struct aic7xxx_host *p, struct aic_dev_data *aic_dev)
* Set up the initial aic_dev struct pointers
*-F*************************************************************************/
static int
aic7xxx_slave_alloc(Scsi_Device *SDptr)
aic7xxx_slave_alloc(struct scsi_device *SDptr)
{
struct aic7xxx_host *p = (struct aic7xxx_host *)SDptr->host->hostdata;
struct aic_dev_data *aic_dev;
@ -6644,7 +6644,7 @@ aic7xxx_slave_alloc(Scsi_Device *SDptr)
* queueing to be [en|dis]abled for a specific adapter.
*-F*************************************************************************/
static void
aic7xxx_device_queue_depth(struct aic7xxx_host *p, Scsi_Device *device)
aic7xxx_device_queue_depth(struct aic7xxx_host *p, struct scsi_device *device)
{
int tag_enabled = FALSE;
struct aic_dev_data *aic_dev = device->hostdata;
@ -6734,7 +6734,7 @@ aic7xxx_device_queue_depth(struct aic7xxx_host *p, Scsi_Device *device)
* prepare for this device to go away
*-F*************************************************************************/
static void
aic7xxx_slave_destroy(Scsi_Device *SDptr)
aic7xxx_slave_destroy(struct scsi_device *SDptr)
{
struct aic_dev_data *aic_dev = SDptr->hostdata;
@ -6754,7 +6754,7 @@ aic7xxx_slave_destroy(Scsi_Device *SDptr)
* depths, allocate command structs, etc.
*-F*************************************************************************/
static int
aic7xxx_slave_configure(Scsi_Device *SDptr)
aic7xxx_slave_configure(struct scsi_device *SDptr)
{
struct aic7xxx_host *p = (struct aic7xxx_host *) SDptr->host->hostdata;
struct aic_dev_data *aic_dev;
@ -7865,7 +7865,7 @@ detect_maxscb(struct aic7xxx_host *p)
* Register a Adaptec aic7xxx chip SCSI controller with the kernel.
*-F*************************************************************************/
static int
aic7xxx_register(Scsi_Host_Template *template, struct aic7xxx_host *p,
aic7xxx_register(struct scsi_host_template *template, struct aic7xxx_host *p,
int reset_delay)
{
int i, result;
@ -8412,7 +8412,7 @@ aic7xxx_chip_reset(struct aic7xxx_host *p)
* and a pointer to a aic7xxx_host struct upon success.
*-F*************************************************************************/
static struct aic7xxx_host *
aic7xxx_alloc(Scsi_Host_Template *sht, struct aic7xxx_host *temp)
aic7xxx_alloc(struct scsi_host_template *sht, struct aic7xxx_host *temp)
{
struct aic7xxx_host *p = NULL;
struct Scsi_Host *host;
@ -8991,7 +8991,7 @@ aic7xxx_configure_bugs(struct aic7xxx_host *p)
* mid-level SCSI code is overhauled.
*-F*************************************************************************/
static int
aic7xxx_detect(Scsi_Host_Template *template)
aic7xxx_detect(struct scsi_host_template *template)
{
struct aic7xxx_host *temp_p = NULL;
struct aic7xxx_host *current_p = NULL;
@ -11161,7 +11161,7 @@ MODULE_LICENSE("Dual BSD/GPL");
MODULE_VERSION(AIC7XXX_H_VERSION);
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_info = aic7xxx_proc_info,
.detect = aic7xxx_detect,
.release = aic7xxx_release,

View file

@ -29,7 +29,7 @@
#include "amiga7xx.h"
static int amiga7xx_register_one(Scsi_Host_Template *tpnt,
static int amiga7xx_register_one(struct scsi_host_template *tpnt,
unsigned long address)
{
long long options;
@ -65,7 +65,7 @@ static struct {
{ 0 }
};
static int __init amiga7xx_zorro_detect(Scsi_Host_Template *tpnt)
static int __init amiga7xx_zorro_detect(struct scsi_host_template *tpnt)
{
int num = 0, i;
struct zorro_dev *z = NULL;
@ -89,7 +89,7 @@ static int __init amiga7xx_zorro_detect(Scsi_Host_Template *tpnt)
#endif /* CONFIG_ZORRO */
int __init amiga7xx_detect(Scsi_Host_Template *tpnt)
int __init amiga7xx_detect(struct scsi_host_template *tpnt)
{
static unsigned char called = 0;
int num = 0;
@ -122,7 +122,7 @@ static int amiga7xx_release(struct Scsi_Host *shost)
return 0;
}
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.name = "Amiga NCR53c710 SCSI",
.detect = amiga7xx_detect,
.release = amiga7xx_release,

View file

@ -2,7 +2,7 @@
#include <linux/types.h>
int amiga7xx_detect(Scsi_Host_Template *);
int amiga7xx_detect(struct scsi_host_template *);
const char *NCR53c7x0_info(void);
int NCR53c7xx_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
int NCR53c7xx_abort(Scsi_Cmnd *);

View file

@ -896,7 +896,7 @@ void acornscsi_done(AS_Host *host, Scsi_Cmnd **SCpntp, unsigned int result)
* Notes : this will only be one SG entry or less
*/
static
void acornscsi_data_updateptr(AS_Host *host, Scsi_Pointer *SCp, unsigned int length)
void acornscsi_data_updateptr(AS_Host *host, struct scsi_pointer *SCp, unsigned int length)
{
SCp->ptr += length;
SCp->this_residual -= length;
@ -2862,7 +2862,7 @@ int acornscsi_proc_info(struct Scsi_Host *instance, char *buffer, char **start,
int length, int inout)
{
int pos, begin = 0, devidx;
Scsi_Device *scd;
struct scsi_device *scd;
AS_Host *host;
char *p = buffer;
@ -2971,7 +2971,7 @@ int acornscsi_proc_info(struct Scsi_Host *instance, char *buffer, char **start,
return pos;
}
static Scsi_Host_Template acornscsi_template = {
static struct scsi_host_template acornscsi_template = {
.module = THIS_MODULE,
.proc_info = acornscsi_proc_info,
.name = "AcornSCSI",

View file

@ -292,7 +292,7 @@ typedef struct acornscsi_hostdata {
unsigned char tag; /* reconnected tag */
} reconnected;
Scsi_Pointer SCp; /* current commands data pointer */
struct scsi_pointer SCp; /* current commands data pointer */
MsgQueue_t msgs;

View file

@ -65,7 +65,7 @@ struct arxescsi_info {
* Returns : 0 if we should not set CMD_WITHDMA for transfer info command
*/
static fasdmatype_t
arxescsi_dma_setup(struct Scsi_Host *host, Scsi_Pointer *SCp,
arxescsi_dma_setup(struct Scsi_Host *host, struct scsi_pointer *SCp,
fasdmadir_t direction, fasdmatype_t min_type)
{
/*
@ -111,7 +111,7 @@ static void arxescsi_pseudo_dma_write(unsigned char *addr, void __iomem *base)
* transfer - minimum number of bytes we expect to transfer
*/
static void
arxescsi_dma_pseudo(struct Scsi_Host *host, Scsi_Pointer *SCp,
arxescsi_dma_pseudo(struct Scsi_Host *host, struct scsi_pointer *SCp,
fasdmadir_t direction, int transfer)
{
struct arxescsi_info *info = (struct arxescsi_info *)host->hostdata;
@ -197,7 +197,7 @@ arxescsi_dma_pseudo(struct Scsi_Host *host, Scsi_Pointer *SCp,
* Params : host - host
* SCpnt - command
*/
static void arxescsi_dma_stop(struct Scsi_Host *host, Scsi_Pointer *SCp)
static void arxescsi_dma_stop(struct Scsi_Host *host, struct scsi_pointer *SCp)
{
/*
* no DMA to stop
@ -261,7 +261,7 @@ arxescsi_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t off
return pos;
}
static Scsi_Host_Template arxescsi_template = {
static struct scsi_host_template arxescsi_template = {
.proc_info = arxescsi_proc_info,
.name = "ARXE SCSI card",
.info = arxescsi_info,

View file

@ -238,7 +238,7 @@ static void cumanascsi_write(struct Scsi_Host *instance, int reg, int value)
#include "../NCR5380.c"
static Scsi_Host_Template cumanascsi_template = {
static struct scsi_host_template cumanascsi_template = {
.module = THIS_MODULE,
.name = "Cumana 16-bit SCSI",
.info = cumanascsi_info,

View file

@ -157,7 +157,7 @@ cumanascsi_2_intr(int irq, void *dev_id, struct pt_regs *regs)
* Returns : type of transfer to be performed
*/
static fasdmatype_t
cumanascsi_2_dma_setup(struct Scsi_Host *host, Scsi_Pointer *SCp,
cumanascsi_2_dma_setup(struct Scsi_Host *host, struct scsi_pointer *SCp,
fasdmadir_t direction, fasdmatype_t min_type)
{
struct cumanascsi2_info *info = (struct cumanascsi2_info *)host->hostdata;
@ -209,7 +209,7 @@ cumanascsi_2_dma_setup(struct Scsi_Host *host, Scsi_Pointer *SCp,
* transfer - minimum number of bytes we expect to transfer
*/
static void
cumanascsi_2_dma_pseudo(struct Scsi_Host *host, Scsi_Pointer *SCp,
cumanascsi_2_dma_pseudo(struct Scsi_Host *host, struct scsi_pointer *SCp,
fasdmadir_t direction, int transfer)
{
struct cumanascsi2_info *info = (struct cumanascsi2_info *)host->hostdata;
@ -283,7 +283,7 @@ cumanascsi_2_dma_pseudo(struct Scsi_Host *host, Scsi_Pointer *SCp,
* SCpnt - command
*/
static void
cumanascsi_2_dma_stop(struct Scsi_Host *host, Scsi_Pointer *SCp)
cumanascsi_2_dma_stop(struct Scsi_Host *host, struct scsi_pointer *SCp)
{
struct cumanascsi2_info *info = (struct cumanascsi2_info *)host->hostdata;
if (info->info.scsi.dma != NO_DMA) {
@ -381,7 +381,7 @@ int cumanascsi_2_proc_info (struct Scsi_Host *host, char *buffer, char **start,
return pos;
}
static Scsi_Host_Template cumanascsi2_template = {
static struct scsi_host_template cumanascsi2_template = {
.module = THIS_MODULE,
.proc_info = cumanascsi_2_proc_info,
.name = "Cumana SCSI II",

View file

@ -155,7 +155,7 @@ printk("reading %p len %d\n",addr, len);
#include "../NCR5380.c"
static Scsi_Host_Template ecoscsi_template = {
static struct scsi_host_template ecoscsi_template = {
.module = THIS_MODULE,
.name = "Serial Port EcoSCSI NCR5380",
.proc_name = "ecoscsi",

View file

@ -158,7 +158,7 @@ eesoxscsi_intr(int irq, void *dev_id, struct pt_regs *regs)
* Returns : type of transfer to be performed
*/
static fasdmatype_t
eesoxscsi_dma_setup(struct Scsi_Host *host, Scsi_Pointer *SCp,
eesoxscsi_dma_setup(struct Scsi_Host *host, struct scsi_pointer *SCp,
fasdmadir_t direction, fasdmatype_t min_type)
{
struct eesoxscsi_info *info = (struct eesoxscsi_info *)host->hostdata;
@ -353,7 +353,7 @@ static void eesoxscsi_buffer_out(void *buf, int length, void __iomem *base)
}
static void
eesoxscsi_dma_pseudo(struct Scsi_Host *host, Scsi_Pointer *SCp,
eesoxscsi_dma_pseudo(struct Scsi_Host *host, struct scsi_pointer *SCp,
fasdmadir_t dir, int transfer_size)
{
struct eesoxscsi_info *info = (struct eesoxscsi_info *)host->hostdata;
@ -370,7 +370,7 @@ eesoxscsi_dma_pseudo(struct Scsi_Host *host, Scsi_Pointer *SCp,
* SCpnt - command
*/
static void
eesoxscsi_dma_stop(struct Scsi_Host *host, Scsi_Pointer *SCp)
eesoxscsi_dma_stop(struct Scsi_Host *host, struct scsi_pointer *SCp)
{
struct eesoxscsi_info *info = (struct eesoxscsi_info *)host->hostdata;
if (info->info.scsi.dma != NO_DMA)
@ -499,7 +499,7 @@ static ssize_t eesoxscsi_store_term(struct device *dev, struct device_attribute
static DEVICE_ATTR(bus_term, S_IRUGO | S_IWUSR,
eesoxscsi_show_term, eesoxscsi_store_term);
static Scsi_Host_Template eesox_template = {
static struct scsi_host_template eesox_template = {
.module = THIS_MODULE,
.proc_info = eesoxscsi_proc_info,
.name = "EESOX SCSI",

View file

@ -173,7 +173,7 @@ static void fas216_dumpstate(FAS216_Info *info)
fas216_readb(info, REG_CTCH));
}
static void print_SCp(Scsi_Pointer *SCp, const char *prefix, const char *suffix)
static void print_SCp(struct scsi_pointer *SCp, const char *prefix, const char *suffix)
{
printk("%sptr %p this_residual 0x%x buffer %p buffers_residual 0x%x%s",
prefix, SCp->ptr, SCp->this_residual, SCp->buffer,
@ -628,7 +628,7 @@ static void fas216_handlesync(FAS216_Info *info, char *msg)
*/
static void fas216_updateptrs(FAS216_Info *info, int bytes_transferred)
{
Scsi_Pointer *SCp = &info->scsi.SCp;
struct scsi_pointer *SCp = &info->scsi.SCp;
fas216_checkmagic(info);
@ -668,7 +668,7 @@ static void fas216_updateptrs(FAS216_Info *info, int bytes_transferred)
*/
static void fas216_pio(FAS216_Info *info, fasdmadir_t direction)
{
Scsi_Pointer *SCp = &info->scsi.SCp;
struct scsi_pointer *SCp = &info->scsi.SCp;
fas216_checkmagic(info);
@ -2559,7 +2559,7 @@ int fas216_eh_bus_reset(Scsi_Cmnd *SCpnt)
{
FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata;
unsigned long flags;
Scsi_Device *SDpnt;
struct scsi_device *SDpnt;
fas216_checkmagic(info);
fas216_log(info, LOG_ERROR, "resetting bus");
@ -3000,7 +3000,7 @@ int fas216_print_stats(FAS216_Info *info, char *buffer)
int fas216_print_devices(FAS216_Info *info, char *buffer)
{
struct fas216_device *dev;
Scsi_Device *scd;
struct scsi_device *scd;
char *p = buffer;
p += sprintf(p, "Device/Lun TaggedQ Parity Sync\n");

View file

@ -243,7 +243,7 @@ typedef struct {
unsigned int irq; /* interrupt */
int dma; /* dma channel */
Scsi_Pointer SCp; /* current commands data pointer */
struct scsi_pointer SCp; /* current commands data pointer */
MsgQueue_t msgs; /* message queue for connected device */
@ -304,9 +304,9 @@ typedef struct {
/* dma */
struct {
fasdmatype_t transfer_type; /* current type of DMA transfer */
fasdmatype_t (*setup) (struct Scsi_Host *host, Scsi_Pointer *SCp, fasdmadir_t direction, fasdmatype_t min_dma);
void (*pseudo)(struct Scsi_Host *host, Scsi_Pointer *SCp, fasdmadir_t direction, int transfer);
void (*stop) (struct Scsi_Host *host, Scsi_Pointer *SCp);
fasdmatype_t (*setup) (struct Scsi_Host *host, struct scsi_pointer *SCp, fasdmadir_t direction, fasdmatype_t min_dma);
void (*pseudo)(struct Scsi_Host *host, struct scsi_pointer *SCp, fasdmadir_t direction, int transfer);
void (*stop) (struct Scsi_Host *host, struct scsi_pointer *SCp);
} dma;
/* miscellaneous */

View file

@ -111,7 +111,7 @@ printk("reading %p len %d\n", addr, len);
#include "../NCR5380.c"
static Scsi_Host_Template oakscsi_template = {
static struct scsi_host_template oakscsi_template = {
.module = THIS_MODULE,
.proc_info = oakscsi_proc_info,
.name = "Oak 16-bit SCSI",

View file

@ -132,7 +132,7 @@ powertecscsi_intr(int irq, void *dev_id, struct pt_regs *regs)
* Returns : type of transfer to be performed
*/
static fasdmatype_t
powertecscsi_dma_setup(struct Scsi_Host *host, Scsi_Pointer *SCp,
powertecscsi_dma_setup(struct Scsi_Host *host, struct scsi_pointer *SCp,
fasdmadir_t direction, fasdmatype_t min_type)
{
struct powertec_info *info = (struct powertec_info *)host->hostdata;
@ -174,7 +174,7 @@ powertecscsi_dma_setup(struct Scsi_Host *host, Scsi_Pointer *SCp,
* SCpnt - command
*/
static void
powertecscsi_dma_stop(struct Scsi_Host *host, Scsi_Pointer *SCp)
powertecscsi_dma_stop(struct Scsi_Host *host, struct scsi_pointer *SCp)
{
struct powertec_info *info = (struct powertec_info *)host->hostdata;
if (info->info.scsi.dma != NO_DMA)
@ -293,7 +293,7 @@ powertecscsi_store_term(struct device *dev, struct device_attribute *attr, const
static DEVICE_ATTR(bus_term, S_IRUGO | S_IWUSR,
powertecscsi_show_term, powertecscsi_store_term);
static Scsi_Host_Template powertecscsi_template = {
static struct scsi_host_template powertecscsi_template = {
.module = THIS_MODULE,
.proc_info = powertecscsi_proc_info,
.name = "PowerTec SCSI",

View file

@ -18,7 +18,7 @@
* The scatter-gather list handling. This contains all
* the yucky stuff that needs to be fixed properly.
*/
static inline int copy_SCp_to_sg(struct scatterlist *sg, Scsi_Pointer *SCp, int max)
static inline int copy_SCp_to_sg(struct scatterlist *sg, struct scsi_pointer *SCp, int max)
{
int bufs = SCp->buffers_residual;
@ -32,7 +32,7 @@ static inline int copy_SCp_to_sg(struct scatterlist *sg, Scsi_Pointer *SCp, int
return bufs + 1;
}
static inline int next_SCp(Scsi_Pointer *SCp)
static inline int next_SCp(struct scsi_pointer *SCp)
{
int ret = SCp->buffers_residual;
if (ret) {
@ -49,7 +49,7 @@ static inline int next_SCp(Scsi_Pointer *SCp)
return ret;
}
static inline unsigned char get_next_SCp_byte(Scsi_Pointer *SCp)
static inline unsigned char get_next_SCp_byte(struct scsi_pointer *SCp)
{
char c = *SCp->ptr;
@ -59,7 +59,7 @@ static inline unsigned char get_next_SCp_byte(Scsi_Pointer *SCp)
return c;
}
static inline void put_next_SCp_byte(Scsi_Pointer *SCp, unsigned char c)
static inline void put_next_SCp_byte(struct scsi_pointer *SCp, unsigned char c)
{
*SCp->ptr = c;
SCp->ptr += 1;

View file

@ -255,7 +255,7 @@
*/
static struct Scsi_Host *first_instance = NULL;
static Scsi_Host_Template *the_template = NULL;
static struct scsi_host_template *the_template = NULL;
/* Macros ease life... :-) */
#define SETUP_HOSTDATA(in) \

View file

@ -600,7 +600,7 @@ int atari_queue_command (Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
#endif
int atari_scsi_detect (Scsi_Host_Template *host)
int atari_scsi_detect (struct scsi_host_template *host)
{
static int called = 0;
struct Scsi_Host *instance;
@ -1141,7 +1141,7 @@ static void atari_scsi_falcon_reg_write( unsigned char reg, unsigned char value
#include "atari_NCR5380.c"
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_info = atari_scsi_proc_info,
.name = "Atari native SCSI",
.detect = atari_scsi_detect,

View file

@ -18,7 +18,7 @@
/* (I_HAVE_OVERRUNS stuff removed) */
#ifndef ASM
int atari_scsi_detect (Scsi_Host_Template *);
int atari_scsi_detect (struct scsi_host_template *);
const char *atari_scsi_info (struct Scsi_Host *);
int atari_scsi_reset (Scsi_Cmnd *, unsigned int);
#ifdef MODULE

View file

@ -94,7 +94,7 @@ static volatile unsigned char cmd_buffer[16];
*/
/***************************************************************** Detection */
int __init blz1230_esp_detect(Scsi_Host_Template *tpnt)
int __init blz1230_esp_detect(struct scsi_host_template *tpnt)
{
struct NCR_ESP *esp;
struct zorro_dev *z = NULL;
@ -328,7 +328,7 @@ int blz1230_esp_release(struct Scsi_Host *instance)
}
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "esp-blz1230",
.proc_info = esp_proc_info,
.name = "Blizzard1230 SCSI IV",

View file

@ -90,7 +90,7 @@ static volatile unsigned char cmd_buffer[16];
*/
/***************************************************************** Detection */
int __init blz2060_esp_detect(Scsi_Host_Template *tpnt)
int __init blz2060_esp_detect(struct scsi_host_template *tpnt)
{
struct NCR_ESP *esp;
struct zorro_dev *z = NULL;
@ -282,7 +282,7 @@ int blz2060_esp_release(struct Scsi_Host *instance)
}
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "esp-blz2060",
.proc_info = esp_proc_info,
.name = "Blizzard2060 SCSI",

View file

@ -23,7 +23,7 @@
#include<linux/stat.h>
int bvme6000_scsi_detect(Scsi_Host_Template *tpnt)
int bvme6000_scsi_detect(struct scsi_host_template *tpnt)
{
static unsigned char called = 0;
int clock;
@ -59,7 +59,7 @@ static int bvme6000_scsi_release(struct Scsi_Host *shost)
return 0;
}
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.name = "BVME6000 NCR53c710 SCSI",
.detect = bvme6000_scsi_detect,
.release = bvme6000_scsi_release,

View file

@ -3,7 +3,7 @@
#include <linux/types.h>
int bvme6000_scsi_detect(Scsi_Host_Template *);
int bvme6000_scsi_detect(struct scsi_host_template *);
const char *NCR53c7x0_info(void);
int NCR53c7xx_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
int NCR53c7xx_abort(Scsi_Cmnd *);

View file

@ -104,7 +104,7 @@ static volatile unsigned char cmd_buffer[16];
*/
/***************************************************************** Detection */
int __init cyber_esp_detect(Scsi_Host_Template *tpnt)
int __init cyber_esp_detect(struct scsi_host_template *tpnt)
{
struct NCR_ESP *esp;
struct zorro_dev *z = NULL;
@ -353,7 +353,7 @@ int cyber_esp_release(struct Scsi_Host *instance)
}
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "esp-cyberstorm",
.proc_info = esp_proc_info,
.name = "CyberStorm SCSI",

View file

@ -81,7 +81,7 @@ static volatile unsigned char cmd_buffer[16];
*/
/***************************************************************** Detection */
int __init cyberII_esp_detect(Scsi_Host_Template *tpnt)
int __init cyberII_esp_detect(struct scsi_host_template *tpnt)
{
struct NCR_ESP *esp;
struct zorro_dev *z = NULL;
@ -290,7 +290,7 @@ int cyberII_esp_release(struct Scsi_Host *instance)
}
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "esp-cyberstormII",
.proc_info = esp_proc_info,
.name = "CyberStorm Mk II SCSI",

View file

@ -133,7 +133,7 @@ static struct scsi_host_template driver_template = {
#include "scsi_module.c"
/***************************************************************** Detection */
static int dec_esp_detect(Scsi_Host_Template * tpnt)
static int dec_esp_detect(struct scsi_host_template * tpnt)
{
struct NCR_ESP *esp;
struct ConfigDev *esp_dev;

View file

@ -44,7 +44,7 @@ static int adpt_device_reset(struct scsi_cmnd* cmd);
/*
* Scsi_Host_Template (see hosts.h)
* struct scsi_host_template (see hosts.h)
*/
#define DPT_DRIVER_NAME "Adaptec I2O RAID"

View file

@ -199,7 +199,7 @@ static void __init dtc_setup(char *str, int *ints)
#endif
/*
* Function : int dtc_detect(Scsi_Host_Template * tpnt)
* 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,
@ -211,7 +211,7 @@ static void __init dtc_setup(char *str, int *ints)
*
*/
static int __init dtc_detect(Scsi_Host_Template * tpnt)
static int __init dtc_detect(struct scsi_host_template * tpnt)
{
static int current_override = 0, current_base = 0;
struct Scsi_Host *instance;
@ -471,7 +471,7 @@ static int dtc_release(struct Scsi_Host *shost)
return 0;
}
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.name = "DTC 3180/3280 ",
.detect = dtc_detect,
.release = dtc_release,

View file

@ -35,7 +35,7 @@
static int dtc_abort(Scsi_Cmnd *);
static int dtc_biosparam(struct scsi_device *, struct block_device *,
sector_t, int*);
static int dtc_detect(Scsi_Host_Template *);
static int dtc_detect(struct scsi_host_template *);
static int dtc_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
static int dtc_bus_reset(Scsi_Cmnd *);

View file

@ -125,7 +125,7 @@ static inline void dma_clear(struct NCR_ESP *esp)
}
/***************************************************************** Detection */
int __init fastlane_esp_detect(Scsi_Host_Template *tpnt)
int __init fastlane_esp_detect(struct scsi_host_template *tpnt)
{
struct NCR_ESP *esp;
struct zorro_dev *z = NULL;
@ -398,7 +398,7 @@ int fastlane_esp_release(struct Scsi_Host *instance)
}
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "esp-fastlane",
.proc_info = esp_proc_info,
.name = "Fastlane SCSI",

View file

@ -70,7 +70,7 @@ static unsigned char target2alpa[] = {
static int fcal_encode_addr(Scsi_Cmnd *SCpnt, u16 *addr, fc_channel *fc, fcp_cmnd *fcmd);
int fcal_slave_configure(Scsi_Device *device)
int fcal_slave_configure(struct scsi_device *device)
{
int depth_to_use;
@ -89,7 +89,7 @@ int fcal_slave_configure(Scsi_Device *device)
/* Detect all FC Arbitrated Loops attached to the machine.
fc4 module has done all the work for us... */
int __init fcal_detect(Scsi_Host_Template *tpnt)
int __init fcal_detect(struct scsi_host_template *tpnt)
{
int nfcals = 0;
fc_channel *fc;
@ -244,7 +244,7 @@ int fcal_proc_info (struct Scsi_Host *host, char *buffer, char **start, off_t of
SPRINTF (" [AL-PA: %02x, Port WWN: %08x%08x, Node WWN: %08x%08x] Not responded to PRLI\n",
alpa, u1[0], u1[1], u2[0], u2[1]);
} else {
Scsi_Device *scd;
struct scsi_device *scd;
shost_for_each_device(scd, host)
if (scd->id == target) {
SPRINTF (" [AL-PA: %02x, Id: %02d, Port WWN: %08x%08x, Node WWN: %08x%08x] ",
@ -297,7 +297,7 @@ static int fcal_encode_addr(Scsi_Cmnd *SCpnt, u16 *addr, fc_channel *fc, fcp_cmn
return 0;
}
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.name = "Fibre Channel Arbitrated Loop",
.detect = fcal_detect,
.release = fcal_release,

View file

@ -20,8 +20,8 @@ struct fcal {
for a particular channel */
#define FCAL_CAN_QUEUE 512
int fcal_detect(Scsi_Host_Template *);
int fcal_detect(struct scsi_host_template *);
int fcal_release(struct Scsi_Host *);
int fcal_slave_configure(Scsi_Device *);
int fcal_slave_configure(struct scsi_device *);
#endif /* !(_FCAL_H) */

View file

@ -343,7 +343,7 @@ static void fd_mcs_make_bus_idle(struct Scsi_Host *shpnt)
outb(0x01 | PARITY_MASK, TMC_Cntl_port);
}
static int fd_mcs_detect(Scsi_Host_Template * tpnt)
static int fd_mcs_detect(struct scsi_host_template * tpnt)
{
int loop;
struct Scsi_Host *shpnt;
@ -1343,7 +1343,7 @@ static int fd_mcs_biosparam(struct scsi_device * disk, struct block_device *bdev
return 0;
}
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "fd_mcs",
.proc_info = fd_mcs_proc_info,
.detect = fd_mcs_detect,

View file

@ -285,7 +285,7 @@ static int __init do_DTC3181E_setup(char *str)
* Locks: none
*/
int __init generic_NCR5380_detect(Scsi_Host_Template * tpnt)
int __init generic_NCR5380_detect(struct scsi_host_template * tpnt)
{
static int current_override = 0;
int count, i;
@ -798,7 +798,7 @@ static int generic_NCR5380_proc_info(struct Scsi_Host *scsi_ptr, char *buffer, c
Scsi_Cmnd *ptr;
struct NCR5380_hostdata *hostdata;
#ifdef NCR5380_STATS
Scsi_Device *dev;
struct scsi_device *dev;
extern const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE];
#endif
@ -899,7 +899,7 @@ static int generic_NCR5380_proc_info(struct Scsi_Host *scsi_ptr, char *buffer, c
#undef PRINTP
#undef ANDP
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_info = generic_NCR5380_proc_info,
.name = "Generic NCR5380/NCR53C400 Scsi Driver",
.detect = generic_NCR5380_detect,

View file

@ -45,7 +45,7 @@
#ifndef ASM
static int generic_NCR5380_abort(Scsi_Cmnd *);
static int generic_NCR5380_detect(Scsi_Host_Template *);
static int generic_NCR5380_detect(struct scsi_host_template *);
static int generic_NCR5380_release_resources(struct Scsi_Host *);
static int generic_NCR5380_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
static int generic_NCR5380_bus_reset(Scsi_Cmnd *);

View file

@ -94,7 +94,7 @@
* Bugfix free_irq()
*
* Revision 1.56 2001/08/09 11:19:39 achim
* Scsi_Host_Template changes
* struct scsi_host_template changes
*
* Revision 1.55 2001/08/09 10:11:28 achim
* Command HOST_UNFREEZE_IO before cache service init.
@ -4153,7 +4153,7 @@ int __init option_setup(char *str)
return 1;
}
static int __init gdth_detect(Scsi_Host_Template *shtp)
static int __init gdth_detect(struct scsi_host_template *shtp)
{
struct Scsi_Host *shp;
gdth_pci_str pcistr[MAXHA];
@ -5562,7 +5562,7 @@ static void gdth_flush(int hanum)
#else
Scsi_Cmnd *scp;
#endif
Scsi_Device *sdev;
struct scsi_device *sdev;
char cmnd[MAX_COMMAND_SIZE];
memset(cmnd, 0xff, MAX_COMMAND_SIZE);
@ -5624,10 +5624,10 @@ static int gdth_halt(struct notifier_block *nb, ulong event, void *buf)
gdth_cmd_str gdtcmd;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
Scsi_Request *srp;
Scsi_Device *sdev;
struct scsi_device *sdev;
#else
Scsi_Cmnd *scp;
Scsi_Device *sdev;
struct scsi_device *sdev;
#endif
char cmnd[MAX_COMMAND_SIZE];
#endif
@ -5683,7 +5683,7 @@ static int gdth_halt(struct notifier_block *nb, ulong event, void *buf)
return NOTIFY_OK;
}
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "gdth",
.proc_info = gdth_proc_info,
.name = "GDT SCSI Disk Array Controller",

View file

@ -944,9 +944,9 @@ typedef struct {
ulong dma32_cnt, dma64_cnt; /* statistics: DMA buffer */
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
Scsi_Device *sdev;
struct scsi_device *sdev;
#else
Scsi_Device sdev;
struct scsi_device sdev;
#endif
} gdth_ha_str;

View file

@ -54,10 +54,10 @@ static int gdth_set_info(char *buffer,int length,struct Scsi_Host *host,
int ret_val = -EINVAL;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
Scsi_Request *scp;
Scsi_Device *sdev;
struct scsi_device *sdev;
#else
Scsi_Cmnd *scp;
Scsi_Device *sdev;
struct scsi_device *sdev;
#endif
TRACE2(("gdth_set_info() ha %d bus %d\n",hanum,busnum));
@ -232,10 +232,10 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length,
gdth_evt_str *estr;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
Scsi_Request *scp;
Scsi_Device *sdev;
struct scsi_device *sdev;
#else
Scsi_Cmnd *scp;
Scsi_Device *sdev;
struct scsi_device *sdev;
#endif
char hrec[161];
struct timeval tv;
@ -275,7 +275,7 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length,
scp->cmd_len = 12;
scp->use_sg = 0;
#else
memset(&sdev,0,sizeof(Scsi_Device));
memset(&sdev,0,sizeof(struct scsi_device));
memset(&scp, 0,sizeof(Scsi_Cmnd));
sdev.host = scp.host = host;
sdev.id = scp.target = sdev.host->this_id;

View file

@ -169,7 +169,7 @@ static void dma_stop (struct Scsi_Host *instance, Scsi_Cmnd *SCpnt,
#define CHECK_WD33C93
int __init gvp11_detect(Scsi_Host_Template *tpnt)
int __init gvp11_detect(struct scsi_host_template *tpnt)
{
static unsigned char called = 0;
struct Scsi_Host *instance;
@ -361,7 +361,7 @@ static int gvp11_bus_reset(Scsi_Cmnd *cmd)
#include "gvp11.h"
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "GVP11",
.name = "GVP Series II SCSI",
.detect = gvp11_detect,

View file

@ -11,7 +11,7 @@
#include <linux/types.h>
int gvp11_detect(Scsi_Host_Template *);
int gvp11_detect(struct scsi_host_template *);
int gvp11_release(struct Scsi_Host *);
const char *wd33c93_info(void);
int wd33c93_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));

View file

@ -492,7 +492,7 @@ static char *ibmrate(unsigned int, int);
static int probe_display(int);
static int probe_bus_mode(int);
static int device_exists(int, int, int *, int *);
static struct Scsi_Host *ibmmca_register(Scsi_Host_Template *, int, int, int, char *);
static struct Scsi_Host *ibmmca_register(struct scsi_host_template *, int, int, int, char *);
static int option_setup(char *);
/* local functions needed for proc_info */
static int ldn_access_load(int, int);
@ -1483,7 +1483,7 @@ static int ibmmca_getinfo(char *buf, int slot, void *dev_id)
return len;
}
int ibmmca_detect(Scsi_Host_Template * scsi_template)
int ibmmca_detect(struct scsi_host_template * scsi_template)
{
struct Scsi_Host *shpnt;
int port, id, i, j, k, list_size, slot;
@ -1736,7 +1736,7 @@ int ibmmca_detect(Scsi_Host_Template * scsi_template)
return found; /* return the number of found SCSI hosts. Should be 1 or 0. */
}
static struct Scsi_Host *ibmmca_register(Scsi_Host_Template * scsi_template, int port, int id, int adaptertype, char *hostname)
static struct Scsi_Host *ibmmca_register(struct scsi_host_template * scsi_template, int port, int id, int adaptertype, char *hostname)
{
struct Scsi_Host *shpnt;
int i, j;
@ -2494,7 +2494,7 @@ static int option_setup(char *str)
__setup("ibmmcascsi=", option_setup);
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "ibmmca",
.proc_info = ibmmca_proc_info,
.name = "IBM SCSI-Subsystem",

View file

@ -11,7 +11,7 @@
/* Common forward declarations for all Linux-versions: */
/* Interfaces to the midlevel Linux SCSI driver */
static int ibmmca_detect (Scsi_Host_Template *);
static int ibmmca_detect (struct scsi_host_template *);
static int ibmmca_release (struct Scsi_Host *);
static int ibmmca_queuecommand (Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
static int ibmmca_abort (Scsi_Cmnd *);

View file

@ -882,7 +882,7 @@ static inline int should_transform(ide_drive_t *drive, struct scsi_cmnd *cmd)
struct gendisk *disk = cmd->request->rq_disk;
if (disk) {
struct Scsi_Device_Template **p = disk->private_data;
struct struct scsi_device_Template **p = disk->private_data;
if (strcmp((*p)->scsi_driverfs_driver.name, "sg") == 0)
return test_bit(IDESCSI_SG_TRANSFORM, &scsi->transform);
}

View file

@ -1899,7 +1899,7 @@ static int int_tab[] in2000__INITDATA = {
};
static int __init in2000_detect(Scsi_Host_Template * tpnt)
static int __init in2000_detect(struct scsi_host_template * tpnt)
{
struct Scsi_Host *instance;
struct IN2000_hostdata *hostdata;
@ -2305,7 +2305,7 @@ static int in2000_proc_info(struct Scsi_Host *instance, char *buf, char **start,
MODULE_LICENSE("GPL");
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "in2000",
.proc_info = in2000_proc_info,
.name = "Always IN2000",

View file

@ -395,7 +395,7 @@ struct IN2000_hostdata {
# define CLISPIN_UNLOCK(host,flags) spin_unlock_irqrestore(host->host_lock, \
flags)
static int in2000_detect(Scsi_Host_Template *) in2000__INIT;
static int in2000_detect(struct scsi_host_template *) in2000__INIT;
static int in2000_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
static int in2000_abort(Scsi_Cmnd *);
static void in2000_setup(char *, int *) in2000__INIT;

File diff suppressed because it is too large Load diff

View file

@ -36,23 +36,8 @@
/*
* Literals
*/
#define IPR_DRIVER_VERSION "2.0.14"
#define IPR_DRIVER_DATE "(May 2, 2005)"
/*
* IPR_DBG_TRACE: Setting this to 1 will turn on some general function tracing
* resulting in a bunch of extra debugging printks to the console
*
* IPR_DEBUG: Setting this to 1 will turn on some error path tracing.
* Enables the ipr_trace macro.
*/
#ifdef IPR_DEBUG_ALL
#define IPR_DEBUG 1
#define IPR_DBG_TRACE 1
#else
#define IPR_DEBUG 0
#define IPR_DBG_TRACE 0
#endif
#define IPR_DRIVER_VERSION "2.1.0"
#define IPR_DRIVER_DATE "(October 31, 2005)"
/*
* IPR_MAX_CMD_PER_LUN: This defines the maximum number of outstanding
@ -76,6 +61,10 @@
#define IPR_SUBS_DEV_ID_571A 0x02C0
#define IPR_SUBS_DEV_ID_571B 0x02BE
#define IPR_SUBS_DEV_ID_571E 0x02BF
#define IPR_SUBS_DEV_ID_571F 0x02D5
#define IPR_SUBS_DEV_ID_572A 0x02C1
#define IPR_SUBS_DEV_ID_572B 0x02C2
#define IPR_SUBS_DEV_ID_575B 0x030D
#define IPR_NAME "ipr"
@ -95,7 +84,10 @@
#define IPR_IOASC_HW_DEV_BUS_STATUS 0x04448500
#define IPR_IOASC_IOASC_MASK 0xFFFFFF00
#define IPR_IOASC_SCSI_STATUS_MASK 0x000000FF
#define IPR_IOASC_IR_INVALID_REQ_TYPE_OR_PKT 0x05240000
#define IPR_IOASC_IR_RESOURCE_HANDLE 0x05250000
#define IPR_IOASC_IR_NO_CMDS_TO_2ND_IOA 0x05258100
#define IPR_IOASA_IR_DUAL_IOA_DISABLED 0x052C8000
#define IPR_IOASC_BUS_WAS_RESET 0x06290000
#define IPR_IOASC_BUS_WAS_RESET_BY_OTHER 0x06298000
#define IPR_IOASC_ABORTED_CMD_TERM_BY_HOST 0x0B5A0000
@ -107,14 +99,14 @@
#define IPR_NUM_LOG_HCAMS 2
#define IPR_NUM_CFG_CHG_HCAMS 2
#define IPR_NUM_HCAMS (IPR_NUM_LOG_HCAMS + IPR_NUM_CFG_CHG_HCAMS)
#define IPR_MAX_NUM_TARGETS_PER_BUS 0x10
#define IPR_MAX_NUM_TARGETS_PER_BUS 256
#define IPR_MAX_NUM_LUNS_PER_TARGET 256
#define IPR_MAX_NUM_VSET_LUNS_PER_TARGET 8
#define IPR_VSET_BUS 0xff
#define IPR_IOA_BUS 0xff
#define IPR_IOA_TARGET 0xff
#define IPR_IOA_LUN 0xff
#define IPR_MAX_NUM_BUSES 4
#define IPR_MAX_NUM_BUSES 8
#define IPR_MAX_BUS_TO_SCAN IPR_MAX_NUM_BUSES
#define IPR_NUM_RESET_RELOAD_RETRIES 3
@ -205,6 +197,7 @@
#define IPR_SDT_FMT2_EXP_ROM_SEL 0x8
#define IPR_FMT2_SDT_READY_TO_USE 0xC4D4E3F2
#define IPR_DOORBELL 0x82800000
#define IPR_RUNTIME_RESET 0x40000000
#define IPR_PCII_IOA_TRANS_TO_OPER (0x80000000 >> 0)
#define IPR_PCII_IOARCB_XFER_FAILED (0x80000000 >> 3)
@ -261,6 +254,16 @@ struct ipr_std_inq_vpids {
u8 product_id[IPR_PROD_ID_LEN];
}__attribute__((packed));
struct ipr_vpd {
struct ipr_std_inq_vpids vpids;
u8 sn[IPR_SERIAL_NUM_LEN];
}__attribute__((packed));
struct ipr_ext_vpd {
struct ipr_vpd vpd;
__be32 wwid[2];
}__attribute__((packed));
struct ipr_std_inq_data {
u8 peri_qual_dev_type;
#define IPR_STD_INQ_PERI_QUAL(peri) ((peri) >> 5)
@ -304,6 +307,10 @@ struct ipr_config_table_entry {
#define IPR_SUBTYPE_GENERIC_SCSI 1
#define IPR_SUBTYPE_VOLUME_SET 2
#define IPR_QUEUEING_MODEL(res) ((((res)->cfgte.flags) & 0x70) >> 4)
#define IPR_QUEUE_FROZEN_MODEL 0
#define IPR_QUEUE_NACA_MODEL 1
struct ipr_res_addr res_addr;
__be32 res_handle;
__be32 reserved4[2];
@ -410,23 +417,26 @@ struct ipr_ioadl_desc {
struct ipr_ioasa_vset {
__be32 failing_lba_hi;
__be32 failing_lba_lo;
__be32 ioa_data[22];
__be32 reserved;
}__attribute__((packed, aligned (4)));
struct ipr_ioasa_af_dasd {
__be32 failing_lba;
__be32 reserved[2];
}__attribute__((packed, aligned (4)));
struct ipr_ioasa_gpdd {
u8 end_state;
u8 bus_phase;
__be16 reserved;
__be32 ioa_data[23];
__be32 ioa_data[2];
}__attribute__((packed, aligned (4)));
struct ipr_ioasa_raw {
__be32 ioa_data[24];
}__attribute__((packed, aligned (4)));
struct ipr_auto_sense {
__be16 auto_sense_len;
__be16 ioa_data_len;
__be32 data[SCSI_SENSE_BUFFERSIZE/sizeof(__be32)];
};
struct ipr_ioasa {
__be32 ioasc;
@ -453,6 +463,8 @@ struct ipr_ioasa {
__be32 fd_res_handle;
__be32 ioasc_specific; /* status code specific field */
#define IPR_ADDITIONAL_STATUS_FMT 0x80000000
#define IPR_AUTOSENSE_VALID 0x40000000
#define IPR_IOASC_SPECIFIC_MASK 0x00ffffff
#define IPR_FIELD_POINTER_VALID (0x80000000 >> 8)
#define IPR_FIELD_POINTER_MASK 0x0000ffff
@ -461,8 +473,9 @@ struct ipr_ioasa {
struct ipr_ioasa_vset vset;
struct ipr_ioasa_af_dasd dasd;
struct ipr_ioasa_gpdd gpdd;
struct ipr_ioasa_raw raw;
} u;
struct ipr_auto_sense auto_sense;
}__attribute__((packed, aligned (4)));
struct ipr_mode_parm_hdr {
@ -536,28 +549,49 @@ struct ipr_inquiry_page3 {
u8 patch_number[4];
}__attribute__((packed));
#define IPR_INQUIRY_PAGE0_ENTRIES 20
struct ipr_inquiry_page0 {
u8 peri_qual_dev_type;
u8 page_code;
u8 reserved1;
u8 len;
u8 page[IPR_INQUIRY_PAGE0_ENTRIES];
}__attribute__((packed));
struct ipr_hostrcb_device_data_entry {
struct ipr_std_inq_vpids dev_vpids;
u8 dev_sn[IPR_SERIAL_NUM_LEN];
struct ipr_vpd vpd;
struct ipr_res_addr dev_res_addr;
struct ipr_std_inq_vpids new_dev_vpids;
u8 new_dev_sn[IPR_SERIAL_NUM_LEN];
struct ipr_std_inq_vpids ioa_last_with_dev_vpids;
u8 ioa_last_with_dev_sn[IPR_SERIAL_NUM_LEN];
struct ipr_std_inq_vpids cfc_last_with_dev_vpids;
u8 cfc_last_with_dev_sn[IPR_SERIAL_NUM_LEN];
struct ipr_vpd new_vpd;
struct ipr_vpd ioa_last_with_dev_vpd;
struct ipr_vpd cfc_last_with_dev_vpd;
__be32 ioa_data[5];
}__attribute__((packed, aligned (4)));
struct ipr_hostrcb_device_data_entry_enhanced {
struct ipr_ext_vpd vpd;
u8 ccin[4];
struct ipr_res_addr dev_res_addr;
struct ipr_ext_vpd new_vpd;
u8 new_ccin[4];
struct ipr_ext_vpd ioa_last_with_dev_vpd;
struct ipr_ext_vpd cfc_last_with_dev_vpd;
}__attribute__((packed, aligned (4)));
struct ipr_hostrcb_array_data_entry {
struct ipr_std_inq_vpids vpids;
u8 serial_num[IPR_SERIAL_NUM_LEN];
struct ipr_vpd vpd;
struct ipr_res_addr expected_dev_res_addr;
struct ipr_res_addr dev_res_addr;
}__attribute__((packed, aligned (4)));
struct ipr_hostrcb_array_data_entry_enhanced {
struct ipr_ext_vpd vpd;
u8 ccin[4];
struct ipr_res_addr expected_dev_res_addr;
struct ipr_res_addr dev_res_addr;
}__attribute__((packed, aligned (4)));
struct ipr_hostrcb_type_ff_error {
__be32 ioa_data[246];
__be32 ioa_data[502];
}__attribute__((packed, aligned (4)));
struct ipr_hostrcb_type_01_error {
@ -568,47 +602,75 @@ struct ipr_hostrcb_type_01_error {
}__attribute__((packed, aligned (4)));
struct ipr_hostrcb_type_02_error {
struct ipr_std_inq_vpids ioa_vpids;
u8 ioa_sn[IPR_SERIAL_NUM_LEN];
struct ipr_std_inq_vpids cfc_vpids;
u8 cfc_sn[IPR_SERIAL_NUM_LEN];
struct ipr_std_inq_vpids ioa_last_attached_to_cfc_vpids;
u8 ioa_last_attached_to_cfc_sn[IPR_SERIAL_NUM_LEN];
struct ipr_std_inq_vpids cfc_last_attached_to_ioa_vpids;
u8 cfc_last_attached_to_ioa_sn[IPR_SERIAL_NUM_LEN];
struct ipr_vpd ioa_vpd;
struct ipr_vpd cfc_vpd;
struct ipr_vpd ioa_last_attached_to_cfc_vpd;
struct ipr_vpd cfc_last_attached_to_ioa_vpd;
__be32 ioa_data[3];
}__attribute__((packed, aligned (4)));
struct ipr_hostrcb_type_12_error {
struct ipr_ext_vpd ioa_vpd;
struct ipr_ext_vpd cfc_vpd;
struct ipr_ext_vpd ioa_last_attached_to_cfc_vpd;
struct ipr_ext_vpd cfc_last_attached_to_ioa_vpd;
__be32 ioa_data[3];
u8 reserved[844];
}__attribute__((packed, aligned (4)));
struct ipr_hostrcb_type_03_error {
struct ipr_std_inq_vpids ioa_vpids;
u8 ioa_sn[IPR_SERIAL_NUM_LEN];
struct ipr_std_inq_vpids cfc_vpids;
u8 cfc_sn[IPR_SERIAL_NUM_LEN];
struct ipr_vpd ioa_vpd;
struct ipr_vpd cfc_vpd;
__be32 errors_detected;
__be32 errors_logged;
u8 ioa_data[12];
struct ipr_hostrcb_device_data_entry dev_entry[3];
u8 reserved[444];
struct ipr_hostrcb_device_data_entry dev[3];
}__attribute__((packed, aligned (4)));
struct ipr_hostrcb_type_13_error {
struct ipr_ext_vpd ioa_vpd;
struct ipr_ext_vpd cfc_vpd;
__be32 errors_detected;
__be32 errors_logged;
struct ipr_hostrcb_device_data_entry_enhanced dev[3];
}__attribute__((packed, aligned (4)));
struct ipr_hostrcb_type_04_error {
struct ipr_std_inq_vpids ioa_vpids;
u8 ioa_sn[IPR_SERIAL_NUM_LEN];
struct ipr_std_inq_vpids cfc_vpids;
u8 cfc_sn[IPR_SERIAL_NUM_LEN];
struct ipr_vpd ioa_vpd;
struct ipr_vpd cfc_vpd;
u8 ioa_data[12];
struct ipr_hostrcb_array_data_entry array_member[10];
__be32 exposed_mode_adn;
__be32 array_id;
struct ipr_std_inq_vpids incomp_dev_vpids;
u8 incomp_dev_sn[IPR_SERIAL_NUM_LEN];
struct ipr_vpd incomp_dev_vpd;
__be32 ioa_data2;
struct ipr_hostrcb_array_data_entry array_member2[8];
struct ipr_res_addr last_func_vset_res_addr;
u8 vset_serial_num[IPR_SERIAL_NUM_LEN];
u8 protection_level[8];
u8 reserved[124];
}__attribute__((packed, aligned (4)));
struct ipr_hostrcb_type_14_error {
struct ipr_ext_vpd ioa_vpd;
struct ipr_ext_vpd cfc_vpd;
__be32 exposed_mode_adn;
__be32 array_id;
struct ipr_res_addr last_func_vset_res_addr;
u8 vset_serial_num[IPR_SERIAL_NUM_LEN];
u8 protection_level[8];
__be32 num_entries;
struct ipr_hostrcb_array_data_entry_enhanced array_member[18];
}__attribute__((packed, aligned (4)));
struct ipr_hostrcb_type_07_error {
u8 failure_reason[64];
struct ipr_vpd vpd;
u32 data[222];
}__attribute__((packed, aligned (4)));
struct ipr_hostrcb_type_17_error {
u8 failure_reason[64];
struct ipr_ext_vpd vpd;
u32 data[476];
}__attribute__((packed, aligned (4)));
struct ipr_hostrcb_error {
@ -622,6 +684,11 @@ struct ipr_hostrcb_error {
struct ipr_hostrcb_type_02_error type_02_error;
struct ipr_hostrcb_type_03_error type_03_error;
struct ipr_hostrcb_type_04_error type_04_error;
struct ipr_hostrcb_type_07_error type_07_error;
struct ipr_hostrcb_type_12_error type_12_error;
struct ipr_hostrcb_type_13_error type_13_error;
struct ipr_hostrcb_type_14_error type_14_error;
struct ipr_hostrcb_type_17_error type_17_error;
} u;
}__attribute__((packed, aligned (4)));
@ -655,6 +722,12 @@ struct ipr_hcam {
#define IPR_HOST_RCB_OVERLAY_ID_3 0x03
#define IPR_HOST_RCB_OVERLAY_ID_4 0x04
#define IPR_HOST_RCB_OVERLAY_ID_6 0x06
#define IPR_HOST_RCB_OVERLAY_ID_7 0x07
#define IPR_HOST_RCB_OVERLAY_ID_12 0x12
#define IPR_HOST_RCB_OVERLAY_ID_13 0x13
#define IPR_HOST_RCB_OVERLAY_ID_14 0x14
#define IPR_HOST_RCB_OVERLAY_ID_16 0x16
#define IPR_HOST_RCB_OVERLAY_ID_17 0x17
#define IPR_HOST_RCB_OVERLAY_ID_DEFAULT 0xFF
u8 reserved1[3];
@ -743,6 +816,7 @@ struct ipr_resource_table {
struct ipr_misc_cbs {
struct ipr_ioa_vpd ioa_vpd;
struct ipr_inquiry_page0 page0_data;
struct ipr_inquiry_page3 page3_data;
struct ipr_mode_pages mode_pages;
struct ipr_supported_device supp_dev;
@ -813,6 +887,7 @@ struct ipr_trace_entry {
struct ipr_sglist {
u32 order;
u32 num_sg;
u32 num_dma_sg;
u32 buffer_len;
struct scatterlist scatterlist[1];
};
@ -825,6 +900,13 @@ enum ipr_sdt_state {
DUMP_OBTAINED
};
enum ipr_cache_state {
CACHE_NONE,
CACHE_DISABLED,
CACHE_ENABLED,
CACHE_INVALID
};
/* Per-controller data */
struct ipr_ioa_cfg {
char eye_catcher[8];
@ -841,6 +923,7 @@ struct ipr_ioa_cfg {
u8 allow_cmds:1;
u8 allow_ml_add_del:1;
enum ipr_cache_state cache_state;
u16 type; /* CCIN of the card */
u8 log_level;
@ -911,6 +994,7 @@ struct ipr_ioa_cfg {
u16 reset_retries;
u32 errors_logged;
u32 doorbell;
struct Scsi_Host *host;
struct pci_dev *pdev;
@ -948,6 +1032,7 @@ struct ipr_cmnd {
struct timer_list timer;
void (*done) (struct ipr_cmnd *);
int (*job_step) (struct ipr_cmnd *);
int (*job_step_failed) (struct ipr_cmnd *);
u16 cmd_index;
u8 sense_buffer[SCSI_SENSE_BUFFERSIZE];
dma_addr_t sense_buffer_dma;
@ -1083,11 +1168,7 @@ struct ipr_ucode_image_header {
/*
* Macros
*/
#if IPR_DEBUG
#define IPR_DBG_CMD(CMD) do { CMD; } while (0)
#else
#define IPR_DBG_CMD(CMD)
#endif
#define IPR_DBG_CMD(CMD) if (ipr_debug) { CMD; }
#ifdef CONFIG_SCSI_IPR_TRACE
#define ipr_create_trace_file(kobj, attr) sysfs_create_bin_file(kobj, attr)
@ -1135,16 +1216,22 @@ struct ipr_ucode_image_header {
#define ipr_res_dbg(ioa_cfg, res, fmt, ...) \
IPR_DBG_CMD(ipr_res_printk(KERN_INFO, ioa_cfg, res, fmt, ##__VA_ARGS__))
#define ipr_phys_res_err(ioa_cfg, res, fmt, ...) \
{ \
if ((res).bus >= IPR_MAX_NUM_BUSES) { \
ipr_err(fmt": unknown\n", ##__VA_ARGS__); \
} else { \
ipr_err(fmt": %d:%d:%d:%d\n", \
##__VA_ARGS__, (ioa_cfg)->host->host_no, \
(res).bus, (res).target, (res).lun); \
} \
}
#define ipr_trace ipr_dbg("%s: %s: Line: %d\n",\
__FILE__, __FUNCTION__, __LINE__)
#if IPR_DBG_TRACE
#define ENTER printk(KERN_INFO IPR_NAME": Entering %s\n", __FUNCTION__)
#define LEAVE printk(KERN_INFO IPR_NAME": Leaving %s\n", __FUNCTION__)
#else
#define ENTER
#define LEAVE
#endif
#define ENTER IPR_DBG_CMD(printk(KERN_INFO IPR_NAME": Entering %s\n", __FUNCTION__))
#define LEAVE IPR_DBG_CMD(printk(KERN_INFO IPR_NAME": Leaving %s\n", __FUNCTION__))
#define ipr_err_separator \
ipr_err("----------------------------------------------------------\n")
@ -1216,6 +1303,20 @@ static inline int ipr_is_gscsi(struct ipr_resource_entry *res)
return 0;
}
/**
* ipr_is_naca_model - Determine if a resource is using NACA queueing model
* @res: resource entry struct
*
* Return value:
* 1 if NACA queueing model / 0 if not NACA queueing model
**/
static inline int ipr_is_naca_model(struct ipr_resource_entry *res)
{
if (ipr_is_gscsi(res) && IPR_QUEUEING_MODEL(res) == IPR_QUEUE_NACA_MODEL)
return 1;
return 0;
}
/**
* ipr_is_device - Determine if resource address is that of a device
* @res_addr: resource address struct
@ -1226,7 +1327,7 @@ static inline int ipr_is_gscsi(struct ipr_resource_entry *res)
static inline int ipr_is_device(struct ipr_res_addr *res_addr)
{
if ((res_addr->bus < IPR_MAX_NUM_BUSES) &&
(res_addr->target < IPR_MAX_NUM_TARGETS_PER_BUS))
(res_addr->target < (IPR_MAX_NUM_TARGETS_PER_BUS - 1)))
return 1;
return 0;

View file

@ -139,6 +139,7 @@
/* - Remove 3 unused "inline" functions */
/* 7.12.xx - Use STATIC functions whereever possible */
/* - Clean up deprecated MODULE_PARM calls */
/* 7.12.05 - Remove Version Matching per IBM request */
/*****************************************************************************/
/*
@ -210,7 +211,7 @@ module_param(ips, charp, 0);
* DRIVER_VER
*/
#define IPS_VERSION_HIGH "7.12"
#define IPS_VERSION_LOW ".02 "
#define IPS_VERSION_LOW ".05 "
#if !defined(__i386__) && !defined(__ia64__) && !defined(__x86_64__)
#warning "This driver has only been tested on the x86/ia64/x86_64 platforms"
@ -247,7 +248,7 @@ module_param(ips, charp, 0);
/*
* Function prototypes
*/
static int ips_detect(Scsi_Host_Template *);
static int ips_detect(struct scsi_host_template *);
static int ips_release(struct Scsi_Host *);
static int ips_eh_abort(Scsi_Cmnd *);
static int ips_eh_reset(Scsi_Cmnd *);
@ -347,8 +348,6 @@ static int ips_proc_info(struct Scsi_Host *, char *, char **, off_t, int, int);
static int ips_host_info(ips_ha_t *, char *, off_t, int);
static void copy_mem_info(IPS_INFOSTR *, char *, int);
static int copy_info(IPS_INFOSTR *, char *, ...);
static int ips_get_version_info(ips_ha_t * ha, dma_addr_t, int intr);
static void ips_version_check(ips_ha_t * ha, int intr);
static int ips_abort_init(ips_ha_t * ha, int index);
static int ips_init_phase2(int index);
@ -378,7 +377,7 @@ static char *ips_FlashData = NULL; /* CD Boot - Flash Data Buffer */
static dma_addr_t ips_flashbusaddr;
static long ips_FlashDataInUse; /* CD Boot - Flash Data In Use Flag */
static uint32_t MaxLiteCmds = 32; /* Max Active Cmds for a Lite Adapter */
static Scsi_Host_Template ips_driver_template = {
static struct scsi_host_template ips_driver_template = {
.detect = ips_detect,
.release = ips_release,
.info = ips_info,
@ -406,8 +405,6 @@ static Scsi_Host_Template ips_driver_template = {
#endif
};
static IPS_DEFINE_COMPAT_TABLE( Compatable ); /* Version Compatability Table */
/* This table describes all ServeRAID Adapters */
static struct pci_device_id ips_pci_table[] = {
@ -590,7 +587,7 @@ __setup("ips=", ips_setup);
/* */
/****************************************************************************/
static int
ips_detect(Scsi_Host_Template * SHT)
ips_detect(struct scsi_host_template * SHT)
{
int i;
@ -1265,9 +1262,9 @@ ips_proc24_info(char *buffer, char **start, off_t offset, int length,
/* */
/****************************************************************************/
static void
ips_select_queue_depth(struct Scsi_Host *host, Scsi_Device * scsi_devs)
ips_select_queue_depth(struct Scsi_Host *host, struct scsi_device * scsi_devs)
{
Scsi_Device *device;
struct scsi_device *device;
ips_ha_t *ha;
int count = 0;
int min;
@ -1310,7 +1307,7 @@ ips_select_queue_depth(struct Scsi_Host *host, Scsi_Device * scsi_devs)
/* */
/****************************************************************************/
static int
ips_slave_configure(Scsi_Device * SDptr)
ips_slave_configure(struct scsi_device * SDptr)
{
ips_ha_t *ha;
int min;
@ -5930,7 +5927,7 @@ ips_write_driver_status(ips_ha_t * ha, int intr)
strncpy((char *) ha->nvram->bios_high, ha->bios_version, 4);
strncpy((char *) ha->nvram->bios_low, ha->bios_version + 4, 4);
ips_version_check(ha, intr); /* Check BIOS/FW/Driver Versions */
ha->nvram->versioning = 0; /* Indicate the Driver Does Not Support Versioning */
/* now update the page */
if (!ips_readwrite_page5(ha, TRUE, intr)) {
@ -6847,135 +6844,6 @@ ips_verify_bios_memio(ips_ha_t * ha, char *buffer, uint32_t buffersize,
return (0);
}
/*---------------------------------------------------------------------------*/
/* Routine Name: ips_version_check */
/* */
/* Dependencies: */
/* Assumes that ips_read_adapter_status() is called first filling in */
/* the data for SubSystem Parameters. */
/* Called from ips_write_driver_status() so it also assumes NVRAM Page 5 */
/* Data is available. */
/* */
/*---------------------------------------------------------------------------*/
static void
ips_version_check(ips_ha_t * ha, int intr)
{
IPS_VERSION_DATA *VersionInfo;
uint8_t FirmwareVersion[IPS_COMPAT_ID_LENGTH + 1];
uint8_t BiosVersion[IPS_COMPAT_ID_LENGTH + 1];
int MatchError;
int rc;
char BiosString[10];
char FirmwareString[10];
METHOD_TRACE("ips_version_check", 1);
VersionInfo = ( IPS_VERSION_DATA * ) ha->ioctl_data;
memset(FirmwareVersion, 0, IPS_COMPAT_ID_LENGTH + 1);
memset(BiosVersion, 0, IPS_COMPAT_ID_LENGTH + 1);
/* Get the Compatible BIOS Version from NVRAM Page 5 */
memcpy(BiosVersion, ha->nvram->BiosCompatibilityID,
IPS_COMPAT_ID_LENGTH);
rc = IPS_FAILURE;
if (ha->subsys->param[4] & IPS_GET_VERSION_SUPPORT) { /* If Versioning is Supported */
/* Get the Version Info with a Get Version Command */
memset( VersionInfo, 0, sizeof (IPS_VERSION_DATA));
rc = ips_get_version_info(ha, ha->ioctl_busaddr, intr);
if (rc == IPS_SUCCESS)
memcpy(FirmwareVersion, VersionInfo->compatibilityId,
IPS_COMPAT_ID_LENGTH);
}
if (rc != IPS_SUCCESS) { /* If Data Not Obtainable from a GetVersion Command */
/* Get the Firmware Version from Enquiry Data */
memcpy(FirmwareVersion, ha->enq->CodeBlkVersion,
IPS_COMPAT_ID_LENGTH);
}
/* printk(KERN_WARNING "Adapter's BIOS Version = %s\n", BiosVersion); */
/* printk(KERN_WARNING "BIOS Compatible Version = %s\n", IPS_COMPAT_BIOS); */
/* printk(KERN_WARNING "Adapter's Firmware Version = %s\n", FirmwareVersion); */
/* printk(KERN_WARNING "Firmware Compatible Version = %s \n", Compatable[ ha->nvram->adapter_type ]); */
MatchError = 0;
if (strncmp
(FirmwareVersion, Compatable[ha->nvram->adapter_type],
IPS_COMPAT_ID_LENGTH) != 0)
MatchError = 1;
if (strncmp(BiosVersion, IPS_COMPAT_BIOS, IPS_COMPAT_ID_LENGTH) != 0)
MatchError = 1;
ha->nvram->versioning = 1; /* Indicate the Driver Supports Versioning */
if (MatchError) {
ha->nvram->version_mismatch = 1;
if (ips_cd_boot == 0) {
strncpy(&BiosString[0], ha->nvram->bios_high, 4);
strncpy(&BiosString[4], ha->nvram->bios_low, 4);
BiosString[8] = 0;
strncpy(&FirmwareString[0], ha->enq->CodeBlkVersion, 8);
FirmwareString[8] = 0;
IPS_PRINTK(KERN_WARNING, ha->pcidev,
"Warning ! ! ! ServeRAID Version Mismatch\n");
IPS_PRINTK(KERN_WARNING, ha->pcidev,
"Bios = %s, Firmware = %s, Device Driver = %s%s\n",
BiosString, FirmwareString, IPS_VERSION_HIGH,
IPS_VERSION_LOW);
IPS_PRINTK(KERN_WARNING, ha->pcidev,
"These levels should match to avoid possible compatibility problems.\n");
}
} else {
ha->nvram->version_mismatch = 0;
}
return;
}
/*---------------------------------------------------------------------------*/
/* Routine Name: ips_get_version_info */
/* */
/* Routine Description: */
/* Issue an internal GETVERSION Command */
/* */
/* Return Value: */
/* 0 if Successful, else non-zero */
/*---------------------------------------------------------------------------*/
static int
ips_get_version_info(ips_ha_t * ha, dma_addr_t Buffer, int intr)
{
ips_scb_t *scb;
int rc;
METHOD_TRACE("ips_get_version_info", 1);
scb = &ha->scbs[ha->max_cmds - 1];
ips_init_scb(ha, scb);
scb->timeout = ips_cmd_timeout;
scb->cdb[0] = IPS_CMD_GET_VERSION_INFO;
scb->cmd.version_info.op_code = IPS_CMD_GET_VERSION_INFO;
scb->cmd.version_info.command_id = IPS_COMMAND_ID(ha, scb);
scb->cmd.version_info.reserved = 0;
scb->cmd.version_info.count = sizeof (IPS_VERSION_DATA);
scb->cmd.version_info.reserved2 = 0;
scb->data_len = sizeof (IPS_VERSION_DATA);
scb->data_busaddr = Buffer;
scb->cmd.version_info.buffer_addr = Buffer;
scb->flags = 0;
/* issue command */
rc = ips_send_wait(ha, scb, ips_cmd_timeout, intr);
return (rc);
}
/****************************************************************************/
/* */
/* Routine Name: ips_abort_init */

View file

@ -450,13 +450,13 @@
*/
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
static int ips_proc24_info(char *, char **, off_t, int, int, int);
static void ips_select_queue_depth(struct Scsi_Host *, Scsi_Device *);
static void ips_select_queue_depth(struct Scsi_Host *, struct scsi_device *);
static int ips_biosparam(Disk *disk, kdev_t dev, int geom[]);
#else
static int ips_proc_info(struct Scsi_Host *, char *, char **, off_t, int, int);
static int ips_biosparam(struct scsi_device *sdev, struct block_device *bdev,
sector_t capacity, int geom[]);
static int ips_slave_configure(Scsi_Device *SDptr);
static int ips_slave_configure(struct scsi_device *SDptr);
#endif
/*

View file

@ -52,7 +52,7 @@ static volatile unsigned char cmd_buffer[16];
* via PIO.
*/
int jazz_esp_detect(Scsi_Host_Template *tpnt);
int jazz_esp_detect(struct scsi_host_template *tpnt);
static int jazz_esp_release(struct Scsi_Host *shost)
{
if (shost->irq)
@ -65,7 +65,7 @@ static int jazz_esp_release(struct Scsi_Host *shost)
return 0;
}
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "jazz_esp",
.proc_info = &esp_proc_info,
.name = "ESP 100/100a/200",

View file

@ -300,7 +300,7 @@ unsigned long get_base(int chip_num)
* Model dependent ESP setup
*/
int mac_esp_detect(Scsi_Host_Template * tpnt)
int mac_esp_detect(struct scsi_host_template * tpnt)
{
int quick = 0;
int chipnum, chipspresent = 0;
@ -730,7 +730,7 @@ static void dma_setup_quick(struct NCR_ESP * esp, __u32 addr, int count, int wri
#endif
}
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "mac_esp",
.name = "Mac 53C9x SCSI",
.detect = mac_esp_detect,

View file

@ -222,7 +222,7 @@ static struct Scsi_Host *default_instance;
#endif
/*
* Function : int macscsi_detect(Scsi_Host_Template * tpnt)
* Function : int macscsi_detect(struct scsi_host_template * tpnt)
*
* Purpose : initializes mac NCR5380 driver based on the
* command line / compile time port and irq definitions.
@ -233,7 +233,7 @@ static struct Scsi_Host *default_instance;
*
*/
int macscsi_detect(Scsi_Host_Template * tpnt)
int macscsi_detect(struct scsi_host_template * tpnt)
{
static int called = 0;
int flags = 0;
@ -581,7 +581,7 @@ static int macscsi_pwrite (struct Scsi_Host *instance,
#include "NCR5380.c"
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "Mac5380",
.proc_info = macscsi_proc_info,
.name = "Macintosh NCR5380 SCSI",

View file

@ -103,7 +103,7 @@ static volatile unsigned char cmd_buffer[16];
static struct ESP_regs eregs;
/***************************************************************** Detection */
static int mca_esp_detect(Scsi_Host_Template *tpnt)
static int mca_esp_detect(struct scsi_host_template *tpnt)
{
struct NCR_ESP *esp;
static int io_port_by_pos[] = MCA_53C9X_IO_PORTS;
@ -444,7 +444,7 @@ static void dma_led_off(struct NCR_ESP *esp)
outb(inb(PS2_SYS_CTR) & 0x3f, PS2_SYS_CTR);
}
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "mca_53c9x",
.name = "NCR 53c9x SCSI",
.detect = mca_esp_detect,

View file

@ -362,6 +362,7 @@ megaraid_queue(Scsi_Cmnd *scmd, void (*done)(Scsi_Cmnd *))
adapter_t *adapter;
scb_t *scb;
int busy=0;
unsigned long flags;
adapter = (adapter_t *)scmd->device->host->hostdata;
@ -377,6 +378,7 @@ megaraid_queue(Scsi_Cmnd *scmd, void (*done)(Scsi_Cmnd *))
* return 0 in that case.
*/
spin_lock_irqsave(&adapter->lock, flags);
scb = mega_build_cmd(adapter, scmd, &busy);
if(scb) {
@ -393,6 +395,7 @@ megaraid_queue(Scsi_Cmnd *scmd, void (*done)(Scsi_Cmnd *))
}
return 0;
}
spin_unlock_irqrestore(&adapter->lock, flags);
return busy;
}
@ -1683,7 +1686,7 @@ mega_rundoneq (adapter_t *adapter)
list_for_each(pos, &adapter->completed_list) {
Scsi_Pointer* spos = (Scsi_Pointer *)pos;
struct scsi_pointer* spos = (struct scsi_pointer *)pos;
cmd = list_entry(spos, Scsi_Cmnd, SCp);
cmd->scsi_done(cmd);
@ -1981,7 +1984,7 @@ megaraid_reset(struct scsi_cmnd *cmd)
mc.cmd = MEGA_CLUSTER_CMD;
mc.opcode = MEGA_RESET_RESERVATIONS;
if( mega_internal_command(adapter, LOCK_INT, &mc, NULL) != 0 ) {
if( mega_internal_command(adapter, &mc, NULL) != 0 ) {
printk(KERN_WARNING
"megaraid: reservation reset failed.\n");
}
@ -3011,7 +3014,7 @@ proc_rdrv(adapter_t *adapter, char *page, int start, int end )
mc.cmd = FC_NEW_CONFIG;
mc.opcode = OP_DCMD_READ_CONFIG;
if( mega_internal_command(adapter, LOCK_INT, &mc, NULL) ) {
if( mega_internal_command(adapter, &mc, NULL) ) {
len = sprintf(page, "40LD read config failed.\n");
@ -3029,11 +3032,11 @@ proc_rdrv(adapter_t *adapter, char *page, int start, int end )
else {
mc.cmd = NEW_READ_CONFIG_8LD;
if( mega_internal_command(adapter, LOCK_INT, &mc, NULL) ) {
if( mega_internal_command(adapter, &mc, NULL) ) {
mc.cmd = READ_CONFIG_8LD;
if( mega_internal_command(adapter, LOCK_INT, &mc,
if( mega_internal_command(adapter, &mc,
NULL) ){
len = sprintf(page,
@ -3632,7 +3635,7 @@ megadev_ioctl(struct inode *inode, struct file *filep, unsigned int cmd,
/*
* Issue the command
*/
mega_internal_command(adapter, LOCK_INT, &mc, pthru);
mega_internal_command(adapter, &mc, pthru);
rval = mega_n_to_m((void __user *)arg, &mc);
@ -3715,7 +3718,7 @@ freemem_and_return:
/*
* Issue the command
*/
mega_internal_command(adapter, LOCK_INT, &mc, NULL);
mega_internal_command(adapter, &mc, NULL);
rval = mega_n_to_m((void __user *)arg, &mc);
@ -4234,7 +4237,7 @@ mega_do_del_logdrv(adapter_t *adapter, int logdrv)
mc.opcode = OP_DEL_LOGDRV;
mc.subopcode = logdrv;
rval = mega_internal_command(adapter, LOCK_INT, &mc, NULL);
rval = mega_internal_command(adapter, &mc, NULL);
/* log this event */
if(rval) {
@ -4367,7 +4370,7 @@ mega_adapinq(adapter_t *adapter, dma_addr_t dma_handle)
mc.xferaddr = (u32)dma_handle;
if ( mega_internal_command(adapter, LOCK_INT, &mc, NULL) != 0 ) {
if ( mega_internal_command(adapter, &mc, NULL) != 0 ) {
return -1;
}
@ -4435,7 +4438,7 @@ mega_internal_dev_inquiry(adapter_t *adapter, u8 ch, u8 tgt,
mc.cmd = MEGA_MBOXCMD_PASSTHRU;
mc.xferaddr = (u32)pthru_dma_handle;
rval = mega_internal_command(adapter, LOCK_INT, &mc, pthru);
rval = mega_internal_command(adapter, &mc, pthru);
pci_free_consistent(pdev, sizeof(mega_passthru), pthru,
pthru_dma_handle);
@ -4449,7 +4452,6 @@ mega_internal_dev_inquiry(adapter_t *adapter, u8 ch, u8 tgt,
/**
* mega_internal_command()
* @adapter - pointer to our soft state
* @ls - the scope of the exclusion lock.
* @mc - the mailbox command
* @pthru - Passthru structure for DCDB commands
*
@ -4463,8 +4465,7 @@ mega_internal_dev_inquiry(adapter_t *adapter, u8 ch, u8 tgt,
* Note: parameter 'pthru' is null for non-passthru commands.
*/
static int
mega_internal_command(adapter_t *adapter, lockscope_t ls, megacmd_t *mc,
mega_passthru *pthru )
mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru)
{
Scsi_Cmnd *scmd;
struct scsi_device *sdev;
@ -4508,15 +4509,8 @@ mega_internal_command(adapter_t *adapter, lockscope_t ls, megacmd_t *mc,
scb->idx = CMDID_INT_CMDS;
/*
* Get the lock only if the caller has not acquired it already
*/
if( ls == LOCK_INT ) spin_lock_irqsave(&adapter->lock, flags);
megaraid_queue(scmd, mega_internal_done);
if( ls == LOCK_INT ) spin_unlock_irqrestore(&adapter->lock, flags);
wait_for_completion(&adapter->int_waitq);
rval = scmd->result;

View file

@ -925,13 +925,6 @@ struct mega_hbas {
#define MEGA_BULK_DATA 0x0001
#define MEGA_SGLIST 0x0002
/*
* lockscope definitions, callers can specify the lock scope with this data
* type. LOCK_INT would mean the caller has not acquired the lock before
* making the call and LOCK_EXT would mean otherwise.
*/
typedef enum { LOCK_INT, LOCK_EXT } lockscope_t;
/*
* Parameters for the io-mapped controllers
*/
@ -1062,8 +1055,7 @@ static int mega_support_random_del(adapter_t *);
static int mega_del_logdrv(adapter_t *, int);
static int mega_do_del_logdrv(adapter_t *, int);
static void mega_get_max_sgl(adapter_t *);
static int mega_internal_command(adapter_t *, lockscope_t, megacmd_t *,
mega_passthru *);
static int mega_internal_command(adapter_t *, megacmd_t *, mega_passthru *);
static void mega_internal_done(Scsi_Cmnd *);
static int mega_support_cluster(adapter_t *);
#endif

View file

@ -96,7 +96,6 @@ typedef struct {
* @param dpc_h : tasklet handle
* @param pdev : pci configuration pointer for kernel
* @param host : pointer to host structure of mid-layer
* @param host_lock : pointer to appropriate lock
* @param lock : synchronization lock for mid-layer and driver
* @param quiescent : driver is quiescent for now.
* @param outstanding_cmds : number of commands pending in the driver
@ -151,7 +150,6 @@ typedef struct {
struct tasklet_struct dpc_h;
struct pci_dev *pdev;
struct Scsi_Host *host;
spinlock_t *host_lock;
spinlock_t lock;
uint8_t quiescent;
int outstanding_cmds;

View file

@ -533,8 +533,6 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
// Initialize the synchronization lock for kernel and LLD
spin_lock_init(&adapter->lock);
adapter->host_lock = &adapter->lock;
// Initialize the command queues: the list of free SCBs and the list
// of pending SCBs.
@ -715,9 +713,6 @@ megaraid_io_attach(adapter_t *adapter)
SCSIHOST2ADAP(host) = (caddr_t)adapter;
adapter->host = host;
// export the parameters required by the mid-layer
scsi_assign_lock(host, adapter->host_lock);
host->irq = adapter->irq;
host->unique_id = adapter->unique_id;
host->can_queue = adapter->max_cmds;
@ -1560,10 +1555,6 @@ megaraid_queue_command(struct scsi_cmnd *scp, void (* done)(struct scsi_cmnd *))
scp->scsi_done = done;
scp->result = 0;
assert_spin_locked(adapter->host_lock);
spin_unlock(adapter->host_lock);
/*
* Allocate and build a SCB request
* if_busy flag will be set if megaraid_mbox_build_cmd() command could
@ -1573,23 +1564,16 @@ megaraid_queue_command(struct scsi_cmnd *scp, void (* done)(struct scsi_cmnd *))
* return 0 in that case, and we would do the callback right away.
*/
if_busy = 0;
scb = megaraid_mbox_build_cmd(adapter, scp, &if_busy);
if (scb) {
megaraid_mbox_runpendq(adapter, scb);
}
spin_lock(adapter->host_lock);
scb = megaraid_mbox_build_cmd(adapter, scp, &if_busy);
if (!scb) { // command already completed
done(scp);
return 0;
}
megaraid_mbox_runpendq(adapter, scb);
return if_busy;
}
/**
* megaraid_mbox_build_cmd - transform the mid-layer scsi command to megaraid
* firmware lingua
@ -2546,9 +2530,7 @@ megaraid_mbox_dpc(unsigned long devp)
megaraid_dealloc_scb(adapter, scb);
// send the scsi packet back to kernel
spin_lock(adapter->host_lock);
scp->scsi_done(scp);
spin_unlock(adapter->host_lock);
}
return;
@ -2563,7 +2545,7 @@ megaraid_mbox_dpc(unsigned long devp)
* aborted. All the commands issued to the F/W must complete.
**/
static int
__megaraid_abort_handler(struct scsi_cmnd *scp)
megaraid_abort_handler(struct scsi_cmnd *scp)
{
adapter_t *adapter;
mraid_device_t *raid_dev;
@ -2577,8 +2559,6 @@ __megaraid_abort_handler(struct scsi_cmnd *scp)
adapter = SCP2ADAPTER(scp);
raid_dev = ADAP2RAIDDEV(adapter);
assert_spin_locked(adapter->host_lock);
con_log(CL_ANN, (KERN_WARNING
"megaraid: aborting-%ld cmd=%x <c=%d t=%d l=%d>\n",
scp->serial_number, scp->cmnd[0], SCP2CHANNEL(scp),
@ -2658,6 +2638,7 @@ __megaraid_abort_handler(struct scsi_cmnd *scp)
// traverse through the list of all SCB, since driver does not
// maintain these SCBs on any list
found = 0;
spin_lock_irq(&adapter->lock);
for (i = 0; i < MBOX_MAX_SCSI_CMDS; i++) {
scb = adapter->kscb_list + i;
@ -2680,6 +2661,7 @@ __megaraid_abort_handler(struct scsi_cmnd *scp)
}
}
}
spin_unlock_irq(&adapter->lock);
if (!found) {
con_log(CL_ANN, (KERN_WARNING
@ -2696,22 +2678,6 @@ __megaraid_abort_handler(struct scsi_cmnd *scp)
return FAILED;
}
static int
megaraid_abort_handler(struct scsi_cmnd *scp)
{
adapter_t *adapter;
int rc;
adapter = SCP2ADAPTER(scp);
spin_lock_irq(adapter->host_lock);
rc = __megaraid_abort_handler(scp);
spin_unlock_irq(adapter->host_lock);
return rc;
}
/**
* megaraid_reset_handler - device reset hadler for mailbox based driver
* @scp : reference command
@ -2723,7 +2689,7 @@ megaraid_abort_handler(struct scsi_cmnd *scp)
* host
**/
static int
__megaraid_reset_handler(struct scsi_cmnd *scp)
megaraid_reset_handler(struct scsi_cmnd *scp)
{
adapter_t *adapter;
scb_t *scb;
@ -2739,10 +2705,6 @@ __megaraid_reset_handler(struct scsi_cmnd *scp)
adapter = SCP2ADAPTER(scp);
raid_dev = ADAP2RAIDDEV(adapter);
assert_spin_locked(adapter->host_lock);
con_log(CL_ANN, (KERN_WARNING "megaraid: reseting the host...\n"));
// return failure if adapter is not responding
if (raid_dev->hw_error) {
con_log(CL_ANN, (KERN_NOTICE
@ -2779,8 +2741,6 @@ __megaraid_reset_handler(struct scsi_cmnd *scp)
adapter->outstanding_cmds, MBOX_RESET_WAIT));
}
spin_unlock(adapter->host_lock);
recovery_window = MBOX_RESET_WAIT + MBOX_RESET_EXT_WAIT;
recovering = adapter->outstanding_cmds;
@ -2806,7 +2766,7 @@ __megaraid_reset_handler(struct scsi_cmnd *scp)
msleep(1000);
}
spin_lock(adapter->host_lock);
spin_lock(&adapter->lock);
// If still outstanding commands, bail out
if (adapter->outstanding_cmds) {
@ -2815,7 +2775,8 @@ __megaraid_reset_handler(struct scsi_cmnd *scp)
raid_dev->hw_error = 1;
return FAILED;
rval = FAILED;
goto out;
}
else {
con_log(CL_ANN, (KERN_NOTICE
@ -2824,7 +2785,10 @@ __megaraid_reset_handler(struct scsi_cmnd *scp)
// If the controller supports clustering, reset reservations
if (!adapter->ha) return SUCCESS;
if (!adapter->ha) {
rval = SUCCESS;
goto out;
}
// clear reservations if any
raw_mbox[0] = CLUSTER_CMD;
@ -2841,22 +2805,11 @@ __megaraid_reset_handler(struct scsi_cmnd *scp)
"megaraid: reservation reset failed\n"));
}
out:
spin_unlock_irq(&adapter->lock);
return rval;
}
static int
megaraid_reset_handler(struct scsi_cmnd *cmd)
{
int rc;
spin_lock_irq(cmd->device->host->host_lock);
rc = __megaraid_reset_handler(cmd);
spin_unlock_irq(cmd->device->host->host_lock);
return rc;
}
/*
* START: internal commands library
*
@ -3776,9 +3729,9 @@ wait_till_fw_empty(adapter_t *adapter)
/*
* Set the quiescent flag to stop issuing cmds to FW.
*/
spin_lock_irqsave(adapter->host_lock, flags);
spin_lock_irqsave(&adapter->lock, flags);
adapter->quiescent++;
spin_unlock_irqrestore(adapter->host_lock, flags);
spin_unlock_irqrestore(&adapter->lock, flags);
/*
* Wait till there are no more cmds outstanding at FW. Try for at most

View file

@ -766,17 +766,12 @@ static int megasas_generic_reset(struct scsi_cmnd *scmd)
return FAILED;
}
spin_unlock(scmd->device->host->host_lock);
ret_val = megasas_wait_for_outstanding(instance);
if (ret_val == SUCCESS)
printk(KERN_NOTICE "megasas: reset successful \n");
else
printk(KERN_ERR "megasas: failed to do reset\n");
spin_lock(scmd->device->host->host_lock);
return ret_val;
}

View file

@ -63,7 +63,7 @@ static void dma_stop (struct Scsi_Host *instance, Scsi_Cmnd *SCpnt,
m147_pcc->dma_cntrl = 0;
}
int mvme147_detect(Scsi_Host_Template *tpnt)
int mvme147_detect(struct scsi_host_template *tpnt)
{
static unsigned char called = 0;
wd33c93_regs regs;
@ -130,7 +130,7 @@ static int mvme147_bus_reset(Scsi_Cmnd *cmd)
#include "mvme147.h"
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "MVME147",
.name = "MVME147 built-in SCSI",
.detect = mvme147_detect,

View file

@ -10,7 +10,7 @@
#include <linux/types.h>
int mvme147_detect(Scsi_Host_Template *);
int mvme147_detect(struct scsi_host_template *);
int mvme147_release(struct Scsi_Host *);
const char *wd33c93_info(void);
int wd33c93_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));

View file

@ -21,7 +21,7 @@
#include<linux/stat.h>
int mvme16x_scsi_detect(Scsi_Host_Template *tpnt)
int mvme16x_scsi_detect(struct scsi_host_template *tpnt)
{
static unsigned char called = 0;
int clock;
@ -61,7 +61,7 @@ static int mvme16x_scsi_release(struct Scsi_Host *shost)
return 0;
}
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.name = "MVME16x NCR53c710 SCSI",
.detect = mvme16x_scsi_detect,
.release = mvme16x_scsi_release,

View file

@ -3,7 +3,7 @@
#include <linux/types.h>
int mvme16x_scsi_detect(Scsi_Host_Template *);
int mvme16x_scsi_detect(struct scsi_host_template *);
const char *NCR53c7x0_info(void);
int NCR53c7xx_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
int NCR53c7xx_abort(Scsi_Cmnd *);

View file

@ -198,7 +198,7 @@ static void __devexit nsp32_remove(struct pci_dev *);
static int __init init_nsp32 (void);
static void __exit exit_nsp32 (void);
/* struct Scsi_Host_Template */
/* struct struct scsi_host_template */
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73))
static int nsp32_proc_info (struct Scsi_Host *, char *, char **, off_t, int, int);
#else
@ -208,7 +208,7 @@ static int nsp32_proc_info (char *, char **, off_t, int, int, int);
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73))
static int nsp32_detect (struct pci_dev *pdev);
#else
static int nsp32_detect (Scsi_Host_Template *);
static int nsp32_detect (struct scsi_host_template *);
#endif
static int nsp32_queuecommand(struct scsi_cmnd *,
void (*done)(struct scsi_cmnd *));
@ -2683,7 +2683,7 @@ static int nsp32_detect(struct pci_dev *pdev)
#define DETECT_OK 1
#define DETECT_NG 0
#define PCIDEV (data->Pci)
static int nsp32_detect(Scsi_Host_Template *sht)
static int nsp32_detect(struct scsi_host_template *sht)
#endif
{
struct Scsi_Host *host; /* registered host structure */

View file

@ -114,7 +114,7 @@ static volatile unsigned char cmd_buffer[16];
*/
/***************************************************************** Detection */
int oktagon_esp_detect(Scsi_Host_Template *tpnt)
int oktagon_esp_detect(struct scsi_host_template *tpnt)
{
struct NCR_ESP *esp;
struct zorro_dev *z = NULL;
@ -585,7 +585,7 @@ int oktagon_esp_release(struct Scsi_Host *instance)
}
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "esp-oktagon",
.proc_info = &esp_proc_info,
.name = "BSC Oktagon SCSI",

View file

@ -369,7 +369,7 @@ void __init pas16_setup(char *str, int *ints)
}
/*
* Function : int pas16_detect(Scsi_Host_Template * tpnt)
* Function : int pas16_detect(struct scsi_host_template * tpnt)
*
* Purpose : detects and initializes PAS16 controllers
* that were autoprobed, overridden on the LILO command line,
@ -381,7 +381,7 @@ void __init pas16_setup(char *str, int *ints)
*
*/
int __init pas16_detect(Scsi_Host_Template * tpnt)
int __init pas16_detect(struct scsi_host_template * tpnt)
{
static int current_override = 0;
static unsigned short current_base = 0;
@ -615,7 +615,7 @@ static int pas16_release(struct Scsi_Host *shost)
return 0;
}
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.name = "Pro Audio Spectrum-16 SCSI",
.detect = pas16_detect,
.release = pas16_release,

View file

@ -117,7 +117,7 @@
static int pas16_abort(Scsi_Cmnd *);
static int pas16_biosparam(struct scsi_device *, struct block_device *,
sector_t, int*);
static int pas16_detect(Scsi_Host_Template *);
static int pas16_detect(struct scsi_host_template *);
static int pas16_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
static int pas16_bus_reset(Scsi_Cmnd *);

View file

@ -184,7 +184,7 @@ typedef struct _INQUIRYDATA
#endif
// function prototypes
int Pci2000_Detect (Scsi_Host_Template *tpnt);
int Pci2000_Detect (struct scsi_host_template *tpnt);
int Pci2000_Command (Scsi_Cmnd *SCpnt);
int Pci2000_QueueCommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *));
int Pci2000_Abort (Scsi_Cmnd *SCpnt);

View file

@ -81,7 +81,7 @@ module_param(free_ports, bool, 0);
MODULE_PARM_DESC(free_ports, "Release IO ports after configuration? (default: 0 (=no))");
/* /usr/src/linux/drivers/scsi/hosts.h */
static Scsi_Host_Template nsp_driver_template = {
static struct scsi_host_template nsp_driver_template = {
.proc_name = "nsp_cs",
.proc_info = nsp_proc_info,
.name = "WorkBit NinjaSCSI-3/32Bi(16bit)",
@ -1310,7 +1310,7 @@ timer_out:
/*----------------------------------------------------------------*/
/* look for ninja3 card and init if found */
/*----------------------------------------------------------------*/
static struct Scsi_Host *nsp_detect(Scsi_Host_Template *sht)
static struct Scsi_Host *nsp_detect(struct scsi_host_template *sht)
{
struct Scsi_Host *host; /* registered host structure */
nsp_hw_data *data_b = &nsp_data_base, *data;
@ -1358,7 +1358,7 @@ static struct Scsi_Host *nsp_detect(Scsi_Host_Template *sht)
}
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
static int nsp_detect_old(Scsi_Host_Template *sht)
static int nsp_detect_old(struct scsi_host_template *sht)
{
if (nsp_detect(sht) == NULL) {
return 0;
@ -1717,7 +1717,7 @@ static void nsp_cs_config(dev_link_t *link)
struct Scsi_Host *host;
nsp_hw_data *data = &nsp_data_base;
#if !(LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,74))
Scsi_Device *dev;
struct scsi_device *dev;
dev_node_t **tail, *node;
#endif

View file

@ -303,9 +303,9 @@ static void nsp_cs_config (dev_link_t *link);
static int nsp_cs_event (event_t event, int priority, event_callback_args_t *args);
/* Linux SCSI subsystem specific functions */
static struct Scsi_Host *nsp_detect (Scsi_Host_Template *sht);
static struct Scsi_Host *nsp_detect (struct scsi_host_template *sht);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
static int nsp_detect_old (Scsi_Host_Template *sht);
static int nsp_detect_old (struct scsi_host_template *sht);
static int nsp_release_old(struct Scsi_Host *shpnt);
#endif
static const char *nsp_info (struct Scsi_Host *shpnt);
@ -345,7 +345,7 @@ static int nsp_expect_signal (Scsi_Cmnd *SCpnt, unsigned char current_phase,
static int nsp_xfer (Scsi_Cmnd *SCpnt, int phase);
static int nsp_dataphase_bypass (Scsi_Cmnd *SCpnt);
static int nsp_reselected (Scsi_Cmnd *SCpnt);
static struct Scsi_Host *nsp_detect(Scsi_Host_Template *sht);
static struct Scsi_Host *nsp_detect(struct scsi_host_template *sht);
/* Interrupt handler */
//static irqreturn_t nspintr(int irq, void *dev_id, struct pt_regs *regs);

View file

@ -72,7 +72,7 @@ static char *version = "qlogic_cs.c 1.79-ac 2002/10/26 (David Hinds)";
#define DEBUG(n, args...)
#endif
static Scsi_Host_Template qlogicfas_driver_template = {
static struct scsi_host_template qlogicfas_driver_template = {
.module = THIS_MODULE,
.name = qlogic_name,
.proc_name = qlogic_name,
@ -108,7 +108,7 @@ static dev_link_t *dev_list = NULL;
static dev_info_t dev_info = "qlogic_cs";
static struct Scsi_Host *qlogic_detect(Scsi_Host_Template *host,
static struct Scsi_Host *qlogic_detect(struct scsi_host_template *host,
dev_link_t *link, int qbase, int qlirq)
{
int qltyp; /* type of chip */

View file

@ -71,7 +71,7 @@ static void __init pluto_detect_scsi_done(Scsi_Cmnd *SCpnt)
up(&fc_sem);
}
int pluto_slave_configure(Scsi_Device *device)
int pluto_slave_configure(struct scsi_device *device)
{
int depth_to_use;
@ -90,11 +90,11 @@ int pluto_slave_configure(Scsi_Device *device)
/* Detect all SSAs attached to the machine.
To be fast, do it on all online FC channels at the same time. */
int __init pluto_detect(Scsi_Host_Template *tpnt)
int __init pluto_detect(struct scsi_host_template *tpnt)
{
int i, retry, nplutos;
fc_channel *fc;
Scsi_Device dev;
struct scsi_device dev;
DEFINE_TIMER(fc_timer, pluto_detect_timeout, 0, 0);
tpnt->proc_name = "pluto";
@ -339,7 +339,7 @@ static int pluto_encode_addr(Scsi_Cmnd *SCpnt, u16 *addr, fc_channel *fc, fcp_cm
return 0;
}
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.name = "Sparc Storage Array 100/200",
.detect = pluto_detect,
.release = pluto_release,

View file

@ -38,10 +38,10 @@ struct pluto_inquiry {
/* This is the max number of outstanding SCSI commands per pluto */
#define PLUTO_CAN_QUEUE 254
int pluto_detect(Scsi_Host_Template *);
int pluto_detect(struct scsi_host_template *);
int pluto_release(struct Scsi_Host *);
const char * pluto_info(struct Scsi_Host *);
int pluto_slave_configure(Scsi_Device *);
int pluto_slave_configure(struct scsi_device *);
#endif /* !(_PLUTO_H) */

View file

@ -538,7 +538,7 @@ static void ReadChipMemory (void *pdata, USHORT base, USHORT length, USHORT port
* Returns: Number of adapters found.
*
****************************************************************/
static int Psi240i_Detect (Scsi_Host_Template *tpnt)
static int Psi240i_Detect (struct scsi_host_template *tpnt)
{
int board;
int count = 0;
@ -669,7 +669,7 @@ static int Psi240i_BiosParam (struct scsi_device *sdev, struct block_device *dev
MODULE_LICENSE("GPL");
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "psi240i",
.name = "PSI-240I EIDE Disk Controller",
.detect = Psi240i_Detect,

View file

@ -465,7 +465,7 @@ scsi_adjust_queue_depth(struct scsi_device *device, int tag, int depth)
}
device->queue_depth = depth;
}
static inline struct Scsi_Host *scsi_host_alloc(Scsi_Host_Template *t, size_t s)
static inline struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *t, size_t s)
{
return scsi_register(t, s);
}
@ -639,10 +639,8 @@ struct qla_boards {
static struct pci_device_id qla1280_pci_tbl[] = {
{PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP12160,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
#ifdef CONFIG_SCSI_QLOGIC_1280_1040
{PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP1020,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
#endif
{PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP1080,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
{PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP1240,
@ -1177,7 +1175,7 @@ qla1280_biosparam(struct scsi_device *sdev, struct block_device *bdev,
#if LINUX_VERSION_CODE < 0x020600
static int
qla1280_detect(Scsi_Host_Template *template)
qla1280_detect(struct scsi_host_template *template)
{
struct pci_device_id *id = &qla1280_pci_tbl[0];
struct pci_dev *pdev = NULL;
@ -4507,7 +4505,7 @@ static struct scsi_host_template qla1280_driver_template = {
.use_clustering = ENABLE_CLUSTERING,
};
#else
static Scsi_Host_Template qla1280_driver_template = {
static struct scsi_host_template qla1280_driver_template = {
.proc_name = "qla1280",
.name = "Qlogic ISP 1280/12160",
.detect = qla1280_detect,

View file

@ -970,7 +970,7 @@ qla24xx_fw_dump(scsi_qla_host_t *ha, int hardware_locked)
int rval;
uint32_t cnt, timer;
uint32_t risc_address;
uint16_t mb[4];
uint16_t mb[4], wd;
uint32_t stat;
struct device_reg_24xx __iomem *reg = &ha->iobase->isp24;
@ -1514,10 +1514,10 @@ qla24xx_fw_dump(scsi_qla_host_t *ha, int hardware_locked)
WRT_REG_DWORD(&reg->ctrl_status,
CSRX_ISP_SOFT_RESET|CSRX_DMA_SHUTDOWN|MWB_4096_BYTES);
RD_REG_DWORD(&reg->ctrl_status);
pci_read_config_word(ha->pdev, PCI_COMMAND, &wd);
udelay(100);
/* Wait for firmware to complete NVRAM accesses. */
udelay(5);
mb[0] = (uint32_t) RD_REG_WORD(&reg->mailbox0);
for (cnt = 10000 ; cnt && mb[0]; cnt--) {
udelay(5);
@ -1525,7 +1525,7 @@ qla24xx_fw_dump(scsi_qla_host_t *ha, int hardware_locked)
barrier();
}
udelay(20);
/* Wait for soft-reset to complete. */
for (cnt = 0; cnt < 30000; cnt++) {
if ((RD_REG_DWORD(&reg->ctrl_status) &
CSRX_ISP_SOFT_RESET) == 0)

View file

@ -147,8 +147,8 @@ check_fw_ready_again:
* LIP to complete
*/
if (atomic_read(&ha->loop_state) ==
LOOP_DOWN && retry--) {
if (atomic_read(&ha->loop_state) !=
LOOP_READY && retry--) {
goto check_fw_ready_again;
}
wait_time--;
@ -567,6 +567,7 @@ qla24xx_reset_risc(scsi_qla_host_t *ha)
unsigned long flags = 0;
struct device_reg_24xx __iomem *reg = &ha->iobase->isp24;
uint32_t cnt, d2;
uint16_t wd;
spin_lock_irqsave(&ha->hardware_lock, flags);
@ -581,10 +582,10 @@ qla24xx_reset_risc(scsi_qla_host_t *ha)
WRT_REG_DWORD(&reg->ctrl_status,
CSRX_ISP_SOFT_RESET|CSRX_DMA_SHUTDOWN|MWB_4096_BYTES);
RD_REG_DWORD(&reg->ctrl_status);
pci_read_config_word(ha->pdev, PCI_COMMAND, &wd);
udelay(100);
/* Wait for firmware to complete NVRAM accesses. */
udelay(5);
d2 = (uint32_t) RD_REG_WORD(&reg->mailbox0);
for (cnt = 10000 ; cnt && d2; cnt--) {
udelay(5);
@ -592,7 +593,7 @@ qla24xx_reset_risc(scsi_qla_host_t *ha)
barrier();
}
udelay(20);
/* Wait for soft-reset to complete. */
d2 = RD_REG_DWORD(&reg->ctrl_status);
for (cnt = 6000000 ; cnt && (d2 & CSRX_ISP_SOFT_RESET); cnt--) {
udelay(5);
@ -1258,9 +1259,15 @@ qla2x00_configure_hba(scsi_qla_host_t *ha)
rval = qla2x00_get_adapter_id(ha,
&loop_id, &al_pa, &area, &domain, &topo);
if (rval != QLA_SUCCESS) {
qla_printk(KERN_WARNING, ha,
"ERROR -- Unable to get host loop ID.\n");
set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
if (LOOP_NOT_READY(ha) || atomic_read(&ha->loop_down_timer) ||
(rval == QLA_COMMAND_ERROR && loop_id == 0x7)) {
DEBUG2(printk("%s(%ld) Loop is in a transition state\n",
__func__, ha->host_no));
} else {
qla_printk(KERN_WARNING, ha,
"ERROR -- Unable to get host loop ID.\n");
set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
}
return (rval);
}
@ -1789,7 +1796,7 @@ qla2x00_configure_loop(scsi_qla_host_t *ha)
}
if (rval == QLA_SUCCESS && test_bit(RSCN_UPDATE, &flags)) {
if (test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags)) {
if (LOOP_NOT_READY(ha)) {
rval = QLA_FUNCTION_FAILED;
} else {
rval = qla2x00_configure_fabric(ha);
@ -2362,8 +2369,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *ha, struct list_head *new_fcports)
if (qla2x00_is_reserved_id(ha, loop_id))
continue;
if (atomic_read(&ha->loop_down_timer) ||
test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags))
if (atomic_read(&ha->loop_down_timer) || LOOP_NOT_READY(ha))
break;
if (swl != NULL) {

View file

@ -868,10 +868,6 @@ qla2x00_abort_command(scsi_qla_host_t *ha, srb_t *sp)
DEBUG11(printk("qla2x00_abort_command(%ld): entered.\n", ha->host_no);)
fcport = sp->fcport;
if (atomic_read(&ha->loop_state) == LOOP_DOWN ||
atomic_read(&fcport->state) == FCS_DEVICE_LOST) {
return 1;
}
spin_lock_irqsave(&ha->hardware_lock, flags);
for (handle = 1; handle < MAX_OUTSTANDING_COMMANDS; handle++) {
@ -1008,6 +1004,8 @@ qla2x00_get_adapter_id(scsi_qla_host_t *ha, uint16_t *id, uint8_t *al_pa,
mcp->tov = 30;
mcp->flags = 0;
rval = qla2x00_mailbox_command(ha, mcp);
if (mcp->mb[0] == MBS_COMMAND_ERROR)
rval = QLA_COMMAND_ERROR;
/* Return data. */
*id = mcp->mb[1];
@ -2179,10 +2177,6 @@ qla24xx_abort_command(scsi_qla_host_t *ha, srb_t *sp)
DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no);)
fcport = sp->fcport;
if (atomic_read(&ha->loop_state) == LOOP_DOWN ||
atomic_read(&fcport->state) == FCS_DEVICE_LOST) {
return QLA_FUNCTION_FAILED;
}
spin_lock_irqsave(&ha->hardware_lock, flags);
for (handle = 1; handle < MAX_OUTSTANDING_COMMANDS; handle++) {

View file

@ -126,6 +126,7 @@ qla2x00_write_nvram_word(scsi_qla_host_t *ha, uint32_t addr, uint16_t data)
/* Wait for NVRAM to become ready */
WRT_REG_WORD(&reg->nvram, NVR_SELECT);
RD_REG_WORD(&reg->nvram); /* PCI Posting. */
do {
NVRAM_DELAY();
word = RD_REG_WORD(&reg->nvram);
@ -178,6 +179,7 @@ qla2x00_write_nvram_word_tmo(scsi_qla_host_t *ha, uint32_t addr, uint16_t data,
/* Wait for NVRAM to become ready */
WRT_REG_WORD(&reg->nvram, NVR_SELECT);
RD_REG_WORD(&reg->nvram); /* PCI Posting. */
do {
NVRAM_DELAY();
word = RD_REG_WORD(&reg->nvram);
@ -235,6 +237,7 @@ qla2x00_nvram_request(scsi_qla_host_t *ha, uint32_t nv_cmd)
/* Read data from NVRAM. */
for (cnt = 0; cnt < 16; cnt++) {
WRT_REG_WORD(&reg->nvram, NVR_SELECT | NVR_CLOCK);
RD_REG_WORD(&reg->nvram); /* PCI Posting. */
NVRAM_DELAY();
data <<= 1;
reg_data = RD_REG_WORD(&reg->nvram);
@ -337,6 +340,7 @@ qla2x00_clear_nvram_protection(scsi_qla_host_t *ha)
/* Wait for NVRAM to become ready. */
WRT_REG_WORD(&reg->nvram, NVR_SELECT);
RD_REG_WORD(&reg->nvram); /* PCI Posting. */
do {
NVRAM_DELAY();
word = RD_REG_WORD(&reg->nvram);
@ -388,6 +392,7 @@ qla2x00_set_nvram_protection(scsi_qla_host_t *ha, int stat)
/* Wait for NVRAM to become ready. */
WRT_REG_WORD(&reg->nvram, NVR_SELECT);
RD_REG_WORD(&reg->nvram); /* PCI Posting. */
do {
NVRAM_DELAY();
word = RD_REG_WORD(&reg->nvram);

View file

@ -7,9 +7,9 @@
/*
* Driver version
*/
#define QLA2XXX_VERSION "8.01.00-k"
#define QLA2XXX_VERSION "8.01.03-k"
#define QLA_DRIVER_MAJOR_VER 8
#define QLA_DRIVER_MINOR_VER 1
#define QLA_DRIVER_PATCH_VER 0
#define QLA_DRIVER_PATCH_VER 3
#define QLA_DRIVER_BETA_VER 0

View file

@ -47,7 +47,7 @@ static char qlogicfas_name[] = "qlogicfas";
* Look for qlogic card and init if found
*/
static struct Scsi_Host *__qlogicfas_detect(Scsi_Host_Template *host,
static struct Scsi_Host *__qlogicfas_detect(struct scsi_host_template *host,
int qbase,
int qlirq)
{
@ -142,7 +142,7 @@ module_param_array(irq, int, NULL, 0);
MODULE_PARM_DESC(iobase, "I/O address");
MODULE_PARM_DESC(irq, "IRQ");
static int __devinit qlogicfas_detect(Scsi_Host_Template *sht)
static int __devinit qlogicfas_detect(struct scsi_host_template *sht)
{
struct Scsi_Host *shost;
struct qlogicfas408_priv *priv;
@ -183,7 +183,7 @@ static int qlogicfas_release(struct Scsi_Host *shost)
/*
* The driver template is also needed for PCMCIA
*/
static Scsi_Host_Template qlogicfas_driver_template = {
static struct scsi_host_template qlogicfas_driver_template = {
.module = THIS_MODULE,
.name = qlogicfas_name,
.proc_name = qlogicfas_name,

Some files were not shown because too many files have changed in this diff Show more