Commit ebc4a2df authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds

[PATCH] kill IPHASE5526

iph5526 does not compiles since 2.5 and was therefore marked as broken.  This
patch removes it.
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d006c935
......@@ -2528,15 +2528,6 @@ config NET_FC
adaptor below. You also should have said Y to "SCSI support" and
"SCSI generic support".
config IPHASE5526
tristate "Interphase 5526 Tachyon chipset based adapter support"
depends on NET_FC && SCSI && PCI && BROKEN
help
Say Y here if you have a Fibre Channel adaptor of this kind.
To compile this driver as a module, choose M here: the module
will be called iph5526.
config SHAPER
tristate "Traffic Shaper (EXPERIMENTAL)"
depends on NETDEVICES && EXPERIMENTAL
......
......@@ -183,7 +183,6 @@ obj-$(CONFIG_SMC91X) += smc91x.o
obj-$(CONFIG_FEC_8XX) += fec_8xx/
obj-$(CONFIG_ARM) += arm/
obj-$(CONFIG_NET_FC) += fc/
obj-$(CONFIG_DEV_APPLETALK) += appletalk/
obj-$(CONFIG_TR) += tokenring/
obj-$(CONFIG_WAN) += wan/
......
#
# Makefile for linux/drivers/net/fc
#
# 9 Aug 2000, Christoph Hellwig <hch@infradead.org>
# Rewritten to use lists instead of if-statements.
#
obj-$(CONFIG_IPHASE5526) += iph5526.o
This source diff could not be displayed because it is too large. You can view the blob instead.
#ifndef IPH5526_IP_H
#define IPH5526_IP_H
#define LLC_SNAP_LEN 0x8
/* Offsets into the ARP frame */
#define ARP_OPCODE_0 (0x6 + LLC_SNAP_LEN)
#define ARP_OPCODE_1 (0x7 + LLC_SNAP_LEN)
int iph5526_probe(struct net_device *dev);
static int fcdev_init(struct net_device *dev);
static int iph5526_open(struct net_device *dev);
static int iph5526_close(struct net_device *dev);
static int iph5526_send_packet(struct sk_buff *skb, struct net_device *dev);
static struct net_device_stats * iph5526_get_stats(struct net_device *dev);
static int iph5526_change_mtu(struct net_device *dev, int mtu);
static void rx_net_packet(struct fc_info *fi, u_char *buff_addr, int payload_size);
static void rx_net_mfs_packet(struct fc_info *fi, struct sk_buff *skb);
static int tx_ip_packet(struct sk_buff *skb, unsigned long len, struct fc_info *fi);
static int tx_arp_packet(char *data, unsigned long len, struct fc_info *fi);
#endif
/**********************************************************************
* Reading the NVRAM on the Interphase 5526 PCI Fibre Channel Card.
* All contents in this file : courtesy Interphase Corporation.
* Special thanks to Kevin Quick, kquick@iphase.com.
**********************************************************************/
#define FF_MAGIC 0x4646
#define DB_MAGIC 0x4442
#define DL_MAGIC 0x444d
#define CMD_LEN 9
/***********
*
* Switches and defines for header files.
*
* The following defines are used to turn on and off
* various options in the header files. Primarily useful
* for debugging.
*
***********/
static const unsigned short novram_default[4] = {
FF_MAGIC,
DB_MAGIC,
DL_MAGIC,
0 };
/*
* a list of the commands that can be sent to the NOVRAM
*/
#define NR_EXTEND 0x100
#define NR_WRITE 0x140
#define NR_READ 0x180
#define NR_ERASE 0x1c0
#define EWDS 0x00
#define WRAL 0x10
#define ERAL 0x20
#define EWEN 0x30
/*
* Defines for the pins on the NOVRAM
*/
#define BIT(x) (1 << (x))
#define NVDI_B 31
#define NVDI BIT(NVDI_B)
#define NVDO BIT(9)
#define NVCE BIT(30)
#define NVSK BIT(29)
#define NV_MANUAL BIT(28)
/***********
*
* Include files.
*
***********/
#define KeStallExecutionProcessor(x) {volatile int d, p;\
for (d=0; d<x; d++) for (p=0; p<10; p++);\
}
/***********************
*
* This define ands the value and the current config register and puts
* the result in the config register
*
***********************/
#define CFG_AND(val) { volatile int t; \
t = readl(fi->n_r.ptr_novram_hw_control_reg); \
t &= (val); \
writel(t, fi->n_r.ptr_novram_hw_control_reg); \
}
/***********************
*
* This define ors the value and the current config register and puts
* the result in the config register
*
***********************/
#define CFG_OR(val) { volatile int t; \
t = readl(fi->n_r.ptr_novram_hw_control_reg); \
t |= (val); \
writel(t, fi->n_r.ptr_novram_hw_control_reg); \
}
/***********************
*
* Send a command to the NOVRAM, the command is in cmd.
*
* clear CE and SK. Then assert CE.
* Clock each of the command bits out in the correct order with SK
* exit with CE still asserted
*
***********************/
#define NVRAM_CMD(cmd) { int i; \
int c = cmd; \
CFG_AND(~(NVCE|NVSK)); \
CFG_OR(NVCE); \
for (i=0; i<CMD_LEN; i++) { \
NVRAM_CLKOUT((c & (1 << (CMD_LEN - 1))) ? 1 : 0);\
c <<= 1; } }
/***********************
*
* clear the CE, this must be used after each command is complete
*
***********************/
#define NVRAM_CLR_CE CFG_AND(~NVCE)
/***********************
*
* clock the data bit in bitval out to the NOVRAM. The bitval must be
* a 1 or 0, or the clockout operation is undefined
*
***********************/
#define NVRAM_CLKOUT(bitval) {\
CFG_AND(~NVDI); \
CFG_OR((bitval) << NVDI_B); \
KeStallExecutionProcessor(5);\
CFG_OR(NVSK); \
KeStallExecutionProcessor(5);\
CFG_AND( ~NVSK); \
}
/***********************
*
* clock the data bit in and return a 1 or 0, depending on the value
* that was received from the NOVRAM
*
***********************/
#define NVRAM_CLKIN(val) {\
CFG_OR(NVSK); \
KeStallExecutionProcessor(5);\
CFG_AND(~NVSK); \
KeStallExecutionProcessor(5);\
val = (readl(fi->n_r.ptr_novram_hw_status_reg) & NVDO) ? 1 : 0; \
}
/***********
*
* Function Prototypes
*
***********/
static int iph5526_nr_get(struct fc_info *fi, int addr);
static void iph5526_nr_do_init(struct fc_info *fi);
static void iph5526_nr_checksum(struct fc_info *fi);
/*******************************************************************
*
* Local routine: iph5526_nr_do_init
* Purpose: initialize novram server
* Description:
*
* iph5526_nr_do_init reads the novram into the temporary holding place.
* A checksum is done on the area and the Magic Cookies are checked.
* If any of them are bad, the NOVRAM is initialized with the
* default values and a warning message is displayed.
*
*******************************************************************/
static void iph5526_nr_do_init(struct fc_info *fi)
{
int i;
unsigned short chksum = 0;
int bad = 0;
for (i=0; i<IPH5526_NOVRAM_SIZE; i++) {
fi->n_r.data[i] = iph5526_nr_get(fi, i);
chksum += fi->n_r.data[i];
}
if (chksum)
bad = 1;
if (fi->n_r.data[IPH5526_NOVRAM_SIZE - 4] != FF_MAGIC)
bad = 1;
if (fi->n_r.data[IPH5526_NOVRAM_SIZE - 3] != DB_MAGIC)
bad = 1;
if (fi->n_r.data[IPH5526_NOVRAM_SIZE - 2] != DL_MAGIC)
bad = 1;
if (bad) {
for (i=0; i<IPH5526_NOVRAM_SIZE; i++) {
if (i < (IPH5526_NOVRAM_SIZE - 4)) {
fi->n_r.data[i] = 0xffff;
} else {
fi->n_r.data[i] = novram_default[i - (IPH5526_NOVRAM_SIZE - 4)];
}
}
iph5526_nr_checksum(fi);
}
}
/*******************************************************************
*
* Local routine: iph5526_nr_get
* Purpose: read a single word of NOVRAM
* Description:
*
* read the 16 bits that make up a word addr of the novram.
* The 16 bits of data that are read are returned as the return value
*
*******************************************************************/
static int iph5526_nr_get(struct fc_info *fi, int addr)
{
int i;
int t;
int val = 0;
CFG_OR(NV_MANUAL);
/*
* read the first bit that was clocked with the falling edge of the
* the last command data clock
*/
NVRAM_CMD(NR_READ + addr);
/*
* Now read the rest of the bits, the next bit read is D1, then D2,
* and so on
*/
val = 0;
for (i=0; i<16; i++) {
NVRAM_CLKIN(t);
val <<= 1;
val |= t;
}
NVRAM_CLR_CE;
CFG_OR(NVDI);
CFG_AND(~NV_MANUAL);
return(val);
}
/*******************************************************************
*
* Local routine: iph5526_nr_checksum
* Purpose: calculate novram checksum on fi->n_r.data
* Description:
*
* calculate a checksum for the novram on the image that is
* currently in fi->n_r.data
*
*******************************************************************/
static void iph5526_nr_checksum(struct fc_info *fi)
{
int i;
unsigned short chksum = 0;
for (i=0; i<(IPH5526_NOVRAM_SIZE - 1); i++)
chksum += fi->n_r.data[i];
fi->n_r.data[i] = -chksum;
}
#ifndef IPH5526_SCSI_H
#define IPH5526_SCSI_H
#define IPH5526_CAN_QUEUE 32
#define IPH5526_SCSI_FC { \
.name = "Interphase 5526 Fibre Channel SCSI Adapter", \
.detect = iph5526_detect, \
.release = iph5526_release, \
.info = iph5526_info, \
.queuecommand = iph5526_queuecommand, \
.bios_param = iph5526_biosparam, \
.can_queue = IPH5526_CAN_QUEUE, \
.this_id = -1, \
.sg_tablesize = 255, \
.cmd_per_lun = 8, \
.use_clustering = DISABLE_CLUSTERING, \
.eh_abort_handler = iph5526_abort, \
.eh_device_reset_handler = NULL, \
.eh_bus_reset_handler = NULL, \
.eh_host_reset_handler = NULL, \
}
int iph5526_detect(Scsi_Host_Template *tmpt);
int iph5526_queuecommand(Scsi_Cmnd *Cmnd, void (*done) (Scsi_Cmnd *));
int iph5526_release(struct Scsi_Host *host);
int iph5526_abort(Scsi_Cmnd *Cmnd);
const char *iph5526_info(struct Scsi_Host *host);
int iph5526_biosparam(struct Scsi_Disk * disk, struct block_device *n, int ip[]);
#endif
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