Skip to content

Commit 485cf92

Browse files
author
Linus Torvalds
committed
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (24 commits) [NETFILTER]: xt_connlimit needs to depend on nf_conntrack [NETFILTER]: ipt_iprange.h must #include <linux/types.h> [IrDA]: Fix IrDA build failure [ATM]: nicstar needs virt_to_bus [NET]: move __dev_addr_discard adjacent to dev_addr_discard for readability [NET]: merge dev_unicast_discard and dev_mc_discard into one [NET]: move dev_mc_discard from dev_mcast.c to dev.c [NETLINK]: negative groups in netlink_setsockopt [PPPOL2TP]: Reset meta-data in xmit function [PPPOL2TP]: Fix use-after-free [PKT_SCHED]: Some typo fixes in net/sched/Kconfig [XFRM]: Fix crash introduced by struct dst_entry reordering [TCP]: remove unused argument to cong_avoid op [ATM]: [idt77252] Rename CONFIG_ATM_IDT77252_SEND_IDLE to not resemble a Kconfig variable [ATM]: [drivers] ioremap balanced with iounmap [ATM]: [lanai] sram_test_word() must be __devinit [ATM]: [nicstar] Replace C code with call to ARRAY_SIZE() macro. [ATM]: Eliminate dead config variable CONFIG_BR2684_FAST_TRANS. [ATM]: Replacing kmalloc/memset combination with kzalloc. [NET]: gen_estimator deadlock fix ...
2 parents 31bdc5d + 3fd8f9e commit 485cf92

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+232
-173
lines changed

drivers/atm/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ config ATM_ZATM_DEBUG
172172

173173
config ATM_NICSTAR
174174
tristate "IDT 77201 (NICStAR) (ForeRunnerLE)"
175-
depends on PCI && !64BIT
175+
depends on PCI && !64BIT && VIRT_TO_BUS
176176
help
177177
The NICStAR chipset family is used in a large number of ATM NICs for
178178
25 and for 155 Mbps, including IDT cards and the Fore ForeRunnerLE

drivers/atm/eni.c

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,7 +1738,8 @@ static int __devinit eni_do_init(struct atm_dev *dev)
17381738
printk(KERN_ERR KERN_ERR DEV_LABEL "(itf %d): bad "
17391739
"magic - expected 0x%x, got 0x%x\n",dev->number,
17401740
ENI155_MAGIC,(unsigned) readl(&eprom->magic));
1741-
return -EINVAL;
1741+
error = -EINVAL;
1742+
goto unmap;
17421743
}
17431744
}
17441745
eni_dev->phy = base+PHY_BASE;
@@ -1765,17 +1766,27 @@ static int __devinit eni_do_init(struct atm_dev *dev)
17651766
printk(")\n");
17661767
printk(KERN_ERR DEV_LABEL "(itf %d): ERROR - wrong id 0x%x\n",
17671768
dev->number,(unsigned) eni_in(MID_RES_ID_MCON));
1768-
return -EINVAL;
1769+
error = -EINVAL;
1770+
goto unmap;
17691771
}
17701772
error = eni_dev->asic ? get_esi_asic(dev) : get_esi_fpga(dev,base);
1771-
if (error) return error;
1773+
if (error)
1774+
goto unmap;
17721775
for (i = 0; i < ESI_LEN; i++)
17731776
printk("%s%02X",i ? "-" : "",dev->esi[i]);
17741777
printk(")\n");
17751778
printk(KERN_NOTICE DEV_LABEL "(itf %d): %s,%s\n",dev->number,
17761779
eni_in(MID_RES_ID_MCON) & 0x200 ? "ASIC" : "FPGA",
17771780
media_name[eni_in(MID_RES_ID_MCON) & DAUGTHER_ID]);
1778-
return suni_init(dev);
1781+
1782+
error = suni_init(dev);
1783+
if (error)
1784+
goto unmap;
1785+
out:
1786+
return error;
1787+
unmap:
1788+
iounmap(base);
1789+
goto out;
17791790
}
17801791

17811792

