Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15661
b: refs/heads/master
c: 410ca5c
h: refs/heads/master
i:
  15659: eb26d8c
v: v3
  • Loading branch information
Matthew Wilcox authored and James Bottomley committed Dec 16, 2005
1 parent 0951be9 commit ada3d19
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 109 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7b16318dea8d9840dac567a2ae8c50ecdea36aea
refs/heads/master: 410ca5c7c6ed08bda165e8137bff26c3fbee5a1b
13 changes: 13 additions & 0 deletions trunk/drivers/scsi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ config SCSI_ACARD
config SCSI_AHA152X
tristate "Adaptec AHA152X/2825 support"
depends on ISA && SCSI && !64BIT
select SCSI_SPI_ATTRS
---help---
This is a driver for the AHA-1510, AHA-1520, AHA-1522, and AHA-2825
SCSI host adapters. It also works for the AVA-1505, but the IRQ etc.
Expand Down Expand Up @@ -623,6 +624,7 @@ config SCSI_OMIT_FLASHPOINT
config SCSI_DMX3191D
tristate "DMX3191D SCSI support"
depends on PCI && SCSI
select SCSI_SPI_ATTRS
help
This is support for Domex DMX3191D SCSI Host Adapters.

Expand All @@ -632,6 +634,7 @@ config SCSI_DMX3191D
config SCSI_DTC3280
tristate "DTC3180/3280 SCSI support"
depends on ISA && SCSI
select SCSI_SPI_ATTRS
help
This is support for DTC 3180/3280 SCSI Host Adapters. Please read
the SCSI-HOWTO, available from
Expand Down Expand Up @@ -752,6 +755,7 @@ config SCSI_GDTH
config SCSI_GENERIC_NCR5380
tristate "Generic NCR5380/53c400 SCSI PIO support"
depends on ISA && SCSI
select SCSI_SPI_ATTRS
---help---
This is a driver for the old NCR 53c80 series of SCSI controllers
on boards using PIO. Most boards such as the Trantor T130 fit this
Expand All @@ -771,6 +775,7 @@ config SCSI_GENERIC_NCR5380
config SCSI_GENERIC_NCR5380_MMIO
tristate "Generic NCR5380/53c400 SCSI MMIO support"
depends on ISA && SCSI
select SCSI_SPI_ATTRS
---help---
This is a driver for the old NCR 53c80 series of SCSI controllers
on boards using memory mapped I/O.
Expand Down Expand Up @@ -1254,6 +1259,7 @@ config SCSI_MCA_53C9X
config SCSI_PAS16
tristate "PAS16 SCSI support"
depends on ISA && SCSI
select SCSI_SPI_ATTRS
---help---
This is support for a SCSI host adapter. It is explained in section
3.10 of the SCSI-HOWTO, available from
Expand Down Expand Up @@ -1423,6 +1429,7 @@ config SCSI_DC390T
config SCSI_T128
tristate "Trantor T128/T128F/T228 SCSI support"
depends on ISA && SCSI
select SCSI_SPI_ATTRS
---help---
This is support for a SCSI host adapter. It is explained in section
3.11 of the SCSI-HOWTO, available from
Expand Down Expand Up @@ -1681,6 +1688,7 @@ config OKTAGON_SCSI
config ATARI_SCSI
tristate "Atari native SCSI support"
depends on ATARI && SCSI && BROKEN
select SCSI_SPI_ATTRS
---help---
If you have an Atari with built-in NCR5380 SCSI controller (TT,
Falcon, ...) say Y to get it supported. Of course also, if you have
Expand Down Expand Up @@ -1722,6 +1730,7 @@ config TT_DMA_EMUL
config MAC_SCSI
bool "Macintosh NCR5380 SCSI"
depends on MAC && SCSI=y
select SCSI_SPI_ATTRS
help
This is the NCR 5380 SCSI controller included on most of the 68030
based Macintoshes. If you have one of these say Y and read the
Expand All @@ -1743,13 +1752,15 @@ config SCSI_MAC_ESP
config MVME147_SCSI
bool "WD33C93 SCSI driver for MVME147"
depends on MVME147 && SCSI=y
select SCSI_SPI_ATTRS
help
Support for the on-board SCSI controller on the Motorola MVME147
single-board computer.

