aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/thermal.c3
-rw-r--r--drivers/block/paride/pcd.c2
-rw-r--r--drivers/block/paride/pf.c2
-rw-r--r--drivers/block/pktcdvd.c3
-rw-r--r--drivers/char/mxser.c48
-rw-r--r--drivers/char/mxser_new.c45
-rw-r--r--drivers/hwmon/w83627ehf.c14
-rw-r--r--drivers/net/bnx2.c7
-rw-r--r--drivers/net/bnx2.h1
-rw-r--r--drivers/net/depca.c3
-rw-r--r--drivers/net/hamradio/baycom_ser_fdx.c6
-rw-r--r--drivers/net/sis900.c44
-rw-r--r--drivers/pci/probe.c45
-rw-r--r--drivers/serial/8250.c8
-rw-r--r--drivers/serial/icom.c9
-rw-r--r--drivers/serial/icom.h1
-rw-r--r--drivers/usb/net/pegasus.c17
-rw-r--r--drivers/usb/net/pegasus.h3
-rw-r--r--drivers/video/Kconfig2
19 files changed, 112 insertions, 151 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 0ae8b9310cbf..589b98b7b216 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -758,7 +758,8 @@ static void acpi_thermal_check(void *data)
758 del_timer(&(tz->timer)); 758 del_timer(&(tz->timer));
759 } else { 759 } else {
760 if (timer_pending(&(tz->timer))) 760 if (timer_pending(&(tz->timer)))
761 mod_timer(&(tz->timer), (HZ * sleep_time) / 1000); 761 mod_timer(&(tz->timer),
762 jiffies + (HZ * sleep_time) / 1000);
762 else { 763 else {
763 tz->timer.data = (unsigned long)tz; 764 tz->timer.data = (unsigned long)tz;
764 tz->timer.function = acpi_thermal_run; 765 tz->timer.function = acpi_thermal_run;
diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c
index c852eed91e4b..1eeb8f2cde71 100644
--- a/drivers/block/paride/pcd.c
+++ b/drivers/block/paride/pcd.c
@@ -140,7 +140,7 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_SLV, D_DLY};
140#include <linux/blkdev.h> 140#include <linux/blkdev.h>
141#include <asm/uaccess.h> 141#include <asm/uaccess.h>
142 142
143static spinlock_t pcd_lock; 143static DEFINE_SPINLOCK(pcd_lock);
144 144
145module_param(verbose, bool, 0644); 145module_param(verbose, bool, 0644);
146module_param(major, int, 0); 146module_param(major, int, 0);
diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c
index 7cdaa1951260..5826508f6731 100644
--- a/drivers/block/paride/pf.c
+++ b/drivers/block/paride/pf.c
@@ -154,7 +154,7 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_SLV, D_LUN, D_DLY};
154#include <linux/blkpg.h> 154#include <linux/blkpg.h>
155#include <asm/uaccess.h> 155#include <asm/uaccess.h>
156 156
157static spinlock_t pf_spin_lock; 157static DEFINE_SPINLOCK(pf_spin_lock);
158 158
159module_param(verbose, bool, 0644); 159module_param(verbose, bool, 0644);
160module_param(major, int, 0); 160module_param(major, int, 0);
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index a4fb70383188..f1b9dd7d47d6 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -777,7 +777,8 @@ static int pkt_generic_packet(struct pktcdvd_device *pd, struct packet_command *
777 rq->cmd_flags |= REQ_QUIET; 777 rq->cmd_flags |= REQ_QUIET;
778 778
779 blk_execute_rq(rq->q, pd->bdev->bd_disk, rq, 0); 779 blk_execute_rq(rq->q, pd->bdev->bd_disk, rq, 0);
780 ret = rq->errors; 780 if (rq->errors)
781 ret = -EIO;
781out: 782out:
782 blk_put_request(rq); 783 blk_put_request(rq);
783 return ret; 784 return ret;
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index a61fb6da5d03..80a01150b86c 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -1338,43 +1338,23 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int c
1338 * (use |'ed TIOCM_RNG/DSR/CD/CTS for masking) 1338 * (use |'ed TIOCM_RNG/DSR/CD/CTS for masking)
1339 * Caller should use TIOCGICOUNT to see which one it was 1339 * Caller should use TIOCGICOUNT to see which one it was
1340 */ 1340 */
1341 case TIOCMIWAIT: { 1341 case TIOCMIWAIT:
1342 DECLARE_WAITQUEUE(wait, current); 1342 spin_lock_irqsave(&info->slock, flags);
1343 int ret; 1343 cnow = info->icount; /* note the counters on entry */
1344 spin_unlock_irqrestore(&info->slock, flags);
1345
1346 wait_event_interruptible(info->delta_msr_wait, ({
1347 cprev = cnow;
1344 spin_lock_irqsave(&info->slock, flags); 1348 spin_lock_irqsave(&info->slock, flags);
1345 cprev = info->icount; /* note the counters on entry */ 1349 cnow = info->icount; /* atomic copy */
1346 spin_unlock_irqrestore(&info->slock, flags); 1350 spin_unlock_irqrestore(&info->slock, flags);
1347 1351
1348 add_wait_queue(&info->delta_msr_wait, &wait); 1352 ((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) ||
1349 while (1) { 1353 ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) ||
1350 spin_lock_irqsave(&info->slock, flags); 1354 ((arg & TIOCM_CD) && (cnow.dcd != cprev.dcd)) ||
1351 cnow = info->icount; /* atomic copy */ 1355 ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts));
1352 spin_unlock_irqrestore(&info->slock, flags); 1356 }));
1353 1357 break;
1354 set_current_state(TASK_INTERRUPTIBLE);
1355 if (((arg & TIOCM_RNG) &&
1356 (cnow.rng != cprev.rng)) ||
1357 ((arg & TIOCM_DSR) &&
1358 (cnow.dsr != cprev.dsr)) ||
1359 ((arg & TIOCM_CD) &&
1360 (cnow.dcd != cprev.dcd)) ||
1361 ((arg & TIOCM_CTS) &&
1362 (cnow.cts != cprev.cts))) {
1363 ret = 0;
1364 break;
1365 }
1366 /* see if a signal did it */
1367 if (signal_pending(current)) {
1368 ret = -ERESTARTSYS;
1369 break;
1370 }
1371 cprev = cnow;
1372 }
1373 current->state = TASK_RUNNING;
1374 remove_wait_queue(&info->delta_msr_wait, &wait);
1375 break;
1376 }
1377 /* NOTREACHED */
1378 /* 1358 /*
1379 * Get counter of input serial line interrupts (DCD,RI,DSR,CTS) 1359 * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
1380 * Return: write counters to the user passed counter struct 1360 * Return: write counters to the user passed counter struct
diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c
index 9af07e4999d5..f7603b6aeb87 100644
--- a/drivers/char/mxser_new.c
+++ b/drivers/char/mxser_new.c
@@ -1758,43 +1758,23 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file,
1758 * (use |'ed TIOCM_RNG/DSR/CD/CTS for masking) 1758 * (use |'ed TIOCM_RNG/DSR/CD/CTS for masking)
1759 * Caller should use TIOCGICOUNT to see which one it was 1759 * Caller should use TIOCGICOUNT to see which one it was
1760 */ 1760 */
1761 case TIOCMIWAIT: { 1761 case TIOCMIWAIT:
1762 DECLARE_WAITQUEUE(wait, current);
1763 int ret;
1764 spin_lock_irqsave(&info->slock, flags); 1762 spin_lock_irqsave(&info->slock, flags);
1765 cprev = info->icount; /* note the counters on entry */ 1763 cnow = info->icount; /* note the counters on entry */
1766 spin_unlock_irqrestore(&info->slock, flags); 1764 spin_unlock_irqrestore(&info->slock, flags);
1767 1765
1768 add_wait_queue(&info->delta_msr_wait, &wait); 1766 wait_event_interruptible(info->delta_msr_wait, ({
1769 while (1) { 1767 cprev = cnow;
1770 spin_lock_irqsave(&info->slock, flags); 1768 spin_lock_irqsave(&info->slock, flags);
1771 cnow = info->icount; /* atomic copy */ 1769 cnow = info->icount; /* atomic copy */
1772 spin_unlock_irqrestore(&info->slock, flags); 1770 spin_unlock_irqrestore(&info->slock, flags);
1773 1771
1774 set_current_state(TASK_INTERRUPTIBLE); 1772 ((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) ||
1775 if (((arg & TIOCM_RNG) && 1773 ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) ||
1776 (cnow.rng != cprev.rng)) || 1774 ((arg & TIOCM_CD) && (cnow.dcd != cprev.dcd)) ||
1777 ((arg & TIOCM_DSR) && 1775 ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts));
1778 (cnow.dsr != cprev.dsr)) || 1776 }));
1779 ((arg & TIOCM_CD) &&
1780 (cnow.dcd != cprev.dcd)) ||
1781 ((arg & TIOCM_CTS) &&
1782 (cnow.cts != cprev.cts))) {
1783 ret = 0;
1784 break;
1785 }
1786 /* see if a signal did it */
1787 if (signal_pending(current)) {
1788 ret = -ERESTARTSYS;
1789 break;
1790 }
1791 cprev = cnow;
1792 }
1793 current->state = TASK_RUNNING;
1794 remove_wait_queue(&info->delta_msr_wait, &wait);
1795 break; 1777 break;
1796 }
1797 /* NOTREACHED */
1798 /* 1778 /*
1799 * Get counter of input serial line interrupts (DCD,RI,DSR,CTS) 1779 * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
1800 * Return: write counters to the user passed counter struct 1780 * Return: write counters to the user passed counter struct
@@ -2230,7 +2210,14 @@ end_intr:
2230 port->mon_data.rxcnt += cnt; 2210 port->mon_data.rxcnt += cnt;
2231 port->mon_data.up_rxcnt += cnt; 2211 port->mon_data.up_rxcnt += cnt;
2232 2212
2213 /*
2214 * We are called from an interrupt context with &port->slock
2215 * being held. Drop it temporarily in order to prevent
2216 * recursive locking.
2217 */
2218 spin_unlock(&port->slock);
2233 tty_flip_buffer_push(tty); 2219 tty_flip_buffer_push(tty);
2220 spin_lock(&port->slock);
2234} 2221}
2235 2222
2236static void mxser_transmit_chars(struct mxser_port *port) 2223static void mxser_transmit_chars(struct mxser_port *port)
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
index 01206ebb1cf2..30a76404f0af 100644
--- a/drivers/hwmon/w83627ehf.c
+++ b/drivers/hwmon/w83627ehf.c
@@ -121,9 +121,9 @@ superio_exit(void)
121 * ISA constants 121 * ISA constants
122 */ 122 */
123 123
124#define REGION_ALIGNMENT ~7 124#define IOREGION_ALIGNMENT ~7
125#define REGION_OFFSET 5 125#define IOREGION_OFFSET 5
126#define REGION_LENGTH 2 126#define IOREGION_LENGTH 2
127#define ADDR_REG_OFFSET 5 127#define ADDR_REG_OFFSET 5
128#define DATA_REG_OFFSET 6 128#define DATA_REG_OFFSET 6
129 129
@@ -1194,7 +1194,7 @@ static int w83627ehf_detect(struct i2c_adapter *adapter)
1194 u8 fan4pin, fan5pin; 1194 u8 fan4pin, fan5pin;
1195 int i, err = 0; 1195 int i, err = 0;
1196 1196
1197 if (!request_region(address + REGION_OFFSET, REGION_LENGTH, 1197 if (!request_region(address + IOREGION_OFFSET, IOREGION_LENGTH,
1198 w83627ehf_driver.driver.name)) { 1198 w83627ehf_driver.driver.name)) {
1199 err = -EBUSY; 1199 err = -EBUSY;
1200 goto exit; 1200 goto exit;
@@ -1322,7 +1322,7 @@ exit_remove:
1322exit_free: 1322exit_free:
1323 kfree(data); 1323 kfree(data);
1324exit_release: 1324exit_release:
1325 release_region(address + REGION_OFFSET, REGION_LENGTH); 1325 release_region(address + IOREGION_OFFSET, IOREGION_LENGTH);
1326exit: 1326exit:
1327 return err; 1327 return err;
1328} 1328}
@@ -1337,7 +1337,7 @@ static int w83627ehf_detach_client(struct i2c_client *client)
1337 1337
1338 if ((err = i2c_detach_client(client))) 1338 if ((err = i2c_detach_client(client)))
1339 return err; 1339 return err;
1340 release_region(client->addr + REGION_OFFSET, REGION_LENGTH); 1340 release_region(client->addr + IOREGION_OFFSET, IOREGION_LENGTH);
1341 kfree(data); 1341 kfree(data);
1342 1342
1343 return 0; 1343 return 0;
@@ -1380,7 +1380,7 @@ static int __init w83627ehf_find(int sioaddr, unsigned short *addr)
1380 superio_select(W83627EHF_LD_HWM); 1380 superio_select(W83627EHF_LD_HWM);
1381 val = (superio_inb(SIO_REG_ADDR) << 8) 1381 val = (superio_inb(SIO_REG_ADDR) << 8)
1382 | superio_inb(SIO_REG_ADDR + 1); 1382 | superio_inb(SIO_REG_ADDR + 1);
1383 *addr = val & REGION_ALIGNMENT; 1383 *addr = val & IOREGION_ALIGNMENT;
1384 if (*addr == 0) { 1384 if (*addr == 0) {
1385 superio_exit(); 1385 superio_exit();
1386 return -ENODEV; 1386 return -ENODEV;
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 0b7aded8dcfd..e85f5ec48f96 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -54,8 +54,8 @@
54 54
55#define DRV_MODULE_NAME "bnx2" 55#define DRV_MODULE_NAME "bnx2"
56#define PFX DRV_MODULE_NAME ": " 56#define PFX DRV_MODULE_NAME ": "
57#define DRV_MODULE_VERSION "1.5.7" 57#define DRV_MODULE_VERSION "1.5.8"
58#define DRV_MODULE_RELDATE "March 29, 2007" 58#define DRV_MODULE_RELDATE "April 24, 2007"
59 59
60#define RUN_AT(x) (jiffies + (x)) 60#define RUN_AT(x) (jiffies + (x))
61 61
@@ -3421,6 +3421,9 @@ bnx2_init_chip(struct bnx2 *bp)
3421 val = REG_RD(bp, BNX2_MQ_CONFIG); 3421 val = REG_RD(bp, BNX2_MQ_CONFIG);
3422 val &= ~BNX2_MQ_CONFIG_KNL_BYP_BLK_SIZE; 3422 val &= ~BNX2_MQ_CONFIG_KNL_BYP_BLK_SIZE;
3423 val |= BNX2_MQ_CONFIG_KNL_BYP_BLK_SIZE_256; 3423 val |= BNX2_MQ_CONFIG_KNL_BYP_BLK_SIZE_256;
3424 if (CHIP_ID(bp) == CHIP_ID_5709_A0 || CHIP_ID(bp) == CHIP_ID_5709_A1)
3425 val |= BNX2_MQ_CONFIG_HALT_DIS;
3426
3424 REG_WR(bp, BNX2_MQ_CONFIG, val); 3427 REG_WR(bp, BNX2_MQ_CONFIG, val);
3425 3428
3426 val = 0x10000 + (MAX_CID_CNT * MB_KERNEL_CTX_SIZE); 3429 val = 0x10000 + (MAX_CID_CNT * MB_KERNEL_CTX_SIZE);
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h
index ccbdf81c6599..878eee58f12a 100644
--- a/drivers/net/bnx2.h
+++ b/drivers/net/bnx2.h
@@ -6518,6 +6518,7 @@ struct bnx2 {
6518#define CHIP_ID_5708_B0 0x57081000 6518#define CHIP_ID_5708_B0 0x57081000
6519#define CHIP_ID_5708_B1 0x57081010 6519#define CHIP_ID_5708_B1 0x57081010
6520#define CHIP_ID_5709_A0 0x57090000 6520#define CHIP_ID_5709_A0 0x57090000
6521#define CHIP_ID_5709_A1 0x57090010
6521 6522
6522#define CHIP_BOND_ID(bp) (((bp)->chip_id) & 0xf) 6523#define CHIP_BOND_ID(bp) (((bp)->chip_id) & 0xf)
6523 6524
diff --git a/drivers/net/depca.c b/drivers/net/depca.c
index 5113eef755b9..f3807aaf10aa 100644
--- a/drivers/net/depca.c
+++ b/drivers/net/depca.c
@@ -1491,8 +1491,9 @@ static void __init depca_platform_probe (void)
1491 depca_io_ports[i].device = pldev; 1491 depca_io_ports[i].device = pldev;
1492 1492
1493 if (platform_device_add(pldev)) { 1493 if (platform_device_add(pldev)) {
1494 platform_device_put(pldev);
1495 depca_io_ports[i].device = NULL; 1494 depca_io_ports[i].device = NULL;
1495 pldev->dev.platform_data = NULL;
1496 platform_device_put(pldev);
1496 continue; 1497 continue;
1497 } 1498 }
1498 1499
diff --git a/drivers/net/hamradio/baycom_ser_fdx.c b/drivers/net/hamradio/baycom_ser_fdx.c
index 59214e74b9cf..30baf6ecfc63 100644
--- a/drivers/net/hamradio/baycom_ser_fdx.c
+++ b/drivers/net/hamradio/baycom_ser_fdx.c
@@ -75,12 +75,14 @@
75#include <linux/ioport.h> 75#include <linux/ioport.h>
76#include <linux/string.h> 76#include <linux/string.h>
77#include <linux/init.h> 77#include <linux/init.h>
78#include <asm/uaccess.h>
79#include <asm/io.h>
80#include <linux/hdlcdrv.h> 78#include <linux/hdlcdrv.h>
81#include <linux/baycom.h> 79#include <linux/baycom.h>
82#include <linux/jiffies.h> 80#include <linux/jiffies.h>
83 81
82#include <asm/uaccess.h>
83#include <asm/io.h>
84#include <asm/irq.h>
85
84/* --------------------------------------------------------------------- */ 86/* --------------------------------------------------------------------- */
85 87
86#define BAYCOM_DEBUG 88#define BAYCOM_DEBUG
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c
index b3750f284279..b2a3b19d773a 100644
--- a/drivers/net/sis900.c
+++ b/drivers/net/sis900.c
@@ -1755,6 +1755,24 @@ static int sis900_rx(struct net_device *net_dev)
1755 } else { 1755 } else {
1756 struct sk_buff * skb; 1756 struct sk_buff * skb;
1757 1757
1758 pci_unmap_single(sis_priv->pci_dev,
1759 sis_priv->rx_ring[entry].bufptr, RX_BUF_SIZE,
1760 PCI_DMA_FROMDEVICE);
1761
1762 /* refill the Rx buffer, what if there is not enought
1763 * memory for new socket buffer ?? */
1764 if ((skb = dev_alloc_skb(RX_BUF_SIZE)) == NULL) {
1765 /*
1766 * Not enough memory to refill the buffer
1767 * so we need to recycle the old one so
1768 * as to avoid creating a memory hole
1769 * in the rx ring
1770 */
1771 skb = sis_priv->rx_skbuff[entry];
1772 sis_priv->stats.rx_dropped++;
1773 goto refill_rx_ring;
1774 }
1775
1758 /* This situation should never happen, but due to 1776 /* This situation should never happen, but due to
1759 some unknow bugs, it is possible that 1777 some unknow bugs, it is possible that
1760 we are working on NULL sk_buff :-( */ 1778 we are working on NULL sk_buff :-( */
@@ -1768,9 +1786,6 @@ static int sis900_rx(struct net_device *net_dev)
1768 break; 1786 break;
1769 } 1787 }
1770 1788
1771 pci_unmap_single(sis_priv->pci_dev,
1772 sis_priv->rx_ring[entry].bufptr, RX_BUF_SIZE,
1773 PCI_DMA_FROMDEVICE);
1774 /* give the socket buffer to upper layers */ 1789 /* give the socket buffer to upper layers */
1775 skb = sis_priv->rx_skbuff[entry]; 1790 skb = sis_priv->rx_skbuff[entry];
1776 skb_put(skb, rx_size); 1791 skb_put(skb, rx_size);
@@ -1783,33 +1798,14 @@ static int sis900_rx(struct net_device *net_dev)
1783 net_dev->last_rx = jiffies; 1798 net_dev->last_rx = jiffies;
1784 sis_priv->stats.rx_bytes += rx_size; 1799 sis_priv->stats.rx_bytes += rx_size;
1785 sis_priv->stats.rx_packets++; 1800 sis_priv->stats.rx_packets++;
1786 1801 sis_priv->dirty_rx++;
1787 /* refill the Rx buffer, what if there is not enought 1802refill_rx_ring:
1788 * memory for new socket buffer ?? */
1789 if ((skb = dev_alloc_skb(RX_BUF_SIZE)) == NULL) {
1790 /* not enough memory for skbuff, this makes a
1791 * "hole" on the buffer ring, it is not clear
1792 * how the hardware will react to this kind
1793 * of degenerated buffer */
1794 if (netif_msg_rx_status(sis_priv))
1795 printk(KERN_INFO "%s: Memory squeeze,"
1796 "deferring packet.\n",
1797 net_dev->name);
1798 sis_priv->rx_skbuff[entry] = NULL;
1799 /* reset buffer descriptor state */
1800 sis_priv->rx_ring[entry].cmdsts = 0;
1801 sis_priv->rx_ring[entry].bufptr = 0;
1802 sis_priv->stats.rx_dropped++;
1803 sis_priv->cur_rx++;
1804 break;
1805 }
1806 skb->dev = net_dev; 1803 skb->dev = net_dev;
1807 sis_priv->rx_skbuff[entry] = skb; 1804 sis_priv->rx_skbuff[entry] = skb;
1808 sis_priv->rx_ring[entry].cmdsts = RX_BUF_SIZE; 1805 sis_priv->rx_ring[entry].cmdsts = RX_BUF_SIZE;
1809 sis_priv->rx_ring[entry].bufptr = 1806 sis_priv->rx_ring[entry].bufptr =
1810 pci_map_single(sis_priv->pci_dev, skb->data, 1807 pci_map_single(sis_priv->pci_dev, skb->data,
1811 RX_BUF_SIZE, PCI_DMA_FROMDEVICE); 1808 RX_BUF_SIZE, PCI_DMA_FROMDEVICE);
1812 sis_priv->dirty_rx++;
1813 } 1809 }
1814 sis_priv->cur_rx++; 1810 sis_priv->cur_rx++;
1815 entry = sis_priv->cur_rx % NUM_RX_DESC; 1811 entry = sis_priv->cur_rx % NUM_RX_DESC;
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index a4a96826d9e0..2fe1d690eb13 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -682,34 +682,7 @@ static void pci_read_irq(struct pci_dev *dev)
682 dev->irq = irq; 682 dev->irq = irq;
683} 683}
684 684
685static void change_legacy_io_resource(struct pci_dev * dev, unsigned index, 685#define LEGACY_IO_RESOURCE (IORESOURCE_IO | IORESOURCE_PCI_FIXED)
686 unsigned start, unsigned end)
687{
688 unsigned base = start & PCI_BASE_ADDRESS_IO_MASK;
689 unsigned len = (end | ~PCI_BASE_ADDRESS_IO_MASK) - base + 1;
690
691 /*
692 * Some X versions get confused when the BARs reported through
693 * /sys or /proc differ from those seen in config space, thus
694 * try to update the config space values, too.
695 */
696 if (!(pci_resource_flags(dev, index) & IORESOURCE_IO))
697 printk(KERN_WARNING "%s: cannot adjust BAR%u (not I/O)\n",
698 pci_name(dev), index);
699 else if (pci_resource_len(dev, index) != len)
700 printk(KERN_WARNING "%s: cannot adjust BAR%u (size %04X)\n",
701 pci_name(dev), index, (unsigned)pci_resource_len(dev, index));
702 else {
703 printk(KERN_INFO "%s: trying to change BAR%u from %04X to %04X\n",
704 pci_name(dev), index,
705 (unsigned)pci_resource_start(dev, index), base);
706 pci_write_config_dword(dev, PCI_BASE_ADDRESS_0 + index * 4, base);
707 }
708 pci_resource_start(dev, index) = start;
709 pci_resource_end(dev, index) = end;
710 pci_resource_flags(dev, index) =
711 IORESOURCE_IO | IORESOURCE_PCI_FIXED | PCI_BASE_ADDRESS_SPACE_IO;
712}
713 686
714/** 687/**
715 * pci_setup_device - fill in class and map information of a device 688 * pci_setup_device - fill in class and map information of a device
@@ -762,12 +735,20 @@ static int pci_setup_device(struct pci_dev * dev)
762 u8 progif; 735 u8 progif;
763 pci_read_config_byte(dev, PCI_CLASS_PROG, &progif); 736 pci_read_config_byte(dev, PCI_CLASS_PROG, &progif);
764 if ((progif & 1) == 0) { 737 if ((progif & 1) == 0) {
765 change_legacy_io_resource(dev, 0, 0x1F0, 0x1F7); 738 dev->resource[0].start = 0x1F0;
766 change_legacy_io_resource(dev, 1, 0x3F6, 0x3F6); 739 dev->resource[0].end = 0x1F7;
740 dev->resource[0].flags = LEGACY_IO_RESOURCE;
741 dev->resource[1].start = 0x3F6;
742 dev->resource[1].end = 0x3F6;
743 dev->resource[1].flags = LEGACY_IO_RESOURCE;
767 } 744 }
768 if ((progif & 4) == 0) { 745 if ((progif & 4) == 0) {
769 change_legacy_io_resource(dev, 2, 0x170, 0x177); 746 dev->resource[2].start = 0x170;
770 change_legacy_io_resource(dev, 3, 0x376, 0x376); 747 dev->resource[2].end = 0x177;
748 dev->resource[2].flags = LEGACY_IO_RESOURCE;
749 dev->resource[3].start = 0x376;
750 dev->resource[3].end = 0x376;
751 dev->resource[3].flags = LEGACY_IO_RESOURCE;
771 } 752 }
772 } 753 }
773 break; 754 break;
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index c129a0e8e807..90621c3312bc 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -1310,7 +1310,8 @@ static unsigned int check_modem_status(struct uart_8250_port *up)
1310{ 1310{
1311 unsigned int status = serial_in(up, UART_MSR); 1311 unsigned int status = serial_in(up, UART_MSR);
1312 1312
1313 if (status & UART_MSR_ANY_DELTA && up->ier & UART_IER_MSI) { 1313 if (status & UART_MSR_ANY_DELTA && up->ier & UART_IER_MSI &&
1314 up->port.info != NULL) {
1314 if (status & UART_MSR_TERI) 1315 if (status & UART_MSR_TERI)
1315 up->port.icount.rng++; 1316 up->port.icount.rng++;
1316 if (status & UART_MSR_DDSR) 1317 if (status & UART_MSR_DDSR)
@@ -1333,8 +1334,9 @@ static inline void
1333serial8250_handle_port(struct uart_8250_port *up) 1334serial8250_handle_port(struct uart_8250_port *up)
1334{ 1335{
1335 unsigned int status; 1336 unsigned int status;
1337 unsigned long flags;
1336 1338
1337 spin_lock(&up->port.lock); 1339 spin_lock_irqsave(&up->port.lock, flags);
1338 1340
1339 status = serial_inp(up, UART_LSR); 1341 status = serial_inp(up, UART_LSR);
1340 1342
@@ -1346,7 +1348,7 @@ serial8250_handle_port(struct uart_8250_port *up)
1346 if (status & UART_LSR_THRE) 1348 if (status & UART_LSR_THRE)
1347 transmit_chars(up); 1349 transmit_chars(up);
1348 1350
1349 spin_unlock(&up->port.lock); 1351 spin_unlock_irqrestore(&up->port.lock, flags);
1350} 1352}
1351 1353
1352/* 1354/*
diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c
index 41431d0d5512..246c5572667b 100644
--- a/drivers/serial/icom.c
+++ b/drivers/serial/icom.c
@@ -164,7 +164,7 @@ static void free_port_memory(struct icom_port *icom_port)
164 } 164 }
165} 165}
166 166
167static int __init get_port_memory(struct icom_port *icom_port) 167static int __devinit get_port_memory(struct icom_port *icom_port)
168{ 168{
169 int index; 169 int index;
170 unsigned long stgAddr; 170 unsigned long stgAddr;
@@ -1380,7 +1380,7 @@ static void icom_port_active(struct icom_port *icom_port, struct icom_adapter *i
1380 0x8024 + 2 - 2 * (icom_port->port - 2); 1380 0x8024 + 2 - 2 * (icom_port->port - 2);
1381 } 1381 }
1382} 1382}
1383static int __init icom_load_ports(struct icom_adapter *icom_adapter) 1383static int __devinit icom_load_ports(struct icom_adapter *icom_adapter)
1384{ 1384{
1385 struct icom_port *icom_port; 1385 struct icom_port *icom_port;
1386 int port_num; 1386 int port_num;
@@ -1473,7 +1473,7 @@ static void icom_remove_adapter(struct icom_adapter *icom_adapter)
1473 } 1473 }
1474 } 1474 }
1475 1475
1476 free_irq(icom_adapter->irq_number, (void *) icom_adapter); 1476 free_irq(icom_adapter->pci_dev->irq, (void *) icom_adapter);
1477 iounmap(icom_adapter->base_addr); 1477 iounmap(icom_adapter->base_addr);
1478 icom_free_adapter(icom_adapter); 1478 icom_free_adapter(icom_adapter);
1479 pci_release_regions(icom_adapter->pci_dev); 1479 pci_release_regions(icom_adapter->pci_dev);
@@ -1539,7 +1539,6 @@ static int __devinit icom_probe(struct pci_dev *dev,
1539 } 1539 }
1540 1540
1541 icom_adapter->base_addr_pci = pci_resource_start(dev, 0); 1541 icom_adapter->base_addr_pci = pci_resource_start(dev, 0);
1542 icom_adapter->irq_number = dev->irq;
1543 icom_adapter->pci_dev = dev; 1542 icom_adapter->pci_dev = dev;
1544 icom_adapter->version = ent->driver_data; 1543 icom_adapter->version = ent->driver_data;
1545 icom_adapter->subsystem_id = ent->subdevice; 1544 icom_adapter->subsystem_id = ent->subdevice;
@@ -1570,7 +1569,7 @@ static int __devinit icom_probe(struct pci_dev *dev,
1570 icom_port = &icom_adapter->port_info[index]; 1569 icom_port = &icom_adapter->port_info[index];
1571 1570
1572 if (icom_port->status == ICOM_PORT_ACTIVE) { 1571 if (icom_port->status == ICOM_PORT_ACTIVE) {
1573 icom_port->uart_port.irq = icom_port->adapter->irq_number; 1572 icom_port->uart_port.irq = icom_port->adapter->pci_dev->irq;
1574 icom_port->uart_port.type = PORT_ICOM; 1573 icom_port->uart_port.type = PORT_ICOM;
1575 icom_port->uart_port.iotype = UPIO_MEM; 1574 icom_port->uart_port.iotype = UPIO_MEM;
1576 icom_port->uart_port.membase = 1575 icom_port->uart_port.membase =
diff --git a/drivers/serial/icom.h b/drivers/serial/icom.h
index 798f1ef23712..e8578d8cd35e 100644
--- a/drivers/serial/icom.h
+++ b/drivers/serial/icom.h
@@ -258,7 +258,6 @@ struct icom_port {
258struct icom_adapter { 258struct icom_adapter {
259 void __iomem * base_addr; 259 void __iomem * base_addr;
260 unsigned long base_addr_pci; 260 unsigned long base_addr_pci;
261 unsigned char irq_number;
262 struct pci_dev *pci_dev; 261 struct pci_dev *pci_dev;
263 struct icom_port port_info[4]; 262 struct icom_port port_info[4];
264 int index; 263 int index;
diff --git a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c
index d48c024cff59..6d12961cf9f9 100644
--- a/drivers/usb/net/pegasus.c
+++ b/drivers/usb/net/pegasus.c
@@ -316,6 +316,7 @@ static int update_eth_regs_async(pegasus_t * pegasus)
316 return ret; 316 return ret;
317} 317}
318 318
319/* Returns 0 on success, error on failure */
319static int read_mii_word(pegasus_t * pegasus, __u8 phy, __u8 indx, __u16 * regd) 320static int read_mii_word(pegasus_t * pegasus, __u8 phy, __u8 indx, __u16 * regd)
320{ 321{
321 int i; 322 int i;
@@ -847,10 +848,16 @@ static void intr_callback(struct urb *urb)
847 * d[0].NO_CARRIER kicks in only with failed TX. 848 * d[0].NO_CARRIER kicks in only with failed TX.
848 * ... so monitoring with MII may be safest. 849 * ... so monitoring with MII may be safest.
849 */ 850 */
850 if (d[0] & NO_CARRIER) 851 if (pegasus->features & TRUST_LINK_STATUS) {
851 netif_carrier_off(net); 852 if (d[5] & LINK_STATUS)
852 else 853 netif_carrier_on(net);
853 netif_carrier_on(net); 854 else
855 netif_carrier_off(net);
856 } else {
857 /* Never set carrier _on_ based on ! NO_CARRIER */
858 if (d[0] & NO_CARRIER)
859 netif_carrier_off(net);
860 }
854 861
855 /* bytes 3-4 == rx_lostpkt, reg 2E/2F */ 862 /* bytes 3-4 == rx_lostpkt, reg 2E/2F */
856 pegasus->stats.rx_missed_errors += ((d[3] & 0x7f) << 8) | d[4]; 863 pegasus->stats.rx_missed_errors += ((d[3] & 0x7f) << 8) | d[4];
@@ -950,7 +957,7 @@ static void set_carrier(struct net_device *net)
950 pegasus_t *pegasus = netdev_priv(net); 957 pegasus_t *pegasus = netdev_priv(net);
951 u16 tmp; 958 u16 tmp;
952 959
953 if (!read_mii_word(pegasus, pegasus->phy, MII_BMSR, &tmp)) 960 if (read_mii_word(pegasus, pegasus->phy, MII_BMSR, &tmp))
954 return; 961 return;
955 962
956 if (tmp & BMSR_LSTATUS) 963 if (tmp & BMSR_LSTATUS)
diff --git a/drivers/usb/net/pegasus.h b/drivers/usb/net/pegasus.h
index c7467823cd1c..c7aadb413e8c 100644
--- a/drivers/usb/net/pegasus.h
+++ b/drivers/usb/net/pegasus.h
@@ -11,6 +11,7 @@
11 11
12#define PEGASUS_II 0x80000000 12#define PEGASUS_II 0x80000000
13#define HAS_HOME_PNA 0x40000000 13#define HAS_HOME_PNA 0x40000000
14#define TRUST_LINK_STATUS 0x20000000
14 15
15#define PEGASUS_MTU 1536 16#define PEGASUS_MTU 1536
16#define RX_SKBS 4 17#define RX_SKBS 4
@@ -203,7 +204,7 @@ PEGASUS_DEV( "AEI USB Fast Ethernet Adapter", VENDOR_AEILAB, 0x1701,
203PEGASUS_DEV( "Allied Telesyn Int. AT-USB100", VENDOR_ALLIEDTEL, 0xb100, 204PEGASUS_DEV( "Allied Telesyn Int. AT-USB100", VENDOR_ALLIEDTEL, 0xb100,
204 DEFAULT_GPIO_RESET | PEGASUS_II ) 205 DEFAULT_GPIO_RESET | PEGASUS_II )
205PEGASUS_DEV( "Belkin F5D5050 USB Ethernet", VENDOR_BELKIN, 0x0121, 206PEGASUS_DEV( "Belkin F5D5050 USB Ethernet", VENDOR_BELKIN, 0x0121,
206 DEFAULT_GPIO_RESET | PEGASUS_II ) 207 DEFAULT_GPIO_RESET | PEGASUS_II | TRUST_LINK_STATUS )
207PEGASUS_DEV( "Billionton USB-100", VENDOR_BILLIONTON, 0x0986, 208PEGASUS_DEV( "Billionton USB-100", VENDOR_BILLIONTON, 0x0986,
208 DEFAULT_GPIO_RESET ) 209 DEFAULT_GPIO_RESET )
209PEGASUS_DEV( "Billionton USBLP-100", VENDOR_BILLIONTON, 0x0987, 210PEGASUS_DEV( "Billionton USBLP-100", VENDOR_BILLIONTON, 0x0987,
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index e4f0dd00ae85..8372ace4a0d9 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -139,7 +139,7 @@ config FB_TILEBLITTING
139 This is particularly important to one driver, matroxfb. If 139 This is particularly important to one driver, matroxfb. If
140 unsure, say N. 140 unsure, say N.
141 141
142comment "Frambuffer hardware drivers" 142comment "Frame buffer hardware drivers"
143 depends on FB 143 depends on FB
144 144
145config FB_CIRRUS 145config FB_CIRRUS