diff -urN -x .svn a/drivers/message/i2o/scsi-osm.c b/drivers/message/i2o/scsi-osm.c --- a/drivers/message/i2o/scsi-osm.c 2004-07-29 11:42:40.025145888 +0200 +++ b/drivers/message/i2o/scsi-osm.c 2004-07-29 11:45:56.984203560 +0200 @@ -653,6 +653,7 @@ }; #if 0 +FIXME /** * i2o_scsi_abort - abort a running command * @SCpnt: command to abort @@ -664,7 +665,7 @@ * Locks: no locks are held or needed */ -int i2o_scsi_abort(Scsi_Cmnd * SCpnt) +int i2o_scsi_abort(struct scsi_cmnd * SCpnt) { struct i2o_controller *c; struct Scsi_Host *host; @@ -699,108 +700,9 @@ return status; } -/** - * i2o_scsi_bus_reset - Issue a SCSI reset - * @SCpnt: the command that caused the reset - * - * Perform a SCSI bus reset operation. In I2O this is just a message - * we pass. I2O can do clever multi-initiator and shared reset stuff - * but we don't support this. - * - * Locks: called with no lock held, requires no locks. - */ - -static int i2o_scsi_bus_reset(Scsi_Cmnd * SCpnt) -{ - int tid; - struct i2o_controller *c; - struct Scsi_Host *host; - struct i2o_scsi_host *hostdata; - u32 m; - void *msg; - unsigned long timeout; - - - /* - * Find the TID for the bus - */ - - - host = SCpnt->device->host; - - spin_unlock_irq(host->host_lock); - - printk(KERN_WARNING "i2o_scsi: Attempting to reset the bus.\n"); - - hostdata = (struct i2o_scsi_host *)host->hostdata; - tid = hostdata->bus_task; - c = hostdata->controller; - - /* - * Now send a SCSI reset request. Any remaining commands - * will be aborted by the IOP. We need to catch the reply - * possibly ? - */ - - timeout = jiffies+2*HZ; - do - { - m = le32_to_cpu(I2O_POST_READ32(c)); - if(m != 0xFFFFFFFF) - break; - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(1); - mb(); - } - while(time_before(jiffies, timeout)); - - - msg = c->msg_virt + m; - i2o_raw_writel(FOUR_WORD_MSG_SIZE|SGL_OFFSET_0, msg); - i2o_raw_writel(I2O_CMD_SCSI_BUSRESET<<24|HOST_TID<<12|tid, msg+4); - i2o_raw_writel(scsi_context|0x80000000, msg+8); - /* We use the top bit to split controller and unit transactions */ - /* Now store unit,tid so we can tie the completion back to a specific device */ - __raw_writel(c->unit << 16 | tid, msg+12); - wmb(); - - /* We want the command to complete after we return */ - spin_lock_irq(host->host_lock); - i2o_post_message(c,m); - - /* Should we wait for the reset to complete ? */ - return SUCCESS; -} #endif /** - * i2o_scsi_host_reset - host reset callback - * @SCpnt: command causing the reset - * - * An I2O controller can be many things at once. While we can - * reset a controller the potential mess from doing so is vast, and - * it's better to simply hold on and pray - */ - -static int i2o_scsi_host_reset(struct scsi_cmnd * SCpnt) -{ - return FAILED; -} -#if 0 - -/** - * i2o_scsi_device_reset - device reset callback - * @SCpnt: command causing the reset - * - * I2O does not (AFAIK) support doing a device reset - */ - -static int i2o_scsi_device_reset(Scsi_Cmnd * SCpnt) -{ - return FAILED; -} - -/** * i2o_scsi_bios_param - Invent disk geometry * @sdev: scsi device * @dev: block layer device @@ -827,9 +729,6 @@ return 0; } - -#endif - static struct scsi_host_template i2o_scsi_host_template = { .proc_name = "SCSI-OSM", .name = "I2O SCSI Peripheral OSM", @@ -837,13 +736,8 @@ .queuecommand = i2o_scsi_queuecommand, /* .eh_abort_handler = i2o_scsi_abort, - .eh_bus_reset_handler = i2o_scsi_bus_reset, - .eh_device_reset_handler= i2o_scsi_device_reset, */ - .eh_host_reset_handler = i2o_scsi_host_reset, -/* .bios_param = i2o_scsi_bios_param, -*/ .can_queue = I2O_SCSI_CAN_QUEUE, .sg_tablesize = 8, .cmd_per_lun = 6, Binary files a/include/linux/.i2o-dev.h.swp and b/include/linux/.i2o-dev.h.swp differ diff -urN -x .svn a/include/linux/i2o-dev.h b/include/linux/i2o-dev.h --- a/include/linux/i2o-dev.h 2004-07-29 11:42:30.503593384 +0200 +++ b/include/linux/i2o-dev.h 2004-07-29 11:45:55.874372280 +0200 @@ -1,13 +1,13 @@ /* * I2O user space accessible structures/APIs - * + * * (c) Copyright 1999, 2000 Red Hat Software * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * ************************************************************************* * * This header file defines the I2O APIs that are available to both @@ -53,24 +53,24 @@ struct i2o_cmd_passthru { unsigned int iop; /* IOP unit number */ - void *msg; /* message */ + void __user *msg; /* message */ }; struct i2o_cmd_hrtlct { - unsigned int iop; /* IOP unit number */ - void *resbuf; /* Buffer for result */ - unsigned int *reslen; /* Buffer length in bytes */ + unsigned int iop; /* IOP unit number */ + void __user *resbuf; /* Buffer for result */ + unsigned int __user *reslen; /* Buffer length in bytes */ }; struct i2o_cmd_psetget { unsigned int iop; /* IOP unit number */ unsigned int tid; /* Target device TID */ - void *opbuf; /* Operation List buffer */ + void __user *opbuf; /* Operation List buffer */ unsigned int oplen; /* Operation List buffer length in bytes */ - void *resbuf; /* Result List buffer */ - unsigned int *reslen; /* Result List buffer length in bytes */ + void __user *resbuf; /* Result List buffer */ + unsigned int __user *reslen; /* Result List buffer length in bytes */ }; struct i2o_sw_xfer @@ -79,10 +79,10 @@ unsigned char flags; /* Flags field */ unsigned char sw_type; /* Software type */ unsigned int sw_id; /* Software ID */ - void *buf; /* Pointer to software buffer */ - unsigned int *swlen; /* Length of software data */ - unsigned int *maxfrag; /* Maximum fragment count */ - unsigned int *curfrag; /* Current fragment count */ + void __user *buf; /* Pointer to software buffer */ + unsigned int __user *swlen; /* Length of software data */ + unsigned int __user *maxfrag; /* Maximum fragment count */ + unsigned int __user *curfrag; /* Current fragment count */ }; struct i2o_html @@ -90,9 +90,9 @@ unsigned int iop; /* IOP unit number */ unsigned int tid; /* Target device ID */ unsigned int page; /* HTML page */ - void *resbuf; /* Buffer for reply HTML page */ - unsigned int *reslen; /* Length in bytes of reply buffer */ - void *qbuf; /* Pointer to HTTP query string */ + void __user *resbuf; /* Buffer for reply HTML page */ + unsigned int __user *reslen; /* Length in bytes of reply buffer */ + void __user *qbuf; /* Pointer to HTTP query string */ unsigned int qlen; /* Length in bytes of query string buffer */ }; @@ -360,13 +360,13 @@ #define I2O_CLASS_PEER_TRANSPORT 0x091 #define I2O_CLASS_END 0xfff -/* +/* * Rest of 0x092 - 0x09f reserved for peer-to-peer classes */ #define I2O_CLASS_MATCH_ANYCLASS 0xffffffff -/* +/* * Subclasses */ @@ -388,7 +388,7 @@ #define I2O_PARAMS_TABLE_CLEAR 0x000A /* - * I2O serial number conventions / formats + * I2O serial number conventions / formats * (circa v1.5) */ @@ -399,7 +399,7 @@ #define I2O_SNFORMAT_LAN48_MAC 4 #define I2O_SNFORMAT_WAN 5 -/* +/* * Plus new in v2.0 (Yellowstone pdf doc) */ @@ -410,7 +410,7 @@ #define I2O_SNFORMAT_UNKNOWN2 0xff /* - * I2O Get Status State values + * I2O Get Status State values */ #define ADAPTER_STATE_INITIALIZING 0x01 diff -urN -x .svn a/include/linux/i2o.h b/include/linux/i2o.h --- a/include/linux/i2o.h 2004-07-29 11:42:40.013147712 +0200 +++ b/include/linux/i2o.h 2004-07-29 11:45:55.819380640 +0200 @@ -1,16 +1,16 @@ /* * I2O kernel space accessible structures/APIs - * + * * (c) Copyright 1999, 2000 Red Hat Software * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * ************************************************************************* * - * This header file defined the I2O APIs/structures for use by + * This header file defined the I2O APIs/structures for use by * the I2O kernel modules. * */ @@ -143,7 +143,7 @@ char name[16]; int unit; int type; - + struct pci_dev *pdev; /* PCI device */ int short_req:1; /* use small block sizes */ @@ -529,7 +529,7 @@ * Endian handling wrapped into the macro - keeps the core code * cleaner. */ - + #define i2o_raw_writel(val, mem) __raw_writel(cpu_to_le32(val), mem) @@ -558,14 +558,14 @@ /* * Cache strategies */ - - + + /* The NULL strategy leaves everything up to the controller. This tends to be a * pessimal but functional choice. */ #define CACHE_NULL 0 /* Prefetch data when reading. We continually attempt to load the next 32 sectors - * into the controller cache. + * into the controller cache. */ #define CACHE_PREFETCH 1 /* Prefetch data when reading. We sometimes attempt to load the next 32 sectors @@ -599,12 +599,12 @@ /* * Ioctl structures */ - -#define BLKI2OGRSTRAT _IOR('2', 1, int) -#define BLKI2OGWSTRAT _IOR('2', 2, int) -#define BLKI2OSRSTRAT _IOW('2', 3, int) -#define BLKI2OSWSTRAT _IOW('2', 4, int) + +#define BLKI2OGRSTRAT _IOR('2', 1, int) +#define BLKI2OGWSTRAT _IOR('2', 2, int) +#define BLKI2OSRSTRAT _IOW('2', 3, int) +#define BLKI2OSWSTRAT _IOW('2', 4, int) /*