lkml.org 
[lkml]   [2002]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] I2O support on alpha.

Hi,

Please find enclosed a little patch to support i2o controllers on alpha.
This patch is against 2.4.19-pre9 and works correctly with my i2o
controller used with the i2o_block driver.

Best regards,
Pierrick.


PS: Please, cc me to reply.
diff -Naur linux-2.4.19-pre9/arch/alpha/config.in linux-2.4.19-pre9-ph/arch/alpha/config.in
--- linux-2.4.19-pre9/arch/alpha/config.in Mon Jun 3 11:13:47 2002
+++ linux-2.4.19-pre9-ph/arch/alpha/config.in Wed May 29 11:56:44 2002
@@ -326,6 +326,7 @@

if [ "$CONFIG_PCI" = "y" ]; then
source drivers/message/fusion/Config.in
+ source drivers/message/i2o/Config.in
fi

if [ "$CONFIG_NET" = "y" ]; then
diff -Naur linux-2.4.19-pre9/drivers/message/i2o/i2o_block.c linux-2.4.19-pre9-ph/drivers/message/i2o/i2o_block.c
--- linux-2.4.19-pre9/drivers/message/i2o/i2o_block.c Mon Jun 3 11:14:04 2002
+++ linux-2.4.19-pre9-ph/drivers/message/i2o/i2o_block.c Sun Jun 2 16:50:56 2002
@@ -56,12 +56,12 @@
#include <linux/errno.h>
#include <linux/file.h>
#include <linux/ioctl.h>
-#include <linux/i2o.h>
#include <linux/blkdev.h>
#include <linux/blkpg.h>
#include <linux/slab.h>
#include <linux/hdreg.h>
#include <linux/spinlock.h>
+#include <linux/init.h>

#include <linux/notifier.h>
#include <linux/reboot.h>
@@ -73,6 +73,7 @@
#include <asm/atomic.h>
#include <linux/smp_lock.h>
#include <linux/wait.h>
+#include <linux/i2o.h>

#define MAJOR_NR I2O_MAJOR

@@ -1104,7 +1105,7 @@
msg[0] = (FIVE_WORD_MSG_SIZE|SGL_OFFSET_0);
msg[1] = I2O_CMD_BLOCK_CFLUSH<<24|HOST_TID<<12|dev->tid;
msg[2] = i2ob_context|0x40000000;
- msg[3] = (u32)query_done;
+ msg[3] = (unsigned long)query_done;
msg[4] = 60<<16;
DEBUG("Flushing...");
i2o_post_wait(dev->controller, msg, 20, 60);
@@ -1115,7 +1116,7 @@
msg[0] = FIVE_WORD_MSG_SIZE|SGL_OFFSET_0;
msg[1] = I2O_CMD_BLOCK_MUNLOCK<<24|HOST_TID<<12|dev->tid;
msg[2] = i2ob_context|0x40000000;
- msg[3] = (u32)query_done;
+ msg[3] = (unsigned long)query_done;
msg[4] = -1;
DEBUG("Unlocking...");
i2o_post_wait(dev->controller, msg, 20, 2);
@@ -1718,7 +1719,7 @@
msg[0] = FIVE_WORD_MSG_SIZE|SGL_OFFSET_0;
msg[1] = I2O_CMD_BLOCK_CFLUSH<<24|HOST_TID<<12|dev->tid;
msg[2] = i2ob_context|0x40000000;
- msg[3] = (u32)query_done;
+ msg[3] = (unsigned long)query_done;
msg[4] = 60<<16;

DEBUG("Flushing...");
@@ -1731,7 +1732,7 @@
msg[0] = FIVE_WORD_MSG_SIZE|SGL_OFFSET_0;
msg[1] = I2O_CMD_BLOCK_MUNLOCK<<24|HOST_TID<<12|dev->tid;
msg[2] = i2ob_context|0x40000000;
- msg[3] = (u32)query_done;
+ msg[3] = (unsigned long)query_done;
msg[4] = -1;
i2o_post_wait(dev->controller, msg, 20, 2);

@@ -1934,3 +1935,4 @@

module_init(i2o_block_init);
module_exit(i2o_block_exit);
+
diff -Naur linux-2.4.19-pre9/drivers/message/i2o/i2o_config.c linux-2.4.19-pre9-ph/drivers/message/i2o/i2o_config.c
--- linux-2.4.19-pre9/drivers/message/i2o/i2o_config.c Mon Jun 3 11:14:04 2002
+++ linux-2.4.19-pre9-ph/drivers/message/i2o/i2o_config.c Sun Jun 2 16:31:05 2002
@@ -28,7 +28,6 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/pci.h>
-#include <linux/i2o.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/slab.h>
@@ -39,6 +38,7 @@

