Commit 10e294df authored by Martin Schwidefsky's avatar Martin Schwidefsky Committed by Linus Torvalds

[PATCH] s/390 patches for 2.5.20 (3 of 4).

Third patch of the s/390 update. Everything from drivers/s390. This patch
contains the main bunch of changes. Major changes are: 1) the restructured
dasd driver, 2) the new tape driver, 3) the start of the common io layer
rework, 4) the gpl'ed lcs driver and 5) the gpl'ed qdio layer
parent e105d28a
...@@ -321,6 +321,18 @@ CONFIG_DASD_CKD ...@@ -321,6 +321,18 @@ CONFIG_DASD_CKD
CONFIG_DASD_FBA CONFIG_DASD_FBA
FBA devices are currently unsupported. FBA devices are currently unsupported.
CONFIG_DASD_AUTO_DIAG
Enable this option if you want your DIAG discipline module loaded
on DASD driver startup.
CONFIG_DASD_AUTO_ECKD
Enable this option if you want your ECKD discipline module loaded
on DASD driver startup.
CONFIG_DASD_AUTO_FBA
Enable this option if you want your FBA discipline module loaded
on DASD driver startup.
CONFIG_TN3215 CONFIG_TN3215
Include support for IBM 3215 line-mode terminals. Include support for IBM 3215 line-mode terminals.
...@@ -343,6 +355,15 @@ CONFIG_HWC_CONSOLE ...@@ -343,6 +355,15 @@ CONFIG_HWC_CONSOLE
Include support for using an IBM HWC line-mode terminal as the Linux Include support for using an IBM HWC line-mode terminal as the Linux
system console. system console.
CONFIG_HWC_CPI
This option enables the hardware console interface for system
identification This is commonly used for workload management and
gives you a nice name for the system on the service element.
Please select this option as a module since built-in operation is
completely untested.
You should only select this option if you know what you are doing,
need this feature and intend to run your kernel in LPAR.
CONFIG_S390_TAPE CONFIG_S390_TAPE
Select this option if you want to access channel-attached tape Select this option if you want to access channel-attached tape
devices on IBM S/390 or zSeries. devices on IBM S/390 or zSeries.
......
...@@ -63,8 +63,8 @@ if [ "$CONFIG_S390_TAPE" != "n" ]; then ...@@ -63,8 +63,8 @@ if [ "$CONFIG_S390_TAPE" != "n" ]; then
bool ' Support for tape character devices' CONFIG_S390_TAPE_CHAR bool ' Support for tape character devices' CONFIG_S390_TAPE_CHAR
bool ' Support for tape block devices' CONFIG_S390_TAPE_BLOCK bool ' Support for tape block devices' CONFIG_S390_TAPE_BLOCK
comment 'S/390 tape hardware support' comment 'S/390 tape hardware support'
bool ' Support for 3490 tape hardware' CONFIG_S390_TAPE_3490 dep_tristate ' Support for 3490 tape hardware' CONFIG_S390_TAPE_3490 $CONFIG_S390_TAPE
bool ' Support for 3480 tape hardware' CONFIG_S390_TAPE_3480 dep_tristate ' Support for 3480 tape hardware' CONFIG_S390_TAPE_3480 $CONFIG_S390_TAPE
fi fi
endmenu endmenu
...@@ -87,6 +87,10 @@ if [ "$CONFIG_NET" = "y" ]; then ...@@ -87,6 +87,10 @@ if [ "$CONFIG_NET" = "y" ]; then
define_bool CONFIG_HOTPLUG y define_bool CONFIG_HOTPLUG y
fi fi
if [ "$CONFIG_NET_ETHERNET" != "n" -o "$CONFIG_TR" != "n" ]; then
tristate 'Lan Channel Station Interface' CONFIG_LCS
fi
tristate 'CTC device support' CONFIG_CTC tristate 'CTC device support' CONFIG_CTC
tristate 'IUCV device support (VM only)' CONFIG_IUCV tristate 'IUCV device support (VM only)' CONFIG_IUCV
fi fi
......
...@@ -2,11 +2,14 @@ ...@@ -2,11 +2,14 @@
# Makefile for the S/390 specific device drivers # Makefile for the S/390 specific device drivers
# #
mod-subdirs := block char misc net mod-subdirs := block char misc net scsi cio
export-objs += ccwcache.o idals.o s390dyn.o s390io.o export-objs += s390dyn.o
obj-y += s390io.o s390mach.o s390dyn.o idals.o ccwcache.o obj-$(CONFIG_QDIO) += qdio.o
obj-y += block/ char/ misc/ net/ export-objs += qdio.o
obj-y += s390mach.o s390dyn.o sysinfo.o
obj-y += block/ char/ misc/ net/ scsi/ cio/
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
...@@ -2,12 +2,13 @@ ...@@ -2,12 +2,13 @@
# S/390 block devices # S/390 block devices
# #
export-objs := dasd.o export-objs := dasd.o dasd_devmap.o dasd_ioctl.o dasd_erp.o
dasd_eckd_mod-objs := dasd_eckd.o dasd_3990_erp.o dasd_9343_erp.o dasd_eckd_mod-objs := dasd_eckd.o dasd_3990_erp.o dasd_9343_erp.o
dasd_fba_mod-objs := dasd_fba.o dasd_3370_erp.o dasd_9336_erp.o dasd_fba_mod-objs := dasd_fba.o dasd_3370_erp.o dasd_9336_erp.o
dasd_diag_mod-objs := dasd_diag.o dasd_diag_mod-objs := dasd_diag.o
dasd_mod-objs := dasd.o dasd_mod-objs := dasd.o dasd_ioctl.o dasd_proc.o dasd_devmap.o \
dasd_genhd.o dasd_erp.o
obj-$(CONFIG_DASD) += dasd_mod.o obj-$(CONFIG_DASD) += dasd_mod.o
obj-$(CONFIG_DASD_ECKD) += dasd_eckd_mod.o obj-$(CONFIG_DASD_ECKD) += dasd_eckd_mod.o
......
This diff is collapsed.
...@@ -5,14 +5,10 @@ ...@@ -5,14 +5,10 @@
* (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 2000 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 2000
*/ */
#include <asm/ccwcache.h> #define PRINTK_HEADER "dasd_erp(3370)"
#include "dasd_int.h" #include "dasd_int.h"
#include "dasd_3370_erp.h"
#ifdef PRINTK_HEADER
#undef PRINTK_HEADER
#define PRINTK_HEADER "dasd_erp(3370)"
#endif /* PRINTK_HEADER */
/* /*
* DASD_3370_ERP_EXAMINE * DASD_3370_ERP_EXAMINE
...@@ -31,7 +27,7 @@ ...@@ -31,7 +27,7 @@
* dasd_era_recover for all others. * dasd_era_recover for all others.
*/ */
dasd_era_t dasd_era_t
dasd_3370_erp_examine (ccw_req_t * cqr, devstat_t * stat) dasd_3370_erp_examine(dasd_ccw_req_t * cqr, devstat_t * stat)
{ {
char *sense = stat->ii.sense.data; char *sense = stat->ii.sense.data;
...@@ -100,7 +96,7 @@ dasd_3370_erp_examine (ccw_req_t * cqr, devstat_t * stat) ...@@ -100,7 +96,7 @@ dasd_3370_erp_examine (ccw_req_t * cqr, devstat_t * stat)
* c-label-offset: -4 * c-label-offset: -4
* c-continued-statement-offset: 4 * c-continued-statement-offset: 4
* c-continued-brace-offset: 0 * c-continued-brace-offset: 0
* indent-tabs-mode: nil * indent-tabs-mode: 1
* tab-width: 8 * tab-width: 8
* End: * End:
*/ */
...@@ -10,6 +10,6 @@ ...@@ -10,6 +10,6 @@
#ifndef DASD_3370_ERP_H #ifndef DASD_3370_ERP_H
#define DASD_3370_ERP_H #define DASD_3370_ERP_H
dasd_era_t dasd_3370_erp_examine (ccw_req_t *, devstat_t *); dasd_era_t dasd_3370_erp_examine(dasd_ccw_req_t *, devstat_t *);
#endif /* DASD_3990_ERP_H */ #endif /* DASD_3990_ERP_H */
This diff is collapsed.
...@@ -10,12 +10,12 @@ ...@@ -10,12 +10,12 @@
#ifndef DASD_3990_ERP_H #ifndef DASD_3990_ERP_H
#define DASD_3990_ERP_H #define DASD_3990_ERP_H
dasd_era_t dasd_3990_erp_examine (ccw_req_t *, devstat_t *); dasd_era_t dasd_3990_erp_examine(dasd_ccw_req_t *, devstat_t *);
ccw_req_t *dasd_3990_erp_action (ccw_req_t *); dasd_ccw_req_t *dasd_3990_erp_action(dasd_ccw_req_t *);
ccw_req_t *dasd_2105_erp_action (ccw_req_t *); dasd_ccw_req_t *dasd_2105_erp_action(ccw_req_t *);
void dasd_3990_erp_restart_queue (unsigned long); void dasd_3990_erp_restart_queue(unsigned long);
typedef struct DCTL_data_t { typedef struct DCTL_data_t {
unsigned char subcommand; /* e.g Inhibit Write, Enable Write,... */ unsigned char subcommand; /* e.g Inhibit Write, Enable Write,... */
......
...@@ -5,14 +5,10 @@ ...@@ -5,14 +5,10 @@
* (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 2000 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 2000
*/ */
#include <asm/ccwcache.h> #define PRINTK_HEADER "dasd_erp(9336)"
#include "dasd_int.h" #include "dasd_int.h"
#include "dasd_9336_erp.h"
#ifdef PRINTK_HEADER
#undef PRINTK_HEADER
#define PRINTK_HEADER "dasd_erp(9336)"
#endif /* PRINTK_HEADER */
/* /*
* DASD_9336_ERP_EXAMINE * DASD_9336_ERP_EXAMINE
...@@ -30,7 +26,8 @@ ...@@ -30,7 +26,8 @@
* dasd_era_fatal for all fatal (unrecoverable errors) * dasd_era_fatal for all fatal (unrecoverable errors)
* dasd_era_recover for all others. * dasd_era_recover for all others.
*/ */
dasd_era_t dasd_9336_erp_examine (ccw_req_t * cqr, devstat_t * stat) dasd_era_t
dasd_9336_erp_examine(dasd_ccw_req_t * cqr, devstat_t * stat)
{ {
/* check for successful execution first */ /* check for successful execution first */
if (stat->cstat == 0x00 && if (stat->cstat == 0x00 &&
...@@ -56,7 +53,7 @@ dasd_era_t dasd_9336_erp_examine (ccw_req_t * cqr, devstat_t * stat) ...@@ -56,7 +53,7 @@ dasd_era_t dasd_9336_erp_examine (ccw_req_t * cqr, devstat_t * stat)
* c-label-offset: -4 * c-label-offset: -4
* c-continued-statement-offset: 4 * c-continued-statement-offset: 4
* c-continued-brace-offset: 0 * c-continued-brace-offset: 0
* indent-tabs-mode: nil * indent-tabs-mode: 1
* tab-width: 8 * tab-width: 8
* End: * End:
*/ */
...@@ -10,6 +10,6 @@ ...@@ -10,6 +10,6 @@
#ifndef DASD_9336_ERP_H #ifndef DASD_9336_ERP_H
#define DASD_9336_ERP_H #define DASD_9336_ERP_H
dasd_era_t dasd_9336_erp_examine (ccw_req_t *, devstat_t *); dasd_era_t dasd_9336_erp_examine(dasd_ccw_req_t *, devstat_t *);
#endif /* DASD_3990_ERP_H */ #endif /* DASD_3990_ERP_H */
...@@ -5,15 +5,12 @@ ...@@ -5,15 +5,12 @@
* (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 2000 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 2000
*/ */
#include <asm/ccwcache.h>
#include "dasd_int.h"
#ifdef PRINTK_HEADER
#undef PRINTK_HEADER
#define PRINTK_HEADER "dasd_erp(9343)" #define PRINTK_HEADER "dasd_erp(9343)"
#endif /* PRINTK_HEADER */
dasd_era_t dasd_9343_erp_examine (ccw_req_t * cqr, devstat_t * stat) #include "dasd_int.h"
dasd_era_t
dasd_9343_erp_examine(dasd_ccw_req_t * cqr, devstat_t * stat)
{ {
if (stat->cstat == 0x00 && if (stat->cstat == 0x00 &&
stat->dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END)) stat->dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END))
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
#ifndef DASD_9343_ERP_H #ifndef DASD_9343_ERP_H
#define DASD_9343_ERP_H #define DASD_9343_ERP_H
dasd_era_t dasd_9343_erp_examine (ccw_req_t *, devstat_t *); dasd_era_t dasd_9343_erp_examine(dasd_ccw_req_t *, devstat_t *);
ccw_req_t *dasd_9343_erp_action (ccw_req_t *); dasd_ccw_req_t *dasd_9343_erp_action(dasd_ccw_req_t *);
#endif /* DASD_9343_ERP_H */ #endif /* DASD_9343_ERP_H */
This diff is collapsed.
This diff is collapsed.
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#define DEV_CLASS_FBA 0x01 #define DEV_CLASS_FBA 0x01
#define DEV_CLASS_ECKD 0x04 #define DEV_CLASS_ECKD 0x04
#define DEV_CLASS_CKD 0x04
typedef struct dasd_diag_characteristics_t { typedef struct dasd_diag_characteristics_t {
u16 dev_nr; u16 dev_nr;
...@@ -29,7 +28,7 @@ typedef struct dasd_diag_characteristics_t { ...@@ -29,7 +28,7 @@ typedef struct dasd_diag_characteristics_t {
u8 rdev_type; u8 rdev_type;
u8 rdev_model; u8 rdev_model;
u8 rdev_features; u8 rdev_features;
} __attribute__ ((packed, aligned (4))) } __attribute__ ((packed, aligned(4)))
dasd_diag_characteristics_t; dasd_diag_characteristics_t;
...@@ -40,7 +39,7 @@ typedef struct diag_bio_t { ...@@ -40,7 +39,7 @@ typedef struct diag_bio_t {
u32 block_number; u32 block_number;
u32 alet; u32 alet;
u32 buffer; u32 buffer;
} __attribute__ ((packed, aligned (8))) } __attribute__ ((packed, aligned(8)))
diag_bio_t; diag_bio_t;
...@@ -52,7 +51,7 @@ typedef struct diag_init_io_t { ...@@ -52,7 +51,7 @@ typedef struct diag_init_io_t {
u32 start_block; u32 start_block;
u32 end_block; u32 end_block;
u32 spare2[6]; u32 spare2[6];
} __attribute__ ((packed, aligned (8))) } __attribute__ ((packed, aligned(8)))
diag_init_io_t; diag_init_io_t;
...@@ -67,9 +66,9 @@ typedef struct diag_rw_io_t { ...@@ -67,9 +66,9 @@ typedef struct diag_rw_io_t {
u32 bio_list; u32 bio_list;
u32 interrupt_params; u32 interrupt_params;
u32 spare3[5]; u32 spare3[5];
} __attribute__ ((packed, aligned (8))) } __attribute__ ((packed, aligned(8)))
diag_rw_io_t; diag_rw_io_t;
int dasd_diag_init (void); int dasd_diag_init(void);
void dasd_diag_cleanup (void); void dasd_diag_cleanup(void);
This diff is collapsed.
#ifndef DASD_ECKD_H #ifndef DASD_ECKD_H
#define DASD_ECKD_H #define DASD_ECKD_H
#include "dasd_3990_erp.h" /*******************************************************************************
#include "dasd_9343_erp.h" * SECTION: CCW Definitions
******************************************************************************/
#define DASD_ECKD_CCW_WRITE 0x05 #define DASD_ECKD_CCW_WRITE 0x05
#define DASD_ECKD_CCW_READ 0x06 #define DASD_ECKD_CCW_READ 0x06
#define DASD_ECKD_CCW_WRITE_HOME_ADDRESS 0x09 #define DASD_ECKD_CCW_WRITE_HOME_ADDRESS 0x09
...@@ -12,10 +12,13 @@ ...@@ -12,10 +12,13 @@
#define DASD_ECKD_CCW_READ_KD 0x0e #define DASD_ECKD_CCW_READ_KD 0x0e
#define DASD_ECKD_CCW_ERASE 0x11 #define DASD_ECKD_CCW_ERASE 0x11
#define DASD_ECKD_CCW_READ_COUNT 0x12 #define DASD_ECKD_CCW_READ_COUNT 0x12
#define DASD_ECKD_CCW_SLCK 0x14
#define DASD_ECKD_CCW_WRITE_RECORD_ZERO 0x15 #define DASD_ECKD_CCW_WRITE_RECORD_ZERO 0x15
#define DASD_ECKD_CCW_READ_RECORD_ZERO 0x16 #define DASD_ECKD_CCW_READ_RECORD_ZERO 0x16
#define DASD_ECKD_CCW_WRITE_CKD 0x1d #define DASD_ECKD_CCW_WRITE_CKD 0x1d
#define DASD_ECKD_CCW_READ_CKD 0x1e #define DASD_ECKD_CCW_READ_CKD 0x1e
#define DASD_ECKD_CCW_PSF 0x27
#define DASD_ECKD_CCW_RSSD 0x3e
#define DASD_ECKD_CCW_LOCATE_RECORD 0x47 #define DASD_ECKD_CCW_LOCATE_RECORD 0x47
#define DASD_ECKD_CCW_DEFINE_EXTENT 0x63 #define DASD_ECKD_CCW_DEFINE_EXTENT 0x63
#define DASD_ECKD_CCW_WRITE_MT 0x85 #define DASD_ECKD_CCW_WRITE_MT 0x85
...@@ -26,53 +29,46 @@ ...@@ -26,53 +29,46 @@
#define DASD_ECKD_CCW_READ_CKD_MT 0x9e #define DASD_ECKD_CCW_READ_CKD_MT 0x9e
#define DASD_ECKD_CCW_WRITE_CKD_MT 0x9d #define DASD_ECKD_CCW_WRITE_CKD_MT 0x9d
#define DASD_ECKD_CCW_RESERVE 0xB4 #define DASD_ECKD_CCW_RESERVE 0xB4
#define DASD_ECKD_CCW_SLCK 0x14 /* steal lock - unconditional reserve */
typedef /*
struct eckd_count_t { *Perform Subsystem Function / Sub-Orders
*/
#define PSF_ORDER_PRSSD 0x18
/*******************************************************************************
* SECTION: Type Definitions
******************************************************************************/
typedef struct eckd_count_t {
__u16 cyl; __u16 cyl;
__u16 head; __u16 head;
__u8 record; __u8 record;
__u8 kl; __u8 kl;
__u16 dl; __u16 dl;
} __attribute__ ((packed)) } __attribute__ ((packed)) eckd_count_t;
eckd_count_t;
typedef typedef struct ch_t {
struct ch_t {
__u16 cyl; __u16 cyl;
__u16 head; __u16 head;
} __attribute__ ((packed)) } __attribute__ ((packed)) ch_t;
ch_t; typedef struct chs_t {
typedef
struct chs_t {
__u16 cyl; __u16 cyl;
__u16 head; __u16 head;
__u32 sector; __u32 sector;
} __attribute__ ((packed)) } __attribute__ ((packed)) chs_t;
chs_t;
typedef typedef struct chr_t {
struct chr_t {
__u16 cyl; __u16 cyl;
__u16 head; __u16 head;
__u8 record; __u8 record;
} __attribute__ ((packed)) } __attribute__ ((packed)) chr_t;
chr_t;
typedef typedef struct geom_t {
struct geom_t {
__u16 cyl; __u16 cyl;
__u16 head; __u16 head;
__u32 sector; __u32 sector;
} __attribute__ ((packed)) } __attribute__ ((packed)) geom_t;
geom_t;
typedef struct eckd_home_t { typedef struct eckd_home_t {
__u8 skip_control[14]; __u8 skip_control[14];
...@@ -83,12 +79,9 @@ typedef struct eckd_home_t { ...@@ -83,12 +79,9 @@ typedef struct eckd_home_t {
__u8 reserved; __u8 reserved;
__u8 key_length; __u8 key_length;
__u8 reserved2[2]; __u8 reserved2[2];
} __attribute__ ((packed)) } __attribute__ ((packed)) eckd_home_t;
eckd_home_t;
typedef typedef struct DE_eckd_data_t {
struct DE_eckd_data_t {
struct { struct {
unsigned char perm:2; /* Permissions on this extent */ unsigned char perm:2; /* Permissions on this extent */
unsigned char reserved:1; unsigned char reserved:1;
...@@ -105,16 +98,13 @@ typedef ...@@ -105,16 +98,13 @@ typedef
} __attribute__ ((packed)) attributes; } __attribute__ ((packed)) attributes;
__u16 short blk_size; /* Blocksize */ __u16 short blk_size; /* Blocksize */
__u16 fast_write_id; __u16 fast_write_id;
__u8 unused; __u8 ga_additional; /* Global Attributes Additional */
__u8 reserved; __u8 ga_extended; /* Global Attributes Extended */
ch_t beg_ext; ch_t beg_ext;
ch_t end_ext; ch_t end_ext;
} __attribute__ ((packed)) } __attribute__ ((packed)) DE_eckd_data_t;
DE_eckd_data_t; typedef struct LO_eckd_data_t {
typedef
struct LO_eckd_data_t {
struct { struct {
unsigned char orientation:2; unsigned char orientation:2;
unsigned char operation:6; unsigned char operation:6;
...@@ -130,12 +120,9 @@ typedef ...@@ -130,12 +120,9 @@ typedef
chr_t search_arg; chr_t search_arg;
__u8 sector; __u8 sector;
__u16 length; __u16 length;
} __attribute__ ((packed)) } __attribute__ ((packed)) LO_eckd_data_t;
LO_eckd_data_t;
typedef typedef struct dasd_eckd_characteristics_t {
struct dasd_eckd_characteristics_t {
__u16 cu_type; __u16 cu_type;
struct { struct {
unsigned char support:2; unsigned char support:2;
...@@ -205,9 +192,7 @@ typedef ...@@ -205,9 +192,7 @@ typedef
__u8 factor8; __u8 factor8;
__u8 reserved2[3]; __u8 reserved2[3];
__u8 reserved3[10]; __u8 reserved3[10];
} __attribute__ ((packed)) } __attribute__ ((packed)) dasd_eckd_characteristics_t;
dasd_eckd_characteristics_t;
typedef struct dasd_eckd_confdata_t { typedef struct dasd_eckd_confdata_t {
struct { struct {
...@@ -324,10 +309,19 @@ typedef struct dasd_eckd_confdata_t { ...@@ -324,10 +309,19 @@ typedef struct dasd_eckd_confdata_t {
__u8 log_dev_address; __u8 log_dev_address;
unsigned char reserved2[12]; unsigned char reserved2[12];
} __attribute__ ((packed)) neq; } __attribute__ ((packed)) neq;
} __attribute__ ((packed)) } __attribute__ ((packed)) dasd_eckd_confdata_t;
dasd_eckd_confdata_t; /*
* Perform Subsystem Function - Prepare for Read Subsystem Data
*/
typedef struct dasd_psf_prssd_data_t {
unsigned char order;
unsigned char flags;
unsigned char reserved[4];
unsigned char suborder;
unsigned char varies[9];
} __attribute__ ((packed)) dasd_psf_prssd_data_t;
int dasd_eckd_init (void); int dasd_eckd_init(void);
void dasd_eckd_cleanup (void); void dasd_eckd_cleanup(void);
#endif /* DASD_ECKD_H */ #endif /* DASD_ECKD_H */
This diff is collapsed.
This diff is collapsed.
...@@ -71,6 +71,6 @@ typedef ...@@ -71,6 +71,6 @@ typedef
dasd_fba_characteristics_t; dasd_fba_characteristics_t;
int dasd_fba_init (void); int dasd_fba_init(void);
void dasd_fba_cleanup (void); void dasd_fba_cleanup(void);
#endif /* DASD_FBA_H */ #endif /* DASD_FBA_H */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -158,6 +158,7 @@ MODULE_PARM_DESC(sizes, "list of device (partition) sizes " \ ...@@ -158,6 +158,7 @@ MODULE_PARM_DESC(sizes, "list of device (partition) sizes " \
/* The following items are obtained through kmalloc() in init_module() */ /* The following items are obtained through kmalloc() in init_module() */
Xpram_Dev *xpram_devices = NULL; Xpram_Dev *xpram_devices = NULL;
int *xpram_hardsects = NULL;
int *xpram_offsets = NULL; /* partition offsets */ int *xpram_offsets = NULL; /* partition offsets */
#define MIN(x,y) ((x) < (y) ? (x) : (y)) #define MIN(x,y) ((x) < (y) ? (x) : (y))
...@@ -938,7 +939,6 @@ int xpram_init(void) ...@@ -938,7 +939,6 @@ int xpram_init(void)
q = BLK_DEFAULT_QUEUE(major); q = BLK_DEFAULT_QUEUE(major);
blk_init_queue (q, xpram_request); blk_init_queue (q, xpram_request);
blk_queue_hardsect_size(q, xpram_hardsect);
/* we want to have XPRAM_UNUSED blocks security buffer between devices */ /* we want to have XPRAM_UNUSED blocks security buffer between devices */
mem_usable=xpram_mem_avail-(XPRAM_UNUSED*(xpram_devs-1)); mem_usable=xpram_mem_avail-(XPRAM_UNUSED*(xpram_devs-1));
...@@ -978,6 +978,16 @@ int xpram_init(void) ...@@ -978,6 +978,16 @@ int xpram_init(void)
PRINT_DEBUG(" device(%d) offset = %d kB, size = %d kB\n",i, xpram_offsets[i], xpram_sizes[i]); PRINT_DEBUG(" device(%d) offset = %d kB, size = %d kB\n",i, xpram_offsets[i], xpram_sizes[i]);
#endif #endif
xpram_hardsects = kmalloc(xpram_devs * sizeof(int), GFP_KERNEL);
if (!xpram_hardsects) {
PRINT_ERR("Not enough memory for xpram_hardsects\n");
PRINT_ERR("Giving up xpram\n");
goto fail_malloc_hardsects;
}
for (i=0; i < xpram_devs; i++) /* all the same hardsect */
xpram_hardsects[i] = xpram_hardsect;
hardsect_size[major]=xpram_hardsects;
/* /*
* allocate the devices -- we can't have them static, as the number * allocate the devices -- we can't have them static, as the number
* can be specified at load time * can be specified at load time
...@@ -1030,6 +1040,7 @@ int xpram_init(void) ...@@ -1030,6 +1040,7 @@ int xpram_init(void)
goto fail_devfs_register; goto fail_devfs_register;
} }
#endif /* WHY? */ #endif /* WHY? */
} }
return 0; /* succeed */ return 0; /* succeed */
...@@ -1042,7 +1053,10 @@ int xpram_init(void) ...@@ -1042,7 +1053,10 @@ int xpram_init(void)
} }
kfree(xpram_devices); kfree(xpram_devices);
kfree (xpram_offsets); kfree (xpram_offsets);
fail_malloc_hardsects:
fail_malloc_devices: fail_malloc_devices:
kfree(xpram_hardsects);
hardsect_size[major] = NULL;
fail_malloc: fail_malloc:
/* ??? unregister_chrdev(major, "xpram"); */ /* ??? unregister_chrdev(major, "xpram"); */
unregister_blkdev(major, "xpram"); unregister_blkdev(major, "xpram");
...@@ -1072,6 +1086,7 @@ void cleanup_module(void) ...@@ -1072,6 +1086,7 @@ void cleanup_module(void)
int i; int i;
/* first of all, reset all the data structures */ /* first of all, reset all the data structures */
kfree(hardsect_size[major]);
kfree(xpram_offsets); kfree(xpram_offsets);
blk_clear(major); blk_clear(major);
......
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# S/390 character devices # S/390 character devices
# #
export-objs := hwc_rw.o export-objs := hwc_rw.o tape.o tape34xx.o
tub3270-objs := tuball.o tubfs.o tubtty.o \ tub3270-objs := tuball.o tubfs.o tubtty.o \
tubttyaid.o tubttybld.o tubttyscl.o \ tubttyaid.o tubttybld.o tubttyscl.o \
...@@ -10,9 +10,11 @@ tub3270-objs := tuball.o tubfs.o tubtty.o \ ...@@ -10,9 +10,11 @@ tub3270-objs := tuball.o tubfs.o tubtty.o \
tape390-$(CONFIG_S390_TAPE_CHAR) += tapechar.o tape390-$(CONFIG_S390_TAPE_CHAR) += tapechar.o
tape390-$(CONFIG_S390_TAPE_BLOCK) += tapeblock.o tape390-$(CONFIG_S390_TAPE_BLOCK) += tapeblock.o
tape390-$(CONFIG_S390_TAPE_3480) += tape3480.o tape34xx.o
tape390-$(CONFIG_S390_TAPE_3490) += tape3490.o tape34xx.o tape390-objs := tape.o tape34xx.o $(sort $(tape390-y))
tape390-objs := tape.o $(sort $(tape390-y)) tape_3480_mod-objs := tape3480.o
tape_3490_mod-objs := tape3490.o
obj-y += ctrlchar.o obj-y += ctrlchar.o
obj-$(CONFIG_TN3215) += con3215.o obj-$(CONFIG_TN3215) += con3215.o
...@@ -20,5 +22,8 @@ obj-$(CONFIG_HWC) += hwc_con.o hwc_rw.o hwc_tty.o ...@@ -20,5 +22,8 @@ obj-$(CONFIG_HWC) += hwc_con.o hwc_rw.o hwc_tty.o
obj-$(CONFIG_HWC_CPI) += hwc_cpi.o obj-$(CONFIG_HWC_CPI) += hwc_cpi.o
obj-$(CONFIG_TN3270) += tub3270.o obj-$(CONFIG_TN3270) += tub3270.o
obj-$(CONFIG_S390_TAPE) += tape390.o obj-$(CONFIG_S390_TAPE) += tape390.o
obj-$(CONFIG_S390_TAPE_3480) += tape_3480_mod.o
obj-$(CONFIG_S390_TAPE_3490) += tape_3490_mod.o
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
...@@ -59,8 +59,6 @@ ...@@ -59,8 +59,6 @@
struct _raw3215_info; /* forward declaration ... */ struct _raw3215_info; /* forward declaration ... */
int raw3215_condevice = -1; /* preset console device */
/* /*
* Request types for a 3215 device * Request types for a 3215 device
*/ */
...@@ -542,7 +540,7 @@ static void raw3215_irq(int irq, void *int_parm, struct pt_regs *regs) ...@@ -542,7 +540,7 @@ static void raw3215_irq(int irq, void *int_parm, struct pt_regs *regs)
* Has to be called with the s390irq lock held. Can be called * Has to be called with the s390irq lock held. Can be called
* disabled. * disabled.
*/ */
void raw3215_make_room(raw3215_info *raw, unsigned int length) static void raw3215_make_room(raw3215_info *raw, unsigned int length)
{ {
while (RAW3215_BUFFER_SIZE - raw->count < length) { while (RAW3215_BUFFER_SIZE - raw->count < length) {
/* there might be a request pending */ /* there might be a request pending */
...@@ -730,8 +728,11 @@ static void raw3215_shutdown(raw3215_info *raw) ...@@ -730,8 +728,11 @@ static void raw3215_shutdown(raw3215_info *raw)
raw->queued_read != NULL) { raw->queued_read != NULL) {
raw->flags |= RAW3215_CLOSING; raw->flags |= RAW3215_CLOSING;
add_wait_queue(&raw->empty_wait, &wait); add_wait_queue(&raw->empty_wait, &wait);
#warning FIXME: use set_current_state instead of current->state=
current->state = TASK_INTERRUPTIBLE; current->state = TASK_INTERRUPTIBLE;
s390irq_spin_unlock_irqrestore(raw->irq, flags); s390irq_spin_unlock_irqrestore(raw->irq, flags);
/* FIXME: what if schedule is interrupted by a signal,
* shouldn't we loop here? */
schedule(); schedule();
s390irq_spin_lock_irqsave(raw->irq, flags); s390irq_spin_lock_irqsave(raw->irq, flags);
remove_wait_queue(&raw->empty_wait, &wait); remove_wait_queue(&raw->empty_wait, &wait);
...@@ -752,7 +753,7 @@ raw3215_find_dev(int number) ...@@ -752,7 +753,7 @@ raw3215_find_dev(int number)
irq = get_irq_first(); irq = get_irq_first();
count = 0; count = 0;
while (count <= number && irq != -ENODEV) { while (count <= number && irq != -ENODEV) {
if (get_dev_info(irq, &dinfo) == -ENODEV) if (get_dev_info_by_irq(irq, &dinfo) == -ENODEV)
break; break;
if (dinfo.devno == console_device || if (dinfo.devno == console_device ||
dinfo.sid_data.cu_type == 0x3215) { dinfo.sid_data.cu_type == 0x3215) {
...@@ -794,16 +795,16 @@ con3215_write(struct console *co, const char *str, unsigned int count) ...@@ -794,16 +795,16 @@ con3215_write(struct console *co, const char *str, unsigned int count)
} }
} }
kdev_t con3215_device(struct console *c) static kdev_t con3215_device(struct console *c)
{ {
return MKDEV(TTY_MAJOR, c->index + 64 ); return mk_kdev(TTY_MAJOR, c->index + 64 );
} }
/* /*
* panic() calls console_unblank before the system enters a * panic() calls console_unblank before the system enters a
* disabled, endless loop. * disabled, endless loop.
*/ */
void con3215_unblank(void) static void con3215_unblank(void)
{ {
raw3215_info *raw; raw3215_info *raw;
unsigned long flags; unsigned long flags;
...@@ -843,7 +844,7 @@ static int tty3215_open(struct tty_struct *tty, struct file * filp) ...@@ -843,7 +844,7 @@ static int tty3215_open(struct tty_struct *tty, struct file * filp)
raw3215_info *raw; raw3215_info *raw;
int retval, line; int retval, line;
line = MINOR(tty->device) - tty->driver.minor_start; line = minor(tty->device) - tty->driver.minor_start;
if ((line < 0) || (line >= NR_3215)) if ((line < 0) || (line >= NR_3215))
return -ENODEV; return -ENODEV;
...@@ -1057,7 +1058,9 @@ static void tty3215_start(struct tty_struct *tty) ...@@ -1057,7 +1058,9 @@ static void tty3215_start(struct tty_struct *tty)
*/ */
void __init con3215_init(void) void __init con3215_init(void)
{ {
#ifdef CONFIG_TN3215_CONSOLE
raw3215_info *raw; raw3215_info *raw;
#endif
raw3215_req *req; raw3215_req *req;
int irq; int irq;
int i; int i;
......
...@@ -149,6 +149,8 @@ typedef struct { ...@@ -149,6 +149,8 @@ typedef struct {
mto_t; mto_t;
/* FIXME: don't define static variables in a header!!! */
#warning
static write_hwcb_t write_hwcb_template = static write_hwcb_t write_hwcb_template =
{ {
sizeof (write_hwcb_t), sizeof (write_hwcb_t),
...@@ -180,6 +182,7 @@ static write_hwcb_t write_hwcb_template = ...@@ -180,6 +182,7 @@ static write_hwcb_t write_hwcb_template =
} }
}; };
#warning
static mto_t mto_template = static mto_t mto_template =
{ {
sizeof (mto_t), sizeof (mto_t),
...@@ -202,6 +205,7 @@ typedef struct { ...@@ -202,6 +205,7 @@ typedef struct {
init_hwcb_t; init_hwcb_t;
#warning
static init_hwcb_t init_hwcb_template = static init_hwcb_t init_hwcb_template =
{ {
sizeof (init_hwcb_t), sizeof (init_hwcb_t),
...@@ -258,6 +262,7 @@ typedef struct { ...@@ -258,6 +262,7 @@ typedef struct {
read_hwcb_t; read_hwcb_t;
#warning
static read_hwcb_t read_hwcb_template = static read_hwcb_t read_hwcb_template =
{ {
PAGE_SIZE, PAGE_SIZE,
......
This diff is collapsed.
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/version.h> #include <linux/version.h>
#include <linux/sched.h>
#include <asm/semaphore.h> #include <asm/semaphore.h>
#include <asm/ebcdic.h> #include <asm/ebcdic.h>
#include "hwc_rw.h" #include "hwc_rw.h"
......
This diff is collapsed.
...@@ -61,7 +61,7 @@ typedef struct { ...@@ -61,7 +61,7 @@ typedef struct {
ioctl_delim_t delim; ioctl_delim_t delim;
} hwc_ioctls_t; } hwc_ioctls_t;
static hwc_ioctls_t _hwc_ioctls; extern hwc_ioctls_t _hwc_ioctls;
#define HWC_IOCTL_LETTER 'B' #define HWC_IOCTL_LETTER 'B'
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -19,5 +19,5 @@ ...@@ -19,5 +19,5 @@
typedef struct _tape3480_disc_data_t { typedef struct _tape3480_disc_data_t {
__u8 modeset_byte; __u8 modeset_byte;
} tape3480_disc_data_t __attribute__ ((packed, aligned(8))); } tape3480_disc_data_t __attribute__ ((packed, aligned(8)));
tape_discipline_t * tape3480_init (int); tape_discipline_t * tape3480_init (void);
#endif // _TAPE3480_H #endif // _TAPE3480_H
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#ifndef S390_AINTERRUPT_H
#define S390_AINTERRUPT_H
extern void do_adapter_IO (__u32 intparm);
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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