config MVME16x_SCSI
bool "NCR53C710 SCSI driver for MVME16x"
depends on MVME16x && SCSI && BROKEN
select SCSI_SPI_ATTRS
help
The Motorola MVME162, 166, 167, 172 and 177 boards use the NCR53C710
SCSI controller chip. Almost everyone using one of these boards
Expand All @@ -1758,6 +1769,7 @@ config MVME16x_SCSI
config BVME6000_SCSI
bool "NCR53C710 SCSI driver for BVME6000"
depends on BVME6000 && SCSI && BROKEN
select SCSI_SPI_ATTRS
help
The BVME4000 and BVME6000 boards from BVM Ltd use the NCR53C710
SCSI controller chip. Almost everyone using one of these boards
Expand All @@ -1774,6 +1786,7 @@ config SCSI_NCR53C7xx_FAST
config SUN3_SCSI
tristate "Sun3 NCR5380 SCSI"
depends on SUN3 && SCSI && BROKEN
select SCSI_SPI_ATTRS
help
This option will enable support for the OBIO (onboard io) NCR5380
SCSI controller found in the Sun 3/50 and 3/60, as well as for
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/scsi/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
config SCSI_ACORNSCSI_3
tristate "Acorn SCSI card (aka30) support"
depends on ARCH_ACORN && SCSI && BROKEN
select SCSI_SPI_ATTRS
help
This enables support for the Acorn SCSI card (aka30). If you have an
Acorn system with one of these, say Y. If unsure, say N.
Expand Down
108 changes: 0 additions & 108 deletions trunk/drivers/scsi/constants.c
Original file line number Diff line number Diff line change
Expand Up @@ -1278,114 +1278,6 @@ void scsi_print_req_sense(const char *devclass, struct scsi_request *sreq)
}
EXPORT_SYMBOL(scsi_print_req_sense);

#ifdef CONFIG_SCSI_CONSTANTS
static const char * const one_byte_msgs[] = {
/* 0x00 */ "Command Complete", NULL, "Save Pointers",
/* 0x03 */ "Restore Pointers", "Disconnect", "Initiator Error",
/* 0x06 */ "Abort", "Message Reject", "Nop", "Message Parity Error",
/* 0x0a */ "Linked Command Complete", "Linked Command Complete w/flag",
/* 0x0c */ "Bus device reset", "Abort Tag", "Clear Queue",
/* 0x0f */ "Initiate Recovery", "Release Recovery"
};
#define NO_ONE_BYTE_MSGS (sizeof(one_byte_msgs) / sizeof (const char *))

static const char * const two_byte_msgs[] = {
/* 0x20 */ "Simple Queue Tag", "Head of Queue Tag", "Ordered Queue Tag"
/* 0x23 */ "Ignore Wide Residue"
};
#define NO_TWO_BYTE_MSGS (sizeof(two_byte_msgs) / sizeof (const char *))

static const char * const extended_msgs[] = {
/* 0x00 */ "Modify Data Pointer", "Synchronous Data Transfer Request",
/* 0x02 */ "SCSI-I Extended Identify", "Wide Data Transfer Request"
};
#define NO_EXTENDED_MSGS (sizeof(two_byte_msgs) / sizeof (const char *))


int scsi_print_msg (const unsigned char *msg)
{
int len = 0, i;
if (msg[0] == EXTENDED_MESSAGE) {
len = 3 + msg[1];
if (msg[2] < NO_EXTENDED_MSGS)
printk ("%s ", extended_msgs[msg[2]]);
else
printk ("Extended Message, reserved code (0x%02x) ",
(int) msg[2]);
switch (msg[2]) {
case EXTENDED_MODIFY_DATA_POINTER:
printk("pointer = %d", (int) (msg[3] << 24) |
(msg[4] << 16) | (msg[5] << 8) | msg[6]);
break;
case EXTENDED_SDTR:
printk("period = %d ns, offset = %d",
(int) msg[3] * 4, (int) msg[4]);
break;
case EXTENDED_WDTR:
printk("width = 2^%d bytes", msg[3]);
break;
default:
for (i = 2; i < len; ++i)
printk("%02x ", msg[i]);
}
/* Identify */
} else if (msg[0] & 0x80) {
printk("Identify disconnect %sallowed %s %d ",
(msg[0] & 0x40) ? "" : "not ",
(msg[0] & 0x20) ? "target routine" : "lun",
msg[0] & 0x7);
len = 1;
/* Normal One byte */
} else if (msg[0] < 0x1f) {
if (msg[0] < NO_ONE_BYTE_MSGS)
printk(one_byte_msgs[msg[0]]);
else
printk("reserved (%02x) ", msg[0]);
len = 1;
/* Two byte */
} else if (msg[0] <= 0x2f) {
if ((msg[0] - 0x20) < NO_TWO_BYTE_MSGS)
printk("%s %02x ", two_byte_msgs[msg[0] - 0x20],
msg[1]);
else
printk("reserved two byte (%02x %02x) ",
msg[0], msg[1]);
len = 2;
} else
printk("reserved");
return len;
}
EXPORT_SYMBOL(scsi_print_msg);

#else /* ifndef CONFIG_SCSI_CONSTANTS */

int scsi_print_msg (const unsigned char *msg)
{
int len = 0, i;

if (msg[0] == EXTENDED_MESSAGE) {
len = 3 + msg[1];
for (i = 0; i < len; ++i)
printk("%02x ", msg[i]);
/* Identify */
} else if (msg[0] & 0x80) {
printk("%02x ", msg[0]);
len = 1;
/* Normal One byte */
} else if (msg[0] < 0x1f) {
printk("%02x ", msg[0]);
len = 1;
/* Two byte */
} else if (msg[0] <= 0x2f) {
printk("%02x %02x", msg[0], msg[1]);
len = 2;
} else
printk("%02x ", msg[0]);
return len;
}
EXPORT_SYMBOL(scsi_print_msg);
#endif /* ! CONFIG_SCSI_CONSTANTS */