#include <asm/uaccess.h>
#include <asm/io.h>
+#include <linux/i2o.h>

static int i2o_cfg_context = -1;
static void *page_buf;
@@ -776,7 +776,7 @@
msg[0] = FOUR_WORD_MSG_SIZE|SGL_OFFSET_0;
msg[1] = I2O_CMD_UTIL_EVT_REGISTER<<24 | HOST_TID<<12 | kdesc.tid;
msg[2] = (u32)i2o_cfg_context;
- msg[3] = (u32)fp->private_data;
+ msg[3] = (unsigned long)fp->private_data;
msg[4] = kdesc.evt_mask;

i2o_post_this(iop, msg, 20);
@@ -786,7 +786,7 @@

static int ioctl_evt_get(unsigned long arg, struct file *fp)
{
- u32 id = (u32)fp->private_data;
+ unsigned long id = (unsigned long)fp->private_data;
struct i2o_cfg_info *p = NULL;
struct i2o_evt_get *uget = (struct i2o_evt_get*)arg;
struct i2o_evt_get kget;
@@ -824,10 +824,10 @@
if(!tmp)
return -ENOMEM;

- file->private_data = (void*)(i2o_cfg_info_id++);
+ file->private_data = (void*)((long)i2o_cfg_info_id++);
tmp->fp = file;
tmp->fasync = NULL;
- tmp->q_id = (u32)file->private_data;
+ tmp->q_id = (unsigned long)file->private_data;
tmp->q_len = 0;
tmp->q_in = 0;
tmp->q_out = 0;
@@ -843,7 +843,7 @@

static int cfg_release(struct inode *inode, struct file *file)
{
- u32 id = (u32)file->private_data;
+ unsigned long id = (unsigned long)file->private_data;
struct i2o_cfg_info *p1, *p2;
unsigned long flags;

@@ -877,7 +877,7 @@

static int cfg_fasync(int fd, struct file *fp, int on)
{
- u32 id = (u32)fp->private_data;
+ unsigned long id = (unsigned long)fp->private_data;
struct i2o_cfg_info *p;

for(p = open_files; p; p = p->next)
diff -Naur linux-2.4.19-pre9/drivers/message/i2o/i2o_core.c linux-2.4.19-pre9-ph/drivers/message/i2o/i2o_core.c
--- linux-2.4.19-pre9/drivers/message/i2o/i2o_core.c Mon Jun 3 11:14:04 2002
+++ linux-2.4.19-pre9-ph/drivers/message/i2o/i2o_core.c Sun Jun 2 16:33:27 2002
@@ -27,8 +27,6 @@
#include <linux/kernel.h>
#include <linux/pci.h>

-#include <linux/i2o.h>
-
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/slab.h>
@@ -46,6 +44,7 @@
#include <linux/completion.h>

#include <asm/io.h>
+#include <linux/i2o.h>
#include <linux/reboot.h>

#include "i2o_lan.h"
diff -Naur linux-2.4.19-pre9/drivers/message/i2o/i2o_pci.c linux-2.4.19-pre9-ph/drivers/message/i2o/i2o_pci.c
--- linux-2.4.19-pre9/drivers/message/i2o/i2o_pci.c Mon Jun 3 11:14:04 2002
+++ linux-2.4.19-pre9-ph/drivers/message/i2o/i2o_pci.c Mon Jun 3 10:53:08 2002
@@ -23,11 +23,11 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/pci.h>
-#include <linux/i2o.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <asm/io.h>
+#include <linux/i2o.h>

#ifdef CONFIG_MTRR
#include <asm/mtrr.h>
@@ -384,4 +384,4 @@
MODULE_PARM_DESC(dpt, "Set this if you want to drive DPT cards normally handled by dpt_i2o");
module_init(i2o_pci_core_attach);
module_exit(i2o_pci_core_detach);
-
\ No newline at end of file
+
diff -Naur linux-2.4.19-pre9/drivers/message/i2o/i2o_proc.c linux-2.4.19-pre9-ph/drivers/message/i2o/i2o_proc.c
--- linux-2.4.19-pre9/drivers/message/i2o/i2o_proc.c Mon Jun 3 11:14:05 2002
+++ linux-2.4.19-pre9-ph/drivers/message/i2o/i2o_proc.c Sun Jun 2 16:35:31 2002
@@ -35,7 +35,6 @@
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/pci.h>
-#include <linux/i2o.h>
#include <linux/proc_fs.h>
#include <linux/init.h>
#include <linux/module.h>
@@ -43,6 +42,7 @@
#include <linux/spinlock.h>

#include <asm/io.h>
+#include <linux/i2o.h>
#include <asm/uaccess.h>
#include <asm/byteorder.h>
\
 
 \ /
  Last update: 2005-03-22 13:22    [W:0.044 / U:0.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site