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: ...@@ -213,7 +213,7 @@ AES algorithm contributors:
Kyle McMartin Kyle McMartin
Adam J. Richter Adam J. Richter
CAST5 algorithm contributors: CAST5/CAST6 algorithm contributors:
Kartikey Mahendra Bhatt (original developers unknown, FSF copyright). Kartikey Mahendra Bhatt (original developers unknown, FSF copyright).
Generic scatterwalk code by Adam J. Richter <adam@yggdrasil.com> Generic scatterwalk code by Adam J. Richter <adam@yggdrasil.com>
......
...@@ -230,8 +230,8 @@ static void change_speed (unsigned int index) ...@@ -230,8 +230,8 @@ static void change_speed (unsigned int index)
freqs.cpu = 0; freqs.cpu = 0;
cfid = fidvidstatus.bits.CFID;
rdmsrl (MSR_K7_FID_VID_STATUS, fidvidstatus.val); rdmsrl (MSR_K7_FID_VID_STATUS, fidvidstatus.val);
cfid = fidvidstatus.bits.CFID;
freqs.old = fsb * fid_codes[cfid] * 100; freqs.old = fsb * fid_codes[cfid] * 100;
freqs.new = powernow_table[index].frequency; freqs.new = powernow_table[index].frequency;
......
...@@ -227,8 +227,6 @@ of_platform_device_create(struct device_node *np, const char *bus_id) ...@@ -227,8 +227,6 @@ of_platform_device_create(struct device_node *np, const char *bus_id)
dev->dev.parent = NULL; dev->dev.parent = NULL;
dev->dev.bus = &of_platform_bus_type; 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); reg = (u32 *)get_property(np, "reg", NULL);
strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE); strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE);
......
...@@ -133,6 +133,13 @@ config CRYPTO_CAST5 ...@@ -133,6 +133,13 @@ config CRYPTO_CAST5
The CAST5 encryption algorithm (synonymous with CAST-128) is The CAST5 encryption algorithm (synonymous with CAST-128) is
described in RFC2144. 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 config CRYPTO_DEFLATE
tristate "Deflate compression algorithm" tristate "Deflate compression algorithm"
depends on CRYPTO depends on CRYPTO
......
...@@ -21,6 +21,7 @@ obj-$(CONFIG_CRYPTO_TWOFISH) += twofish.o ...@@ -21,6 +21,7 @@ obj-$(CONFIG_CRYPTO_TWOFISH) += twofish.o
obj-$(CONFIG_CRYPTO_SERPENT) += serpent.o obj-$(CONFIG_CRYPTO_SERPENT) += serpent.o
obj-$(CONFIG_CRYPTO_AES) += aes.o obj-$(CONFIG_CRYPTO_AES) += aes.o
obj-$(CONFIG_CRYPTO_CAST5) += cast5.o obj-$(CONFIG_CRYPTO_CAST5) += cast5.o
obj-$(CONFIG_CRYPTO_CAST6) += cast6.o
obj-$(CONFIG_CRYPTO_DEFLATE) += deflate.o obj-$(CONFIG_CRYPTO_DEFLATE) += deflate.o
obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o
This diff is collapsed.
...@@ -48,8 +48,8 @@ static char *tvmem; ...@@ -48,8 +48,8 @@ static char *tvmem;
static char *check[] = { static char *check[] = {
"des", "md5", "des3_ede", "rot13", "sha1", "sha256", "blowfish", "des", "md5", "des3_ede", "rot13", "sha1", "sha256", "blowfish",
"twofish", "serpent", "sha384", "sha512", "md4", "aes", "deflate", "twofish", "serpent", "sha384", "sha512", "md4", "aes", "cast6",
NULL "deflate", NULL
}; };
static void static void
...@@ -2087,6 +2087,105 @@ test_serpent(void) ...@@ -2087,6 +2087,105 @@ test_serpent(void)
crypto_free_tfm(tfm); 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 void
test_aes(void) test_aes(void)
{ {
...@@ -2396,11 +2495,13 @@ do_test(void) ...@@ -2396,11 +2495,13 @@ do_test(void)
test_blowfish(); test_blowfish();
test_twofish(); test_twofish();
test_serpent(); test_serpent();
test_cast6();
test_aes(); test_aes();
test_sha384(); test_sha384();
test_sha512(); test_sha512();
test_deflate(); test_deflate();
test_cast5(); test_cast5();
test_cast6();
#ifdef CONFIG_CRYPTO_HMAC #ifdef CONFIG_CRYPTO_HMAC
test_hmac_md5(); test_hmac_md5();
test_hmac_sha1(); test_hmac_sha1();
...@@ -2464,6 +2565,10 @@ do_test(void) ...@@ -2464,6 +2565,10 @@ do_test(void)
test_cast5(); test_cast5();
break; break;
case 15:
test_cast6();
break;
#ifdef CONFIG_CRYPTO_HMAC #ifdef CONFIG_CRYPTO_HMAC
case 100: case 100:
test_hmac_md5(); test_hmac_md5();
......
...@@ -1589,6 +1589,93 @@ struct serpent_tv serpent_dec_tv_template[] = ...@@ -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. * AES test vectors.
*/ */
......
...@@ -460,21 +460,6 @@ static void nodemgr_remove_node_uds(struct node_entry *ne) ...@@ -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) static void nodemgr_remove_ne(struct node_entry *ne)
{ {
struct device *dev = &ne->device; struct device *dev = &ne->device;
...@@ -720,9 +705,6 @@ static struct node_entry *nodemgr_create_node(octlet_t guid, quadlet_t busoption ...@@ -720,9 +705,6 @@ static struct node_entry *nodemgr_create_node(octlet_t guid, quadlet_t busoption
ne->device.parent = &host->device; ne->device.parent = &host->device;
snprintf(ne->device.bus_id, BUS_ID_SIZE, "%016Lx", snprintf(ne->device.bus_id, BUS_ID_SIZE, "%016Lx",
(unsigned long long)(ne->guid)); (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); device_register(&ne->device);
...@@ -732,8 +714,6 @@ static struct node_entry *nodemgr_create_node(octlet_t guid, quadlet_t busoption ...@@ -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_process_config_rom (hi, ne, busoptions);
nodemgr_update_ud_names(hi, ne);
HPSB_DEBUG("%s added: ID:BUS[" NODE_BUS_FMT "] GUID[%016Lx]", HPSB_DEBUG("%s added: ID:BUS[" NODE_BUS_FMT "] GUID[%016Lx]",
(host->node_id == nodeid) ? "Host" : "Node", (host->node_id == nodeid) ? "Host" : "Node",
NODE_BUS_ARGS(host, nodeid), (unsigned long long)guid); 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, ...@@ -1312,18 +1292,11 @@ static void nodemgr_update_node(struct node_entry *ne, quadlet_t busoptions,
struct host_info *hi, nodeid_t nodeid, struct host_info *hi, nodeid_t nodeid,
unsigned int generation) unsigned int generation)
{ {
int update_ud_names = 0;
if (ne->nodeid != nodeid) { 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, HPSB_DEBUG("Node changed: " NODE_BUS_FMT " -> " NODE_BUS_FMT,
NODE_BUS_ARGS(ne->host, ne->nodeid), NODE_BUS_ARGS(ne->host, ne->nodeid),
NODE_BUS_ARGS(ne->host, nodeid)); NODE_BUS_ARGS(ne->host, nodeid));
ne->nodeid = nodeid; ne->nodeid = nodeid;
update_ud_names++;
} }
if (ne->busopt.generation != ((busoptions >> 4) & 0xf)) { if (ne->busopt.generation != ((busoptions >> 4) & 0xf)) {
...@@ -1333,13 +1306,8 @@ static void nodemgr_update_node(struct node_entry *ne, quadlet_t busoptions, ...@@ -1333,13 +1306,8 @@ static void nodemgr_update_node(struct node_entry *ne, quadlet_t busoptions,
/* This will re-register our unitdir's */ /* This will re-register our unitdir's */
nodemgr_process_config_rom (hi, ne, busoptions); 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 */ /* Since that's done, we can declare this record current */
ne->generation = generation; ne->generation = generation;
...@@ -1772,8 +1740,6 @@ static void nodemgr_add_host(struct hpsb_host *host) ...@@ -1772,8 +1740,6 @@ static void nodemgr_add_host(struct hpsb_host *host)
sizeof(host->device)); sizeof(host->device));
host->device.parent = &host->pdev->dev; host->device.parent = &host->pdev->dev;
snprintf(host->device.bus_id, BUS_ID_SIZE, "fw-host%d", host->id); 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); sprintf(hi->daemon_name, "knodemgrd_%d", host->id);
......
...@@ -144,9 +144,7 @@ static struct i2c_adapter bit_ops = { ...@@ -144,9 +144,7 @@ static struct i2c_adapter bit_ops = {
.id = 0xAA, //FIXME: probably we should get an id in i2c-id.h .id = 0xAA, //FIXME: probably we should get an id in i2c-id.h
.client_register = bit_reg, .client_register = bit_reg,
.client_unregister = bit_unreg, .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, ...@@ -141,9 +141,6 @@ macio_add_one_device(struct macio_chip *chip, struct device *parent,
dev->ofdev.dev.parent = parent; dev->ofdev.dev.parent = parent;
dev->ofdev.dev.bus = &macio_bus_type; 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 */ /* MacIO itself has a different reg, we use it's PCI base */
if (np == chip->of_node) { if (np == chip->of_node) {
sprintf(dev->ofdev.dev.bus_id, "%1d.%08lx:%.8s", chip->lbus.index, sprintf(dev->ofdev.dev.bus_id, "%1d.%08lx:%.8s", chip->lbus.index,
......
...@@ -39,9 +39,6 @@ ...@@ -39,9 +39,6 @@
#include <net/irda/wrapper.h> #include <net/irda/wrapper.h>
#include <net/irda/irda_device.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 */ static int qos_mtt_bits = 0x03; /* 5 ms or more */
/* Network device fuction prototypes */ /* Network device fuction prototypes */
...@@ -55,7 +52,8 @@ static struct net_device_stats *irtty_net_get_stats(struct net_device *dev); ...@@ -55,7 +52,8 @@ static struct net_device_stats *irtty_net_get_stats(struct net_device *dev);
/* Line discipline function prototypes */ /* Line discipline function prototypes */
static int irtty_open(struct tty_struct *tty); static int irtty_open(struct tty_struct *tty);
static void irtty_close(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 int irtty_receive_room(struct tty_struct *tty);
static void irtty_write_wakeup(struct tty_struct *tty); static void irtty_write_wakeup(struct tty_struct *tty);
static void irtty_receive_buf(struct tty_struct *, const unsigned char *, 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); ...@@ -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_set_mode(struct net_device *dev, int mode);
static int irtty_change_speed(struct irda_task *task); 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 __init irtty_init(void)
{ {
int status; 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) { if ((status = tty_register_ldisc(N_IRDA, &irda_ldisc)) != 0) {
ERROR("IrDA: can't register line discipline (err = %d)\n", ERROR("IrDA: can't register line discipline (err = %d)\n",
status); status);
...@@ -124,12 +107,6 @@ static void __exit irtty_cleanup(void) ...@@ -124,12 +107,6 @@ static void __exit irtty_cleanup(void)
__FUNCTION__, ret); __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) ...@@ -172,8 +149,6 @@ static int irtty_open(struct tty_struct *tty)
/* Give self a name */ /* Give self a name */
strcpy(name, tty->name); strcpy(name, tty->name);
hashbin_insert(irtty, (irda_queue_t *) self, (int) self, NULL);
if (tty->driver->flush_buffer) if (tty->driver->flush_buffer)
tty->driver->flush_buffer(tty); tty->driver->flush_buffer(tty);
...@@ -251,8 +226,6 @@ static int irtty_open(struct tty_struct *tty) ...@@ -251,8 +226,6 @@ static int irtty_open(struct tty_struct *tty)
MESSAGE("IrDA: Registered device %s\n", dev->name); MESSAGE("IrDA: Registered device %s\n", dev->name);
MOD_INC_USE_COUNT;
return 0; return 0;
} }
...@@ -285,8 +258,6 @@ static void irtty_close(struct tty_struct *tty) ...@@ -285,8 +258,6 @@ static void irtty_close(struct tty_struct *tty)
if (self->netdev) if (self->netdev)
unregister_netdev(self->netdev); unregister_netdev(self->netdev);
self = hashbin_remove(irtty, (int) self, NULL);
/* Protect access to self->task and self->?x_buff - Jean II */ /* Protect access to self->task and self->?x_buff - Jean II */
spin_lock_irqsave(&self->lock, flags); spin_lock_irqsave(&self->lock, flags);
...@@ -305,8 +276,6 @@ static void irtty_close(struct tty_struct *tty) ...@@ -305,8 +276,6 @@ static void irtty_close(struct tty_struct *tty)
spin_unlock_irqrestore(&self->lock, flags); spin_unlock_irqrestore(&self->lock, flags);
kfree(self); kfree(self);
MOD_DEC_USE_COUNT;
} }
/* /*
...@@ -487,7 +456,8 @@ static int irtty_change_speed(struct irda_task *task) ...@@ -487,7 +456,8 @@ static int irtty_change_speed(struct irda_task *task)
* The Swiss army knife of system calls :-) * 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; dongle_t *dongle;
struct irtty_info info; struct irtty_info info;
...@@ -511,8 +481,7 @@ static int irtty_ioctl(struct tty_struct *tty, void *file, int cmd, void *arg) ...@@ -511,8 +481,7 @@ static int irtty_ioctl(struct tty_struct *tty, void *file, int cmd, void *arg)
case TCGETS: case TCGETS:
case TCGETA: case TCGETA:
/* Unsure about locking here, to check - Jean II */ /* Unsure about locking here, to check - Jean II */
return n_tty_ioctl(tty, (struct file *) file, cmd, return n_tty_ioctl(tty, (struct file *) file, cmd, arg);
(unsigned long) arg);
break; break;
case IRTTY_IOCTDONGLE: case IRTTY_IOCTDONGLE:
/* Initialize dongle */ /* Initialize dongle */
...@@ -543,7 +512,7 @@ static int irtty_ioctl(struct tty_struct *tty, void *file, int cmd, void *arg) ...@@ -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)); memset(&info, 0, sizeof(struct irtty_info));
strncpy(info.name, self->netdev->name, 5); 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; return -EFAULT;
break; break;
default: default:
...@@ -938,7 +907,6 @@ static int irtty_net_open(struct net_device *dev) ...@@ -938,7 +907,6 @@ static int irtty_net_open(struct net_device *dev)
{ {
struct irtty_cb *self = (struct irtty_cb *) dev->priv; struct irtty_cb *self = (struct irtty_cb *) dev->priv;
struct tty_struct *tty = self->tty; struct tty_struct *tty = self->tty;
char hwname[16];
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRTTY_MAGIC, return -1;); ASSERT(self->magic == IRTTY_MAGIC, return -1;);
...@@ -951,16 +919,11 @@ static int irtty_net_open(struct net_device *dev) ...@@ -951,16 +919,11 @@ static int irtty_net_open(struct net_device *dev)
/* Make sure we can receive more data */ /* Make sure we can receive more data */
irtty_stop_receiver(self, FALSE); 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 * Open new IrLAP layer instance, now that everything should be
* initialized properly * initialized properly
*/ */
self->irlap = irlap_open(dev, &self->qos, hwname); self->irlap = irlap_open(dev, &self->qos, tty->name);
MOD_INC_USE_COUNT;
return 0; return 0;
} }
...@@ -983,8 +946,6 @@ static int irtty_net_close(struct net_device *dev) ...@@ -983,8 +946,6 @@ static int irtty_net_close(struct net_device *dev)
irlap_close(self->irlap); irlap_close(self->irlap);
self->irlap = NULL; self->irlap = NULL;
MOD_DEC_USE_COUNT;
return 0; return 0;
} }
......
...@@ -876,7 +876,6 @@ static int tok_open(struct net_device *dev) ...@@ -876,7 +876,6 @@ static int tok_open(struct net_device *dev)
if (i==0) break; if (i==0) break;
if (ti->open_status == OPEN && ti->sap_status==OPEN) { if (ti->open_status == OPEN && ti->sap_status==OPEN) {
netif_start_queue(dev); netif_start_queue(dev);
MOD_INC_USE_COUNT;
DPRINTK("Adapter is up and running\n"); DPRINTK("Adapter is up and running\n");
return 0; return 0;
} }
...@@ -1041,7 +1040,6 @@ static int tok_close(struct net_device *dev) ...@@ -1041,7 +1040,6 @@ static int tok_close(struct net_device *dev)
netif_stop_queue(dev); netif_stop_queue(dev);
DPRINTK("Adapter is closed.\n"); DPRINTK("Adapter is closed.\n");
MOD_DEC_USE_COUNT;
return 0; return 0;
} }
...@@ -1918,7 +1916,7 @@ MODULE_PARM(io, "1-" __MODULE_STRING(IBMTR_MAX_ADAPTERS) "i"); ...@@ -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(irq, "1-" __MODULE_STRING(IBMTR_MAX_ADAPTERS) "i");
MODULE_PARM(mem, "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 i;
int count=0; int count=0;
...@@ -1948,21 +1946,24 @@ int init_module(void) ...@@ -1948,21 +1946,24 @@ int init_module(void)
if (count) return 0; if (count) return 0;
printk("ibmtr: register_netdev() returned non-zero.\n"); printk("ibmtr: register_netdev() returned non-zero.\n");
return -EIO; 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++){ for (i = 0; i < IBMTR_MAX_ADAPTERS; i++){
if (!dev_ibmtr[i]) if (!dev_ibmtr[i])
continue; continue;
if (dev_ibmtr[i]->base_addr) { if (dev_ibmtr[i]->base_addr) {
outb(0,dev_ibmtr[i]->base_addr+ADAPTRESET); 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); outb(0,dev_ibmtr[i]->base_addr+ADAPTRESETREL);
} }
unregister_netdev(dev_ibmtr[i]); unregister_netdev(dev_ibmtr[i]);
free_irq(dev_ibmtr[i]->irq, dev_ibmtr[i]); free_irq(dev_ibmtr[i]->irq, dev_ibmtr[i]);
release_region(dev_ibmtr[i]->base_addr, IBMTR_IO_EXTENT); release_region(dev_ibmtr[i]->base_addr, IBMTR_IO_EXTENT);
...@@ -1978,4 +1979,5 @@ void cleanup_module(void) ...@@ -1978,4 +1979,5 @@ void cleanup_module(void)
dev_ibmtr[i] = NULL; dev_ibmtr[i] = NULL;
} }
} }
#endif /* MODULE */ module_exit(ibmtr_cleanup);
#endif
...@@ -948,7 +948,6 @@ static Scsi_Host_Template idescsi_template = { ...@@ -948,7 +948,6 @@ static Scsi_Host_Template idescsi_template = {
}; };
static struct device idescsi_primary = { static struct device idescsi_primary = {
.name = "Ide-scsi Parent",
.bus_id = "ide-scsi", .bus_id = "ide-scsi",
}; };
static struct bus_type idescsi_emu_bus = { static struct bus_type idescsi_emu_bus = {
......
...@@ -463,9 +463,6 @@ struct net_device ...@@ -463,9 +463,6 @@ struct net_device
/* class/net/name entry */ /* class/net/name entry */
struct class_device class_dev; struct class_device class_dev;
/* statistics sub-directory */
struct kobject stats_kobj;
}; };
#define SET_MODULE_OWNER(dev) do { } while (0) #define SET_MODULE_OWNER(dev) do { } while (0)
......
...@@ -209,9 +209,29 @@ ...@@ -209,9 +209,29 @@
#define PCI_DEVICE_ID_ATI_215_LR 0x4c52 #define PCI_DEVICE_ID_ATI_215_LR 0x4c52
#define PCI_DEVICE_ID_ATI_215_LS 0x4c53 #define PCI_DEVICE_ID_ATI_215_LS 0x4c53
#define PCI_DEVICE_ID_ATI_264_LT 0x4c54 #define PCI_DEVICE_ID_ATI_264_LT 0x4c54
/* Radeon M4 */ /* Mach64 VT */
#define PCI_DEVICE_ID_ATI_RADEON_LE 0x4d45 #define PCI_DEVICE_ID_ATI_264VT 0x5654
#define PCI_DEVICE_ID_ATI_RADEON_LF 0x4d46 #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 */ /* Rage128 Pro GL */
#define PCI_DEVICE_ID_ATI_Rage128_PA 0x5041 #define PCI_DEVICE_ID_ATI_Rage128_PA 0x5041
#define PCI_DEVICE_ID_ATI_Rage128_PB 0x5042 #define PCI_DEVICE_ID_ATI_Rage128_PB 0x5042
...@@ -239,75 +259,69 @@ ...@@ -239,75 +259,69 @@
#define PCI_DEVICE_ID_ATI_RAGE128_PV 0x5056 #define PCI_DEVICE_ID_ATI_RAGE128_PV 0x5056
#define PCI_DEVICE_ID_ATI_RAGE128_PW 0x5057 #define PCI_DEVICE_ID_ATI_RAGE128_PW 0x5057
#define PCI_DEVICE_ID_ATI_RAGE128_PX 0x5058 #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 */ /* Radeon R100 */
#define PCI_DEVICE_ID_ATI_RADEON_QD 0x5144 #define PCI_DEVICE_ID_ATI_RADEON_QD 0x5144
#define PCI_DEVICE_ID_ATI_RADEON_QE 0x5145 #define PCI_DEVICE_ID_ATI_RADEON_QE 0x5145
#define PCI_DEVICE_ID_ATI_RADEON_QF 0x5146 #define PCI_DEVICE_ID_ATI_RADEON_QF 0x5146
#define PCI_DEVICE_ID_ATI_RADEON_QG 0x5147 #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) */ /* Radeon R200 (8500) */
#define PCI_DEVICE_ID_ATI_RADEON_QL 0x514c #define PCI_DEVICE_ID_ATI_RADEON_QL 0x514c
#define PCI_DEVICE_ID_ATI_RADEON_QN 0x514e #define PCI_DEVICE_ID_ATI_RADEON_QN 0x514e
#define PCI_DEVICE_ID_ATI_RADEON_QO 0x514f #define PCI_DEVICE_ID_ATI_RADEON_QO 0x514f
#define PCI_DEVICE_ID_ATI_RADEON_Ql 0x516c #define PCI_DEVICE_ID_ATI_RADEON_Ql 0x516c
#define PCI_DEVICE_ID_ATI_RADEON_BB 0x4242 #define PCI_DEVICE_ID_ATI_RADEON_BB 0x4242
/* Radeon R200 (9100) */
#define PCI_DEVICE_ID_ATI_RADEON_QM 0x514d
/* Radeon RV200 (7500) */ /* Radeon RV200 (7500) */
#define PCI_DEVICE_ID_ATI_RADEON_QW 0x5157 #define PCI_DEVICE_ID_ATI_RADEON_QW 0x5157
#define PCI_DEVICE_ID_ATI_RADEON_QX 0x5158 #define PCI_DEVICE_ID_ATI_RADEON_QX 0x5158
/* Radeon NV-100 */ /* Radeon NV-100 */
#define PCI_DEVICE_ID_ATI_RADEON_N1 0x5159 #define PCI_DEVICE_ID_ATI_RADEON_N1 0x5159
#define PCI_DEVICE_ID_ATI_RADEON_N2 0x515a #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) */ /* Radeon RV250 (9000) */
#define PCI_DEVICE_ID_ATI_RADEON_Id 0x4964 #define PCI_DEVICE_ID_ATI_RADEON_Id 0x4964
#define PCI_DEVICE_ID_ATI_RADEON_Ie 0x4965 #define PCI_DEVICE_ID_ATI_RADEON_Ie 0x4965
#define PCI_DEVICE_ID_ATI_RADEON_If 0x4966 #define PCI_DEVICE_ID_ATI_RADEON_If 0x4966
#define PCI_DEVICE_ID_ATI_RADEON_Ig 0x4967 #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) */ /* Radeon R300 (9700) */
#define PCI_DEVICE_ID_ATI_RADEON_ND 0x4e44 #define PCI_DEVICE_ID_ATI_RADEON_ND 0x4e44
#define PCI_DEVICE_ID_ATI_RADEON_NE 0x4e45 #define PCI_DEVICE_ID_ATI_RADEON_NE 0x4e45
#define PCI_DEVICE_ID_ATI_RADEON_NF 0x4e46 #define PCI_DEVICE_ID_ATI_RADEON_NF 0x4e46
#define PCI_DEVICE_ID_ATI_RADEON_NG 0x4e47 #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 */ /* Radeon M6 */
#define PCI_DEVICE_ID_ATI_RADEON_LY 0x4c59 #define PCI_DEVICE_ID_ATI_RADEON_LY 0x4c59
#define PCI_DEVICE_ID_ATI_RADEON_LZ 0x4c5a #define PCI_DEVICE_ID_ATI_RADEON_LZ 0x4c5a
/* Radeon M7 */ /* Radeon M7 */
#define PCI_DEVICE_ID_ATI_RADEON_LW 0x4c57 #define PCI_DEVICE_ID_ATI_RADEON_LW 0x4c57
#define PCI_DEVICE_ID_ATI_RADEON_LX 0x4c58 #define PCI_DEVICE_ID_ATI_RADEON_LX 0x4c58
#define PCI_DEVICE_ID_ATI_RADEON_Ld 0x4964 /* Radeon M9 */
#define PCI_DEVICE_ID_ATI_RADEON_Le 0x4965 #define PCI_DEVICE_ID_ATI_RADEON_Ld 0x4c64
#define PCI_DEVICE_ID_ATI_RADEON_Lf 0x4966 #define PCI_DEVICE_ID_ATI_RADEON_Le 0x4c65
#define PCI_DEVICE_ID_ATI_RADEON_Lg 0x4967 #define PCI_DEVICE_ID_ATI_RADEON_Lf 0x4c66
#define PCI_DEVICE_ID_ATI_RADEON_Lg 0x4c67
/* Radeon */ /* Radeon */
#define PCI_DEVICE_ID_ATI_RADEON_RA 0x5144 #define PCI_DEVICE_ID_ATI_RADEON_RA 0x5144
#define PCI_DEVICE_ID_ATI_RADEON_RB 0x5145 #define PCI_DEVICE_ID_ATI_RADEON_RB 0x5145
#define PCI_DEVICE_ID_ATI_RADEON_RC 0x5146 #define PCI_DEVICE_ID_ATI_RADEON_RC 0x5146
#define PCI_DEVICE_ID_ATI_RADEON_RD 0x5147 #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 */ /* RadeonIGP */
#define PCI_DEVICE_ID_ATI_RS100 0xcab0 #define PCI_DEVICE_ID_ATI_RS100 0xcab0
#define PCI_DEVICE_ID_ATI_RS200 0xcab2 #define PCI_DEVICE_ID_ATI_RS200 0xcab2
......
...@@ -284,7 +284,10 @@ struct sadb_x_nat_t_port { ...@@ -284,7 +284,10 @@ struct sadb_x_nat_t_port {
#define SADB_X_EALG_BLOWFISHCBC 7 #define SADB_X_EALG_BLOWFISHCBC 7
#define SADB_EALG_NULL 11 #define SADB_EALG_NULL 11
#define SADB_X_EALG_AESCBC 12 #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 */ /* Compression algorithms */
#define SADB_X_CALG_NONE 0 #define SADB_X_CALG_NONE 0
......
...@@ -209,7 +209,7 @@ void irda_device_cleanup(void); ...@@ -209,7 +209,7 @@ void irda_device_cleanup(void);
* We declare them here to avoid the driver pulling a whole bunch stack * We declare them here to avoid the driver pulling a whole bunch stack
* headers they don't really need - Jean II */ * headers they don't really need - Jean II */
struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos, 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_close(struct irlap_cb *self);
/* Interface to be uses by IrLAP */ /* Interface to be uses by IrLAP */
...@@ -222,7 +222,7 @@ int irda_device_txqueue_empty(struct net_device *dev); ...@@ -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_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_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_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 */ /* Dongle interface */
void irda_device_unregister_dongle(struct dongle_reg *dongle); void irda_device_unregister_dongle(struct dongle_reg *dongle);
......
...@@ -208,8 +208,6 @@ struct irlap_cb { ...@@ -208,8 +208,6 @@ struct irlap_cb {
int next_bofs; /* Negotiated extra BOFs after next frame */ int next_bofs; /* Negotiated extra BOFs after next frame */
}; };
extern hashbin_t *irlap;
/* /*
* Function prototypes * Function prototypes
*/ */
...@@ -217,7 +215,7 @@ int irlap_init(void); ...@@ -217,7 +215,7 @@ int irlap_init(void);
void irlap_cleanup(void); void irlap_cleanup(void);
struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos, 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_close(struct irlap_cb *self);
void irlap_connect_request(struct irlap_cb *self, __u32 daddr, void irlap_connect_request(struct irlap_cb *self, __u32 daddr,
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <net/irda/irda.h> #include <net/irda/irda.h>
#include <net/irda/irqueue.h>
#include <net/irda/irda_device.h> #include <net/irda/irda_device.h>
/* Used by ioctl */ /* Used by ioctl */
...@@ -45,7 +44,6 @@ struct irtty_info { ...@@ -45,7 +44,6 @@ struct irtty_info {
#define IRTTY_IOC_MAXNR 2 #define IRTTY_IOC_MAXNR 2
struct irtty_cb { struct irtty_cb {
irda_queue_t q; /* Must be first */
magic_t magic; magic_t magic;
struct net_device *netdev; /* Yes! we are some kind of netdevice */ struct net_device *netdev; /* Yes! we are some kind of netdevice */
......
...@@ -187,7 +187,6 @@ int netdev_fastroute_obstacles; ...@@ -187,7 +187,6 @@ int netdev_fastroute_obstacles;
extern int netdev_sysfs_init(void); extern int netdev_sysfs_init(void);
extern int netdev_register_sysfs(struct net_device *); 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) ...@@ -2343,14 +2342,18 @@ static int dev_ifsioc(struct ifreq *ifr, unsigned int cmd)
case SIOCSIFNAME: case SIOCSIFNAME:
if (dev->flags & IFF_UP) if (dev->flags & IFF_UP)
return -EBUSY; return -EBUSY;
ifr->ifr_newname[IFNAMSIZ-1] = '\0';
if (__dev_get_by_name(ifr->ifr_newname)) if (__dev_get_by_name(ifr->ifr_newname))
return -EEXIST; return -EEXIST;
memcpy(dev->name, ifr->ifr_newname, IFNAMSIZ); err = class_device_rename(&dev->class_dev,
dev->name[IFNAMSIZ - 1] = 0; ifr->ifr_newname);
strlcpy(dev->class_dev.class_id, dev->name, BUS_ID_SIZE); if (!err) {
strlcpy(dev->name, ifr->ifr_newname, IFNAMSIZ);
notifier_call_chain(&netdev_chain, notifier_call_chain(&netdev_chain,
NETDEV_CHANGENAME, dev); NETDEV_CHANGENAME, dev);
return 0; }
return err;
/* /*
* Unknown or private ioctl * Unknown or private ioctl
...@@ -2706,38 +2709,17 @@ int register_netdevice(struct net_device *dev) ...@@ -2706,38 +2709,17 @@ int register_netdevice(struct net_device *dev)
goto out; goto out;
} }
/** /*
* netdev_finish_unregister - complete unregistration * netdev_wait_allrefs - wait until all references are gone.
* @dev: device
* *
* Destroy and free a dead device. A value of zero is returned on * This is called when unregistering network devices.
* success. *
*/ * Any protocol or device that holds a reference should register
static int netdev_finish_unregister(struct net_device *dev) * for netdevice notification, and cleanup and put back the
{ * reference if they receive an UNREGISTER event.
BUG_TRAP(!dev->ip_ptr); * We can get stuck here if buggy protocols don't correctly
BUG_TRAP(!dev->ip6_ptr); * call dev_put.
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) static void netdev_wait_allrefs(struct net_device *dev)
{ {
unsigned long rebroadcast_time, warning_time; unsigned long rebroadcast_time, warning_time;
...@@ -2833,13 +2815,23 @@ void netdev_run_todo(void) ...@@ -2833,13 +2815,23 @@ void netdev_run_todo(void)
break; break;
case NETREG_UNREGISTERING: case NETREG_UNREGISTERING:
netdev_unregister_sysfs(dev); class_device_unregister(&dev->class_dev);
dev->reg_state = NETREG_UNREGISTERED; dev->reg_state = NETREG_UNREGISTERED;
netdev_wait_allrefs(dev); netdev_wait_allrefs(dev);
/* paranoia */
BUG_ON(atomic_read(&dev->refcnt)); BUG_ON(atomic_read(&dev->refcnt));
BUG_TRAP(!dev->ip_ptr);
BUG_TRAP(!dev->ip6_ptr);
BUG_TRAP(!dev->dn_ptr);
netdev_finish_unregister(dev);
/* It must be the very last action,
* after this 'dev' may point to freed up memory.
*/
if (dev->destructor)
dev->destructor(dev);
break; break;
default: default:
......
This diff is collapsed.
...@@ -1983,10 +1983,11 @@ void __init ip6_route_init(void) ...@@ -1983,10 +1983,11 @@ void __init ip6_route_init(void)
NULL, NULL); NULL, NULL);
fib6_init(); fib6_init();
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
proc_net_create("ipv6_route", 0, rt6_proc_info); p = proc_net_create("ipv6_route", 0, rt6_proc_info);
p = create_proc_entry("rt6_stats", S_IRUGO, proc_net);
if (p) 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 #endif
#ifdef CONFIG_XFRM #ifdef CONFIG_XFRM
xfrm6_init(); xfrm6_init();
...@@ -2000,7 +2001,9 @@ void ip6_route_cleanup(void) ...@@ -2000,7 +2001,9 @@ void ip6_route_cleanup(void)
proc_net_remove("ipv6_route"); proc_net_remove("ipv6_route");
proc_net_remove("rt6_stats"); proc_net_remove("rt6_stats");
#endif #endif
#ifdef CONFIG_XFRM
xfrm6_fini(); xfrm6_fini();
#endif
rt6_ifdown(NULL); rt6_ifdown(NULL);
fib6_gc_cleanup(); fib6_gc_cleanup();
kmem_cache_destroy(ip6_dst_ops.kmem_cachep); kmem_cache_destroy(ip6_dst_ops.kmem_cachep);
......
...@@ -383,10 +383,8 @@ static void irda_device_destructor(struct net_device *dev) ...@@ -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 * This function should be used by low level device drivers in a similar way
* as ether_setup() is used by normal network device drivers * 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->hard_header_len = 0;
dev->addr_len = 0; dev->addr_len = 0;
...@@ -399,7 +397,6 @@ int irda_device_setup(struct net_device *dev) ...@@ -399,7 +397,6 @@ int irda_device_setup(struct net_device *dev)
dev->mtu = 2048; dev->mtu = 2048;
dev->flags = IFF_NOARP; dev->flags = IFF_NOARP;
return 0;
} }
/* /*
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
#include <net/irda/timer.h> #include <net/irda/timer.h>
#include <net/irda/qos.h> #include <net/irda/qos.h>
hashbin_t *irlap = NULL; static hashbin_t *irlap = NULL;
int sysctl_slot_timeout = SLOT_TIMEOUT * 1000 / HZ; int sysctl_slot_timeout = SLOT_TIMEOUT * 1000 / HZ;
/* This is the delay of missed pf period before generating an event /* This is the delay of missed pf period before generating an event
...@@ -110,7 +110,7 @@ void __exit irlap_cleanup(void) ...@@ -110,7 +110,7 @@ void __exit irlap_cleanup(void)
* *
*/ */
struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos, struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos,
char * hw_name) const char *hw_name)
{ {
struct irlap_cb *self; struct irlap_cb *self;
......
...@@ -43,7 +43,7 @@ config SCTP_ADLER32 ...@@ -43,7 +43,7 @@ config SCTP_ADLER32
bool "SCTP: Use old checksum (Adler-32)" bool "SCTP: Use old checksum (Adler-32)"
depends on IP_SCTP depends on IP_SCTP
help 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 This has been deprecated and replaced by an algorithm now referred
to as crc32c. to as crc32c.
......
...@@ -217,6 +217,40 @@ static struct xfrm_algo_desc ealg_list[] = { ...@@ -217,6 +217,40 @@ static struct xfrm_algo_desc ealg_list[] = {
.sadb_alg_maxbits = 256 .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[] = { 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