Commit b9be38f1 authored by David S. Miller's avatar David S. Miller

Merge nuts.ninka.net:/home/davem/src/BK/sparcwork-2.5

into nuts.ninka.net:/home/davem/src/BK/sparc-2.5
parents 3ec0428e 2ff0cbaa
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
#if defined(CONFIG_BLK_DEV_LVM) || defined(CONFIG_BLK_DEV_LVM_MODULE) #if defined(CONFIG_BLK_DEV_LVM) || defined(CONFIG_BLK_DEV_LVM_MODULE)
#include <linux/lvm.h> #include <linux/lvm.h>
#endif /* LVM */ #endif /* LVM */
#include <linux/dm-ioctl.h>
#include <scsi/scsi.h> #include <scsi/scsi.h>
/* Ugly hack. */ /* Ugly hack. */
...@@ -5012,6 +5013,19 @@ COMPATIBLE_IOCTL(NBD_CLEAR_QUE) ...@@ -5012,6 +5013,19 @@ COMPATIBLE_IOCTL(NBD_CLEAR_QUE)
COMPATIBLE_IOCTL(NBD_PRINT_DEBUG) COMPATIBLE_IOCTL(NBD_PRINT_DEBUG)
COMPATIBLE_IOCTL(NBD_SET_SIZE_BLOCKS) COMPATIBLE_IOCTL(NBD_SET_SIZE_BLOCKS)
COMPATIBLE_IOCTL(NBD_DISCONNECT) COMPATIBLE_IOCTL(NBD_DISCONNECT)
/* device-mapper */
COMPATIBLE_IOCTL(DM_VERSION)
COMPATIBLE_IOCTL(DM_REMOVE_ALL)
COMPATIBLE_IOCTL(DM_DEV_CREATE)
COMPATIBLE_IOCTL(DM_DEV_REMOVE)
COMPATIBLE_IOCTL(DM_DEV_RELOAD)
COMPATIBLE_IOCTL(DM_DEV_SUSPEND)
COMPATIBLE_IOCTL(DM_DEV_RENAME)
COMPATIBLE_IOCTL(DM_DEV_DEPS)
COMPATIBLE_IOCTL(DM_DEV_STATUS)
COMPATIBLE_IOCTL(DM_TARGET_STATUS)
COMPATIBLE_IOCTL(DM_TARGET_WAIT)
/* And these ioctls need translation */ /* And these ioctls need translation */
HANDLE_IOCTL(MEMREADOOB32, mtd_rw_oob) HANDLE_IOCTL(MEMREADOOB32, mtd_rw_oob)
HANDLE_IOCTL(MEMWRITEOOB32, mtd_rw_oob) HANDLE_IOCTL(MEMWRITEOOB32, mtd_rw_oob)
......
...@@ -1136,7 +1136,7 @@ static int __init detect_one_esp(Scsi_Host_Template *tpnt, struct sbus_dev *esp_ ...@@ -1136,7 +1136,7 @@ static int __init detect_one_esp(Scsi_Host_Template *tpnt, struct sbus_dev *esp_
#include <asm/sun4paddr.h> #include <asm/sun4paddr.h>
int __init esp_detect(Scsi_Host_Template *tpnt) static int __init esp_detect(Scsi_Host_Template *tpnt)
{ {
static struct sbus_dev esp_dev; static struct sbus_dev esp_dev;
int esps_in_use = 0; int esps_in_use = 0;
...@@ -1161,7 +1161,7 @@ int __init esp_detect(Scsi_Host_Template *tpnt) ...@@ -1161,7 +1161,7 @@ int __init esp_detect(Scsi_Host_Template *tpnt)
#else /* !CONFIG_SUN4 */ #else /* !CONFIG_SUN4 */
int __init esp_detect(Scsi_Host_Template *tpnt) static int __init esp_detect(Scsi_Host_Template *tpnt)
{ {
struct sbus_bus *sbus; struct sbus_bus *sbus;
struct sbus_dev *esp_dev, *sbdev_iter; struct sbus_dev *esp_dev, *sbdev_iter;
...@@ -1385,8 +1385,8 @@ static int esp_host_info(struct esp *esp, char *ptr, off_t offset, int len) ...@@ -1385,8 +1385,8 @@ static int esp_host_info(struct esp *esp, char *ptr, off_t offset, int len)
} }
/* ESP proc filesystem code. */ /* ESP proc filesystem code. */
int esp_proc_info(char *buffer, char **start, off_t offset, int length, static int esp_proc_info(char *buffer, char **start, off_t offset,
int hostno, int inout) int length, int hostno, int inout)
{ {
struct esp *esp; struct esp *esp;
...@@ -1830,7 +1830,7 @@ static void esp_exec_cmd(struct esp *esp) ...@@ -1830,7 +1830,7 @@ static void esp_exec_cmd(struct esp *esp)
} }
/* Queue a SCSI command delivered from the mid-level Linux SCSI code. */ /* Queue a SCSI command delivered from the mid-level Linux SCSI code. */
int esp_queue(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) static int esp_queue(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
{ {
struct esp *esp; struct esp *esp;
...@@ -1867,7 +1867,7 @@ int esp_queue(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) ...@@ -1867,7 +1867,7 @@ int esp_queue(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
} }
/* Only queuing supported in this ESP driver. */ /* Only queuing supported in this ESP driver. */
int esp_command(Scsi_Cmnd *SCpnt) static int esp_command(Scsi_Cmnd *SCpnt)
{ {
struct esp *esp = (struct esp *) SCpnt->host->hostdata; struct esp *esp = (struct esp *) SCpnt->host->hostdata;
...@@ -1932,7 +1932,7 @@ static void esp_dump_state(struct esp *esp) ...@@ -1932,7 +1932,7 @@ static void esp_dump_state(struct esp *esp)
} }
/* Abort a command. */ /* Abort a command. */
int esp_abort(Scsi_Cmnd *SCptr) static int esp_abort(Scsi_Cmnd *SCptr)
{ {
struct esp *esp = (struct esp *) SCptr->host->hostdata; struct esp *esp = (struct esp *) SCptr->host->hostdata;
unsigned long flags; unsigned long flags;
...@@ -2068,7 +2068,7 @@ static int esp_do_resetbus(struct esp *esp) ...@@ -2068,7 +2068,7 @@ static int esp_do_resetbus(struct esp *esp)
/* Reset ESP chip, reset hanging bus, then kill active and /* Reset ESP chip, reset hanging bus, then kill active and
* disconnected commands for targets without soft reset. * disconnected commands for targets without soft reset.
*/ */
int esp_reset(Scsi_Cmnd *SCptr) static int esp_reset(Scsi_Cmnd *SCptr)
{ {
struct esp *esp = (struct esp *) SCptr->host->hostdata; struct esp *esp = (struct esp *) SCptr->host->hostdata;
unsigned long flags; unsigned long flags;
...@@ -4359,7 +4359,7 @@ static void esp_intr(int irq, void *dev_id, struct pt_regs *pregs) ...@@ -4359,7 +4359,7 @@ static void esp_intr(int irq, void *dev_id, struct pt_regs *pregs)
spin_unlock_irqrestore(esp->ehost->host_lock, flags); spin_unlock_irqrestore(esp->ehost->host_lock, flags);
} }
void esp_slave_detach(Scsi_Device* SDptr) static void esp_slave_detach(Scsi_Device* SDptr)
{ {
struct esp *esp = (struct esp *) SDptr->host->hostdata; struct esp *esp = (struct esp *) SDptr->host->hostdata;
esp->targets_present &= ~(1 << SDptr->id); esp->targets_present &= ~(1 << SDptr->id);
...@@ -4368,7 +4368,27 @@ void esp_slave_detach(Scsi_Device* SDptr) ...@@ -4368,7 +4368,27 @@ void esp_slave_detach(Scsi_Device* SDptr)
SDptr->hostdata = NULL; SDptr->hostdata = NULL;
} }
static Scsi_Host_Template driver_template = SCSI_SPARC_ESP;
#include "scsi_module.c" static Scsi_Host_Template driver_template = {
.proc_name = "esp",
.proc_info = esp_proc_info,
.name = "Sun ESP 100/100a/200",
.detect = esp_detect,
.slave_detach = esp_slave_detach,
.info = esp_info,
.command = esp_command,
.queuecommand = esp_queue,
.eh_abort_handler = esp_abort,
.eh_bus_reset_handler = esp_reset,
.can_queue = 7,
.this_id = 7,
.sg_tablesize = SG_ALL,
.cmd_per_lun = 1,
.use_clustering = ENABLE_CLUSTERING,
/* Sparc32's iommu code cannot handle highmem pages yet. */
#ifdef CONFIG_SPARC64
.highmem_io = 1,
#endif
}
#include "scsi_module.c"
...@@ -403,42 +403,6 @@ struct esp { ...@@ -403,42 +403,6 @@ struct esp {
#define ESP_MHZ_TO_CYCLE(mhertz) ((1000000000) / ((mhertz) / 1000)) #define ESP_MHZ_TO_CYCLE(mhertz) ((1000000000) / ((mhertz) / 1000))
#define ESP_TICK(ccf, cycle) ((7682 * (ccf) * (cycle) / 1000)) #define ESP_TICK(ccf, cycle) ((7682 * (ccf) * (cycle) / 1000))
extern int esp_detect(struct SHT *);
extern const char *esp_info(struct Scsi_Host *);
extern int esp_queue(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
extern int esp_command(Scsi_Cmnd *);
extern int esp_abort(Scsi_Cmnd *);
extern int esp_reset(Scsi_Cmnd *);
extern int esp_proc_info(char *buffer, char **start, off_t offset, int length,
int hostno, int inout);
extern void esp_slave_detach(Scsi_Device* SDptr);
#ifdef CONFIG_SPARC64
#define ESP_HIGHMEM_IO 1
#else
/* Sparc32's iommu code cannot handle highmem pages yet. */
#define ESP_HIGHMEM_IO 0
#endif
#define SCSI_SPARC_ESP { \
.proc_name = "esp", \
.proc_info = &esp_proc_info, \
.name = "Sun ESP 100/100a/200", \
.detect = esp_detect, \
.slave_detach = esp_slave_detach, \
.info = esp_info, \
.command = esp_command, \
.queuecommand = esp_queue, \
.eh_abort_handler = esp_abort, \
.eh_bus_reset_handler = esp_reset, \
.can_queue = 7, \
.this_id = 7, \
.sg_tablesize = SG_ALL, \
.cmd_per_lun = 1, \
.use_clustering = ENABLE_CLUSTERING, \
.highmem_io = ESP_HIGHMEM_IO, \
}
/* For our interrupt engine. */ /* For our interrupt engine. */
#define for_each_esp(esp) \ #define for_each_esp(esp) \
for((esp) = espchain; (esp); (esp) = (esp)->next) for((esp) = espchain; (esp); (esp) = (esp)->next)
......
...@@ -807,7 +807,7 @@ static int __init qpti_map_queues(struct qlogicpti *qpti) ...@@ -807,7 +807,7 @@ static int __init qpti_map_queues(struct qlogicpti *qpti)
} }
/* Detect all PTI Qlogic ISP's in the machine. */ /* Detect all PTI Qlogic ISP's in the machine. */
int __init qlogicpti_detect(Scsi_Host_Template *tpnt) static int __init qlogicpti_detect(Scsi_Host_Template *tpnt)
{ {
struct qlogicpti *qpti; struct qlogicpti *qpti;
struct Scsi_Host *qpti_host; struct Scsi_Host *qpti_host;
...@@ -946,7 +946,7 @@ int __init qlogicpti_detect(Scsi_Host_Template *tpnt) ...@@ -946,7 +946,7 @@ int __init qlogicpti_detect(Scsi_Host_Template *tpnt)
return nqptis; return nqptis;
} }
int qlogicpti_release(struct Scsi_Host *host) staticstatic int qlogicpti_release(struct Scsi_Host *host)
{ {
struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata; struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata;
...@@ -1164,7 +1164,8 @@ static void ourdone(Scsi_Cmnd *Cmnd) ...@@ -1164,7 +1164,8 @@ static void ourdone(Scsi_Cmnd *Cmnd)
done(Cmnd); done(Cmnd);
} }
int qlogicpti_queuecommand_slow(Scsi_Cmnd *Cmnd, void (*done)(Scsi_Cmnd *)) static int qlogicpti_queuecommand_slow(Scsi_Cmnd *Cmnd,
void (*done)(Scsi_Cmnd *))
{ {
struct qlogicpti *qpti = (struct qlogicpti *) Cmnd->host->hostdata; struct qlogicpti *qpti = (struct qlogicpti *) Cmnd->host->hostdata;
unsigned long flags; unsigned long flags;
...@@ -1240,7 +1241,7 @@ int qlogicpti_queuecommand_slow(Scsi_Cmnd *Cmnd, void (*done)(Scsi_Cmnd *)) ...@@ -1240,7 +1241,7 @@ int qlogicpti_queuecommand_slow(Scsi_Cmnd *Cmnd, void (*done)(Scsi_Cmnd *))
* *
* "This code must fly." -davem * "This code must fly." -davem
*/ */
int qlogicpti_queuecommand(Scsi_Cmnd *Cmnd, void (*done)(Scsi_Cmnd *)) static int qlogicpti_queuecommand(Scsi_Cmnd *Cmnd, void (*done)(Scsi_Cmnd *))
{ {
struct Scsi_Host *host = Cmnd->host; struct Scsi_Host *host = Cmnd->host;
struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata; struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata;
...@@ -1461,7 +1462,7 @@ static void qpti_intr(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1461,7 +1462,7 @@ static void qpti_intr(int irq, void *dev_id, struct pt_regs *regs)
local_irq_restore(flags); local_irq_restore(flags);
} }
int qlogicpti_abort(Scsi_Cmnd *Cmnd) static int qlogicpti_abort(Scsi_Cmnd *Cmnd)
{ {
u_short param[6]; u_short param[6];
struct Scsi_Host *host = Cmnd->host; struct Scsi_Host *host = Cmnd->host;
...@@ -1503,7 +1504,7 @@ int qlogicpti_abort(Scsi_Cmnd *Cmnd) ...@@ -1503,7 +1504,7 @@ int qlogicpti_abort(Scsi_Cmnd *Cmnd)
return return_status; return return_status;
} }
int qlogicpti_reset(Scsi_Cmnd *Cmnd) static int qlogicpti_reset(Scsi_Cmnd *Cmnd)
{ {
u_short param[6]; u_short param[6];
struct Scsi_Host *host = Cmnd->host; struct Scsi_Host *host = Cmnd->host;
...@@ -1532,6 +1533,23 @@ int qlogicpti_reset(Scsi_Cmnd *Cmnd) ...@@ -1532,6 +1533,23 @@ int qlogicpti_reset(Scsi_Cmnd *Cmnd)
return return_status; return return_status;
} }
static Scsi_Host_Template driver_template = QLOGICPTI; static Scsi_Host_Template driver_template = {
.detect = qlogicpti_detect,
.release = qlogicpti_release,
.info = qlogicpti_info,
.queuecommand = qlogicpti_queuecommand_slow,
.eh_abort_handler = qlogicpti_abort,
.eh_bus_reset_handler = qlogicpti_reset,
.can_queue = QLOGICPTI_REQ_QUEUE_LEN,
.this_id = 7,
.sg_tablesize = QLOGICPTI_MAX_SG(QLOGICPTI_REQ_QUEUE_LEN),
.cmd_per_lun = 1,
.use_clustering = ENABLE_CLUSTERING,
/* Sparc32's iommu code cannot handle highmem pages yet. */
#ifdef CONFIG_SPARC64
.highmem_io = 1,
#endif
};
#include "scsi_module.c" #include "scsi_module.c"
...@@ -47,18 +47,6 @@ ...@@ -47,18 +47,6 @@
#define QLOGICPTI_REQ_QUEUE_LEN 255 /* must be power of two - 1 */ #define QLOGICPTI_REQ_QUEUE_LEN 255 /* must be power of two - 1 */
#define QLOGICPTI_MAX_SG(ql) (4 + ((ql) > 0) ? 7*((ql) - 1) : 0) #define QLOGICPTI_MAX_SG(ql) (4 + ((ql) > 0) ? 7*((ql) - 1) : 0)
#ifndef NULL
#define NULL (0)
#endif
int qlogicpti_detect(Scsi_Host_Template *);
int qlogicpti_release(struct Scsi_Host *);
const char * qlogicpti_info(struct Scsi_Host *);
int qlogicpti_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
int qlogicpti_queuecommand_slow(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
int qlogicpti_abort(Scsi_Cmnd *);
int qlogicpti_reset(Scsi_Cmnd *);
/* mailbox command complete status codes */ /* mailbox command complete status codes */
#define MBOX_COMMAND_COMPLETE 0x4000 #define MBOX_COMMAND_COMPLETE 0x4000
#define INVALID_COMMAND 0x4001 #define INVALID_COMMAND 0x4001
...@@ -514,28 +502,6 @@ struct qlogicpti { ...@@ -514,28 +502,6 @@ struct qlogicpti {
#define HCCTRL_B1ENAB 0x0008 /* Breakpoint 1 enable */ #define HCCTRL_B1ENAB 0x0008 /* Breakpoint 1 enable */
#define HCCTRL_B0ENAB 0x0004 /* Breakpoint 0 enable */ #define HCCTRL_B0ENAB 0x0004 /* Breakpoint 0 enable */
#ifdef CONFIG_SPARC64
#define QLOGICPTI_HIGHMEM_IO 1
#else
/* Sparc32's iommu code cannot handle highmem pages yet. */
#define QLOGICPTI_HIGHMEM_IO 0
#endif
#define QLOGICPTI { \
.detect = qlogicpti_detect, \
.release = qlogicpti_release, \
.info = qlogicpti_info, \
.queuecommand = qlogicpti_queuecommand_slow, \
.eh_abort_handler = qlogicpti_abort, \
.eh_bus_reset_handler = qlogicpti_reset, \
.can_queue = QLOGICPTI_REQ_QUEUE_LEN, \
.this_id = 7, \
.sg_tablesize = QLOGICPTI_MAX_SG(QLOGICPTI_REQ_QUEUE_LEN), \
.cmd_per_lun = 1, \
.use_clustering = ENABLE_CLUSTERING, \
.highmem_io = QLOGICPTI_HIGHMEM_IO, \
}
/* For our interrupt engine. */ /* For our interrupt engine. */
#define for_each_qlogicpti(qp) \ #define for_each_qlogicpti(qp) \
for((qp) = qptichain; (qp); (qp) = (qp)->next) for((qp) = qptichain; (qp); (qp) = (qp)->next)
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#define POLLRDBAND 128 #define POLLRDBAND 128
#define POLLWRBAND 256 #define POLLWRBAND 256
#define POLLMSG 512 #define POLLMSG 512
#define POLLREMOVE 1024
struct pollfd { struct pollfd {
int fd; int fd;
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#define POLLRDBAND 128 #define POLLRDBAND 128
#define POLLWRBAND 256 #define POLLWRBAND 256
#define POLLMSG 512 #define POLLMSG 512
#define POLLREMOVE 1024
struct pollfd { struct pollfd {
int fd; int fd;
......
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