aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorKyle McMartin <kyle@parisc-linux.org>2007-02-17 00:18:23 -0500
committerKyle McMartin <kyle@parisc-linux.org>2007-02-17 00:18:23 -0500
commite7b3ca08549caccf5d6e1cf066780bf4f0ae77a7 (patch)
tree7e5745bea06675cfce60d6813ee3b4d5e19cbb56 /drivers/net
parent62d0cfcb27cf755cebdc93ca95dabc83608007cd (diff)
parentcb6efb39163bfb6bb6475fa7c8a5e08e44dbf14a (diff)
Merge branch 'parisc' from /home/kyle/repos/parisc-2.6.git
Conflicts: arch/parisc/hpux/sys_hpux.c arch/parisc/mm/ioremap.c
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/Kconfig6
-rw-r--r--drivers/net/lasi_82596.c34
2 files changed, 10 insertions, 30 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 8aa8dd02b91..79eade7e9d9 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -440,10 +440,10 @@ config HPLANCE
config LASI_82596
tristate "Lasi ethernet"
- depends on NET_ETHERNET && PARISC && GSC_LASI
+ depends on NET_ETHERNET && GSC
help
- Say Y here to support the on-board Intel 82596 ethernet controller
- built into Hewlett-Packard PA-RISC machines.
+ Say Y here to support the builtin Intel 82596 ethernet controller
+ found in Hewlett-Packard PA-RISC machines with 10Mbit ethernet.
config MIPS_JAZZ_SONIC
tristate "MIPS JAZZ onboard SONIC Ethernet support"
diff --git a/drivers/net/lasi_82596.c b/drivers/net/lasi_82596.c
index ea392f2a5aa..452863d5d49 100644
--- a/drivers/net/lasi_82596.c
+++ b/drivers/net/lasi_82596.c
@@ -384,7 +384,7 @@ struct i596_private {
struct device *dev;
};
-static char init_setup[] =
+static const char init_setup[] =
{
0x8E, /* length, prefetch on */
0xC8, /* fifo to 8, monitor off */
@@ -683,7 +683,7 @@ static int init_i596_mem(struct net_device *dev)
enable_irq(dev->irq); /* enable IRQs from LAN */
DEB(DEB_INIT, printk("%s: queuing CmdConfigure\n", dev->name));
- memcpy(lp->cf_cmd.i596_config, init_setup, 14);
+ memcpy(lp->cf_cmd.i596_config, init_setup, sizeof(init_setup));
lp->cf_cmd.cmd.command = CmdConfigure;
CHECK_WBACK(lp, &(lp->cf_cmd), sizeof(struct cf_cmd));
i596_add_cmd(dev, &lp->cf_cmd.cmd);
@@ -1156,32 +1156,12 @@ static int __devinit i82596_probe(struct net_device *dev,
dma_addr_t dma_addr;
/* This lot is ensure things have been cache line aligned. */
- if (sizeof(struct i596_rfd) != 32) {
- printk("82596: sizeof(struct i596_rfd) = %d\n",
- (int)sizeof(struct i596_rfd));
- return -ENODEV;
- }
- if ((sizeof(struct i596_rbd) % 32) != 0) {
- printk("82596: sizeof(struct i596_rbd) = %d\n",
- (int)sizeof(struct i596_rbd));
- return -ENODEV;
- }
- if ((sizeof(struct tx_cmd) % 32) != 0) {
- printk("82596: sizeof(struct tx_cmd) = %d\n",
- (int)sizeof(struct tx_cmd));
- return -ENODEV;
- }
- if (sizeof(struct i596_tbd) != 32) {
- printk("82596: sizeof(struct i596_tbd) = %d\n",
- (int)sizeof(struct i596_tbd));
- return -ENODEV;
- }
+ BUILD_BUG_ON(sizeof(struct i596_rfd) != 32);
+ BUILD_BUG_ON(sizeof(struct i596_rbd) & 31);
+ BUILD_BUG_ON(sizeof(struct tx_cmd) & 31);
+ BUILD_BUG_ON(sizeof(struct i596_tbd) != 32);
#ifndef __LP64__
- if (sizeof(struct i596_private) > 4096) {
- printk("82596: sizeof(struct i596_private) = %d\n",
- (int)sizeof(struct i596_private));
- return -ENODEV;
- }
+ BUILD_BUG_ON(sizeof(struct i596_private) > 4096);
#endif
if (!dev->base_addr || !dev->irq)