Commit bdf1ad71 authored by Russell King's avatar Russell King

[ARM] Update Acorn platform scsi drivers.

These were broken by two changes - the removal of the old device model
class code, and when scsi device lists appeared.  This cset allows
these drivers to build again.  We also drop some unnecessary code
from one of the drivers.
parent a4870a51
...@@ -2934,19 +2934,17 @@ int acornscsi_proc_info(char *buffer, char **start, off_t offset, ...@@ -2934,19 +2934,17 @@ int acornscsi_proc_info(char *buffer, char **start, off_t offset,
p += sprintf(p, "\nAttached devices:\n"); p += sprintf(p, "\nAttached devices:\n");
list_for_each_entry(scd, &instance->my_devices, siblings) { list_for_each_entry(scd, &instance->my_devices, siblings) {
int len; p += sprintf(p, "Device/Lun TaggedQ Sync\n");
p += sprintf(p, " %d/%d ", scd->id, scd->lun);
proc_print_scsidevice(scd, p, &len, 0);
p += len;
p += sprintf(p, "Extensions: ");
if (scd->tagged_supported) if (scd->tagged_supported)
p += sprintf(p, "TAG %sabled [%d] ", p += sprintf(p, "%3sabled(%3d) ",
scd->tagged_queue ? "en" : "dis", scd->current_tag); scd->tagged_queue ? "en" : "dis",
p += sprintf(p, "\nTransfers: "); scd->current_tag);
else
p += sprintf(p, "unsupported ");
if (host->device[scd->id].sync_xfer & 15) if (host->device[scd->id].sync_xfer & 15)
p += sprintf(p, "sync, offset %d, %d ns\n", p += sprintf(p, "offset %d, %d ns\n",
host->device[scd->id].sync_xfer & 15, host->device[scd->id].sync_xfer & 15,
acornscsi_getperiod(host->device[scd->id].sync_xfer)); acornscsi_getperiod(host->device[scd->id].sync_xfer));
else else
...@@ -3106,7 +3104,6 @@ static struct ecard_driver acornscsi_driver = { ...@@ -3106,7 +3104,6 @@ static struct ecard_driver acornscsi_driver = {
.remove = __devexit_p(acornscsi_remove), .remove = __devexit_p(acornscsi_remove),
.id_table = acornscsi_cids, .id_table = acornscsi_cids,
.drv = { .drv = {
.devclass = &shost_devclass,
.name = "acornscsi", .name = "acornscsi",
}, },
}; };
......
...@@ -298,7 +298,6 @@ typedef struct acornscsi_hostdata { ...@@ -298,7 +298,6 @@ typedef struct acornscsi_hostdata {
unsigned short last_message; /* last message to be sent */ unsigned short last_message; /* last message to be sent */
unsigned char disconnectable:1; /* this command can be disconnected */ unsigned char disconnectable:1; /* this command can be disconnected */
unsigned char interrupt:1; /* interrupt active */
} scsi; } scsi;
/* statistics information */ /* statistics information */
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <linux/stat.h> #include <linux/stat.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -238,10 +239,10 @@ static int ...@@ -238,10 +239,10 @@ static int
arxescsi_proc_info(char *buffer, char **start, off_t offset, int length, arxescsi_proc_info(char *buffer, char **start, off_t offset, int length,
int host_no, int inout) int host_no, int inout)
{ {
int pos, begin;
struct Scsi_Host *host; struct Scsi_Host *host;
struct arxescsi_info *info; struct arxescsi_info *info;
Scsi_Device *scd; char *p = buffer;
int pos;
host = scsi_host_hn_get(host_no); host = scsi_host_hn_get(host_no);
if (!host) if (!host)
...@@ -251,26 +252,13 @@ arxescsi_proc_info(char *buffer, char **start, off_t offset, int length, ...@@ -251,26 +252,13 @@ arxescsi_proc_info(char *buffer, char **start, off_t offset, int length,
if (inout == 1) if (inout == 1)
return -EINVAL; return -EINVAL;
begin = 0; p += sprintf(p, "ARXE 16-bit SCSI driver v%s\n", VERSION);
pos = sprintf(buffer, "ARXE 16-bit SCSI driver v%s\n", VERSION); p += fas216_print_host(&info->info, p);
pos += fas216_print_host(&info->info, buffer + pos); p += fas216_print_stats(&info->info, p);
pos += fas216_print_stats(&info->info, buffer + pos); p += fas216_print_devices(&info->info, p);
pos += sprintf (buffer+pos, "\nAttached devices:\n"); *start = buffer + offset;
pos = p - buffer - offset;
list_for_each_entry(scd, &host->my_devices, siblings) {
pos += fas216_print_device(&info->info, scd, buffer + pos);
if (pos + begin < offset) {
begin += pos;
pos = 0;
}
if (pos + begin > offset + length)
break;
}
*start = buffer + (offset - begin);
pos -= offset - begin;
if (pos > length) if (pos > length)
pos = length; pos = length;
...@@ -397,7 +385,6 @@ static struct ecard_driver arxescsi_driver = { ...@@ -397,7 +385,6 @@ static struct ecard_driver arxescsi_driver = {
.remove = __devexit_p(arxescsi_remove), .remove = __devexit_p(arxescsi_remove),
.id_table = arxescsi_cids, .id_table = arxescsi_cids,
.drv = { .drv = {
.devclass = &shost_devclass,
.name = "arxescsi", .name = "arxescsi",
}, },
}; };
......
...@@ -334,7 +334,6 @@ static struct ecard_driver cumanascsi1_driver = { ...@@ -334,7 +334,6 @@ static struct ecard_driver cumanascsi1_driver = {
.remove = __devexit_p(cumanascsi1_remove), .remove = __devexit_p(cumanascsi1_remove),
.id_table = cumanascsi1_cids, .id_table = cumanascsi1_cids,
.drv = { .drv = {
.devclass = &shost_devclass,
.name = "cumanascsi1", .name = "cumanascsi1",
}, },
}; };
......
...@@ -356,10 +356,10 @@ cumanascsi_2_set_proc_info(struct Scsi_Host *host, char *buffer, int length) ...@@ -356,10 +356,10 @@ cumanascsi_2_set_proc_info(struct Scsi_Host *host, char *buffer, int length)
int cumanascsi_2_proc_info (char *buffer, char **start, off_t offset, int cumanascsi_2_proc_info (char *buffer, char **start, off_t offset,
int length, int host_no, int inout) int length, int host_no, int inout)
{ {
int pos, begin;
struct Scsi_Host *host; struct Scsi_Host *host;
struct cumanascsi2_info *info; struct cumanascsi2_info *info;
Scsi_Device *scd; char *p = buffer;
int pos;
host = scsi_host_hn_get(host_no); host = scsi_host_hn_get(host_no);
if (!host) if (!host)
...@@ -370,38 +370,16 @@ int cumanascsi_2_proc_info (char *buffer, char **start, off_t offset, ...@@ -370,38 +370,16 @@ int cumanascsi_2_proc_info (char *buffer, char **start, off_t offset,
info = (struct cumanascsi2_info *)host->hostdata; info = (struct cumanascsi2_info *)host->hostdata;
begin = 0; p += sprintf(p, "Cumana SCSI II driver v%s\n", VERSION);
pos = sprintf(buffer, "Cumana SCSI II driver v%s\n", VERSION); p += fas216_print_host(&info->info, p);
pos += fas216_print_host(&info->info, buffer + pos); p += sprintf(p, "Term : o%s\n",
pos += sprintf(buffer + pos, "Term : o%s\n",
info->terms ? "n" : "ff"); info->terms ? "n" : "ff");
pos += fas216_print_stats(&info->info, buffer + pos); p += fas216_print_stats(&info->info, p);
p += fas216_print_devices(&info->info, p);
pos += sprintf(buffer+pos, "\nAttached devices:\n"); *start = buffer + offset;
pos = p - buffer - offset;
list_for_each_entry(scd, &host->my_devices, siblings) {
int len;
proc_print_scsidevice(scd, buffer, &len, pos);
pos += len;
pos += sprintf(buffer+pos, "Extensions: ");
if (scd->tagged_supported)
pos += sprintf(buffer+pos, "TAG %sabled [%d] ",
scd->tagged_queue ? "en" : "dis",
scd->current_tag);
pos += sprintf(buffer+pos, "\n");
if (pos + begin < offset) {
begin += pos;
pos = 0;
}
if (pos + begin > offset + length)
break;
}
*start = buffer + (offset - begin);
pos -= offset - begin;
if (pos > length) if (pos > length)
pos = length; pos = length;
...@@ -572,7 +550,6 @@ static struct ecard_driver cumanascsi2_driver = { ...@@ -572,7 +550,6 @@ static struct ecard_driver cumanascsi2_driver = {
.remove = __devexit_p(cumanascsi2_remove), .remove = __devexit_p(cumanascsi2_remove),
.id_table = cumanascsi2_cids, .id_table = cumanascsi2_cids,
.drv = { .drv = {
.devclass = &shost_devclass,
.name = "cumanascsi2", .name = "cumanascsi2",
}, },
}; };
......
...@@ -430,10 +430,10 @@ eesoxscsi_set_proc_info(struct Scsi_Host *host, char *buffer, int length) ...@@ -430,10 +430,10 @@ eesoxscsi_set_proc_info(struct Scsi_Host *host, char *buffer, int length)
int eesoxscsi_proc_info(char *buffer, char **start, off_t offset, int eesoxscsi_proc_info(char *buffer, char **start, off_t offset,
int length, int host_no, int inout) int length, int host_no, int inout)
{ {
int pos, begin;
struct Scsi_Host *host; struct Scsi_Host *host;
struct eesoxscsi_info *info; struct eesoxscsi_info *info;
Scsi_Device *scd; char *p = buffer;
int pos;
host = scsi_host_hn_get(host_no); host = scsi_host_hn_get(host_no);
if (!host) if (!host)
...@@ -444,35 +444,16 @@ int eesoxscsi_proc_info(char *buffer, char **start, off_t offset, ...@@ -444,35 +444,16 @@ int eesoxscsi_proc_info(char *buffer, char **start, off_t offset,
info = (struct eesoxscsi_info *)host->hostdata; info = (struct eesoxscsi_info *)host->hostdata;
begin = 0; p += sprintf(p, "EESOX SCSI driver v%s\n", VERSION);
pos = sprintf(buffer, "EESOX SCSI driver v%s\n", VERSION); p += fas216_print_host(&info->info, p);
pos += fas216_print_host(&info->info, buffer + pos); p += sprintf(p, "Term : o%s\n",
pos += sprintf(buffer + pos, "Term : o%s\n",
info->control & EESOX_TERM_ENABLE ? "n" : "ff"); info->control & EESOX_TERM_ENABLE ? "n" : "ff");
pos += fas216_print_stats(&info->info, buffer + pos); p += fas216_print_stats(&info->info, p);
p += fas216_print_devices(&info->info, p);
pos += sprintf(buffer+pos, "\nAttached devices:\n"); *start = buffer + offset;
pos = p - buffer - offset;
list_for_each_entry(scd, &host->my_devices, siblings) {
int len;
proc_print_scsidevice(scd, buffer, &len, pos);
pos += len;
pos += sprintf(buffer+pos, "Extensions: ");
if (scd->tagged_supported)
pos += sprintf(buffer+pos, "TAG %sabled [%d] ",
scd->tagged_queue ? "en" : "dis",
scd->current_tag);
pos += sprintf (buffer+pos, "\n");
if (pos + begin < offset) {
begin += pos;
pos = 0;
}
}
*start = buffer + (offset - begin);
pos -= offset - begin;
if (pos > length) if (pos > length)
pos = length; pos = length;
...@@ -679,7 +660,6 @@ static struct ecard_driver eesoxscsi_driver = { ...@@ -679,7 +660,6 @@ static struct ecard_driver eesoxscsi_driver = {
.remove = __devexit_p(eesoxscsi_remove), .remove = __devexit_p(eesoxscsi_remove),
.id_table = eesoxscsi_cids, .id_table = eesoxscsi_cids,
.drv = { .drv = {
.devclass = &shost_devclass,
.name = "eesoxscsi", .name = "eesoxscsi",
}, },
}; };
......
This diff is collapsed.
...@@ -177,7 +177,6 @@ typedef enum { ...@@ -177,7 +177,6 @@ typedef enum {
PHASE_SELSTEPS, /* selection with command steps */ PHASE_SELSTEPS, /* selection with command steps */
PHASE_COMMAND, /* command sent */ PHASE_COMMAND, /* command sent */
PHASE_MESSAGESENT, /* selected, and we're sending cmd */ PHASE_MESSAGESENT, /* selected, and we're sending cmd */
PHASE_RECONNECTED, /* reconnected */
PHASE_DATAOUT, /* data out to device */ PHASE_DATAOUT, /* data out to device */
PHASE_DATAIN, /* data in from device */ PHASE_DATAIN, /* data in from device */
PHASE_MSGIN, /* message in from device */ PHASE_MSGIN, /* message in from device */
...@@ -244,12 +243,6 @@ typedef struct { ...@@ -244,12 +243,6 @@ typedef struct {
const char *type; /* chip type */ const char *type; /* chip type */
unsigned int irq; /* interrupt */ unsigned int irq; /* interrupt */
struct {
unsigned char target; /* reconnected target */
unsigned char lun; /* reconnected lun */
unsigned char tag; /* reconnected tag */
} reconnected;
Scsi_Pointer SCp; /* current commands data pointer */ Scsi_Pointer SCp; /* current commands data pointer */
MsgQueue_t msgs; /* message queue for connected device */ MsgQueue_t msgs; /* message queue for connected device */
...@@ -368,7 +361,7 @@ extern void fas216_release (struct Scsi_Host *instance); ...@@ -368,7 +361,7 @@ extern void fas216_release (struct Scsi_Host *instance);
extern int fas216_print_host(FAS216_Info *info, char *buffer); extern int fas216_print_host(FAS216_Info *info, char *buffer);
extern int fas216_print_stats(FAS216_Info *info, char *buffer); extern int fas216_print_stats(FAS216_Info *info, char *buffer);
extern int fas216_print_device(FAS216_Info *info, Scsi_Device *scd, char *buffer); extern int fas216_print_devices(FAS216_Info *info, char *buffer);
/* Function: int fas216_eh_abort(Scsi_Cmnd *SCpnt) /* Function: int fas216_eh_abort(Scsi_Cmnd *SCpnt)
* Purpose : abort this command * Purpose : abort this command
......
...@@ -192,7 +192,6 @@ static struct ecard_driver oakscsi_driver = { ...@@ -192,7 +192,6 @@ static struct ecard_driver oakscsi_driver = {
.remove = __devexit_p(oakscsi_remove), .remove = __devexit_p(oakscsi_remove),
.id_table = oakscsi_cids, .id_table = oakscsi_cids,
.drv = { .drv = {
.devclass = &shost_devclass,
.name = "oakscsi", .name = "oakscsi",
}, },
}; };
......
...@@ -242,10 +242,10 @@ powertecscsi_set_proc_info(struct Scsi_Host *host, char *buffer, int length) ...@@ -242,10 +242,10 @@ powertecscsi_set_proc_info(struct Scsi_Host *host, char *buffer, int length)
int powertecscsi_proc_info(char *buffer, char **start, off_t offset, int powertecscsi_proc_info(char *buffer, char **start, off_t offset,
int length, int host_no, int inout) int length, int host_no, int inout)
{ {
int pos, begin;
struct Scsi_Host *host; struct Scsi_Host *host;
struct powertec_info *info; struct powertec_info *info;
Scsi_Device *scd; char *p = buffer;
int pos;
host = scsi_host_hn_get(host_no); host = scsi_host_hn_get(host_no);
if (!host) if (!host)
...@@ -256,29 +256,16 @@ int powertecscsi_proc_info(char *buffer, char **start, off_t offset, ...@@ -256,29 +256,16 @@ int powertecscsi_proc_info(char *buffer, char **start, off_t offset,
info = (struct powertec_info *)host->hostdata; info = (struct powertec_info *)host->hostdata;
begin = 0; p += sprintf(p, "PowerTec SCSI driver v%s\n", VERSION);
pos = sprintf(buffer, "PowerTec SCSI driver v%s\n", VERSION); p += fas216_print_host(&info->info, p);
pos += fas216_print_host(&info->info, buffer + pos); p += sprintf(p, "Term : o%s\n",
pos += sprintf(buffer + pos, "Term : o%s\n",
info->term_ctl ? "n" : "ff"); info->term_ctl ? "n" : "ff");
pos += fas216_print_stats(&info->info, buffer + pos); p += fas216_print_stats(&info->info, p);
p += fas216_print_devices(&info->info, p);
pos += sprintf(buffer+pos, "\nAttached devices:\n"); *start = buffer + offset;
pos = p - buffer - offset;
list_for_each_entry(scd, &host->my_devices, siblings) {
pos += fas216_print_device(&info->info, scd, buffer + pos);
if (pos + begin < offset) {
begin += pos;
pos = 0;
}
if (pos + begin > offset + length)
break;
}
*start = buffer + (offset - begin);
pos -= offset - begin;
if (pos > length) if (pos > length)
pos = length; pos = length;
...@@ -475,7 +462,6 @@ static struct ecard_driver powertecscsi_driver = { ...@@ -475,7 +462,6 @@ static struct ecard_driver powertecscsi_driver = {
.remove = __devexit_p(powertecscsi_remove), .remove = __devexit_p(powertecscsi_remove),
.id_table = powertecscsi_cids, .id_table = powertecscsi_cids,
.drv = { .drv = {
.devclass = &shost_devclass,
.name = "powertecscsi", .name = "powertecscsi",
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment