Commit ef2dbb54 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] PPC64 iSeries virtual disk driver

From: Stephen Rothwell <sfr@canb.auug.org.au>

Add the PPC64 iSeries virtual disk driver
parent 74b7bd9d
...@@ -271,15 +271,6 @@ config VIODASD ...@@ -271,15 +271,6 @@ config VIODASD
If you are running on an iSeries system and you want to use If you are running on an iSeries system and you want to use
virtual disks created and managed by OS/400, say Y. virtual disks created and managed by OS/400, say Y.
config VIODASD_IDE
bool "iSeries Virtual disk IDE emulation"
depends on VIODASD
help
This causes the iSeries virtual disks to look like IDE disks.
If you have programs or utilities that only support certain
kinds of disks, this option will cause iSeries virtual disks
to pretend to be IDE disks, which may satisfy the program.
config VIOCD config VIOCD
tristate "iSeries Virtual I/O CD support" tristate "iSeries Virtual I/O CD support"
help help
......
...@@ -67,10 +67,10 @@ struct iSeries_Device_Node iSeries_veth_dev_node = { .LogicalSlot = 0xFF, .DevTc ...@@ -67,10 +67,10 @@ struct iSeries_Device_Node iSeries_veth_dev_node = { .LogicalSlot = 0xFF, .DevTc
struct iSeries_Device_Node iSeries_vio_dev_node = { .LogicalSlot = 0xFF, .DevTceTable = &virtBusVioTceTable }; struct iSeries_Device_Node iSeries_vio_dev_node = { .LogicalSlot = 0xFF, .DevTceTable = &virtBusVioTceTable };
struct pci_dev iSeries_veth_dev_st = { .sysdata = &iSeries_veth_dev_node }; struct pci_dev iSeries_veth_dev_st = { .sysdata = &iSeries_veth_dev_node };
struct pci_dev iSeries_vio_dev_st = { .sysdata = &iSeries_vio_dev_node }; struct pci_dev iSeries_vio_dev_st = { .sysdata = &iSeries_vio_dev_node, .dev.bus = &pci_bus_type };
struct pci_dev * iSeries_veth_dev = &iSeries_veth_dev_st; struct pci_dev * iSeries_veth_dev = &iSeries_veth_dev_st;
struct pci_dev * iSeries_vio_dev = &iSeries_vio_dev_st; struct device * iSeries_vio_dev = &iSeries_vio_dev_st.dev;
/* Device TceTable is stored in Device Node */ /* Device TceTable is stored in Device Node */
/* struct TceTable * tceTables[256]; */ /* Tce tables for 256 busses /* struct TceTable * tceTables[256]; */ /* Tce tables for 256 busses
......
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/pci.h> #include <linux/device.h>
#include <linux/dma-mapping.h>
#include <linux/wait.h> #include <linux/wait.h>
#include <asm/hardirq.h> /* for is_atomic */ #include <asm/hardirq.h> /* for is_atomic */
...@@ -48,7 +49,7 @@ ...@@ -48,7 +49,7 @@
#include <asm/iSeries/iSeries_proc.h> #include <asm/iSeries/iSeries_proc.h>
#include <asm/iSeries/vio.h> #include <asm/iSeries/vio.h>
extern struct pci_dev *iSeries_vio_dev; extern struct device *iSeries_vio_dev;
/* Status of the path to each other partition in the system. /* Status of the path to each other partition in the system.
* This is overkill, since we will only ever establish connections * This is overkill, since we will only ever establish connections
...@@ -194,8 +195,7 @@ static int proc_read(char *buf, char **start, off_t offset, ...@@ -194,8 +195,7 @@ static int proc_read(char *buf, char **start, off_t offset,
HvLpEvent_Rc hvrc; HvLpEvent_Rc hvrc;
DECLARE_MUTEX_LOCKED(Semaphore); DECLARE_MUTEX_LOCKED(Semaphore);
dma_addr_t dmaa = dma_addr_t dmaa =
pci_map_single(iSeries_vio_dev, buf, PAGE_SIZE, dma_map_single(iSeries_vio_dev, buf, PAGE_SIZE, DMA_FROM_DEVICE);
PCI_DMA_FROMDEVICE);
int len = PAGE_SIZE; int len = PAGE_SIZE;
if (len > blen) if (len > blen)
...@@ -215,8 +215,7 @@ static int proc_read(char *buf, char **start, off_t offset, ...@@ -215,8 +215,7 @@ static int proc_read(char *buf, char **start, off_t offset,
down(&Semaphore); down(&Semaphore);
pci_unmap_single(iSeries_vio_dev, dmaa, PAGE_SIZE, dma_unmap_single(iSeries_vio_dev, dmaa, PAGE_SIZE, DMA_FROM_DEVICE);
PCI_DMA_FROMDEVICE);
sprintf(buf + strlen(buf), "SRLNBR="); sprintf(buf + strlen(buf), "SRLNBR=");
buf[strlen(buf)] = e2a(xItExtVpdPanel.mfgID[2]); buf[strlen(buf)] = e2a(xItExtVpdPanel.mfgID[2]);
......
...@@ -38,3 +38,5 @@ obj-$(CONFIG_BLK_DEV_DAC960) += DAC960.o ...@@ -38,3 +38,5 @@ obj-$(CONFIG_BLK_DEV_DAC960) += DAC960.o
obj-$(CONFIG_BLK_DEV_UMEM) += umem.o obj-$(CONFIG_BLK_DEV_UMEM) += umem.o
obj-$(CONFIG_BLK_DEV_NBD) += nbd.o obj-$(CONFIG_BLK_DEV_NBD) += nbd.o
obj-$(CONFIG_BLK_DEV_CRYPTOLOOP) += cryptoloop.o obj-$(CONFIG_BLK_DEV_CRYPTOLOOP) += cryptoloop.o
obj-$(CONFIG_VIODASD) += viodasd.o
This diff is collapsed.
...@@ -126,6 +126,9 @@ ...@@ -126,6 +126,9 @@
#define COMPAQ_CISS_MAJOR6 110 #define COMPAQ_CISS_MAJOR6 110
#define COMPAQ_CISS_MAJOR7 111 #define COMPAQ_CISS_MAJOR7 111
#define VIODASD_MAJOR 112
#define VIOCD_MAJOR 113
#define ATARAID_MAJOR 114 #define ATARAID_MAJOR 114
#define SCSI_DISK8_MAJOR 128 #define SCSI_DISK8_MAJOR 128
......
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