Commit 8e5db3dc authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/davem/sparc-2.5

into home.osdl.org:/home/torvalds/v2.5/linux
parents a6ac2f91 a2b36723
......@@ -213,7 +213,7 @@ AES algorithm contributors:
Kyle McMartin
Adam J. Richter
CAST5 algorithm contributors:
CAST5/CAST6 algorithm contributors:
Kartikey Mahendra Bhatt (original developers unknown, FSF copyright).
Generic scatterwalk code by Adam J. Richter <adam@yggdrasil.com>
......
......@@ -230,8 +230,8 @@ static void change_speed (unsigned int index)
freqs.cpu = 0;
cfid = fidvidstatus.bits.CFID;
rdmsrl (MSR_K7_FID_VID_STATUS, fidvidstatus.val);
cfid = fidvidstatus.bits.CFID;
freqs.old = fsb * fid_codes[cfid] * 100;
freqs.new = powernow_table[index].frequency;
......
......@@ -227,8 +227,6 @@ of_platform_device_create(struct device_node *np, const char *bus_id)
dev->dev.parent = NULL;
dev->dev.bus = &of_platform_bus_type;
/* XXX Make something better here ? */
snprintf(dev->dev.name, DEVICE_NAME_SIZE, "Platform device %s", np->name);
reg = (u32 *)get_property(np, "reg", NULL);
strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE);
......
......@@ -133,6 +133,13 @@ config CRYPTO_CAST5
The CAST5 encryption algorithm (synonymous with CAST-128) is
described in RFC2144.
config CRYPTO_CAST6
tristate "CAST6 (CAST-256) cipher algorithm"
depends on CRYPTO
help
The CAST6 encryption algorithm (synonymous with CAST-256) is
described in RFC2612.
config CRYPTO_DEFLATE
tristate "Deflate compression algorithm"
depends on CRYPTO
......
......@@ -21,6 +21,7 @@ obj-$(CONFIG_CRYPTO_TWOFISH) += twofish.o
obj-$(CONFIG_CRYPTO_SERPENT) += serpent.o
obj-$(CONFIG_CRYPTO_AES) += aes.o
obj-$(CONFIG_CRYPTO_CAST5) += cast5.o
obj-$(CONFIG_CRYPTO_CAST6) += cast6.o
obj-$(CONFIG_CRYPTO_DEFLATE) += deflate.o
obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o
This diff is collapsed.
......@@ -48,8 +48,8 @@ static char *tvmem;
static char *check[] = {
"des", "md5", "des3_ede", "rot13", "sha1", "sha256", "blowfish",
"twofish", "serpent", "sha384", "sha512", "md4", "aes", "deflate",
NULL
"twofish", "serpent", "sha384", "sha512", "md4", "aes", "cast6",
"deflate", NULL
};
static void
......@@ -2087,6 +2087,105 @@ test_serpent(void)
crypto_free_tfm(tfm);
}
static void
test_cast6(void)
{
unsigned int ret, i, tsize;
u8 *p, *q, *key;
struct crypto_tfm *tfm;
struct cast6_tv *cast_tv;
struct scatterlist sg[1];
printk("\ntesting cast6 encryption\n");
tfm = crypto_alloc_tfm("cast6", 0);
if (tfm == NULL) {
printk("failed to load transform for cast6 (default ecb)\n");
return;
}
tsize = sizeof (cast6_enc_tv_template);
if (tsize > TVMEMSIZE) {
printk("template (%u) too big for tvmem (%u)\n", tsize,
TVMEMSIZE);
return;
}
memcpy(tvmem, cast6_enc_tv_template, tsize);
cast_tv = (void *) tvmem;
for (i = 0; i < CAST6_ENC_TEST_VECTORS; i++) {
printk("test %u (%d bit key):\n", i + 1, cast_tv[i].keylen * 8);
key = cast_tv[i].key;
ret = crypto_cipher_setkey(tfm, key, cast_tv[i].keylen);
if (ret) {
printk("setkey() failed flags=%x\n", tfm->crt_flags);
if (!cast_tv[i].fail)
goto out;
}
p = cast_tv[i].plaintext;
sg[0].page = virt_to_page(p);
sg[0].offset = ((long) p & ~PAGE_MASK);
sg[0].length = sizeof(cast_tv[i].plaintext);
ret = crypto_cipher_encrypt(tfm, sg, sg, sg[0].length);
if (ret) {
printk("encrypt() failed flags=%x\n", tfm->crt_flags);
goto out;
}
q = kmap(sg[0].page) + sg[0].offset;
hexdump(q, sizeof(cast_tv[i].result));
printk("%s\n", memcmp(q, cast_tv[i].result,
sizeof(cast_tv[i].result)) ? "fail" : "pass");
}
printk("\ntesting cast6 decryption\n");
tsize = sizeof (cast6_dec_tv_template);
if (tsize > TVMEMSIZE) {
printk("template (%u) too big for tvmem (%u)\n", tsize,
TVMEMSIZE);
return;
}
memcpy(tvmem, cast6_dec_tv_template, tsize);
cast_tv = (void *) tvmem;
for (i = 0; i < CAST6_DEC_TEST_VECTORS; i++) {
printk("test %u (%d bit key):\n", i + 1, cast_tv[i].keylen * 8);
key = cast_tv[i].key;
ret = crypto_cipher_setkey(tfm, key, cast_tv[i].keylen);
if (ret) {
printk("setkey() failed flags=%x\n", tfm->crt_flags);
if (!cast_tv[i].fail)
goto out;
}
p = cast_tv[i].plaintext;
sg[0].page = virt_to_page(p);
sg[0].offset = ((long) p & ~PAGE_MASK);
sg[0].length = sizeof(cast_tv[i].plaintext);
ret = crypto_cipher_decrypt(tfm, sg, sg, sg[0].length);
if (ret) {
printk("decrypt() failed flags=%x\n", tfm->crt_flags);
goto out;
}
q = kmap(sg[0].page) + sg[0].offset;
hexdump(q, sizeof(cast_tv[i].result));
printk("%s\n", memcmp(q, cast_tv[i].result,
sizeof(cast_tv[i].result)) ? "fail" : "pass");
}
out:
crypto_free_tfm(tfm);
}
void
test_aes(void)
{
......@@ -2396,11 +2495,13 @@ do_test(void)
test_blowfish();
test_twofish();
test_serpent();
test_cast6();
test_aes();
test_sha384();
test_sha512();
test_deflate();
test_cast5();
test_cast6();
#ifdef CONFIG_CRYPTO_HMAC
test_hmac_md5();
test_hmac_sha1();
......@@ -2464,6 +2565,10 @@ do_test(void)
test_cast5();
break;
case 15:
test_cast6();
break;
#ifdef CONFIG_CRYPTO_HMAC
case 100:
test_hmac_md5();
......
......@@ -1589,6 +1589,93 @@ struct serpent_tv serpent_dec_tv_template[] =
}
};
/* Cast6 test vectors from RFC 2612 */
#define CAST6_ENC_TEST_VECTORS 3
#define CAST6_DEC_TEST_VECTORS 3
struct cast6_tv {
unsigned keylen;
unsigned fail;
u8 key[32];
u8 plaintext[16];
u8 result[16];
};
struct cast6_tv cast6_enc_tv_template[] =
{
{
16,
0,
{ 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c,
0x0a, 0xf7, 0x56, 0x47, 0xf2, 0x9f, 0x61, 0x5d },
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
{ 0xc8, 0x42, 0xa0, 0x89, 0x72, 0xb4, 0x3d, 0x20,
0x83, 0x6c, 0x91, 0xd1, 0xb7, 0x53, 0x0f, 0x6b },
},
{
24,
0,
{ 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c,
0xbe, 0xd0, 0xac, 0x83, 0x94, 0x0a, 0xc2, 0x98,
0xba, 0xc7, 0x7a, 0x77, 0x17, 0x94, 0x28, 0x63 },
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
{ 0x1b, 0x38, 0x6c, 0x02, 0x10, 0xdc, 0xad, 0xcb,
0xdd, 0x0e, 0x41, 0xaa, 0x08, 0xa7, 0xa7, 0xe8 },
},
{
32,
0,
{ 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c,
0xbe, 0xd0, 0xac, 0x83, 0x94, 0x0a, 0xc2, 0x98,
0x8d, 0x7c, 0x47, 0xce, 0x26, 0x49, 0x08, 0x46,
0x1c, 0xc1, 0xb5, 0x13, 0x7a, 0xe6, 0xb6, 0x04 },
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
{ 0x4f, 0x6a, 0x20, 0x38, 0x28, 0x68, 0x97, 0xb9,
0xc9, 0x87, 0x01, 0x36, 0x55, 0x33, 0x17, 0xfa },
}
};
struct cast6_tv cast6_dec_tv_template[] =
{
{
16,
0,
{ 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c,
0x0a, 0xf7, 0x56, 0x47, 0xf2, 0x9f, 0x61, 0x5d },
{ 0xc8, 0x42, 0xa0, 0x89, 0x72, 0xb4, 0x3d, 0x20,
0x83, 0x6c, 0x91, 0xd1, 0xb7, 0x53, 0x0f, 0x6b },
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
},
{
24,
0,
{ 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c,
0xbe, 0xd0, 0xac, 0x83, 0x94, 0x0a, 0xc2, 0x98,
0xba, 0xc7, 0x7a, 0x77, 0x17, 0x94, 0x28, 0x63 },
{ 0x1b, 0x38, 0x6c, 0x02, 0x10, 0xdc, 0xad, 0xcb,
0xdd, 0x0e, 0x41, 0xaa, 0x08, 0xa7, 0xa7, 0xe8 },
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
},
{
32,
0,
{ 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c,
0xbe, 0xd0, 0xac, 0x83, 0x94, 0x0a, 0xc2, 0x98,
0x8d, 0x7c, 0x47, 0xce, 0x26, 0x49, 0x08, 0x46,
0x1c, 0xc1, 0xb5, 0x13, 0x7a, 0xe6, 0xb6, 0x04 },
{ 0x4f, 0x6a, 0x20, 0x38, 0x28, 0x68, 0x97, 0xb9,
0xc9, 0x87, 0x01, 0x36, 0x55, 0x33, 0x17, 0xfa },
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
}
};
/*
* AES test vectors.
*/
......
......@@ -460,21 +460,6 @@ static void nodemgr_remove_node_uds(struct node_entry *ne)
}
static void nodemgr_update_ud_names(struct host_info *hi, struct node_entry *ne)
{
struct list_head *lh;
list_for_each(lh, &ne->device.children) {
struct unit_directory *ud;
ud = container_of(list_to_dev(lh), struct unit_directory, device);
snprintf(ud->device.name, DEVICE_NAME_SIZE,
"IEEE-1394 unit directory " NODE_BUS_FMT "-%u",
NODE_BUS_ARGS(hi->host, ne->nodeid), ud->id);
}
}
static void nodemgr_remove_ne(struct node_entry *ne)
{
struct device *dev = &ne->device;
......@@ -720,9 +705,6 @@ static struct node_entry *nodemgr_create_node(octlet_t guid, quadlet_t busoption
ne->device.parent = &host->device;
snprintf(ne->device.bus_id, BUS_ID_SIZE, "%016Lx",
(unsigned long long)(ne->guid));
snprintf(ne->device.name, DEVICE_NAME_SIZE,
"IEEE-1394 device " NODE_BUS_FMT,
NODE_BUS_ARGS(host, ne->nodeid));
device_register(&ne->device);
......@@ -732,8 +714,6 @@ static struct node_entry *nodemgr_create_node(octlet_t guid, quadlet_t busoption
nodemgr_process_config_rom (hi, ne, busoptions);
nodemgr_update_ud_names(hi, ne);
HPSB_DEBUG("%s added: ID:BUS[" NODE_BUS_FMT "] GUID[%016Lx]",
(host->node_id == nodeid) ? "Host" : "Node",
NODE_BUS_ARGS(host, nodeid), (unsigned long long)guid);
......@@ -1312,18 +1292,11 @@ static void nodemgr_update_node(struct node_entry *ne, quadlet_t busoptions,
struct host_info *hi, nodeid_t nodeid,
unsigned int generation)
{
int update_ud_names = 0;
if (ne->nodeid != nodeid) {
snprintf(ne->device.name, DEVICE_NAME_SIZE,
"IEEE-1394 device " NODE_BUS_FMT,
NODE_BUS_ARGS(hi->host, ne->nodeid));
HPSB_DEBUG("Node changed: " NODE_BUS_FMT " -> " NODE_BUS_FMT,
NODE_BUS_ARGS(ne->host, ne->nodeid),
NODE_BUS_ARGS(ne->host, nodeid));
ne->nodeid = nodeid;
update_ud_names++;
}
if (ne->busopt.generation != ((busoptions >> 4) & 0xf)) {
......@@ -1333,13 +1306,8 @@ static void nodemgr_update_node(struct node_entry *ne, quadlet_t busoptions,
/* This will re-register our unitdir's */
nodemgr_process_config_rom (hi, ne, busoptions);
update_ud_names++;
}
if (update_ud_names)
nodemgr_update_ud_names(hi, ne);
/* Since that's done, we can declare this record current */
ne->generation = generation;
......@@ -1772,8 +1740,6 @@ static void nodemgr_add_host(struct hpsb_host *host)
sizeof(host->device));
host->device.parent = &host->pdev->dev;
snprintf(host->device.bus_id, BUS_ID_SIZE, "fw-host%d", host->id);
snprintf(host->device.name, DEVICE_NAME_SIZE, "IEEE-1394 Host %s-%d",
host->driver->name, host->id);
sprintf(hi->daemon_name, "knodemgrd_%d", host->id);
......
......@@ -144,9 +144,7 @@ static struct i2c_adapter bit_ops = {
.id = 0xAA, //FIXME: probably we should get an id in i2c-id.h
.client_register = bit_reg,
.client_unregister = bit_unreg,
.dev = {
.name = "PCILynx I2C",
},
.name = "PCILynx I2C",
};
......
......@@ -141,9 +141,6 @@ macio_add_one_device(struct macio_chip *chip, struct device *parent,
dev->ofdev.dev.parent = parent;
dev->ofdev.dev.bus = &macio_bus_type;
/* XXX Make something better here ? */
snprintf(dev->ofdev.dev.name, DEVICE_NAME_SIZE, "MacIO device %s", np->name);
/* MacIO itself has a different reg, we use it's PCI base */
if (np == chip->of_node) {
sprintf(dev->ofdev.dev.bus_id, "%1d.%08lx:%.8s", chip->lbus.index,
......
......@@ -39,9 +39,6 @@
#include <net/irda/wrapper.h>
#include <net/irda/irda_device.h>
static hashbin_t *irtty = NULL;
static struct tty_ldisc irda_ldisc;
static int qos_mtt_bits = 0x03; /* 5 ms or more */
/* Network device fuction prototypes */
......@@ -55,7 +52,8 @@ static struct net_device_stats *irtty_net_get_stats(struct net_device *dev);
/* Line discipline function prototypes */
static int irtty_open(struct tty_struct *tty);
static void irtty_close(struct tty_struct *tty);
static int irtty_ioctl(struct tty_struct *, void *, int, void *);
static int irtty_ioctl(struct tty_struct *, struct file *,
unsigned int, unsigned long);
static int irtty_receive_room(struct tty_struct *tty);
static void irtty_write_wakeup(struct tty_struct *tty);
static void irtty_receive_buf(struct tty_struct *, const unsigned char *,
......@@ -69,37 +67,22 @@ static int irtty_raw_read(struct net_device *dev, __u8 *buf, int len);
static int irtty_set_mode(struct net_device *dev, int mode);
static int irtty_change_speed(struct irda_task *task);
char *driver_name = "irtty";
static struct tty_ldisc irda_ldisc = {
.owner = THIS_MODULE,
.magic = TTY_LDISC_MAGIC,
.name = "irda",
.open = irtty_open,
.close = irtty_close,
.ioctl = irtty_ioctl,
.receive_buf = irtty_receive_buf,
.receive_room = irtty_receive_room,
.write_wakeup = irtty_write_wakeup,
};
int __init irtty_init(void)
{
int status;
/* Probably no need to lock here because all operations done in
* open()/close() which are already safe - Jean II */
irtty = hashbin_new( HB_NOLOCK);
if ( irtty == NULL) {
printk( KERN_WARNING "IrDA: Can't allocate irtty hashbin!\n");
return -ENOMEM;
}
/* Fill in our line protocol discipline, and register it */
memset(&irda_ldisc, 0, sizeof( irda_ldisc));
irda_ldisc.magic = TTY_LDISC_MAGIC;
irda_ldisc.name = "irda";
irda_ldisc.flags = 0;
irda_ldisc.open = irtty_open;
irda_ldisc.close = irtty_close;
irda_ldisc.read = NULL;
irda_ldisc.write = NULL;
irda_ldisc.ioctl = (int (*)(struct tty_struct *, struct file *,
unsigned int, unsigned long)) irtty_ioctl;
irda_ldisc.poll = NULL;
irda_ldisc.receive_buf = irtty_receive_buf;
irda_ldisc.receive_room = irtty_receive_room;
irda_ldisc.write_wakeup = irtty_write_wakeup;
if ((status = tty_register_ldisc(N_IRDA, &irda_ldisc)) != 0) {
ERROR("IrDA: can't register line discipline (err = %d)\n",
status);
......@@ -124,12 +107,6 @@ static void __exit irtty_cleanup(void)
__FUNCTION__, ret);
}
/*
* The TTY should care of deallocating the instances by using the
* callback to irtty_close(), therefore we do give any deallocation
* function to hashbin_destroy().
*/
hashbin_delete(irtty, NULL);
}
/*
......@@ -172,8 +149,6 @@ static int irtty_open(struct tty_struct *tty)
/* Give self a name */
strcpy(name, tty->name);
hashbin_insert(irtty, (irda_queue_t *) self, (int) self, NULL);
if (tty->driver->flush_buffer)
tty->driver->flush_buffer(tty);
......@@ -251,8 +226,6 @@ static int irtty_open(struct tty_struct *tty)
MESSAGE("IrDA: Registered device %s\n", dev->name);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -285,8 +258,6 @@ static void irtty_close(struct tty_struct *tty)
if (self->netdev)
unregister_netdev(self->netdev);
self = hashbin_remove(irtty, (int) self, NULL);
/* Protect access to self->task and self->?x_buff - Jean II */
spin_lock_irqsave(&self->lock, flags);
......@@ -305,8 +276,6 @@ static void irtty_close(struct tty_struct *tty)
spin_unlock_irqrestore(&self->lock, flags);
kfree(self);
MOD_DEC_USE_COUNT;
}
/*
......@@ -487,7 +456,8 @@ static int irtty_change_speed(struct irda_task *task)
* The Swiss army knife of system calls :-)
*
*/
static int irtty_ioctl(struct tty_struct *tty, void *file, int cmd, void *arg)
static int irtty_ioctl(struct tty_struct *tty, struct file *file,
unsigned int cmd, unsigned long arg)
{
dongle_t *dongle;
struct irtty_info info;
......@@ -511,8 +481,7 @@ static int irtty_ioctl(struct tty_struct *tty, void *file, int cmd, void *arg)
case TCGETS:
case TCGETA:
/* Unsure about locking here, to check - Jean II */
return n_tty_ioctl(tty, (struct file *) file, cmd,
(unsigned long) arg);
return n_tty_ioctl(tty, (struct file *) file, cmd, arg);
break;
case IRTTY_IOCTDONGLE:
/* Initialize dongle */
......@@ -543,7 +512,7 @@ static int irtty_ioctl(struct tty_struct *tty, void *file, int cmd, void *arg)
memset(&info, 0, sizeof(struct irtty_info));
strncpy(info.name, self->netdev->name, 5);
if (copy_to_user(arg, &info, sizeof(struct irtty_info)))
if (copy_to_user((void *) arg, &info, sizeof(struct irtty_info)))
return -EFAULT;
break;
default:
......@@ -938,7 +907,6 @@ static int irtty_net_open(struct net_device *dev)
{
struct irtty_cb *self = (struct irtty_cb *) dev->priv;
struct tty_struct *tty = self->tty;
char hwname[16];
ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRTTY_MAGIC, return -1;);
......@@ -951,16 +919,11 @@ static int irtty_net_open(struct net_device *dev)
/* Make sure we can receive more data */
irtty_stop_receiver(self, FALSE);
/* Give self a hardware name */
sprintf(hwname, "%s", tty->name);
/*
* Open new IrLAP layer instance, now that everything should be
* initialized properly
*/
self->irlap = irlap_open(dev, &self->qos, hwname);
MOD_INC_USE_COUNT;
self->irlap = irlap_open(dev, &self->qos, tty->name);
return 0;
}
......@@ -983,8 +946,6 @@ static int irtty_net_close(struct net_device *dev)
irlap_close(self->irlap);
self->irlap = NULL;
MOD_DEC_USE_COUNT;
return 0;
}
......
......@@ -876,7 +876,6 @@ static int tok_open(struct net_device *dev)
if (i==0) break;
if (ti->open_status == OPEN && ti->sap_status==OPEN) {
netif_start_queue(dev);
MOD_INC_USE_COUNT;
DPRINTK("Adapter is up and running\n");
return 0;
}
......@@ -1041,7 +1040,6 @@ static int tok_close(struct net_device *dev)
netif_stop_queue(dev);
DPRINTK("Adapter is closed.\n");
MOD_DEC_USE_COUNT;
return 0;
}
......@@ -1918,7 +1916,7 @@ MODULE_PARM(io, "1-" __MODULE_STRING(IBMTR_MAX_ADAPTERS) "i");
MODULE_PARM(irq, "1-" __MODULE_STRING(IBMTR_MAX_ADAPTERS) "i");
MODULE_PARM(mem, "1-" __MODULE_STRING(IBMTR_MAX_ADAPTERS) "i");
int init_module(void)
static int __init ibmtr_init(void)
{
int i;
int count=0;
......@@ -1948,21 +1946,24 @@ int init_module(void)
if (count) return 0;
printk("ibmtr: register_netdev() returned non-zero.\n");
return -EIO;
} /*init_module */
}
module_init(ibmtr_init);
void cleanup_module(void)
static void __exit ibmtr_cleanup(void)
{
int i,j;
int i;
for (i = 0; i < IBMTR_MAX_ADAPTERS; i++){
if (!dev_ibmtr[i])
continue;
if (dev_ibmtr[i]->base_addr) {
outb(0,dev_ibmtr[i]->base_addr+ADAPTRESET);
for(j=jiffies+TR_RST_TIME;
time_before_eq(jiffies,j);) ;
schedule_timeout(TR_RST_TIME); /* wait 50ms */
outb(0,dev_ibmtr[i]->base_addr+ADAPTRESETREL);
}
unregister_netdev(dev_ibmtr[i]);
free_irq(dev_ibmtr[i]->irq, dev_ibmtr[i]);
release_region(dev_ibmtr[i]->base_addr, IBMTR_IO_EXTENT);
......@@ -1978,4 +1979,5 @@ void cleanup_module(void)
dev_ibmtr[i] = NULL;
}
}
#endif /* MODULE */
module_exit(ibmtr_cleanup);
#endif
......@@ -948,7 +948,6 @@ static Scsi_Host_Template idescsi_template = {
};
static struct device idescsi_primary = {
.name = "Ide-scsi Parent",
.bus_id = "ide-scsi",
};
static struct bus_type idescsi_emu_bus = {
......
......@@ -463,9 +463,6 @@ struct net_device
/* class/net/name entry */
struct class_device class_dev;
/* statistics sub-directory */
struct kobject stats_kobj;
};
#define SET_MODULE_OWNER(dev) do { } while (0)
......
......@@ -209,9 +209,29 @@
#define PCI_DEVICE_ID_ATI_215_LR 0x4c52
#define PCI_DEVICE_ID_ATI_215_LS 0x4c53
#define PCI_DEVICE_ID_ATI_264_LT 0x4c54
/* Radeon M4 */
#define PCI_DEVICE_ID_ATI_RADEON_LE 0x4d45
#define PCI_DEVICE_ID_ATI_RADEON_LF 0x4d46
/* Mach64 VT */
#define PCI_DEVICE_ID_ATI_264VT 0x5654
#define PCI_DEVICE_ID_ATI_264VU 0x5655
#define PCI_DEVICE_ID_ATI_264VV 0x5656
/* Rage128 GL */
#define PCI_DEVICE_ID_ATI_RAGE128_RE 0x5245
#define PCI_DEVICE_ID_ATI_RAGE128_RF 0x5246
#define PCI_DEVICE_ID_ATI_RAGE128_RG 0x534b
#define PCI_DEVICE_ID_ATI_RAGE128_RH 0x534c
#define PCI_DEVICE_ID_ATI_RAGE128_RI 0x534d
/* Rage128 VR */
#define PCI_DEVICE_ID_ATI_RAGE128_RK 0x524b
#define PCI_DEVICE_ID_ATI_RAGE128_RL 0x524c
#define PCI_DEVICE_ID_ATI_RAGE128_RM 0x5345
#define PCI_DEVICE_ID_ATI_RAGE128_RN 0x5346
#define PCI_DEVICE_ID_ATI_RAGE128_RO 0x5347
/* Rage128 M3 */
#define PCI_DEVICE_ID_ATI_RAGE128_LE 0x4c45
#define PCI_DEVICE_ID_ATI_RAGE128_LF 0x4c46
/* Rage128 Pro Ultra */
#define PCI_DEVICE_ID_ATI_RAGE128_U1 0x5446
#define PCI_DEVICE_ID_ATI_RAGE128_U2 0x544C
#define PCI_DEVICE_ID_ATI_RAGE128_U3 0x5452
/* Rage128 Pro GL */
#define PCI_DEVICE_ID_ATI_Rage128_PA 0x5041
#define PCI_DEVICE_ID_ATI_Rage128_PB 0x5042
......@@ -239,75 +259,69 @@
#define PCI_DEVICE_ID_ATI_RAGE128_PV 0x5056
#define PCI_DEVICE_ID_ATI_RAGE128_PW 0x5057
#define PCI_DEVICE_ID_ATI_RAGE128_PX 0x5058
/* Rage128 M4 */
#define PCI_DEVICE_ID_ATI_RADEON_LE 0x4d45
#define PCI_DEVICE_ID_ATI_RADEON_LF 0x4d46
/* Radeon R100 */
#define PCI_DEVICE_ID_ATI_RADEON_QD 0x5144
#define PCI_DEVICE_ID_ATI_RADEON_QE 0x5145
#define PCI_DEVICE_ID_ATI_RADEON_QF 0x5146
#define PCI_DEVICE_ID_ATI_RADEON_QG 0x5147
/* Radeon RV100 (VE) */
#define PCI_DEVICE_ID_ATI_RADEON_QY 0x5159
#define PCI_DEVICE_ID_ATI_RADEON_QZ 0x515a
/* Radeon R200 (8500) */
#define PCI_DEVICE_ID_ATI_RADEON_QL 0x514c
#define PCI_DEVICE_ID_ATI_RADEON_QN 0x514e
#define PCI_DEVICE_ID_ATI_RADEON_QO 0x514f
#define PCI_DEVICE_ID_ATI_RADEON_Ql 0x516c
#define PCI_DEVICE_ID_ATI_RADEON_BB 0x4242
/* Radeon R200 (9100) */
#define PCI_DEVICE_ID_ATI_RADEON_QM 0x514d
/* Radeon RV200 (7500) */
#define PCI_DEVICE_ID_ATI_RADEON_QW 0x5157
#define PCI_DEVICE_ID_ATI_RADEON_QX 0x5158
/* Radeon NV-100 */
#define PCI_DEVICE_ID_ATI_RADEON_N1 0x5159
#define PCI_DEVICE_ID_ATI_RADEON_N2 0x515a
/* Radeon RV100 (VE) */
#define PCI_DEVICE_ID_ATI_RADEON_QY 0x5159
#define PCI_DEVICE_ID_ATI_RADEON_QZ 0x515a
/* Radeon RV250 (9000) */
#define PCI_DEVICE_ID_ATI_RADEON_Id 0x4964
#define PCI_DEVICE_ID_ATI_RADEON_Ie 0x4965
#define PCI_DEVICE_ID_ATI_RADEON_If 0x4966
#define PCI_DEVICE_ID_ATI_RADEON_Ig 0x4967
#define PCI_DEVICE_ID_ATI_RADEON_QM 0x514d
/* Radeon RV280 (9200) */
#define PCI_DEVICE_ID_ATI_RADEON_Y_ 0x5960
/* Radeon R300 (9500) */
#define PCI_DEVICE_ID_ATI_RADEON_AD 0x4144
/* Radeon R300 (9700) */
#define PCI_DEVICE_ID_ATI_RADEON_ND 0x4e44
#define PCI_DEVICE_ID_ATI_RADEON_NE 0x4e45
#define PCI_DEVICE_ID_ATI_RADEON_NF 0x4e46
#define PCI_DEVICE_ID_ATI_RADEON_NG 0x4e47
#define PCI_DEVICE_ID_ATI_RADEON_AE 0x4145
#define PCI_DEVICE_ID_ATI_RADEON_AF 0x4146
/* Radeon R350 (9800) */
#define PCI_DEVICE_ID_ATI_RADEON_NH 0x4e48
#define PCI_DEVICE_ID_ATI_RADEON_NI 0x4e49
/* Radeon RV350 (9600) */
#define PCI_DEVICE_ID_ATI_RADEON_AP 0x4150
#define PCI_DEVICE_ID_ATI_RADEON_AR 0x4152
/* Radeon M6 */
#define PCI_DEVICE_ID_ATI_RADEON_LY 0x4c59
#define PCI_DEVICE_ID_ATI_RADEON_LZ 0x4c5a
/* Radeon M7 */
#define PCI_DEVICE_ID_ATI_RADEON_LW 0x4c57
#define PCI_DEVICE_ID_ATI_RADEON_LX 0x4c58
#define PCI_DEVICE_ID_ATI_RADEON_Ld 0x4964
#define PCI_DEVICE_ID_ATI_RADEON_Le 0x4965
#define PCI_DEVICE_ID_ATI_RADEON_Lf 0x4966
#define PCI_DEVICE_ID_ATI_RADEON_Lg 0x4967
/* Radeon M9 */
#define PCI_DEVICE_ID_ATI_RADEON_Ld 0x4c64
#define PCI_DEVICE_ID_ATI_RADEON_Le 0x4c65
#define PCI_DEVICE_ID_ATI_RADEON_Lf 0x4c66
#define PCI_DEVICE_ID_ATI_RADEON_Lg 0x4c67
/* Radeon */
#define PCI_DEVICE_ID_ATI_RADEON_RA 0x5144
#define PCI_DEVICE_ID_ATI_RADEON_RB 0x5145
#define PCI_DEVICE_ID_ATI_RADEON_RC 0x5146
#define PCI_DEVICE_ID_ATI_RADEON_RD 0x5147
/* Rage128 GL */
#define PCI_DEVICE_ID_ATI_RAGE128_RE 0x5245
#define PCI_DEVICE_ID_ATI_RAGE128_RF 0x5246
#define PCI_DEVICE_ID_ATI_RAGE128_RG 0x534b
#define PCI_DEVICE_ID_ATI_RAGE128_RH 0x534c
#define PCI_DEVICE_ID_ATI_RAGE128_RI 0x534d
/* Rage128 VR */
#define PCI_DEVICE_ID_ATI_RAGE128_RK 0x524b
#define PCI_DEVICE_ID_ATI_RAGE128_RL 0x524c
#define PCI_DEVICE_ID_ATI_RAGE128_RM 0x5345
#define PCI_DEVICE_ID_ATI_RAGE128_RN 0x5346
#define PCI_DEVICE_ID_ATI_RAGE128_RO 0x5347
/* Rage128 M3 */
#define PCI_DEVICE_ID_ATI_RAGE128_LE 0x4c45
#define PCI_DEVICE_ID_ATI_RAGE128_LF 0x4c46
/* Rage128 Pro Ultra */
#define PCI_DEVICE_ID_ATI_RAGE128_U1 0x5446
#define PCI_DEVICE_ID_ATI_RAGE128_U2 0x544C
#define PCI_DEVICE_ID_ATI_RAGE128_U3 0x5452
/* Mach64 VT */
#define PCI_DEVICE_ID_ATI_264VT 0x5654
#define PCI_DEVICE_ID_ATI_264VU 0x5655
#define PCI_DEVICE_ID_ATI_264VV 0x5656
/* RadeonIGP */
#define PCI_DEVICE_ID_ATI_RS100 0xcab0
#define PCI_DEVICE_ID_ATI_RS200 0xcab2
......
......@@ -284,7 +284,10 @@ struct sadb_x_nat_t_port {
#define SADB_X_EALG_BLOWFISHCBC 7
#define SADB_EALG_NULL 11
#define SADB_X_EALG_AESCBC 12
#define SADB_EALG_MAX 12
#define SADB_EALG_MAX 253 /* last EALG */
/* private allocations should use 249-255 (RFC2407) */
#define SADB_X_EALG_SERPENTCBC 252 /* draft-ietf-ipsec-ciph-aes-cbc-00 */
#define SADB_X_EALG_TWOFISHCBC 253 /* draft-ietf-ipsec-ciph-aes-cbc-00 */
/* Compression algorithms */
#define SADB_X_CALG_NONE 0
......
......@@ -209,7 +209,7 @@ void irda_device_cleanup(void);
* We declare them here to avoid the driver pulling a whole bunch stack
* headers they don't really need - Jean II */
struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos,
char * hw_name);
const char *hw_name);
void irlap_close(struct irlap_cb *self);
/* Interface to be uses by IrLAP */
......@@ -222,7 +222,7 @@ int irda_device_txqueue_empty(struct net_device *dev);
int irda_device_set_raw_mode(struct net_device* self, int status);
int irda_device_set_dtr_rts(struct net_device *dev, int dtr, int rts);
int irda_device_change_speed(struct net_device *dev, __u32 speed);
int irda_device_setup(struct net_device *dev);
void irda_device_setup(struct net_device *dev);
/* Dongle interface */
void irda_device_unregister_dongle(struct dongle_reg *dongle);
......
......@@ -208,8 +208,6 @@ struct irlap_cb {
int next_bofs; /* Negotiated extra BOFs after next frame */
};
extern hashbin_t *irlap;
/*
* Function prototypes
*/
......@@ -217,7 +215,7 @@ int irlap_init(void);
void irlap_cleanup(void);
struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos,
char * hw_name);
const char *hw_name);
void irlap_close(struct irlap_cb *self);
void irlap_connect_request(struct irlap_cb *self, __u32 daddr,
......
......@@ -31,7 +31,6 @@
#include <linux/netdevice.h>
#include <net/irda/irda.h>
#include <net/irda/irqueue.h>
#include <net/irda/irda_device.h>
/* Used by ioctl */
......@@ -45,7 +44,6 @@ struct irtty_info {
#define IRTTY_IOC_MAXNR 2
struct irtty_cb {
irda_queue_t q; /* Must be first */
magic_t magic;
struct net_device *netdev; /* Yes! we are some kind of netdevice */
......
......@@ -187,7 +187,6 @@ int netdev_fastroute_obstacles;
extern int netdev_sysfs_init(void);
extern int netdev_register_sysfs(struct net_device *);
extern void netdev_unregister_sysfs(struct net_device *);
/*******************************************************************************
......@@ -2343,14 +2342,18 @@ static int dev_ifsioc(struct ifreq *ifr, unsigned int cmd)
case SIOCSIFNAME:
if (dev->flags & IFF_UP)
return -EBUSY;
ifr->ifr_newname[IFNAMSIZ-1] = '\0';
if (__dev_get_by_name(ifr->ifr_newname))
return -EEXIST;
memcpy(dev->name, ifr->ifr_newname, IFNAMSIZ);
dev->name[IFNAMSIZ - 1] = 0;
strlcpy(dev->class_dev.class_id, dev->name, BUS_ID_SIZE);
notifier_call_chain(&netdev_chain,
NETDEV_CHANGENAME, dev);
return 0;
err = class_device_rename(&dev->class_dev,
ifr->ifr_newname);
if (!err) {
strlcpy(dev->name, ifr->ifr_newname, IFNAMSIZ);
notifier_call_chain(&netdev_chain,
NETDEV_CHANGENAME, dev);
}
return err;
/*
* Unknown or private ioctl
......@@ -2706,38 +2709,17 @@ int register_netdevice(struct net_device *dev)
goto out;
}
/**
* netdev_finish_unregister - complete unregistration
* @dev: device
/*
* netdev_wait_allrefs - wait until all references are gone.
*
* This is called when unregistering network devices.
*
* Destroy and free a dead device. A value of zero is returned on
* success.
* Any protocol or device that holds a reference should register
* for netdevice notification, and cleanup and put back the
* reference if they receive an UNREGISTER event.
* We can get stuck here if buggy protocols don't correctly
* call dev_put.
*/
static int netdev_finish_unregister(struct net_device *dev)
{
BUG_TRAP(!dev->ip_ptr);
BUG_TRAP(!dev->ip6_ptr);
BUG_TRAP(!dev->dn_ptr);
if (dev->reg_state != NETREG_UNREGISTERED) {
printk(KERN_ERR "Freeing alive device %p, %s\n",
dev, dev->name);
return 0;
}
#ifdef NET_REFCNT_DEBUG
printk(KERN_DEBUG "netdev_finish_unregister: %s%s.\n", dev->name,
(dev->destructor != NULL)?"":", old style");
#endif
/* It must be the very last action, after this 'dev' may point
* to freed up memory.
*/
if (dev->destructor)
dev->destructor(dev);
return 0;
}
static void netdev_wait_allrefs(struct net_device *dev)
{
unsigned long rebroadcast_time, warning_time;
......@@ -2833,13 +2815,23 @@ void netdev_run_todo(void)
break;
case NETREG_UNREGISTERING:
netdev_unregister_sysfs(dev);
class_device_unregister(&dev->class_dev);
dev->reg_state = NETREG_UNREGISTERED;
netdev_wait_allrefs(dev);
/* paranoia */
BUG_ON(atomic_read(&dev->refcnt));
netdev_finish_unregister(dev);
BUG_TRAP(!dev->ip_ptr);
BUG_TRAP(!dev->ip6_ptr);
BUG_TRAP(!dev->dn_ptr);
/* It must be the very last action,
* after this 'dev' may point to freed up memory.
*/
if (dev->destructor)
dev->destructor(dev);
break;
default:
......
This diff is collapsed.
......@@ -1983,10 +1983,11 @@ void __init ip6_route_init(void)
NULL, NULL);
fib6_init();
#ifdef CONFIG_PROC_FS
proc_net_create("ipv6_route", 0, rt6_proc_info);
p = create_proc_entry("rt6_stats", S_IRUGO, proc_net);
p = proc_net_create("ipv6_route", 0, rt6_proc_info);
if (p)
p->proc_fops = &rt6_stats_seq_fops;
p->owner = THIS_MODULE;
proc_net_fops_create("rt6_stats", S_IRUGO, &rt6_stats_seq_fops);
#endif
#ifdef CONFIG_XFRM
xfrm6_init();
......@@ -2000,7 +2001,9 @@ void ip6_route_cleanup(void)
proc_net_remove("ipv6_route");
proc_net_remove("rt6_stats");
#endif
#ifdef CONFIG_XFRM
xfrm6_fini();
#endif
rt6_ifdown(NULL);
fib6_gc_cleanup();
kmem_cache_destroy(ip6_dst_ops.kmem_cachep);
......
......@@ -383,10 +383,8 @@ static void irda_device_destructor(struct net_device *dev)
* This function should be used by low level device drivers in a similar way
* as ether_setup() is used by normal network device drivers
*/
int irda_device_setup(struct net_device *dev)
void irda_device_setup(struct net_device *dev)
{
ASSERT(dev != NULL, return -1;);
dev->hard_header_len = 0;
dev->addr_len = 0;
......@@ -399,7 +397,6 @@ int irda_device_setup(struct net_device *dev)
dev->mtu = 2048;
dev->flags = IFF_NOARP;
return 0;
}
/*
......
......@@ -48,7 +48,7 @@
#include <net/irda/timer.h>
#include <net/irda/qos.h>
hashbin_t *irlap = NULL;
static hashbin_t *irlap = NULL;
int sysctl_slot_timeout = SLOT_TIMEOUT * 1000 / HZ;
/* This is the delay of missed pf period before generating an event
......@@ -110,7 +110,7 @@ void __exit irlap_cleanup(void)
*
*/
struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos,
char * hw_name)
const char *hw_name)
{
struct irlap_cb *self;
......
......@@ -43,7 +43,7 @@ config SCTP_ADLER32
bool "SCTP: Use old checksum (Adler-32)"
depends on IP_SCTP
help
RCF2960 currently specifies the Adler-32 checksum algorithm for SCTP.
RFC2960 currently specifies the Adler-32 checksum algorithm for SCTP.
This has been deprecated and replaced by an algorithm now referred
to as crc32c.
......
......@@ -217,6 +217,40 @@ static struct xfrm_algo_desc ealg_list[] = {
.sadb_alg_maxbits = 256
}
},
{
.name = "serpent",
.uinfo = {
.encr = {
.blockbits = 128,
.defkeybits = 128,
}
},
.desc = {
.sadb_alg_id = SADB_X_EALG_SERPENTCBC,
.sadb_alg_ivlen = 8,
.sadb_alg_minbits = 128,
.sadb_alg_maxbits = 256,
}
},
{
.name = "twofish",
.uinfo = {
.encr = {
.blockbits = 128,
.defkeybits = 128,
}
},
.desc = {
.sadb_alg_id = SADB_X_EALG_TWOFISHCBC,
.sadb_alg_ivlen = 8,
.sadb_alg_minbits = 128,
.sadb_alg_maxbits = 256
}
},
};
static struct xfrm_algo_desc calg_list[] = {
......
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