summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJames Bottomley <jejb@titanic.(none)>2005-05-20 15:27:44 -0500
committerJames Bottomley <jejb@titanic.(none)>2005-05-20 15:27:44 -0500
commitad34ea2cc3845ef4dcd7d12fb0fa8484734bd672 (patch)
treead434400f5ecaa33b433c8f830e40792d8d6c05c /drivers/scsi
parent90356ac3194bf91a441a5f9c3067af386ef62462 (diff)
parent88d7bd8cb9eb8d64bf7997600b0d64f7834047c5 (diff)
merge by hand - fix up rejections in Documentation/DocBook/Makefile
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/Kconfig12
-rw-r--r--drivers/scsi/NCR53C9x.c5
-rw-r--r--drivers/scsi/aacraid/linit.c2
-rw-r--r--drivers/scsi/esp.c11
-rw-r--r--drivers/scsi/pas16.c6
-rw-r--r--drivers/scsi/pluto.c2
-rw-r--r--drivers/scsi/scsi.c2
-rw-r--r--drivers/scsi/scsi_error.c2
-rw-r--r--drivers/scsi/scsi_scan.c2
-rw-r--r--drivers/scsi/scsi_transport_spi.c49
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_glue.c5
11 files changed, 63 insertions, 35 deletions
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index ba88be399a5..88e34095ca4 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -278,7 +278,7 @@ config SCSI_3W_9XXX
config SCSI_7000FASST
tristate "7000FASST SCSI support"
- depends on ISA && SCSI
+ depends on ISA && SCSI && ISA_DMA_API
help
This driver supports the Western Digital 7000 SCSI host adapter
family. Some information is in the source:
@@ -313,7 +313,7 @@ config SCSI_AHA152X
config SCSI_AHA1542
tristate "Adaptec AHA1542 support"
- depends on ISA && SCSI
+ depends on ISA && SCSI && ISA_DMA_API
---help---
This is support for a SCSI host adapter. It is explained in section
3.4 of the SCSI-HOWTO, available from
@@ -533,7 +533,7 @@ config SCSI_SATA_VITESSE
config SCSI_BUSLOGIC
tristate "BusLogic SCSI support"
- depends on (PCI || ISA || MCA) && SCSI && (BROKEN || !SPARC64)
+ depends on (PCI || ISA || MCA) && SCSI && ISA_DMA_API
---help---
This is support for BusLogic MultiMaster and FlashPoint SCSI Host
Adapters. Consult the SCSI-HOWTO, available from
@@ -589,7 +589,7 @@ config SCSI_DTC3280
config SCSI_EATA
tristate "EATA ISA/EISA/PCI (DPT and generic EATA/DMA-compliant boards) support"
- depends on (ISA || EISA || PCI) && SCSI && (BROKEN || !SPARC64)
+ depends on (ISA || EISA || PCI) && SCSI && ISA_DMA_API
---help---
This driver supports all EATA/DMA-compliant SCSI host adapters. DPT
ISA and all EISA I/O addresses are probed looking for the "EATA"
@@ -683,7 +683,7 @@ config SCSI_FD_MCS
config SCSI_GDTH
tristate "Intel/ICP (former GDT SCSI Disk Array) RAID Controller support"
- depends on (ISA || EISA || PCI) && SCSI && (BROKEN || !SPARC64)
+ depends on (ISA || EISA || PCI) && SCSI && ISA_DMA_API
---help---
Formerly called GDT SCSI Disk Array Controller Support.
@@ -1412,7 +1412,7 @@ config SCSI_T128
config SCSI_U14_34F
tristate "UltraStor 14F/34F support"
- depends on ISA && SCSI
+ depends on ISA && SCSI && ISA_DMA_API
---help---
This is support for the UltraStor 14F and 34F SCSI-2 host adapters.
The source at <file:drivers/scsi/u14-34f.c> contains some
diff --git a/drivers/scsi/NCR53C9x.c b/drivers/scsi/NCR53C9x.c
index 74293f62a62..064781a2cb1 100644
--- a/drivers/scsi/NCR53C9x.c
+++ b/drivers/scsi/NCR53C9x.c
@@ -1824,7 +1824,10 @@ static int esp_do_data(struct NCR_ESP *esp, struct ESP_regs *eregs)
/* loop */
while (hmuch) {
int j, fifo_stuck = 0, newphase;
- unsigned long flags, timeout;
+ unsigned long timeout;
+#if 0
+ unsigned long flags;
+#endif
#if 0
if ( i % 10 )
ESPDATA(("\r"));
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 7e9e6b3186a..5fd8f3ee980 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -450,7 +450,7 @@ static int aac_cfg_open(struct inode *inode, struct file *file)
}
}
- return 0;
+ return err;
}
/**
diff --git a/drivers/scsi/esp.c b/drivers/scsi/esp.c
index d8ab73b6803..f6900538be9 100644
--- a/drivers/scsi/esp.c
+++ b/drivers/scsi/esp.c
@@ -49,6 +49,8 @@
#include <scsi/scsi_host.h>
#include <scsi/scsi_tcq.h>
+#define DRV_VERSION "1.101"
+
#define DEBUG_ESP
/* #define DEBUG_ESP_HME */
/* #define DEBUG_ESP_DATA */
@@ -1145,7 +1147,7 @@ static int __init esp_detect(struct scsi_host_template *tpnt)
static struct sbus_dev esp_dev;
int esps_in_use = 0;
- espchain = 0;
+ espchain = NULL;
if (sun4_esp_physaddr) {
memset (&esp_dev, 0, sizeof(esp_dev));
@@ -2511,7 +2513,7 @@ static inline void esp_reconnect(struct esp *esp, struct scsi_cmnd *sp)
ESPLOG(("esp%d: Weird, being reselected but disconnected "
"command queue is empty.\n", esp->esp_id));
esp->snip = 0;
- esp->current_SC = 0;
+ esp->current_SC = NULL;
sp->SCp.phase = not_issued;
append_SC(&esp->issue_SC, sp);
}
@@ -4146,7 +4148,7 @@ static int esp_work_bus(struct esp *esp)
}
static espfunc_t isvc_vector[] = {
- 0,
+ NULL,
esp_do_phase_determine,
esp_do_resetbus,
esp_finish_reset,
@@ -4398,5 +4400,8 @@ static struct scsi_host_template driver_template = {
#include "scsi_module.c"
+MODULE_DESCRIPTION("EnhancedScsiProcessor Sun SCSI driver");
+MODULE_AUTHOR("David S. Miller (davem@redhat.com)");
MODULE_LICENSE("GPL");
+MODULE_VERSION(DRV_VERSION);
diff --git a/drivers/scsi/pas16.c b/drivers/scsi/pas16.c
index e70dedb0d0a..7976947c032 100644
--- a/drivers/scsi/pas16.c
+++ b/drivers/scsi/pas16.c
@@ -137,7 +137,7 @@ static unsigned short pas16_addr = 0;
static int pas16_irq = 0;
-int scsi_irq_translate[] =
+static const int scsi_irq_translate[] =
{ 0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 7, 8, 9, 0, 10, 11 };
/* The default_irqs array contains values used to set the irq into the
@@ -145,7 +145,7 @@ int scsi_irq_translate[] =
* irq jumpers on the board). The first value in the array will be
* assigned to logical board 0, the next to board 1, etc.
*/
-int default_irqs[] __initdata =
+static int default_irqs[] __initdata =
{ PAS16_DEFAULT_BOARD_1_IRQ,
PAS16_DEFAULT_BOARD_2_IRQ,
PAS16_DEFAULT_BOARD_3_IRQ,
@@ -177,7 +177,7 @@ static struct base {
#define NO_BASES (sizeof (bases) / sizeof (struct base))
-unsigned short pas16_offset[ 8 ] =
+static const unsigned short pas16_offset[ 8 ] =
{
0x1c00, /* OUTPUT_DATA_REG */
0x1c01, /* INITIATOR_COMMAND_REG */
diff --git a/drivers/scsi/pluto.c b/drivers/scsi/pluto.c
index 7bb0a2e5674..c01b7191fcf 100644
--- a/drivers/scsi/pluto.c
+++ b/drivers/scsi/pluto.c
@@ -45,7 +45,7 @@ static struct ctrl_inquiry {
Scsi_Cmnd cmd;
char inquiry[256];
fc_channel *fc;
-} *fcs __initdata = { 0 };
+} *fcs __initdata;
static int fcscount __initdata = 0;
static atomic_t fcss __initdata = ATOMIC_INIT(0);
DECLARE_MUTEX_LOCKED(fc_sem);
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 0d730f646bc..5578ae9a9e4 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -542,7 +542,7 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
* that the device is no longer present */
cmd->result = DID_NO_CONNECT << 16;
atomic_inc(&cmd->device->iorequest_cnt);
- scsi_done(cmd);
+ __scsi_done(cmd);
/* return 0 (because the command has been processed) */
goto out;
}
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 10355857466..cb789c35262 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -582,7 +582,7 @@ static int scsi_request_sense(struct scsi_cmnd *scmd)
memcpy(scmd->cmnd, generic_sense, sizeof(generic_sense));
- scsi_result = kmalloc(252, GFP_ATOMIC | (scmd->device->host->hostt->unchecked_isa_dma) ? __GFP_DMA : 0);
+ scsi_result = kmalloc(252, GFP_ATOMIC | ((scmd->device->host->hostt->unchecked_isa_dma) ? __GFP_DMA : 0));
if (unlikely(!scsi_result)) {
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 287d197a7c1..cca772624ae 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -801,7 +801,7 @@ static int scsi_probe_and_add_lun(struct scsi_target *starget,
if (!sreq)
goto out_free_sdev;
result = kmalloc(256, GFP_ATOMIC |
- (shost->unchecked_isa_dma) ? __GFP_DMA : 0);
+ ((shost->unchecked_isa_dma) ? __GFP_DMA : 0));
if (!result)
goto out_free_sreq;
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c
index 303d7656f71..28966d05435 100644
--- a/drivers/scsi/scsi_transport_spi.c
+++ b/drivers/scsi/scsi_transport_spi.c
@@ -22,6 +22,7 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/workqueue.h>
+#include <linux/blkdev.h>
#include <asm/semaphore.h>
#include <scsi/scsi.h>
#include "scsi_priv.h"
@@ -41,6 +42,11 @@
#define SPI_MAX_ECHO_BUFFER_SIZE 4096
+#define DV_LOOPS 3
+#define DV_TIMEOUT (10*HZ)
+#define DV_RETRIES 3 /* should only need at most
+ * two cc/ua clears */
+
/* Private data accessors (keep these out of the header file) */
#define spi_dv_pending(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dv_pending)
#define spi_dv_sem(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dv_sem)
@@ -100,6 +106,29 @@ static int sprint_frac(char *dest, int value, int denom)
return result;
}
+/* Modification of scsi_wait_req that will clear UNIT ATTENTION conditions
+ * resulting from (likely) bus and device resets */
+static void spi_wait_req(struct scsi_request *sreq, const void *cmd,
+ void *buffer, unsigned bufflen)
+{
+ int i;
+
+ for(i = 0; i < DV_RETRIES; i++) {
+ sreq->sr_request->flags |= REQ_FAILFAST;
+
+ scsi_wait_req(sreq, cmd, buffer, bufflen,
+ DV_TIMEOUT, /* retries */ 1);
+ if (sreq->sr_result & DRIVER_SENSE) {
+ struct scsi_sense_hdr sshdr;
+
+ if (scsi_request_normalize_sense(sreq, &sshdr)
+ && sshdr.sense_key == UNIT_ATTENTION)
+ continue;
+ }
+ break;
+ }
+}
+
static struct {
enum spi_signal_type value;
char *name;
@@ -378,11 +407,6 @@ static CLASS_DEVICE_ATTR(signalling, S_IRUGO | S_IWUSR,
if(i->f->set_##x) \
i->f->set_##x(sdev->sdev_target, y)
-#define DV_LOOPS 3
-#define DV_TIMEOUT (10*HZ)
-#define DV_RETRIES 3 /* should only need at most
- * two cc/ua clears */
-
enum spi_compare_returns {
SPI_COMPARE_SUCCESS,
SPI_COMPARE_FAILURE,
@@ -446,8 +470,7 @@ spi_dv_device_echo_buffer(struct scsi_request *sreq, u8 *buffer,
for (r = 0; r < retries; r++) {
sreq->sr_cmd_len = 0; /* wait_req to fill in */
sreq->sr_data_direction = DMA_TO_DEVICE;
- scsi_wait_req(sreq, spi_write_buffer, buffer, len,
- DV_TIMEOUT, DV_RETRIES);
+ spi_wait_req(sreq, spi_write_buffer, buffer, len);
if(sreq->sr_result || !scsi_device_online(sdev)) {
struct scsi_sense_hdr sshdr;
@@ -471,8 +494,7 @@ spi_dv_device_echo_buffer(struct scsi_request *sreq, u8 *buffer,
memset(ptr, 0, len);
sreq->sr_cmd_len = 0; /* wait_req to fill in */
sreq->sr_data_direction = DMA_FROM_DEVICE;
- scsi_wait_req(sreq, spi_read_buffer, ptr, len,
- DV_TIMEOUT, DV_RETRIES);
+ spi_wait_req(sreq, spi_read_buffer, ptr, len);
scsi_device_set_state(sdev, SDEV_QUIESCE);
if (memcmp(buffer, ptr, len) != 0)
@@ -500,8 +522,7 @@ spi_dv_device_compare_inquiry(struct scsi_request *sreq, u8 *buffer,
memset(ptr, 0, len);
- scsi_wait_req(sreq, spi_inquiry, ptr, len,
- DV_TIMEOUT, DV_RETRIES);
+ spi_wait_req(sreq, spi_inquiry, ptr, len);
if(sreq->sr_result || !scsi_device_online(sdev)) {
scsi_device_set_state(sdev, SDEV_QUIESCE);
@@ -593,8 +614,7 @@ spi_dv_device_get_echo_buffer(struct scsi_request *sreq, u8 *buffer)
* (reservation conflict, device not ready, etc) just
* skip the write tests */
for (l = 0; ; l++) {
- scsi_wait_req(sreq, spi_test_unit_ready, NULL, 0,
- DV_TIMEOUT, DV_RETRIES);
+ spi_wait_req(sreq, spi_test_unit_ready, NULL, 0);
if(sreq->sr_result) {
if(l >= 3)
@@ -608,8 +628,7 @@ spi_dv_device_get_echo_buffer(struct scsi_request *sreq, u8 *buffer)
sreq->sr_cmd_len = 0;
sreq->sr_data_direction = DMA_FROM_DEVICE;
- scsi_wait_req(sreq, spi_read_buffer_descriptor, buffer, 4,
- DV_TIMEOUT, DV_RETRIES);
+ spi_wait_req(sreq, spi_read_buffer_descriptor, buffer, 4);
if (sreq->sr_result)
/* Device has no echo buffer */
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
index 5ff83d214f1..5b07c6ec3ec 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
@@ -2038,8 +2038,9 @@ static void sym2_set_period(struct scsi_target *starget, int period)
struct sym_hcb *np = sym_get_hcb(shost);
struct sym_tcb *tp = &np->target[starget->id];
- /* have to have DT for these transfers */
- if (period <= np->minsync)
+ /* have to have DT for these transfers, but DT will also
+ * set width, so check that this is allowed */
+ if (period <= np->minsync && spi_width(starget))
tp->tgoal.dt = 1;
tp->tgoal.period = period;