add support for PC-9800 architecture (SCSI)
Subsystems (3)
PATCH 19/25 add support for PC-9800 architecture (SCSI)
This is part 19/26 of patchset for add support NEC PC-9800 architecture, against 2.5.43.
Summary:
SCSI driver related modules.
- replace bios_param function.
- add new driver. (pc980155)
- export sd_get_sdisk to get disk goemetry. we need disk geometry to read partition table.
diffstat:
drivers/scsi/Config.in | 3 drivers/scsi/Makefile | 1 drivers/scsi/advansys.c | 9 + drivers/scsi/aic7xxx/aic7xxx_linux_host.h | 3 drivers/scsi/aic7xxx_old/aic7xxx.h | 9 - drivers/scsi/pc980155.c | 262 ++++++++++++++++++++++++++++++ drivers/scsi/pc980155.h | 47 +++++ drivers/scsi/pc980155regs.h | 89 ++++++++++ drivers/scsi/scsi_scan.c | 1 drivers/scsi/scsi_syms.c | 6 drivers/scsi/scsicam.c | 93 ++++++++++ drivers/scsi/sd.c | 8 drivers/scsi/wd33c93.c | 112 ++++++++++-- drivers/scsi/wd33c93.h | 5 include/scsi/scsicam.h | 5 15 files changed, 635 insertions(+), 18 deletions(-)
patch:
drivers/scsi/Config.in +3 -0
@@ -258,6 +258,9 @@ # bool 'GVP Turbo 040/060 SCSI support (EXPERIMENTAL)' CONFIG_GVP_TURBO_SCSI fi fi +if [ "$CONFIG_PC9800" = "y" ]; then + dep_tristate 'NEC PC-9801-55 SCSI support' CONFIG_SCSI_PC980155 $CONFIG_SCSI +fi endmenu
drivers/scsi/Makefile +1 -0
@@ -31,6 +31,7 @@ obj-$(CONFIG_A3000_SCSI) += a3000.o wd33c93.o obj-$(CONFIG_A2091_SCSI) += a2091.o wd33c93.o obj-$(CONFIG_GVP11_SCSI) += gvp11.o wd33c93.o +obj-$(CONFIG_SCSI_PC980155) += pc980155.o wd33c93.o obj-$(CONFIG_MVME147_SCSI) += mvme147.o wd33c93.o obj-$(CONFIG_SGIWD93_SCSI) += sgiwd93.o wd33c93.o obj-$(CONFIG_CYBERSTORM_SCSI) += NCR53C9x.o cyberstorm.o
drivers/scsi/advansys.c +9 -0
@@ -815,6 +815,9 @@#ifdef CONFIG_PCI #include <linux/pci.h> #endif /* CONFIG_PCI */ +#ifdef CONFIG_PC9800 +#include <scsi/scsicam.h> +#endif /*
@@ -6117,10 +6120,13 @@ int advansys_biosparam(Disk *dp, struct block_device *dep, int ip[]) { +#ifndef CONFIG_PC9800 asc_board_t *boardp; +#endif ASC_DBG(1, "advansys_biosparam: begin\n"); ASC_STATS(dp->device->host, biosparam); +#ifndef CONFIG_PC9800 boardp = ASC_BOARDP(dp->device->host); if (ASC_NARROW_BOARD(boardp)) { if ((boardp->dvc_var.asc_dvc_var.dvc_cntl &
@@ -6142,6 +6148,9 @@ } } ip[2 ] = (unsigned long )dp->capacity / (ip[0 ] * ip[1 ]); +#else /* CONFIG_PC9800 */ +pc9800_scsi_bios_param (dp, dep, ip); +#endif /* !CONFIG_PC9800 */ ASC_DBG (1 ,"advansys_biosparam: end\n" );return 0 ; }
drivers/scsi/aic7xxx/aic7xxx_linux_host.h +2 -1
@@ -52,7 +52,8 @@int ahc_linux_dev_reset (Scsi_Cmnd *);int ahc_linux_abort (Scsi_Cmnd *); -#if defined(__i386__) +#include <linux/config.h> +#if defined(__i386__) && !defined(CONFIG_PC9800 )# define AIC7XXX_BIOSPARAM ahc_linux_biosparam#else # define AIC7XXX_BIOSPARAM NULL
drivers/scsi/aic7xxx_old/aic7xxx.h +8 -1
@@ -23,6 +23,13 @@#ifndef _aic7xxx_h#define _aic7xxx_h +#include <linux/config.h> + +#ifndef CONFIG_PC9800 +# define AIC7XXX_BIOSPARAM aic7xxx_biosparam +#else +# define AIC7XXX_BIOSPARAM NULL +#endif #define AIC7XXX_H_VERSION "5.2.0"/*
@@ -48,7 +55,7 @@ reset: aic7xxx_reset, \ slave_attach: aic7xxx_slave_attach, \ slave_detach: aic7xxx_slave_detach, \ - bios_param: aic7xxx_biosparam, \ + bios_param: AIC7XXX_BIOSPARAM, \ can_queue: 255, /* max simultaneous cmds */\ this_id: -1, /* scsi id of host adapter */\ sg_tablesize: 0, /* max scatter-gather cmds */\
drivers/scsi/pc980155.c +262 -0
262 lines not on this page · raw message
drivers/scsi/pc980155.h +47 -0
47 lines not on this page · raw message
drivers/scsi/pc980155regs.h +89 -0
89 lines not on this page · raw message
drivers/scsi/scsi_scan.c +1 -0
@@ -131,6 +131,7 @@ {"MITSUMI", "CD-R CR-2201CS", "6119", BLIST_NOLUN}, /* locks up */ {"RELISYS", "Scorpio", NULL, BLIST_NOLUN}, /* responds to all lun */ {"MICROTEK", "ScanMaker II", "5.61", BLIST_NOLUN}, /* responds to all lun */ + {"NEC", "D3856", "0009", BLIST_NOLUN},/* * Other types of devices that have special flags.
drivers/scsi/scsi_syms.c +6 -0
@@ -96,6 +96,12 @@EXPORT_SYMBOL (scsi_devicelist);EXPORT_SYMBOL (scsi_device_types); +#ifdef CONFIG_PC9800 +EXPORT_SYMBOL (pc9800_scsi_bios_param); +extern Scsi_Disk *sd_get_sdisk (int ); +EXPORT_SYMBOL (sd_get_sdisk); +#endif +/* * Externalize timers so that HBAs can safely start/restart commands. */
drivers/scsi/scsicam.c +93 -0
109 lines not on this page · raw message
drivers/scsi/sd.c +8 -0
@@ -125,7 +125,11 @@static void sd_rw_intr (Scsi_Cmnd * SCpnt); +#ifndef CONFIG_PC9800 static Scsi_Disk *sd_get_sdisk (int index); +#else +Scsi_Disk *sd_get_sdisk (int index); +#endif #if defined(CONFIG_PPC32 )/**
@@ -1638,7 +1642,11 @@return (the_result ==0 ); } +#ifndef CONFIG_PC9800 static Scsi_Disk * sd_get_sdisk(int index) +#else +Scsi_Disk * sd_get_sdisk(int index) +#endif {Scsi_Disk * sdkp =NULL ;unsigned long iflags;
drivers/scsi/wd33c93.c +96 -16
250 lines not on this page · raw message
drivers/scsi/wd33c93.h +5 -0
@@ -186,8 +186,13 @@/* This is what the 3393 chip looks like to us */ typedef struct { +#if defined(CONFIG_SCSI_PC980155 ) || defined(CONFIG_SCSI_PC980155_MODULE ) +volatile unsigned int *SASR; +volatile unsigned int *SCMD; +#else volatile unsigned char *SASR;volatile unsigned char *SCMD; +#endif }wd33c93_regs ;
include/scsi/scsicam.h +5 -0
@@ -12,8 +12,13 @@#ifndef SCSICAM_H #define SCSICAM_H +#include <linux/config.h> extern int scsicam_bios_param (Disk *disk,struct block_device *bdev,int *ip);extern int scsi_partsize (unsigned char *buf,unsigned long capacity,unsigned int *cyls,unsigned int *hds,unsigned int *secs);extern unsigned char *scsi_bios_ptable (struct block_device *bdev); +#ifdef CONFIG_PC9800 +extern int pc9800_scsi_bios_param (Disk *disk,struct block_device *bdev, +int *ip); +#endif #endif /* def SCSICAM_H */