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,23 +2934,21 @@ int acornscsi_proc_info(char *buffer, char **start, off_t offset,
p += sprintf(p, "\nAttached devices:\n");
list_for_each_entry(scd, &instance->my_devices, siblings) {
int len;
proc_print_scsidevice(scd, p, &len, 0);
p += len;
p += sprintf(p, "Extensions: ");
p += sprintf(p, "Device/Lun TaggedQ Sync\n");
p += sprintf(p, " %d/%d ", scd->id, scd->lun);
if (scd->tagged_supported)
p += sprintf(p, "TAG %sabled [%d] ",
scd->tagged_queue ? "en" : "dis", scd->current_tag);
p += sprintf(p, "\nTransfers: ");
p += sprintf(p, "%3sabled(%3d) ",
scd->tagged_queue ? "en" : "dis",
scd->current_tag);
else
p += sprintf(p, "unsupported ");
if (host->device[scd->id].sync_xfer & 15)
p += sprintf(p, "sync, offset %d, %d ns\n",
host->device[scd->id].sync_xfer & 15,
acornscsi_getperiod(host->device[scd->id].sync_xfer));
p += sprintf(p, "offset %d, %d ns\n",
host->device[scd->id].sync_xfer & 15,
acornscsi_getperiod(host->device[scd->id].sync_xfer));
else
p += sprintf(p, "async\n");
p += sprintf(p, "async\n");
pos = p - buffer;
if (pos + begin < offset) {
......@@ -3106,7 +3104,6 @@ static struct ecard_driver acornscsi_driver = {
.remove = __devexit_p(acornscsi_remove),
.id_table = acornscsi_cids,
.drv = {
.devclass = &shost_devclass,
.name = "acornscsi",
},
};
......
......@@ -298,7 +298,6 @@ typedef struct acornscsi_hostdata {
unsigned short last_message; /* last message to be sent */
unsigned char disconnectable:1; /* this command can be disconnected */
unsigned char interrupt:1; /* interrupt active */
} scsi;
/* statistics information */
......
......@@ -29,6 +29,7 @@
#include <linux/stat.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <asm/dma.h>
#include <asm/io.h>
......@@ -238,10 +239,10 @@ static int
arxescsi_proc_info(char *buffer, char **start, off_t offset, int length,
int host_no, int inout)
{
int pos, begin;
struct Scsi_Host *host;
struct arxescsi_info *info;
Scsi_Device *scd;
char *p = buffer;
int pos;
host = scsi_host_hn_get(host_no);
if (!host)
......@@ -251,26 +252,13 @@ arxescsi_proc_info(char *buffer, char **start, off_t offset, int length,
if (inout == 1)
return -EINVAL;
begin = 0;
pos = sprintf(buffer, "ARXE 16-bit SCSI driver v%s\n", VERSION);
pos += fas216_print_host(&info->info, buffer + pos);
pos += fas216_print_stats(&info->info, buffer + pos);
p += sprintf(p, "ARXE 16-bit SCSI driver v%s\n", VERSION);
p += fas216_print_host(&info->info, p);
p += fas216_print_stats(&info->info, p);
p += fas216_print_devices(&info->info, p);
pos += sprintf (buffer+pos, "\nAttached devices:\n");
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;
*start = buffer + offset;
pos = p - buffer - offset;
if (pos > length)
pos = length;
......@@ -397,7 +385,6 @@ static struct ecard_driver arxescsi_driver = {
.remove = __devexit_p(arxescsi_remove),
.id_table = arxescsi_cids,
.drv = {
.devclass = &shost_devclass,
.name = "arxescsi",
},
};
......
......@@ -334,7 +334,6 @@ static struct ecard_driver cumanascsi1_driver = {
.remove = __devexit_p(cumanascsi1_remove),
.id_table = cumanascsi1_cids,
.drv = {
.devclass = &shost_devclass,
.name = "cumanascsi1",
},
};
......
......@@ -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 length, int host_no, int inout)
{
int pos, begin;
struct Scsi_Host *host;
struct cumanascsi2_info *info;
Scsi_Device *scd;
char *p = buffer;
int pos;
host = scsi_host_hn_get(host_no);
if (!host)
......@@ -370,38 +370,16 @@ int cumanascsi_2_proc_info (char *buffer, char **start, off_t offset,
info = (struct cumanascsi2_info *)host->hostdata;
begin = 0;
pos = sprintf(buffer, "Cumana SCSI II driver v%s\n", VERSION);
pos += fas216_print_host(&info->info, buffer + pos);
pos += sprintf(buffer + pos, "Term : o%s\n",
p += sprintf(p, "Cumana SCSI II driver v%s\n", VERSION);
p += fas216_print_host(&info->info, p);
p += sprintf(p, "Term : o%s\n",
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");
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;
*start = buffer + offset;
pos = p - buffer - offset;
if (pos > length)
pos = length;
......@@ -572,7 +550,6 @@ static struct ecard_driver cumanascsi2_driver = {
.remove = __devexit_p(cumanascsi2_remove),
.id_table = cumanascsi2_cids,
.drv = {
.devclass = &shost_devclass,
.name = "cumanascsi2",
},
};
......
......@@ -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 length, int host_no, int inout)
{
int pos, begin;
struct Scsi_Host *host;
struct eesoxscsi_info *info;
Scsi_Device *scd;
char *p = buffer;
int pos;
host = scsi_host_hn_get(host_no);
if (!host)
......@@ -444,35 +444,16 @@ int eesoxscsi_proc_info(char *buffer, char **start, off_t offset,
info = (struct eesoxscsi_info *)host->hostdata;
begin = 0;
pos = sprintf(buffer, "EESOX SCSI driver v%s\n", VERSION);
pos += fas216_print_host(&info->info, buffer + pos);
pos += sprintf(buffer + pos, "Term : o%s\n",
p += sprintf(p, "EESOX SCSI driver v%s\n", VERSION);
p += fas216_print_host(&info->info, p);
p += sprintf(p, "Term : o%s\n",
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");
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;
*start = buffer + offset;
pos = p - buffer - offset;
if (pos > length)
pos = length;
......@@ -679,7 +660,6 @@ static struct ecard_driver eesoxscsi_driver = {
.remove = __devexit_p(eesoxscsi_remove),
.id_table = eesoxscsi_cids,
.drv = {
.devclass = &shost_devclass,
.name = "eesoxscsi",
},
};
......
This diff is collapsed.
......@@ -177,7 +177,6 @@ typedef enum {
PHASE_SELSTEPS, /* selection with command steps */
PHASE_COMMAND, /* command sent */
PHASE_MESSAGESENT, /* selected, and we're sending cmd */
PHASE_RECONNECTED, /* reconnected */
PHASE_DATAOUT, /* data out to device */
PHASE_DATAIN, /* data in from device */
PHASE_MSGIN, /* message in from device */
......@@ -244,12 +243,6 @@ typedef struct {
const char *type; /* chip type */
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 */
MsgQueue_t msgs; /* message queue for connected device */
......@@ -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_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)
* Purpose : abort this command
......
......@@ -192,7 +192,6 @@ static struct ecard_driver oakscsi_driver = {
.remove = __devexit_p(oakscsi_remove),
.id_table = oakscsi_cids,
.drv = {
.devclass = &shost_devclass,
.name = "oakscsi",
},
};
......
......@@ -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 length, int host_no, int inout)
{
int pos, begin;
struct Scsi_Host *host;
struct powertec_info *info;
Scsi_Device *scd;
char *p = buffer;
int pos;
host = scsi_host_hn_get(host_no);
if (!host)
......@@ -256,29 +256,16 @@ int powertecscsi_proc_info(char *buffer, char **start, off_t offset,
info = (struct powertec_info *)host->hostdata;
begin = 0;
pos = sprintf(buffer, "PowerTec SCSI driver v%s\n", VERSION);
pos += fas216_print_host(&info->info, buffer + pos);
pos += sprintf(buffer + pos, "Term : o%s\n",
p += sprintf(p, "PowerTec SCSI driver v%s\n", VERSION);
p += fas216_print_host(&info->info, p);
p += sprintf(p, "Term : o%s\n",
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");
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;
*start = buffer + offset;
pos = p - buffer - offset;
if (pos > length)
pos = length;
......@@ -475,7 +462,6 @@ static struct ecard_driver powertecscsi_driver = {
.remove = __devexit_p(powertecscsi_remove),
.id_table = powertecscsi_cids,
.drv = {
.devclass = &shost_devclass,
.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