aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/atm/eni.c27
-rw-r--r--drivers/atm/fore200e.c4
-rw-r--r--drivers/atm/he.c3
-rw-r--r--drivers/atm/he.h2
-rw-r--r--drivers/block/Kconfig2
-rw-r--r--drivers/i2c/busses/Kconfig2
-rw-r--r--drivers/i2c/busses/i2c-mpc.c4
-rw-r--r--drivers/infiniband/hw/mthca/mthca_memfree.c1
-rw-r--r--drivers/isdn/hisax/hfc4s8s_l1.c1
-rw-r--r--drivers/net/hamradio/6pack.c4
-rw-r--r--drivers/net/hamradio/baycom_epp.c4
-rw-r--r--drivers/net/hamradio/bpqether.c10
-rw-r--r--drivers/net/hamradio/dmascc.c4
-rw-r--r--drivers/net/hamradio/hdlcdrv.c4
-rw-r--r--drivers/net/hamradio/mkiss.c4
-rw-r--r--drivers/net/hamradio/scc.c5
-rw-r--r--drivers/net/hamradio/yam.c4
-rw-r--r--drivers/net/mv643xx_eth.c4
-rw-r--r--drivers/net/slip.c30
-rw-r--r--drivers/net/sunbmac.c13
-rw-r--r--drivers/net/sunhme.c16
-rw-r--r--drivers/net/sunlance.c17
-rw-r--r--drivers/net/sunqe.c17
-rw-r--r--drivers/net/tg3.c77
-rw-r--r--drivers/sbus/char/rtc.c6
-rw-r--r--drivers/scsi/esp.c5
-rw-r--r--drivers/scsi/scsi_error.c2
-rw-r--r--drivers/scsi/scsi_scan.c2
-rw-r--r--drivers/serial/mpsc.c14
-rw-r--r--drivers/serial/mpsc.h10
-rw-r--r--drivers/video/logo/Kconfig2
-rw-r--r--drivers/video/tcx.c14
32 files changed, 176 insertions, 138 deletions
diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c
index 78e34ee79df8..10da36934769 100644
--- a/drivers/atm/eni.c
+++ b/drivers/atm/eni.c
@@ -59,7 +59,6 @@
59 * - doesn't support OAM cells 59 * - doesn't support OAM cells
60 * - eni_put_free may hang if not putting memory fragments that _complete_ 60 * - eni_put_free may hang if not putting memory fragments that _complete_
61 * 2^n block (never happens in real life, though) 61 * 2^n block (never happens in real life, though)
62 * - keeps IRQ even if initialization fails
63 */ 62 */
64 63
65 64
@@ -1802,22 +1801,22 @@ static int __devinit eni_start(struct atm_dev *dev)
1802 if (request_irq(eni_dev->irq,&eni_int,SA_SHIRQ,DEV_LABEL,dev)) { 1801 if (request_irq(eni_dev->irq,&eni_int,SA_SHIRQ,DEV_LABEL,dev)) {
1803 printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n", 1802 printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n",
1804 dev->number,eni_dev->irq); 1803 dev->number,eni_dev->irq);
1805 return -EAGAIN; 1804 error = -EAGAIN;
1805 goto out;
1806 } 1806 }
1807 /* @@@ should release IRQ on error */
1808 pci_set_master(eni_dev->pci_dev); 1807 pci_set_master(eni_dev->pci_dev);
1809 if ((error = pci_write_config_word(eni_dev->pci_dev,PCI_COMMAND, 1808 if ((error = pci_write_config_word(eni_dev->pci_dev,PCI_COMMAND,
1810 PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | 1809 PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER |
1811 (eni_dev->asic ? PCI_COMMAND_PARITY | PCI_COMMAND_SERR : 0)))) { 1810 (eni_dev->asic ? PCI_COMMAND_PARITY | PCI_COMMAND_SERR : 0)))) {
1812 printk(KERN_ERR DEV_LABEL "(itf %d): can't enable memory+" 1811 printk(KERN_ERR DEV_LABEL "(itf %d): can't enable memory+"
1813 "master (0x%02x)\n",dev->number,error); 1812 "master (0x%02x)\n",dev->number,error);
1814 return error; 1813 goto free_irq;
1815 } 1814 }
1816 if ((error = pci_write_config_byte(eni_dev->pci_dev,PCI_TONGA_CTRL, 1815 if ((error = pci_write_config_byte(eni_dev->pci_dev,PCI_TONGA_CTRL,
1817 END_SWAP_DMA))) { 1816 END_SWAP_DMA))) {
1818 printk(KERN_ERR DEV_LABEL "(itf %d): can't set endian swap " 1817 printk(KERN_ERR DEV_LABEL "(itf %d): can't set endian swap "
1819 "(0x%02x)\n",dev->number,error); 1818 "(0x%02x)\n",dev->number,error);
1820 return error; 1819 goto free_irq;
1821 } 1820 }
1822 /* determine addresses of internal tables */ 1821 /* determine addresses of internal tables */
1823 eni_dev->vci = eni_dev->ram; 1822 eni_dev->vci = eni_dev->ram;
@@ -1839,7 +1838,8 @@ static int __devinit eni_start(struct atm_dev *dev)
1839 if (!eni_dev->free_list) { 1838 if (!eni_dev->free_list) {
1840 printk(KERN_ERR DEV_LABEL "(itf %d): couldn't get free page\n", 1839 printk(KERN_ERR DEV_LABEL "(itf %d): couldn't get free page\n",
1841 dev->number); 1840 dev->number);
1842 return -ENOMEM; 1841 error = -ENOMEM;
1842 goto free_irq;
1843 } 1843 }
1844 eni_dev->free_len = 0; 1844 eni_dev->free_len = 0;
1845 eni_put_free(eni_dev,buf,buffer_mem); 1845 eni_put_free(eni_dev,buf,buffer_mem);
@@ -1855,17 +1855,26 @@ static int __devinit eni_start(struct atm_dev *dev)
1855 */ 1855 */
1856 eni_out(0xffffffff,MID_IE); 1856 eni_out(0xffffffff,MID_IE);
1857 error = start_tx(dev); 1857 error = start_tx(dev);
1858 if (error) return error; 1858 if (error) goto free_list;
1859 error = start_rx(dev); 1859 error = start_rx(dev);
1860 if (error) return error; 1860 if (error) goto free_list;
1861 error = dev->phy->start(dev); 1861 error = dev->phy->start(dev);
1862 if (error) return error; 1862 if (error) goto free_list;
1863 eni_out(eni_in(MID_MC_S) | (1 << MID_INT_SEL_SHIFT) | 1863 eni_out(eni_in(MID_MC_S) | (1 << MID_INT_SEL_SHIFT) |
1864 MID_TX_LOCK_MODE | MID_DMA_ENABLE | MID_TX_ENABLE | MID_RX_ENABLE, 1864 MID_TX_LOCK_MODE | MID_DMA_ENABLE | MID_TX_ENABLE | MID_RX_ENABLE,
1865 MID_MC_S); 1865 MID_MC_S);
1866 /* Tonga uses SBus INTReq1 */ 1866 /* Tonga uses SBus INTReq1 */
1867 (void) eni_in(MID_ISA); /* clear Midway interrupts */ 1867 (void) eni_in(MID_ISA); /* clear Midway interrupts */
1868 return 0; 1868 return 0;
1869
1870free_list:
1871 kfree(eni_dev->free_list);
1872
1873free_irq:
1874 free_irq(eni_dev->irq, eni_dev);
1875
1876out:
1877 return error;
1869} 1878}
1870 1879
1871 1880
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index 196b33644627..9e65bfb85ba3 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -2792,8 +2792,6 @@ static void __devexit fore200e_pca_remove_one(struct pci_dev *pci_dev)
2792 2792
2793 fore200e = pci_get_drvdata(pci_dev); 2793 fore200e = pci_get_drvdata(pci_dev);
2794 2794
2795 list_del(&fore200e->entry);
2796
2797 fore200e_shutdown(fore200e); 2795 fore200e_shutdown(fore200e);
2798 kfree(fore200e); 2796 kfree(fore200e);
2799 pci_disable_device(pci_dev); 2797 pci_disable_device(pci_dev);
@@ -2850,7 +2848,7 @@ fore200e_module_init(void)
2850 } 2848 }
2851 2849
2852#ifdef CONFIG_ATM_FORE200E_PCA 2850#ifdef CONFIG_ATM_FORE200E_PCA
2853 if (!pci_module_init(&fore200e_pca_driver)) 2851 if (!pci_register_driver(&fore200e_pca_driver))
2854 return 0; 2852 return 0;
2855#endif 2853#endif
2856 2854
diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index c2c31a5f4513..3022c548a132 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -70,6 +70,7 @@
70#include <linux/sched.h> 70#include <linux/sched.h>
71#include <linux/timer.h> 71#include <linux/timer.h>
72#include <linux/interrupt.h> 72#include <linux/interrupt.h>
73#include <linux/dma-mapping.h>
73#include <asm/io.h> 74#include <asm/io.h>
74#include <asm/byteorder.h> 75#include <asm/byteorder.h>
75#include <asm/uaccess.h> 76#include <asm/uaccess.h>
@@ -371,7 +372,7 @@ he_init_one(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent)
371 372
372 if (pci_enable_device(pci_dev)) 373 if (pci_enable_device(pci_dev))
373 return -EIO; 374 return -EIO;
374 if (pci_set_dma_mask(pci_dev, HE_DMA_MASK) != 0) { 375 if (pci_set_dma_mask(pci_dev, DMA_32BIT_MASK) != 0) {
375 printk(KERN_WARNING "he: no suitable dma available\n"); 376 printk(KERN_WARNING "he: no suitable dma available\n");
376 err = -EIO; 377 err = -EIO;
377 goto init_one_failure; 378 goto init_one_failure;
diff --git a/drivers/atm/he.h b/drivers/atm/he.h
index 1a903859343a..1dc277547a73 100644
--- a/drivers/atm/he.h
+++ b/drivers/atm/he.h
@@ -380,8 +380,6 @@ struct he_vcc
380#define PCI_VENDOR_ID_FORE 0x1127 380#define PCI_VENDOR_ID_FORE 0x1127
381#define PCI_DEVICE_ID_FORE_HE 0x400 381#define PCI_DEVICE_ID_FORE_HE 0x400
382 382
383#define HE_DMA_MASK 0xffffffff
384
385#define GEN_CNTL_0 0x40 383#define GEN_CNTL_0 0x40
386#define INT_PROC_ENBL (1<<25) 384#define INT_PROC_ENBL (1<<25)
387#define SLAVE_ENDIAN_MODE (1<<16) 385#define SLAVE_ENDIAN_MODE (1<<16)
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index e830be1a3ae6..e43e02328968 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -6,7 +6,7 @@ menu "Block devices"
6 6
7config BLK_DEV_FD 7config BLK_DEV_FD
8 tristate "Normal floppy disk support" 8 tristate "Normal floppy disk support"
9 depends on (!ARCH_S390 && !M68K && !IA64 && !UML) || Q40 || (SUN3X && BROKEN) || ARCH_RPC || ARCH_EBSA285 9 depends on (!ARCH_S390 && !M68K && !IA64 && !UML && !ARM) || Q40 || (SUN3X && BROKEN) || ARCH_RPC || ARCH_EBSA285
10 ---help--- 10 ---help---
11 If you want to use the floppy disk drive(s) of your PC under Linux, 11 If you want to use the floppy disk drive(s) of your PC under Linux,
12 say Y. Information about this driver, especially important for IBM 12 say Y. Information about this driver, especially important for IBM
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index a2827e43f0fe..a0018de3bef4 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -237,7 +237,7 @@ config I2C_KEYWEST
237 237
238config I2C_MPC 238config I2C_MPC
239 tristate "MPC107/824x/85xx/52xx" 239 tristate "MPC107/824x/85xx/52xx"
240 depends on I2C && PPC 240 depends on I2C && PPC32
241 help 241 help
242 If you say yes to this option, support will be included for the 242 If you say yes to this option, support will be included for the
243 built-in I2C interface on the MPC107/Tsi107/MPC8240/MPC8245 and 243 built-in I2C interface on the MPC107/Tsi107/MPC8240/MPC8245 and
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index 75b8d867dae1..6f33496d31c3 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -55,7 +55,7 @@
55#define CSR_RXAK 0x01 55#define CSR_RXAK 0x01
56 56
57struct mpc_i2c { 57struct mpc_i2c {
58 char *base; 58 void __iomem *base;
59 u32 interrupt; 59 u32 interrupt;
60 wait_queue_head_t queue; 60 wait_queue_head_t queue;
61 struct i2c_adapter adap; 61 struct i2c_adapter adap;
@@ -444,7 +444,7 @@ static int fsl_i2c_probe(struct device *device)
444 444
445 fail_add: 445 fail_add:
446 if (i2c->irq != 0) 446 if (i2c->irq != 0)
447 free_irq(i2c->irq, 0); 447 free_irq(i2c->irq, NULL);
448 fail_irq: 448 fail_irq:
449 iounmap(i2c->base); 449 iounmap(i2c->base);
450 fail_map: 450 fail_map:
diff --git a/drivers/infiniband/hw/mthca/mthca_memfree.c b/drivers/infiniband/hw/mthca/mthca_memfree.c
index 5824b6d3769f..986f2180404b 100644
--- a/drivers/infiniband/hw/mthca/mthca_memfree.c
+++ b/drivers/infiniband/hw/mthca/mthca_memfree.c
@@ -35,6 +35,7 @@
35#include "mthca_memfree.h" 35#include "mthca_memfree.h"
36#include "mthca_dev.h" 36#include "mthca_dev.h"
37#include "mthca_cmd.h" 37#include "mthca_cmd.h"
38#include <linux/mm.h>
38 39
39/* 40/*
40 * We allocate in as big chunks as we can, up to a maximum of 256 KB 41 * We allocate in as big chunks as we can, up to a maximum of 256 KB
diff --git a/drivers/isdn/hisax/hfc4s8s_l1.c b/drivers/isdn/hisax/hfc4s8s_l1.c
index 1ac46c26b936..ba1d028343ec 100644
--- a/drivers/isdn/hisax/hfc4s8s_l1.c
+++ b/drivers/isdn/hisax/hfc4s8s_l1.c
@@ -29,6 +29,7 @@
29#include <linux/timer.h> 29#include <linux/timer.h>
30#include <linux/skbuff.h> 30#include <linux/skbuff.h>
31#include <linux/wait.h> 31#include <linux/wait.h>
32#include <asm/io.h>
32#include "hisax_if.h" 33#include "hisax_if.h"
33#include "hfc4s8s_l1.h" 34#include "hfc4s8s_l1.h"
34 35
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index 067b353e1cbd..89454915b857 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -394,13 +394,11 @@ static void sp_bump(struct sixpack *sp, char cmd)
394 if ((skb = dev_alloc_skb(count)) == NULL) 394 if ((skb = dev_alloc_skb(count)) == NULL)
395 goto out_mem; 395 goto out_mem;
396 396
397 skb->dev = sp->dev;
398 ptr = skb_put(skb, count); 397 ptr = skb_put(skb, count);
399 *ptr++ = cmd; /* KISS command */ 398 *ptr++ = cmd; /* KISS command */
400 399
401 memcpy(ptr, sp->cooked_buf + 1, count); 400 memcpy(ptr, sp->cooked_buf + 1, count);
402 skb->mac.raw = skb->data; 401 skb->protocol = ax25_type_trans(skb, sp->dev);
403 skb->protocol = htons(ETH_P_AX25);
404 netif_rx(skb); 402 netif_rx(skb);
405 sp->dev->last_rx = jiffies; 403 sp->dev->last_rx = jiffies;
406 sp->stats.rx_packets++; 404 sp->stats.rx_packets++;
diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c
index e8cb87d906fc..1c563f905a59 100644
--- a/drivers/net/hamradio/baycom_epp.c
+++ b/drivers/net/hamradio/baycom_epp.c
@@ -601,12 +601,10 @@ static void do_rxpacket(struct net_device *dev)
601 bc->stats.rx_dropped++; 601 bc->stats.rx_dropped++;
602 return; 602 return;
603 } 603 }
604 skb->dev = dev;
605 cp = skb_put(skb, pktlen); 604 cp = skb_put(skb, pktlen);
606 *cp++ = 0; /* KISS kludge */ 605 *cp++ = 0; /* KISS kludge */
607 memcpy(cp, bc->hdlcrx.buf, pktlen - 1); 606 memcpy(cp, bc->hdlcrx.buf, pktlen - 1);
608 skb->protocol = htons(ETH_P_AX25); 607 skb->protocol = ax25_type_trans(skb, dev);
609 skb->mac.raw = skb->data;
610 netif_rx(skb); 608 netif_rx(skb);
611 dev->last_rx = jiffies; 609 dev->last_rx = jiffies;
612 bc->stats.rx_packets++; 610 bc->stats.rx_packets++;
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
index ef1a359e2273..ba9f0580e1f9 100644
--- a/drivers/net/hamradio/bpqether.c
+++ b/drivers/net/hamradio/bpqether.c
@@ -211,11 +211,7 @@ static int bpq_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_ty
211 ptr = skb_push(skb, 1); 211 ptr = skb_push(skb, 1);
212 *ptr = 0; 212 *ptr = 0;
213 213
214 skb->dev = dev; 214 skb->protocol = ax25_type_trans(skb, dev);
215 skb->protocol = htons(ETH_P_AX25);
216 skb->mac.raw = skb->data;
217 skb->pkt_type = PACKET_HOST;
218
219 netif_rx(skb); 215 netif_rx(skb);
220 dev->last_rx = jiffies; 216 dev->last_rx = jiffies;
221unlock: 217unlock:
@@ -272,8 +268,6 @@ static int bpq_xmit(struct sk_buff *skb, struct net_device *dev)
272 skb = newskb; 268 skb = newskb;
273 } 269 }
274 270
275 skb->protocol = htons(ETH_P_AX25);
276
277 ptr = skb_push(skb, 2); 271 ptr = skb_push(skb, 2);
278 272
279 *ptr++ = (size + 5) % 256; 273 *ptr++ = (size + 5) % 256;
@@ -287,7 +281,7 @@ static int bpq_xmit(struct sk_buff *skb, struct net_device *dev)
287 return -ENODEV; 281 return -ENODEV;
288 } 282 }
289 283
290 skb->dev = dev; 284 skb->protocol = ax25_type_trans(skb, dev);
291 skb->nh.raw = skb->data; 285 skb->nh.raw = skb->data;
292 dev->hard_header(skb, dev, ETH_P_BPQ, bpq->dest_addr, NULL, 0); 286 dev->hard_header(skb, dev, ETH_P_BPQ, bpq->dest_addr, NULL, 0);
293 bpq->stats.tx_packets++; 287 bpq->stats.tx_packets++;
diff --git a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c
index f3269b70a8c5..f515245a3fd0 100644
--- a/drivers/net/hamradio/dmascc.c
+++ b/drivers/net/hamradio/dmascc.c
@@ -1306,9 +1306,7 @@ static void rx_bh(void *arg)
1306 data = skb_put(skb, cb + 1); 1306 data = skb_put(skb, cb + 1);
1307 data[0] = 0; 1307 data[0] = 0;
1308 memcpy(&data[1], priv->rx_buf[i], cb); 1308 memcpy(&data[1], priv->rx_buf[i], cb);
1309 skb->dev = priv->dev; 1309 skb->protocol = ax25_type_trans(skb, priv->dev);
1310 skb->protocol = ntohs(ETH_P_AX25);
1311 skb->mac.raw = skb->data;
1312 netif_rx(skb); 1310 netif_rx(skb);
1313 priv->dev->last_rx = jiffies; 1311 priv->dev->last_rx = jiffies;
1314 priv->stats.rx_packets++; 1312 priv->stats.rx_packets++;
diff --git a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c
index b89959a596d7..b4c836e4fe86 100644
--- a/drivers/net/hamradio/hdlcdrv.c
+++ b/drivers/net/hamradio/hdlcdrv.c
@@ -174,12 +174,10 @@ static void hdlc_rx_flag(struct net_device *dev, struct hdlcdrv_state *s)
174 s->stats.rx_dropped++; 174 s->stats.rx_dropped++;
175 return; 175 return;
176 } 176 }
177 skb->dev = dev;
178 cp = skb_put(skb, pkt_len); 177 cp = skb_put(skb, pkt_len);
179 *cp++ = 0; /* KISS kludge */ 178 *cp++ = 0; /* KISS kludge */
180 memcpy(cp, s->hdlcrx.buffer, pkt_len - 1); 179 memcpy(cp, s->hdlcrx.buffer, pkt_len - 1);
181 skb->protocol = htons(ETH_P_AX25); 180 skb->protocol = ax25_type_trans(skb, dev);
182 skb->mac.raw = skb->data;
183 netif_rx(skb); 181 netif_rx(skb);
184 dev->last_rx = jiffies; 182 dev->last_rx = jiffies;
185 s->stats.rx_packets++; 183 s->stats.rx_packets++;
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c
index d9ea080aea0f..62790511098f 100644
--- a/drivers/net/hamradio/mkiss.c
+++ b/drivers/net/hamradio/mkiss.c
@@ -332,12 +332,10 @@ static void ax_bump(struct ax_disp *ax)
332 return; 332 return;
333 } 333 }
334 334
335 skb->dev = ax->dev;
336 spin_lock_bh(&ax->buflock); 335 spin_lock_bh(&ax->buflock);
337 memcpy(skb_put(skb,count), ax->rbuff, count); 336 memcpy(skb_put(skb,count), ax->rbuff, count);
338 spin_unlock_bh(&ax->buflock); 337 spin_unlock_bh(&ax->buflock);
339 skb->mac.raw = skb->data; 338 skb->protocol = ax25_type_trans(skb, ax->dev);
340 skb->protocol = htons(ETH_P_AX25);
341 netif_rx(skb); 339 netif_rx(skb);
342 ax->dev->last_rx = jiffies; 340 ax->dev->last_rx = jiffies;
343 ax->rx_packets++; 341 ax->rx_packets++;
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index ce9e7af020da..ece1b1a13186 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -1630,10 +1630,7 @@ static void scc_net_rx(struct scc_channel *scc, struct sk_buff *skb)
1630 scc->dev_stat.rx_packets++; 1630 scc->dev_stat.rx_packets++;
1631 scc->dev_stat.rx_bytes += skb->len; 1631 scc->dev_stat.rx_bytes += skb->len;
1632 1632
1633 skb->dev = scc->dev; 1633 skb->protocol = ax25_type_trans(skb, scc->dev);
1634 skb->protocol = htons(ETH_P_AX25);
1635 skb->mac.raw = skb->data;
1636 skb->pkt_type = PACKET_HOST;
1637 1634
1638 netif_rx(skb); 1635 netif_rx(skb);
1639 scc->dev->last_rx = jiffies; 1636 scc->dev->last_rx = jiffies;
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index fd7b00fe38e5..41213ef602dc 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -522,12 +522,10 @@ static inline void yam_rx_flag(struct net_device *dev, struct yam_port *yp)
522 ++yp->stats.rx_dropped; 522 ++yp->stats.rx_dropped;
523 } else { 523 } else {
524 unsigned char *cp; 524 unsigned char *cp;
525 skb->dev = dev;
526 cp = skb_put(skb, pkt_len); 525 cp = skb_put(skb, pkt_len);
527 *cp++ = 0; /* KISS kludge */ 526 *cp++ = 0; /* KISS kludge */
528 memcpy(cp, yp->rx_buf, pkt_len - 1); 527 memcpy(cp, yp->rx_buf, pkt_len - 1);
529 skb->protocol = htons(ETH_P_AX25); 528 skb->protocol = ax25_type_trans(skb, dev);
530 skb->mac.raw = skb->data;
531 netif_rx(skb); 529 netif_rx(skb);
532 dev->last_rx = jiffies; 530 dev->last_rx = jiffies;
533 ++yp->stats.rx_packets; 531 ++yp->stats.rx_packets;
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 7e94d455533c..0405e1f0d3df 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -99,7 +99,7 @@ static spinlock_t mv643xx_eth_phy_lock = SPIN_LOCK_UNLOCKED;
99 99
100static inline u32 mv_read(int offset) 100static inline u32 mv_read(int offset)
101{ 101{
102 void *__iomem reg_base; 102 void __iomem *reg_base;
103 103
104 reg_base = mv643xx_eth_shared_base - MV643XX_ETH_SHARED_REGS; 104 reg_base = mv643xx_eth_shared_base - MV643XX_ETH_SHARED_REGS;
105 105
@@ -108,7 +108,7 @@ static inline u32 mv_read(int offset)
108 108
109static inline void mv_write(int offset, u32 data) 109static inline void mv_write(int offset, u32 data)
110{ 110{
111 void * __iomem reg_base; 111 void __iomem *reg_base;
112 112
113 reg_base = mv643xx_eth_shared_base - MV643XX_ETH_SHARED_REGS; 113 reg_base = mv643xx_eth_shared_base - MV643XX_ETH_SHARED_REGS;
114 writel(data, reg_base + offset); 114 writel(data, reg_base + offset);
diff --git a/drivers/net/slip.c b/drivers/net/slip.c
index 4ce52f5f2419..8f7841c0374d 100644
--- a/drivers/net/slip.c
+++ b/drivers/net/slip.c
@@ -185,15 +185,12 @@ sl_alloc_bufs(struct slip *sl, int mtu)
185 /* Cleanup */ 185 /* Cleanup */
186err_exit: 186err_exit:
187#ifdef SL_INCLUDE_CSLIP 187#ifdef SL_INCLUDE_CSLIP
188 if (cbuff) 188 kfree(cbuff);
189 kfree(cbuff);
190 if (slcomp) 189 if (slcomp)
191 slhc_free(slcomp); 190 slhc_free(slcomp);
192#endif 191#endif
193 if (xbuff) 192 kfree(xbuff);
194 kfree(xbuff); 193 kfree(rbuff);
195 if (rbuff)
196 kfree(rbuff);
197 return err; 194 return err;
198} 195}
199 196
@@ -204,13 +201,13 @@ sl_free_bufs(struct slip *sl)
204 void * tmp; 201 void * tmp;
205 202
206 /* Free all SLIP frame buffers. */ 203 /* Free all SLIP frame buffers. */
207 if ((tmp = xchg(&sl->rbuff, NULL)) != NULL) 204 tmp = xchg(&sl->rbuff, NULL);
208 kfree(tmp); 205 kfree(tmp);
209 if ((tmp = xchg(&sl->xbuff, NULL)) != NULL) 206 tmp = xchg(&sl->xbuff, NULL);
210 kfree(tmp); 207 kfree(tmp);
211#ifdef SL_INCLUDE_CSLIP 208#ifdef SL_INCLUDE_CSLIP
212 if ((tmp = xchg(&sl->cbuff, NULL)) != NULL) 209 tmp = xchg(&sl->cbuff, NULL);
213 kfree(tmp); 210 kfree(tmp);
214 if ((tmp = xchg(&sl->slcomp, NULL)) != NULL) 211 if ((tmp = xchg(&sl->slcomp, NULL)) != NULL)
215 slhc_free(tmp); 212 slhc_free(tmp);
216#endif 213#endif
@@ -297,13 +294,10 @@ done_on_bh:
297 spin_unlock_bh(&sl->lock); 294 spin_unlock_bh(&sl->lock);
298 295
299done: 296done:
300 if (xbuff) 297 kfree(xbuff);
301 kfree(xbuff); 298 kfree(rbuff);
302 if (rbuff)
303 kfree(rbuff);
304#ifdef SL_INCLUDE_CSLIP 299#ifdef SL_INCLUDE_CSLIP
305 if (cbuff) 300 kfree(cbuff);
306 kfree(cbuff);
307#endif 301#endif
308 return err; 302 return err;
309} 303}
diff --git a/drivers/net/sunbmac.c b/drivers/net/sunbmac.c
index 025dcd867eaa..f88f5e32b714 100644
--- a/drivers/net/sunbmac.c
+++ b/drivers/net/sunbmac.c
@@ -37,8 +37,18 @@
37 37
38#include "sunbmac.h" 38#include "sunbmac.h"
39 39
40#define DRV_NAME "sunbmac"
41#define DRV_VERSION "2.0"
42#define DRV_RELDATE "11/24/03"
43#define DRV_AUTHOR "David S. Miller (davem@redhat.com)"
44
40static char version[] __initdata = 45static char version[] __initdata =
41 "sunbmac.c:v2.0 24/Nov/03 David S. Miller (davem@redhat.com)\n"; 46 DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " " DRV_AUTHOR "\n";
47
48MODULE_VERSION(DRV_VERSION);
49MODULE_AUTHOR(DRV_AUTHOR);
50MODULE_DESCRIPTION("Sun BigMAC 100baseT ethernet driver");
51MODULE_LICENSE("GPL");
42 52
43#undef DEBUG_PROBE 53#undef DEBUG_PROBE
44#undef DEBUG_TX 54#undef DEBUG_TX
@@ -1321,4 +1331,3 @@ static void __exit bigmac_cleanup(void)
1321 1331
1322module_init(bigmac_probe); 1332module_init(bigmac_probe);
1323module_exit(bigmac_cleanup); 1333module_exit(bigmac_cleanup);
1324MODULE_LICENSE("GPL");
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c
index d837b3c35723..f02fe4119b2c 100644
--- a/drivers/net/sunhme.c
+++ b/drivers/net/sunhme.c
@@ -13,9 +13,6 @@
13 * argument : macaddr=0x00,0x10,0x20,0x30,0x40,0x50 13 * argument : macaddr=0x00,0x10,0x20,0x30,0x40,0x50
14 */ 14 */
15 15
16static char version[] =
17 "sunhme.c:v2.02 24/Aug/2003 David S. Miller (davem@redhat.com)\n";
18
19#include <linux/config.h> 16#include <linux/config.h>
20#include <linux/module.h> 17#include <linux/module.h>
21#include <linux/kernel.h> 18#include <linux/kernel.h>
@@ -67,15 +64,24 @@ static char version[] =
67 64
68#include "sunhme.h" 65#include "sunhme.h"
69 66
67#define DRV_NAME "sunhme"
68#define DRV_VERSION "2.02"
69#define DRV_RELDATE "8/24/03"
70#define DRV_AUTHOR "David S. Miller (davem@redhat.com)"
71
72static char version[] =
73 DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " " DRV_AUTHOR "\n";
70 74
71#define DRV_NAME "sunhme" 75MODULE_VERSION(DRV_VERSION);
76MODULE_AUTHOR(DRV_AUTHOR);
77MODULE_DESCRIPTION("Sun HappyMealEthernet(HME) 10/100baseT ethernet driver");
78MODULE_LICENSE("GPL");
72 79
73static int macaddr[6]; 80static int macaddr[6];
74 81
75/* accept MAC address of the form macaddr=0x08,0x00,0x20,0x30,0x40,0x50 */ 82/* accept MAC address of the form macaddr=0x08,0x00,0x20,0x30,0x40,0x50 */
76module_param_array(macaddr, int, NULL, 0); 83module_param_array(macaddr, int, NULL, 0);
77MODULE_PARM_DESC(macaddr, "Happy Meal MAC address to set"); 84MODULE_PARM_DESC(macaddr, "Happy Meal MAC address to set");
78MODULE_LICENSE("GPL");
79 85
80static struct happy_meal *root_happy_dev; 86static struct happy_meal *root_happy_dev;
81 87
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c
index 62d464c7ef51..b7d87d4690b4 100644
--- a/drivers/net/sunlance.c
+++ b/drivers/net/sunlance.c
@@ -69,9 +69,6 @@
69 69
70#undef DEBUG_DRIVER 70#undef DEBUG_DRIVER
71 71
72static char version[] =
73 "sunlance.c:v2.02 24/Aug/03 Miguel de Icaza (miguel@nuclecu.unam.mx)\n";
74
75static char lancestr[] = "LANCE"; 72static char lancestr[] = "LANCE";
76 73
77#include <linux/config.h> 74#include <linux/config.h>
@@ -108,6 +105,19 @@ static char lancestr[] = "LANCE";
108#include <asm/auxio.h> /* For tpe-link-test? setting */ 105#include <asm/auxio.h> /* For tpe-link-test? setting */
109#include <asm/irq.h> 106#include <asm/irq.h>
110 107
108#define DRV_NAME "sunlance"
109#define DRV_VERSION "2.02"
110#define DRV_RELDATE "8/24/03"
111#define DRV_AUTHOR "Miguel de Icaza (miguel@nuclecu.unam.mx)"
112
113static char version[] =
114 DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " " DRV_AUTHOR "\n";
115
116MODULE_VERSION(DRV_VERSION);
117MODULE_AUTHOR(DRV_AUTHOR);
118MODULE_DESCRIPTION("Sun Lance ethernet driver");
119MODULE_LICENSE("GPL");
120
111/* Define: 2^4 Tx buffers and 2^4 Rx buffers */ 121/* Define: 2^4 Tx buffers and 2^4 Rx buffers */
112#ifndef LANCE_LOG_TX_BUFFERS 122#ifndef LANCE_LOG_TX_BUFFERS
113#define LANCE_LOG_TX_BUFFERS 4 123#define LANCE_LOG_TX_BUFFERS 4
@@ -1611,4 +1621,3 @@ static void __exit sparc_lance_cleanup(void)
1611 1621
1612module_init(sparc_lance_probe); 1622module_init(sparc_lance_probe);
1613module_exit(sparc_lance_cleanup); 1623module_exit(sparc_lance_cleanup);
1614MODULE_LICENSE("GPL");
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c
index 37ef1b82a6cb..1f2323be60d4 100644
--- a/drivers/net/sunqe.c
+++ b/drivers/net/sunqe.c
@@ -7,9 +7,6 @@
7 * Copyright (C) 1996, 1999, 2003 David S. Miller (davem@redhat.com) 7 * Copyright (C) 1996, 1999, 2003 David S. Miller (davem@redhat.com)
8 */ 8 */
9 9
10static char version[] =
11 "sunqe.c:v3.0 8/24/03 David S. Miller (davem@redhat.com)\n";
12
13#include <linux/module.h> 10#include <linux/module.h>
14#include <linux/kernel.h> 11#include <linux/kernel.h>
15#include <linux/types.h> 12#include <linux/types.h>
@@ -43,6 +40,19 @@ static char version[] =
43 40
44#include "sunqe.h" 41#include "sunqe.h"
45 42
43#define DRV_NAME "sunqe"
44#define DRV_VERSION "3.0"
45#define DRV_RELDATE "8/24/03"
46#define DRV_AUTHOR "David S. Miller (davem@redhat.com)"
47
48static char version[] =
49 DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " " DRV_AUTHOR "\n";
50
51MODULE_VERSION(DRV_VERSION);
52MODULE_AUTHOR(DRV_AUTHOR);
53MODULE_DESCRIPTION("Sun QuadEthernet 10baseT SBUS card driver");
54MODULE_LICENSE("GPL");
55
46static struct sunqec *root_qec_dev; 56static struct sunqec *root_qec_dev;
47 57
48static void qe_set_multicast(struct net_device *dev); 58static void qe_set_multicast(struct net_device *dev);
@@ -1040,4 +1050,3 @@ static void __exit qec_cleanup(void)
1040 1050
1041module_init(qec_probe); 1051module_init(qec_probe);
1042module_exit(qec_cleanup); 1052module_exit(qec_cleanup);
1043MODULE_LICENSE("GPL");
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index f65ca3b2da6f..903d0ced7ddb 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -61,8 +61,8 @@
61 61
62#define DRV_MODULE_NAME "tg3" 62#define DRV_MODULE_NAME "tg3"
63#define PFX DRV_MODULE_NAME ": " 63#define PFX DRV_MODULE_NAME ": "
64#define DRV_MODULE_VERSION "3.25" 64#define DRV_MODULE_VERSION "3.26"
65#define DRV_MODULE_RELDATE "March 24, 2005" 65#define DRV_MODULE_RELDATE "April 24, 2005"
66 66
67#define TG3_DEF_MAC_MODE 0 67#define TG3_DEF_MAC_MODE 0
68#define TG3_DEF_RX_MODE 0 68#define TG3_DEF_RX_MODE 0
@@ -426,9 +426,30 @@ static void tg3_enable_ints(struct tg3 *tp)
426 tg3_cond_int(tp); 426 tg3_cond_int(tp);
427} 427}
428 428
429static inline unsigned int tg3_has_work(struct tg3 *tp)
430{
431 struct tg3_hw_status *sblk = tp->hw_status;
432 unsigned int work_exists = 0;
433
434 /* check for phy events */
435 if (!(tp->tg3_flags &
436 (TG3_FLAG_USE_LINKCHG_REG |
437 TG3_FLAG_POLL_SERDES))) {
438 if (sblk->status & SD_STATUS_LINK_CHG)
439 work_exists = 1;
440 }
441 /* check for RX/TX work to do */
442 if (sblk->idx[0].tx_consumer != tp->tx_cons ||
443 sblk->idx[0].rx_producer != tp->rx_rcb_ptr)
444 work_exists = 1;
445
446 return work_exists;
447}
448
429/* tg3_restart_ints 449/* tg3_restart_ints
430 * similar to tg3_enable_ints, but it can return without flushing the 450 * similar to tg3_enable_ints, but it accurately determines whether there
431 * PIO write which reenables interrupts 451 * is new work pending and can return without flushing the PIO write
452 * which reenables interrupts
432 */ 453 */
433static void tg3_restart_ints(struct tg3 *tp) 454static void tg3_restart_ints(struct tg3 *tp)
434{ 455{
@@ -437,7 +458,9 @@ static void tg3_restart_ints(struct tg3 *tp)
437 tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00000000); 458 tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00000000);
438 mmiowb(); 459 mmiowb();
439 460
440 tg3_cond_int(tp); 461 if (tg3_has_work(tp))
462 tw32(HOSTCC_MODE, tp->coalesce_mode |
463 (HOSTCC_MODE_ENABLE | HOSTCC_MODE_NOW));
441} 464}
442 465
443static inline void tg3_netif_stop(struct tg3 *tp) 466static inline void tg3_netif_stop(struct tg3 *tp)
@@ -2686,8 +2709,8 @@ static int tg3_vlan_rx(struct tg3 *tp, struct sk_buff *skb, u16 vlan_tag)
2686static int tg3_rx(struct tg3 *tp, int budget) 2709static int tg3_rx(struct tg3 *tp, int budget)
2687{ 2710{
2688 u32 work_mask; 2711 u32 work_mask;
2689 u32 rx_rcb_ptr = tp->rx_rcb_ptr; 2712 u32 sw_idx = tp->rx_rcb_ptr;
2690 u16 hw_idx, sw_idx; 2713 u16 hw_idx;
2691 int received; 2714 int received;
2692 2715
2693 hw_idx = tp->hw_status->idx[0].rx_producer; 2716 hw_idx = tp->hw_status->idx[0].rx_producer;
@@ -2696,7 +2719,6 @@ static int tg3_rx(struct tg3 *tp, int budget)
2696 * the opaque cookie. 2719 * the opaque cookie.
2697 */ 2720 */
2698 rmb(); 2721 rmb();
2699 sw_idx = rx_rcb_ptr % TG3_RX_RCB_RING_SIZE(tp);
2700 work_mask = 0; 2722 work_mask = 0;
2701 received = 0; 2723 received = 0;
2702 while (sw_idx != hw_idx && budget > 0) { 2724 while (sw_idx != hw_idx && budget > 0) {
@@ -2801,14 +2823,19 @@ static int tg3_rx(struct tg3 *tp, int budget)
2801next_pkt: 2823next_pkt:
2802 (*post_ptr)++; 2824 (*post_ptr)++;
2803next_pkt_nopost: 2825next_pkt_nopost:
2804 rx_rcb_ptr++; 2826 sw_idx++;
2805 sw_idx = rx_rcb_ptr % TG3_RX_RCB_RING_SIZE(tp); 2827 sw_idx %= TG3_RX_RCB_RING_SIZE(tp);
2828
2829 /* Refresh hw_idx to see if there is new work */
2830 if (sw_idx == hw_idx) {
2831 hw_idx = tp->hw_status->idx[0].rx_producer;
2832 rmb();
2833 }
2806 } 2834 }
2807 2835
2808 /* ACK the status ring. */ 2836 /* ACK the status ring. */
2809 tp->rx_rcb_ptr = rx_rcb_ptr; 2837 tp->rx_rcb_ptr = sw_idx;
2810 tw32_rx_mbox(MAILBOX_RCVRET_CON_IDX_0 + TG3_64BIT_REG_LOW, 2838 tw32_rx_mbox(MAILBOX_RCVRET_CON_IDX_0 + TG3_64BIT_REG_LOW, sw_idx);
2811 (rx_rcb_ptr % TG3_RX_RCB_RING_SIZE(tp)));
2812 2839
2813 /* Refill RX ring(s). */ 2840 /* Refill RX ring(s). */
2814 if (work_mask & RXD_OPAQUE_RING_STD) { 2841 if (work_mask & RXD_OPAQUE_RING_STD) {
@@ -2887,26 +2914,6 @@ static int tg3_poll(struct net_device *netdev, int *budget)
2887 return (done ? 0 : 1); 2914 return (done ? 0 : 1);
2888} 2915}
2889 2916
2890static inline unsigned int tg3_has_work(struct net_device *dev, struct tg3 *tp)
2891{
2892 struct tg3_hw_status *sblk = tp->hw_status;
2893 unsigned int work_exists = 0;
2894
2895 /* check for phy events */
2896 if (!(tp->tg3_flags &
2897 (TG3_FLAG_USE_LINKCHG_REG |
2898 TG3_FLAG_POLL_SERDES))) {
2899 if (sblk->status & SD_STATUS_LINK_CHG)
2900 work_exists = 1;
2901 }
2902 /* check for RX/TX work to do */
2903 if (sblk->idx[0].tx_consumer != tp->tx_cons ||
2904 sblk->idx[0].rx_producer != tp->rx_rcb_ptr)
2905 work_exists = 1;
2906
2907 return work_exists;
2908}
2909
2910/* MSI ISR - No need to check for interrupt sharing and no need to 2917/* MSI ISR - No need to check for interrupt sharing and no need to
2911 * flush status block and interrupt mailbox. PCI ordering rules 2918 * flush status block and interrupt mailbox. PCI ordering rules
2912 * guarantee that MSI will arrive after the status block. 2919 * guarantee that MSI will arrive after the status block.
@@ -2930,7 +2937,7 @@ static irqreturn_t tg3_msi(int irq, void *dev_id, struct pt_regs *regs)
2930 tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00000001); 2937 tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00000001);
2931 sblk->status &= ~SD_STATUS_UPDATED; 2938 sblk->status &= ~SD_STATUS_UPDATED;
2932 2939
2933 if (likely(tg3_has_work(dev, tp))) 2940 if (likely(tg3_has_work(tp)))
2934 netif_rx_schedule(dev); /* schedule NAPI poll */ 2941 netif_rx_schedule(dev); /* schedule NAPI poll */
2935 else { 2942 else {
2936 /* no work, re-enable interrupts 2943 /* no work, re-enable interrupts
@@ -2977,7 +2984,7 @@ static irqreturn_t tg3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
2977 tr32(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW); 2984 tr32(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW);
2978 sblk->status &= ~SD_STATUS_UPDATED; 2985 sblk->status &= ~SD_STATUS_UPDATED;
2979 2986
2980 if (likely(tg3_has_work(dev, tp))) 2987 if (likely(tg3_has_work(tp)))
2981 netif_rx_schedule(dev); /* schedule NAPI poll */ 2988 netif_rx_schedule(dev); /* schedule NAPI poll */
2982 else { 2989 else {
2983 /* no work, shared interrupt perhaps? re-enable 2990 /* no work, shared interrupt perhaps? re-enable
diff --git a/drivers/sbus/char/rtc.c b/drivers/sbus/char/rtc.c
index 49d1cd99d5ac..9b988baf0b51 100644
--- a/drivers/sbus/char/rtc.c
+++ b/drivers/sbus/char/rtc.c
@@ -67,7 +67,7 @@ struct rtc_time_generic {
67/* Retrieve the current date and time from the real time clock. */ 67/* Retrieve the current date and time from the real time clock. */
68static void get_rtc_time(struct rtc_time *t) 68static void get_rtc_time(struct rtc_time *t)
69{ 69{
70 void * __iomem regs = mstk48t02_regs; 70 void __iomem *regs = mstk48t02_regs;
71 u8 tmp; 71 u8 tmp;
72 72
73 spin_lock_irq(&mostek_lock); 73 spin_lock_irq(&mostek_lock);
@@ -94,7 +94,7 @@ static void get_rtc_time(struct rtc_time *t)
94/* Set the current date and time inthe real time clock. */ 94/* Set the current date and time inthe real time clock. */
95void set_rtc_time(struct rtc_time *t) 95void set_rtc_time(struct rtc_time *t)
96{ 96{
97 void * __iomem regs = mstk48t02_regs; 97 void __iomem *regs = mstk48t02_regs;
98 u8 tmp; 98 u8 tmp;
99 99
100 spin_lock_irq(&mostek_lock); 100 spin_lock_irq(&mostek_lock);
@@ -250,7 +250,7 @@ static int __init rtc_sun_init(void)
250 /* It is possible we are being driven by some other RTC chip 250 /* It is possible we are being driven by some other RTC chip
251 * and thus another RTC driver is handling things. 251 * and thus another RTC driver is handling things.
252 */ 252 */
253 if (mstk48t02_regs == 0) 253 if (!mstk48t02_regs)
254 return -ENODEV; 254 return -ENODEV;
255 255
256 error = misc_register(&rtc_dev); 256 error = misc_register(&rtc_dev);
diff --git a/drivers/scsi/esp.c b/drivers/scsi/esp.c
index d8ab73b68031..891f97f7881e 100644
--- a/drivers/scsi/esp.c
+++ b/drivers/scsi/esp.c
@@ -49,6 +49,8 @@
49#include <scsi/scsi_host.h> 49#include <scsi/scsi_host.h>
50#include <scsi/scsi_tcq.h> 50#include <scsi/scsi_tcq.h>
51 51
52#define DRV_VERSION "1.101"
53
52#define DEBUG_ESP 54#define DEBUG_ESP
53/* #define DEBUG_ESP_HME */ 55/* #define DEBUG_ESP_HME */
54/* #define DEBUG_ESP_DATA */ 56/* #define DEBUG_ESP_DATA */
@@ -4398,5 +4400,8 @@ static struct scsi_host_template driver_template = {
4398 4400
4399#include "scsi_module.c" 4401#include "scsi_module.c"
4400 4402
4403MODULE_DESCRIPTION("EnhancedScsiProcessor Sun SCSI driver");
4404MODULE_AUTHOR("David S. Miller (davem@redhat.com)");
4401MODULE_LICENSE("GPL"); 4405MODULE_LICENSE("GPL");
4406MODULE_VERSION(DRV_VERSION);
4402 4407
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 1a135f38e78d..2bf1ee2b47b6 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -584,7 +584,7 @@ static int scsi_request_sense(struct scsi_cmnd *scmd)
584 584
585 memcpy(scmd->cmnd, generic_sense, sizeof(generic_sense)); 585 memcpy(scmd->cmnd, generic_sense, sizeof(generic_sense));
586 586
587 scsi_result = kmalloc(252, GFP_ATOMIC | (scmd->device->host->hostt->unchecked_isa_dma) ? __GFP_DMA : 0); 587 scsi_result = kmalloc(252, GFP_ATOMIC | ((scmd->device->host->hostt->unchecked_isa_dma) ? __GFP_DMA : 0));
588 588
589 589
590 if (unlikely(!scsi_result)) { 590 if (unlikely(!scsi_result)) {
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 287d197a7c17..cca772624ae7 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -801,7 +801,7 @@ static int scsi_probe_and_add_lun(struct scsi_target *starget,
801 if (!sreq) 801 if (!sreq)
802 goto out_free_sdev; 802 goto out_free_sdev;
803 result = kmalloc(256, GFP_ATOMIC | 803 result = kmalloc(256, GFP_ATOMIC |
804 (shost->unchecked_isa_dma) ? __GFP_DMA : 0); 804 ((shost->unchecked_isa_dma) ? __GFP_DMA : 0));
805 if (!result) 805 if (!result)
806 goto out_free_sreq; 806 goto out_free_sreq;
807 807
diff --git a/drivers/serial/mpsc.c b/drivers/serial/mpsc.c
index d0dfc3cf9245..a8314aee2ab8 100644
--- a/drivers/serial/mpsc.c
+++ b/drivers/serial/mpsc.c
@@ -329,8 +329,8 @@ mpsc_sdma_stop(struct mpsc_port_info *pi)
329 mpsc_sdma_cmd(pi, SDMA_SDCM_AR | SDMA_SDCM_AT); 329 mpsc_sdma_cmd(pi, SDMA_SDCM_AR | SDMA_SDCM_AT);
330 330
331 /* Clear the SDMA current and first TX and RX pointers */ 331 /* Clear the SDMA current and first TX and RX pointers */
332 mpsc_sdma_set_tx_ring(pi, 0); 332 mpsc_sdma_set_tx_ring(pi, NULL);
333 mpsc_sdma_set_rx_ring(pi, 0); 333 mpsc_sdma_set_rx_ring(pi, NULL);
334 334
335 /* Disable interrupts */ 335 /* Disable interrupts */
336 mpsc_sdma_intr_mask(pi, 0xf); 336 mpsc_sdma_intr_mask(pi, 0xf);
@@ -1540,8 +1540,8 @@ mpsc_shared_unmap_regs(void)
1540 MPSC_SDMA_INTR_REG_BLOCK_SIZE); 1540 MPSC_SDMA_INTR_REG_BLOCK_SIZE);
1541 } 1541 }
1542 1542
1543 mpsc_shared_regs.mpsc_routing_base = 0; 1543 mpsc_shared_regs.mpsc_routing_base = NULL;
1544 mpsc_shared_regs.sdma_intr_base = 0; 1544 mpsc_shared_regs.sdma_intr_base = NULL;
1545 1545
1546 mpsc_shared_regs.mpsc_routing_base_p = 0; 1546 mpsc_shared_regs.mpsc_routing_base_p = 0;
1547 mpsc_shared_regs.sdma_intr_base_p = 0; 1547 mpsc_shared_regs.sdma_intr_base_p = 0;
@@ -1678,9 +1678,9 @@ mpsc_drv_unmap_regs(struct mpsc_port_info *pi)
1678 release_mem_region(pi->brg_base_p, MPSC_BRG_REG_BLOCK_SIZE); 1678 release_mem_region(pi->brg_base_p, MPSC_BRG_REG_BLOCK_SIZE);
1679 } 1679 }
1680 1680
1681 pi->mpsc_base = 0; 1681 pi->mpsc_base = NULL;
1682 pi->sdma_base = 0; 1682 pi->sdma_base = NULL;
1683 pi->brg_base = 0; 1683 pi->brg_base = NULL;
1684 1684
1685 pi->mpsc_base_p = 0; 1685 pi->mpsc_base_p = 0;
1686 pi->sdma_base_p = 0; 1686 pi->sdma_base_p = 0;
diff --git a/drivers/serial/mpsc.h b/drivers/serial/mpsc.h
index 1f7294b7095f..678dbcf06c8f 100644
--- a/drivers/serial/mpsc.h
+++ b/drivers/serial/mpsc.h
@@ -83,8 +83,8 @@ struct mpsc_shared_regs {
83 phys_addr_t mpsc_routing_base_p; 83 phys_addr_t mpsc_routing_base_p;
84 phys_addr_t sdma_intr_base_p; 84 phys_addr_t sdma_intr_base_p;
85 85
86 void *mpsc_routing_base; 86 void __iomem *mpsc_routing_base;
87 void *sdma_intr_base; 87 void __iomem *sdma_intr_base;
88 88
89 u32 MPSC_MRR_m; 89 u32 MPSC_MRR_m;
90 u32 MPSC_RCRR_m; 90 u32 MPSC_RCRR_m;
@@ -120,9 +120,9 @@ struct mpsc_port_info {
120 phys_addr_t brg_base_p; 120 phys_addr_t brg_base_p;
121 121
122 /* Virtual addresses of various blocks of registers (from platform) */ 122 /* Virtual addresses of various blocks of registers (from platform) */
123 void *mpsc_base; 123 void __iomem *mpsc_base;
124 void *sdma_base; 124 void __iomem *sdma_base;
125 void *brg_base; 125 void __iomem *brg_base;
126 126
127 /* Descriptor ring and buffer allocations */ 127 /* Descriptor ring and buffer allocations */
128 void *dma_region; 128 void *dma_region;
diff --git a/drivers/video/logo/Kconfig b/drivers/video/logo/Kconfig
index 849b47b210ec..6ba10e3aceff 100644
--- a/drivers/video/logo/Kconfig
+++ b/drivers/video/logo/Kconfig
@@ -45,7 +45,7 @@ config LOGO_SGI_CLUT224
45 45
46config LOGO_SUN_CLUT224 46config LOGO_SUN_CLUT224
47 bool "224-color Sun Linux logo" 47 bool "224-color Sun Linux logo"
48 depends on LOGO && (SPARC || SPARC64) 48 depends on LOGO && (SPARC32 || SPARC64)
49 default y 49 default y
50 50
51config LOGO_SUPERH_MONO 51config LOGO_SUPERH_MONO
diff --git a/drivers/video/tcx.c b/drivers/video/tcx.c
index e2fa9e1ddc3b..1986a8b3833c 100644
--- a/drivers/video/tcx.c
+++ b/drivers/video/tcx.c
@@ -36,6 +36,7 @@ static int tcx_blank(int, struct fb_info *);
36static int tcx_mmap(struct fb_info *, struct file *, struct vm_area_struct *); 36static int tcx_mmap(struct fb_info *, struct file *, struct vm_area_struct *);
37static int tcx_ioctl(struct inode *, struct file *, unsigned int, 37static int tcx_ioctl(struct inode *, struct file *, unsigned int,
38 unsigned long, struct fb_info *); 38 unsigned long, struct fb_info *);
39static int tcx_pan_display(struct fb_var_screeninfo *, struct fb_info *);
39 40
40/* 41/*
41 * Frame buffer operations 42 * Frame buffer operations
@@ -45,6 +46,7 @@ static struct fb_ops tcx_ops = {
45 .owner = THIS_MODULE, 46 .owner = THIS_MODULE,
46 .fb_setcolreg = tcx_setcolreg, 47 .fb_setcolreg = tcx_setcolreg,
47 .fb_blank = tcx_blank, 48 .fb_blank = tcx_blank,
49 .fb_pan_display = tcx_pan_display,
48 .fb_fillrect = cfb_fillrect, 50 .fb_fillrect = cfb_fillrect,
49 .fb_copyarea = cfb_copyarea, 51 .fb_copyarea = cfb_copyarea,
50 .fb_imageblit = cfb_imageblit, 52 .fb_imageblit = cfb_imageblit,
@@ -153,6 +155,12 @@ static void tcx_reset (struct fb_info *info)
153 spin_unlock_irqrestore(&par->lock, flags); 155 spin_unlock_irqrestore(&par->lock, flags);
154} 156}
155 157
158static int tcx_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
159{
160 tcx_reset(info);
161 return 0;
162}
163
156/** 164/**
157 * tcx_setcolreg - Optional function. Sets a color register. 165 * tcx_setcolreg - Optional function. Sets a color register.
158 * @regno: boolean, 0 copy local, 1 get_user() function 166 * @regno: boolean, 0 copy local, 1 get_user() function
@@ -366,6 +374,9 @@ static void tcx_init_one(struct sbus_dev *sdev)
366 all->par.lowdepth = prom_getbool(sdev->prom_node, "tcx-8-bit"); 374 all->par.lowdepth = prom_getbool(sdev->prom_node, "tcx-8-bit");
367 375
368 sbusfb_fill_var(&all->info.var, sdev->prom_node, 8); 376 sbusfb_fill_var(&all->info.var, sdev->prom_node, 8);
377 all->info.var.red.length = 8;
378 all->info.var.green.length = 8;
379 all->info.var.blue.length = 8;
369 380
370 linebytes = prom_getintdefault(sdev->prom_node, "linebytes", 381 linebytes = prom_getintdefault(sdev->prom_node, "linebytes",
371 all->info.var.xres); 382 all->info.var.xres);
@@ -439,6 +450,7 @@ static void tcx_init_one(struct sbus_dev *sdev)
439 return; 450 return;
440 } 451 }
441 452
453 fb_set_cmap(&all->info.cmap, &all->info);
442 tcx_init_fix(&all->info, linebytes); 454 tcx_init_fix(&all->info, linebytes);
443 455
444 if (register_framebuffer(&all->info) < 0) { 456 if (register_framebuffer(&all->info) < 0) {
@@ -466,7 +478,7 @@ int __init tcx_init(void)
466 return -ENODEV; 478 return -ENODEV;
467 479
468 for_all_sbusdev(sdev, sbus) { 480 for_all_sbusdev(sdev, sbus) {
469 if (!strcmp(sdev->prom_name, "tcx")) 481 if (!strcmp(sdev->prom_name, "SUNW,tcx"))
470 tcx_init_one(sdev); 482 tcx_init_one(sdev);
471 } 483 }
472 484