void scsi_print_command(struct scsi_cmnd *cmd)
{
/* Assume appended output (i.e. not at start of line) */
Expand Down
109 changes: 109 additions & 0 deletions trunk/drivers/scsi/scsi_transport_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/config.h>
#include <linux/ctype.h>
#include <linux/init.h>
#include <linux/module.h>
Expand Down Expand Up @@ -1047,6 +1048,114 @@ void spi_display_xfer_agreement(struct scsi_target *starget)
}
EXPORT_SYMBOL(spi_display_xfer_agreement);

#ifdef CONFIG_SCSI_CONSTANTS
static const char * const one_byte_msgs[] = {
/* 0x00 */ "Command Complete", NULL, "Save Pointers",
/* 0x03 */ "Restore Pointers", "Disconnect", "Initiator Error",
/* 0x06 */ "Abort", "Message Reject", "Nop", "Message Parity Error",
/* 0x0a */ "Linked Command Complete", "Linked Command Complete w/flag",
/* 0x0c */ "Bus device reset", "Abort Tag", "Clear Queue",
/* 0x0f */ "Initiate Recovery", "Release Recovery"
};
#define NO_ONE_BYTE_MSGS (sizeof(one_byte_msgs) / sizeof (const char *))

static const char * const two_byte_msgs[] = {
/* 0x20 */ "Simple Queue Tag", "Head of Queue Tag", "Ordered Queue Tag"
/* 0x23 */ "Ignore Wide Residue"
};
#define NO_TWO_BYTE_MSGS (sizeof(two_byte_msgs) / sizeof (const char *))

static const char * const extended_msgs[] = {
/* 0x00 */ "Modify Data Pointer", "Synchronous Data Transfer Request",
/* 0x02 */ "SCSI-I Extended Identify", "Wide Data Transfer Request"
};
#define NO_EXTENDED_MSGS (sizeof(two_byte_msgs) / sizeof (const char *))


int scsi_print_msg (const unsigned char *msg)
{
int len = 0, i;
if (msg[0] == EXTENDED_MESSAGE) {
len = 3 + msg[1];
if (msg[2] < NO_EXTENDED_MSGS)
printk ("%s ", extended_msgs[msg[2]]);
else
printk ("Extended Message, reserved code (0x%02x) ",
(int) msg[2]);
switch (msg[2]) {
case EXTENDED_MODIFY_DATA_POINTER:
printk("pointer = %d", (int) (msg[3] << 24) |
(msg[4] << 16) | (msg[5] << 8) | msg[6]);
break;
case EXTENDED_SDTR:
printk("period = %d ns, offset = %d",
(int) msg[3] * 4, (int) msg[4]);
break;
case EXTENDED_WDTR:
printk("width = 2^%d bytes", msg[3]);
break;
default:
for (i = 2; i < len; ++i)
printk("%02x ", msg[i]);
}
/* Identify */
} else if (msg[0] & 0x80) {
printk("Identify disconnect %sallowed %s %d ",
(msg[0] & 0x40) ? "" : "not ",
(msg[0] & 0x20) ? "target routine" : "lun",
msg[0] & 0x7);
len = 1;
/* Normal One byte */
} else if (msg[0] < 0x1f) {
if (msg[0] < NO_ONE_BYTE_MSGS)
printk(one_byte_msgs[msg[0]]);
else
printk("reserved (%02x) ", msg[0]);
len = 1;
/* Two byte */
} else if (msg[0] <= 0x2f) {
if ((msg[0] - 0x20) < NO_TWO_BYTE_MSGS)
printk("%s %02x ", two_byte_msgs[msg[0] - 0x20],
msg[1]);
else
printk("reserved two byte (%02x %02x) ",
msg[0], msg[1]);
len = 2;
} else
printk("reserved");
return len;
}
EXPORT_SYMBOL(scsi_print_msg);

#else /* ifndef CONFIG_SCSI_CONSTANTS */

int scsi_print_msg (const unsigned char *msg)
{
int len = 0, i;

if (msg[0] == EXTENDED_MESSAGE) {
len = 3 + msg[1];
for (i = 0; i < len; ++i)
printk("%02x ", msg[i]);
/* Identify */
} else if (msg[0] & 0x80) {
printk("%02x ", msg[0]);
len = 1;
/* Normal One byte */
} else if (msg[0] < 0x1f) {
printk("%02x ", msg[0]);
len = 1;
/* Two byte */
} else if (msg[0] <= 0x2f) {
printk("%02x %02x", msg[0], msg[1]);
len = 2;
} else
printk("%02x ", msg[0]);
return len;
}
EXPORT_SYMBOL(scsi_print_msg);
#endif /* ! CONFIG_SCSI_CONSTANTS */

#define SETUP_ATTRIBUTE(field) \
i->private_attrs[count] = class_device_attr_##field; \
if (!i->f->set_##field) { \
Expand Down

0 comments on commit ada3d19

Please sign in to comment.