drivers/atm/firestream.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1710,7 +1710,7 @@ static int __devinit fs_init (struct fs_dev *dev)
17101710
/* This bit is documented as "RESERVED" */
17111711
if (isr & ISR_INIT_ERR) {
17121712
printk (KERN_ERR "Error initializing the FS... \n");
1713-
return 1;
1713+
goto unmap;
17141714
}
17151715
if (isr & ISR_INIT) {
17161716
fs_dprintk (FS_DEBUG_INIT, "Ha! Initialized OK!\n");
@@ -1723,7 +1723,7 @@ static int __devinit fs_init (struct fs_dev *dev)
17231723

17241724
if (!to) {
17251725
printk (KERN_ERR "timeout initializing the FS... \n");
1726-
return 1;
1726+
goto unmap;
17271727
}
17281728

17291729
/* XXX fix for fs155 */
@@ -1803,7 +1803,7 @@ static int __devinit fs_init (struct fs_dev *dev)
18031803
if (!dev->atm_vccs) {
18041804
printk (KERN_WARNING "Couldn't allocate memory for VCC buffers. Woops!\n");
18051805
/* XXX Clean up..... */
1806-
return 1;
1806+
goto unmap;
18071807
}
18081808

18091809
dev->tx_inuse = kzalloc (dev->nchannels / 8 /* bits/byte */ , GFP_KERNEL);
@@ -1813,7 +1813,7 @@ static int __devinit fs_init (struct fs_dev *dev)
18131813
if (!dev->tx_inuse) {
18141814
printk (KERN_WARNING "Couldn't allocate memory for tx_inuse bits!\n");
18151815
/* XXX Clean up..... */
1816-
return 1;
1816+
goto unmap;
18171817
}
18181818
/* -- RAS1 : FS155 and 50 differ. Default (0) should be OK for both */
18191819
/* -- RAS2 : FS50 only: Default is OK. */
@@ -1840,7 +1840,7 @@ static int __devinit fs_init (struct fs_dev *dev)
18401840
if (request_irq (dev->irq, fs_irq, IRQF_SHARED, "firestream", dev)) {
18411841
printk (KERN_WARNING "couldn't get irq %d for firestream.\n", pci_dev->irq);
18421842
/* XXX undo all previous stuff... */
1843-
return 1;
1843+
goto unmap;
18441844
}
18451845
fs_dprintk (FS_DEBUG_INIT, "Grabbed irq %d for dev at %p.\n", dev->irq, dev);
18461846

@@ -1890,6 +1890,9 @@ static int __devinit fs_init (struct fs_dev *dev)
18901890

18911891
func_exit ();
18921892
return 0;
1893+
unmap:
1894+
iounmap(dev->base);
1895+
return 1;
18931896
}
18941897

18951898
static int __devinit firestream_init_one (struct pci_dev *pci_dev,
@@ -2012,6 +2015,7 @@ static void __devexit firestream_remove_one (struct pci_dev *pdev)
20122015
for (i=0;i < FS_NR_RX_QUEUES;i++)
20132016
free_queue (dev, &dev->rx_rq[i]);
20142017

2018+
iounmap(dev->base);
20152019
fs_dprintk (FS_DEBUG_ALLOC, "Free fs-dev: %p\n", dev);
20162020
nxtdev = dev->next;
20172021
kfree (dev);

drivers/atm/idt77252.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static char const rcsid[] =
6565
static unsigned int vpibits = 1;
6666

6767

68-
#define CONFIG_ATM_IDT77252_SEND_IDLE 1
68+
#define ATM_IDT77252_SEND_IDLE 1
6969

7070

7171
/*
@@ -3404,7 +3404,7 @@ init_card(struct atm_dev *dev)
34043404
conf = SAR_CFG_TX_FIFO_SIZE_9 | /* Use maximum fifo size */
34053405
SAR_CFG_RXSTQ_SIZE_8k | /* Receive Status Queue is 8k */
34063406
SAR_CFG_IDLE_CLP | /* Set CLP on idle cells */
3407-
#ifndef CONFIG_ATM_IDT77252_SEND_IDLE
3407+
#ifndef ATM_IDT77252_SEND_IDLE
34083408
SAR_CFG_NO_IDLE | /* Do not send idle cells */
34093409
#endif
34103410
0;
@@ -3541,7 +3541,7 @@ init_card(struct atm_dev *dev)
35413541
printk("%s: Linkrate on ATM line : %u bit/s, %u cell/s.\n",
35423542
card->name, linkrate, card->link_pcr);
35433543

3544-
#ifdef CONFIG_ATM_IDT77252_SEND_IDLE
3544+
#ifdef ATM_IDT77252_SEND_IDLE
35453545
card->utopia_pcr = card->link_pcr;
35463546
#else
35473547
card->utopia_pcr = (160000000 / 8 / 54);

drivers/atm/lanai.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,8 @@ static inline void sram_write(const struct lanai_dev *lanai,
552552
writel(val, sram_addr(lanai, offset));
553553
}
554554

555-
static int __init sram_test_word(
556-
const struct lanai_dev *lanai, int offset, u32 pattern)
555+
static int __devinit sram_test_word(const struct lanai_dev *lanai,
556+
int offset, u32 pattern)
557557
{
558558
u32 readback;
559559
sram_write(lanai, pattern, offset);

drivers/atm/nicstarmac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ nicstar_read_eprom_status( virt_addr_t base )
134134
/* Send read instruction */
135135
val = NICSTAR_REG_READ( base, NICSTAR_REG_GENERAL_PURPOSE ) & 0xFFFFFFF0;
136136

137-
for (i=0; i<sizeof rdsrtab/sizeof rdsrtab[0]; i++)
137+
for (i=0; i<ARRAY_SIZE(rdsrtab); i++)
138138
{
139139
NICSTAR_REG_WRITE( base, NICSTAR_REG_GENERAL_PURPOSE,
140140
(val | rdsrtab[i]) );

0 commit comments

Comments
 (0)