diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/Kconfig | 8 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_msghandler.c | 4 | ||||
-rw-r--r-- | drivers/char/mspec.c | 8 | ||||
-rw-r--r-- | drivers/net/arcnet/com20020.c | 7 | ||||
-rw-r--r-- | drivers/net/bonding/bond_main.c | 5 | ||||
-rw-r--r-- | drivers/net/cris/eth_v10.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_main.c | 22 | ||||
-rw-r--r-- | drivers/pci/pci-sysfs.c | 3 | ||||
-rw-r--r-- | drivers/scsi/scsi_scan.c | 18 | ||||
-rw-r--r-- | drivers/serial/cpm_uart/cpm_uart.h | 2 | ||||
-rw-r--r-- | drivers/serial/cpm_uart/cpm_uart_core.c | 16 | ||||
-rw-r--r-- | drivers/serial/cpm_uart/cpm_uart_cpm1.c | 2 | ||||
-rw-r--r-- | drivers/video/nvidia/nv_hw.c | 12 | ||||
-rw-r--r-- | drivers/video/nvidia/nv_setup.c | 18 | ||||
-rw-r--r-- | drivers/video/nvidia/nv_type.h | 1 | ||||
-rw-r--r-- | drivers/video/nvidia/nvidia.c | 24 |
16 files changed, 107 insertions, 45 deletions
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 39a9f8cc6412..2af12fc45115 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig | |||
@@ -409,14 +409,6 @@ config SGI_MBCS | |||
409 | If you have an SGI Altix with an attached SABrick | 409 | If you have an SGI Altix with an attached SABrick |
410 | say Y or M here, otherwise say N. | 410 | say Y or M here, otherwise say N. |
411 | 411 | ||
412 | config MSPEC | ||
413 | tristate "Memory special operations driver" | ||
414 | depends on IA64 | ||
415 | help | ||
416 | If you have an ia64 and you want to enable memory special | ||
417 | operations support (formerly known as fetchop), say Y here, | ||
418 | otherwise say N. | ||
419 | |||
420 | source "drivers/serial/Kconfig" | 412 | source "drivers/serial/Kconfig" |
421 | 413 | ||
422 | config UNIX98_PTYS | 414 | config UNIX98_PTYS |
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 0b07ca1b71fa..a41b8df24073 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c | |||
@@ -1854,7 +1854,7 @@ static ssize_t provides_dev_sdrs_show(struct device *dev, | |||
1854 | struct bmc_device *bmc = dev_get_drvdata(dev); | 1854 | struct bmc_device *bmc = dev_get_drvdata(dev); |
1855 | 1855 | ||
1856 | return snprintf(buf, 10, "%u\n", | 1856 | return snprintf(buf, 10, "%u\n", |
1857 | bmc->id.device_revision && 0x80 >> 7); | 1857 | (bmc->id.device_revision & 0x80) >> 7); |
1858 | } | 1858 | } |
1859 | 1859 | ||
1860 | static ssize_t revision_show(struct device *dev, struct device_attribute *attr, | 1860 | static ssize_t revision_show(struct device *dev, struct device_attribute *attr, |
@@ -1863,7 +1863,7 @@ static ssize_t revision_show(struct device *dev, struct device_attribute *attr, | |||
1863 | struct bmc_device *bmc = dev_get_drvdata(dev); | 1863 | struct bmc_device *bmc = dev_get_drvdata(dev); |
1864 | 1864 | ||
1865 | return snprintf(buf, 20, "%u\n", | 1865 | return snprintf(buf, 20, "%u\n", |
1866 | bmc->id.device_revision && 0x0F); | 1866 | bmc->id.device_revision & 0x0F); |
1867 | } | 1867 | } |
1868 | 1868 | ||
1869 | static ssize_t firmware_rev_show(struct device *dev, | 1869 | static ssize_t firmware_rev_show(struct device *dev, |
diff --git a/drivers/char/mspec.c b/drivers/char/mspec.c index 5c0dec39cf6c..235e89226112 100644 --- a/drivers/char/mspec.c +++ b/drivers/char/mspec.c | |||
@@ -72,7 +72,11 @@ enum { | |||
72 | MSPEC_UNCACHED | 72 | MSPEC_UNCACHED |
73 | }; | 73 | }; |
74 | 74 | ||
75 | #ifdef CONFIG_SGI_SN | ||
75 | static int is_sn2; | 76 | static int is_sn2; |
77 | #else | ||
78 | #define is_sn2 0 | ||
79 | #endif | ||
76 | 80 | ||
77 | /* | 81 | /* |
78 | * One of these structures is allocated when an mspec region is mmaped. The | 82 | * One of these structures is allocated when an mspec region is mmaped. The |
@@ -211,7 +215,7 @@ mspec_nopfn(struct vm_area_struct *vma, unsigned long address) | |||
211 | if (vdata->type == MSPEC_FETCHOP) | 215 | if (vdata->type == MSPEC_FETCHOP) |
212 | paddr = TO_AMO(maddr); | 216 | paddr = TO_AMO(maddr); |
213 | else | 217 | else |
214 | paddr = __pa(TO_CAC(maddr)); | 218 | paddr = maddr & ~__IA64_UNCACHED_OFFSET; |
215 | 219 | ||
216 | pfn = paddr >> PAGE_SHIFT; | 220 | pfn = paddr >> PAGE_SHIFT; |
217 | 221 | ||
@@ -335,6 +339,7 @@ mspec_init(void) | |||
335 | * The fetchop device only works on SN2 hardware, uncached and cached | 339 | * The fetchop device only works on SN2 hardware, uncached and cached |
336 | * memory drivers should both be valid on all ia64 hardware | 340 | * memory drivers should both be valid on all ia64 hardware |
337 | */ | 341 | */ |
342 | #ifdef CONFIG_SGI_SN | ||
338 | if (ia64_platform_is("sn2")) { | 343 | if (ia64_platform_is("sn2")) { |
339 | is_sn2 = 1; | 344 | is_sn2 = 1; |
340 | if (is_shub2()) { | 345 | if (is_shub2()) { |
@@ -363,6 +368,7 @@ mspec_init(void) | |||
363 | goto free_scratch_pages; | 368 | goto free_scratch_pages; |
364 | } | 369 | } |
365 | } | 370 | } |
371 | #endif | ||
366 | ret = misc_register(&cached_miscdev); | 372 | ret = misc_register(&cached_miscdev); |
367 | if (ret) { | 373 | if (ret) { |
368 | printk(KERN_ERR "%s: failed to register device %i\n", | 374 | printk(KERN_ERR "%s: failed to register device %i\n", |
diff --git a/drivers/net/arcnet/com20020.c b/drivers/net/arcnet/com20020.c index 0dc70c7b7940..aa9dd8f11269 100644 --- a/drivers/net/arcnet/com20020.c +++ b/drivers/net/arcnet/com20020.c | |||
@@ -337,13 +337,16 @@ static void com20020_set_mc_list(struct net_device *dev) | |||
337 | } | 337 | } |
338 | } | 338 | } |
339 | 339 | ||
340 | #ifdef MODULE | 340 | #if defined(CONFIG_ARCNET_COM20020_PCI_MODULE) || \ |
341 | 341 | defined(CONFIG_ARCNET_COM20020_ISA_MODULE) | |
342 | EXPORT_SYMBOL(com20020_check); | 342 | EXPORT_SYMBOL(com20020_check); |
343 | EXPORT_SYMBOL(com20020_found); | 343 | EXPORT_SYMBOL(com20020_found); |
344 | #endif | ||
344 | 345 | ||
345 | MODULE_LICENSE("GPL"); | 346 | MODULE_LICENSE("GPL"); |
346 | 347 | ||
348 | #ifdef MODULE | ||
349 | |||
347 | int init_module(void) | 350 | int init_module(void) |
348 | { | 351 | { |
349 | BUGLVL(D_NORMAL) printk(VERSION); | 352 | BUGLVL(D_NORMAL) printk(VERSION); |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index c0bbddae4ec4..17a461152d39 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -4692,6 +4692,8 @@ static int bond_check_params(struct bond_params *params) | |||
4692 | return 0; | 4692 | return 0; |
4693 | } | 4693 | } |
4694 | 4694 | ||
4695 | static struct lock_class_key bonding_netdev_xmit_lock_key; | ||
4696 | |||
4695 | /* Create a new bond based on the specified name and bonding parameters. | 4697 | /* Create a new bond based on the specified name and bonding parameters. |
4696 | * Caller must NOT hold rtnl_lock; we need to release it here before we | 4698 | * Caller must NOT hold rtnl_lock; we need to release it here before we |
4697 | * set up our sysfs entries. | 4699 | * set up our sysfs entries. |
@@ -4727,6 +4729,9 @@ int bond_create(char *name, struct bond_params *params, struct bonding **newbond | |||
4727 | if (res < 0) { | 4729 | if (res < 0) { |
4728 | goto out_bond; | 4730 | goto out_bond; |
4729 | } | 4731 | } |
4732 | |||
4733 | lockdep_set_class(&bond_dev->_xmit_lock, &bonding_netdev_xmit_lock_key); | ||
4734 | |||
4730 | if (newbond) | 4735 | if (newbond) |
4731 | *newbond = bond_dev->priv; | 4736 | *newbond = bond_dev->priv; |
4732 | 4737 | ||
diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c index 966b563e42bb..a03d781f6d0a 100644 --- a/drivers/net/cris/eth_v10.c +++ b/drivers/net/cris/eth_v10.c | |||
@@ -509,6 +509,8 @@ etrax_ethernet_init(void) | |||
509 | * does not share cacheline with any other data (to avoid cache bug) | 509 | * does not share cacheline with any other data (to avoid cache bug) |
510 | */ | 510 | */ |
511 | RxDescList[i].skb = dev_alloc_skb(MAX_MEDIA_DATA_SIZE + 2 * L1_CACHE_BYTES); | 511 | RxDescList[i].skb = dev_alloc_skb(MAX_MEDIA_DATA_SIZE + 2 * L1_CACHE_BYTES); |
512 | if (!RxDescList[i].skb) | ||
513 | return -ENOMEM; | ||
512 | RxDescList[i].descr.ctrl = 0; | 514 | RxDescList[i].descr.ctrl = 0; |
513 | RxDescList[i].descr.sw_len = MAX_MEDIA_DATA_SIZE; | 515 | RxDescList[i].descr.sw_len = MAX_MEDIA_DATA_SIZE; |
514 | RxDescList[i].descr.next = virt_to_phys(&RxDescList[i + 1]); | 516 | RxDescList[i].descr.next = virt_to_phys(&RxDescList[i + 1]); |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index 65edb56107fd..a1b783813d8e 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |||
@@ -746,7 +746,7 @@ int bcm43xx_sprom_write(struct bcm43xx_private *bcm, const u16 *sprom) | |||
746 | if (err) | 746 | if (err) |
747 | goto err_ctlreg; | 747 | goto err_ctlreg; |
748 | spromctl |= 0x10; /* SPROM WRITE enable. */ | 748 | spromctl |= 0x10; /* SPROM WRITE enable. */ |
749 | bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl); | 749 | err = bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl); |
750 | if (err) | 750 | if (err) |
751 | goto err_ctlreg; | 751 | goto err_ctlreg; |
752 | /* We must burn lots of CPU cycles here, but that does not | 752 | /* We must burn lots of CPU cycles here, but that does not |
@@ -768,7 +768,7 @@ int bcm43xx_sprom_write(struct bcm43xx_private *bcm, const u16 *sprom) | |||
768 | mdelay(20); | 768 | mdelay(20); |
769 | } | 769 | } |
770 | spromctl &= ~0x10; /* SPROM WRITE enable. */ | 770 | spromctl &= ~0x10; /* SPROM WRITE enable. */ |
771 | bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl); | 771 | err = bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl); |
772 | if (err) | 772 | if (err) |
773 | goto err_ctlreg; | 773 | goto err_ctlreg; |
774 | mdelay(500); | 774 | mdelay(500); |
@@ -1463,6 +1463,23 @@ static void handle_irq_transmit_status(struct bcm43xx_private *bcm) | |||
1463 | } | 1463 | } |
1464 | } | 1464 | } |
1465 | 1465 | ||
1466 | static void drain_txstatus_queue(struct bcm43xx_private *bcm) | ||
1467 | { | ||
1468 | u32 dummy; | ||
1469 | |||
1470 | if (bcm->current_core->rev < 5) | ||
1471 | return; | ||
1472 | /* Read all entries from the microcode TXstatus FIFO | ||
1473 | * and throw them away. | ||
1474 | */ | ||
1475 | while (1) { | ||
1476 | dummy = bcm43xx_read32(bcm, BCM43xx_MMIO_XMITSTAT_0); | ||
1477 | if (!dummy) | ||
1478 | break; | ||
1479 | dummy = bcm43xx_read32(bcm, BCM43xx_MMIO_XMITSTAT_1); | ||
1480 | } | ||
1481 | } | ||
1482 | |||
1466 | static void bcm43xx_generate_noise_sample(struct bcm43xx_private *bcm) | 1483 | static void bcm43xx_generate_noise_sample(struct bcm43xx_private *bcm) |
1467 | { | 1484 | { |
1468 | bcm43xx_shm_write16(bcm, BCM43xx_SHM_SHARED, 0x408, 0x7F7F); | 1485 | bcm43xx_shm_write16(bcm, BCM43xx_SHM_SHARED, 0x408, 0x7F7F); |
@@ -3532,6 +3549,7 @@ int bcm43xx_select_wireless_core(struct bcm43xx_private *bcm, | |||
3532 | bcm43xx_macfilter_clear(bcm, BCM43xx_MACFILTER_ASSOC); | 3549 | bcm43xx_macfilter_clear(bcm, BCM43xx_MACFILTER_ASSOC); |
3533 | bcm43xx_macfilter_set(bcm, BCM43xx_MACFILTER_SELF, (u8 *)(bcm->net_dev->dev_addr)); | 3550 | bcm43xx_macfilter_set(bcm, BCM43xx_MACFILTER_SELF, (u8 *)(bcm->net_dev->dev_addr)); |
3534 | bcm43xx_security_init(bcm); | 3551 | bcm43xx_security_init(bcm); |
3552 | drain_txstatus_queue(bcm); | ||
3535 | ieee80211softmac_start(bcm->net_dev); | 3553 | ieee80211softmac_start(bcm->net_dev); |
3536 | 3554 | ||
3537 | /* Let's go! Be careful after enabling the IRQs. | 3555 | /* Let's go! Be careful after enabling the IRQs. |
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index a1d2e979b17f..f952bfea48a6 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -642,6 +642,9 @@ err: | |||
642 | */ | 642 | */ |
643 | void pci_remove_sysfs_dev_files(struct pci_dev *pdev) | 643 | void pci_remove_sysfs_dev_files(struct pci_dev *pdev) |
644 | { | 644 | { |
645 | if (!sysfs_initialized) | ||
646 | return; | ||
647 | |||
645 | if (pdev->cfg_size < 4096) | 648 | if (pdev->cfg_size < 4096) |
646 | sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr); | 649 | sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr); |
647 | else | 650 | else |
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index fd9e281c3bfe..94a274645f6f 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
@@ -631,12 +631,22 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result, | |||
631 | * scanning run at their own risk, or supply a user level program | 631 | * scanning run at their own risk, or supply a user level program |
632 | * that can correctly scan. | 632 | * that can correctly scan. |
633 | */ | 633 | */ |
634 | sdev->inquiry = kmalloc(sdev->inquiry_len, GFP_ATOMIC); | 634 | |
635 | if (sdev->inquiry == NULL) { | 635 | /* |
636 | * Copy at least 36 bytes of INQUIRY data, so that we don't | ||
637 | * dereference unallocated memory when accessing the Vendor, | ||
638 | * Product, and Revision strings. Badly behaved devices may set | ||
639 | * the INQUIRY Additional Length byte to a small value, indicating | ||
640 | * these strings are invalid, but often they contain plausible data | ||
641 | * nonetheless. It doesn't matter if the device sent < 36 bytes | ||
642 | * total, since scsi_probe_lun() initializes inq_result with 0s. | ||
643 | */ | ||
644 | sdev->inquiry = kmemdup(inq_result, | ||
645 | max_t(size_t, sdev->inquiry_len, 36), | ||
646 | GFP_ATOMIC); | ||
647 | if (sdev->inquiry == NULL) | ||
636 | return SCSI_SCAN_NO_RESPONSE; | 648 | return SCSI_SCAN_NO_RESPONSE; |
637 | } | ||
638 | 649 | ||
639 | memcpy(sdev->inquiry, inq_result, sdev->inquiry_len); | ||
640 | sdev->vendor = (char *) (sdev->inquiry + 8); | 650 | sdev->vendor = (char *) (sdev->inquiry + 8); |
641 | sdev->model = (char *) (sdev->inquiry + 16); | 651 | sdev->model = (char *) (sdev->inquiry + 16); |
642 | sdev->rev = (char *) (sdev->inquiry + 32); | 652 | sdev->rev = (char *) (sdev->inquiry + 32); |
diff --git a/drivers/serial/cpm_uart/cpm_uart.h b/drivers/serial/cpm_uart/cpm_uart.h index a8f894c78194..69715e556506 100644 --- a/drivers/serial/cpm_uart/cpm_uart.h +++ b/drivers/serial/cpm_uart/cpm_uart.h | |||
@@ -88,7 +88,7 @@ extern struct uart_cpm_port cpm_uart_ports[UART_NR]; | |||
88 | 88 | ||
89 | /* these are located in their respective files */ | 89 | /* these are located in their respective files */ |
90 | void cpm_line_cr_cmd(int line, int cmd); | 90 | void cpm_line_cr_cmd(int line, int cmd); |
91 | int cpm_uart_init_portdesc(void); | 91 | int __init cpm_uart_init_portdesc(void); |
92 | int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con); | 92 | int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con); |
93 | void cpm_uart_freebuf(struct uart_cpm_port *pinfo); | 93 | void cpm_uart_freebuf(struct uart_cpm_port *pinfo); |
94 | 94 | ||
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c index 0abb544ae63d..7a3b97fdf8d1 100644 --- a/drivers/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/serial/cpm_uart/cpm_uart_core.c | |||
@@ -195,10 +195,8 @@ static void cpm_uart_start_tx(struct uart_port *port) | |||
195 | if (cpm_uart_tx_pump(port) != 0) { | 195 | if (cpm_uart_tx_pump(port) != 0) { |
196 | if (IS_SMC(pinfo)) { | 196 | if (IS_SMC(pinfo)) { |
197 | smcp->smc_smcm |= SMCM_TX; | 197 | smcp->smc_smcm |= SMCM_TX; |
198 | smcp->smc_smcmr |= SMCMR_TEN; | ||
199 | } else { | 198 | } else { |
200 | sccp->scc_sccm |= UART_SCCM_TX; | 199 | sccp->scc_sccm |= UART_SCCM_TX; |
201 | pinfo->sccp->scc_gsmrl |= SCC_GSMRL_ENT; | ||
202 | } | 200 | } |
203 | } | 201 | } |
204 | } | 202 | } |
@@ -421,9 +419,10 @@ static int cpm_uart_startup(struct uart_port *port) | |||
421 | /* Startup rx-int */ | 419 | /* Startup rx-int */ |
422 | if (IS_SMC(pinfo)) { | 420 | if (IS_SMC(pinfo)) { |
423 | pinfo->smcp->smc_smcm |= SMCM_RX; | 421 | pinfo->smcp->smc_smcm |= SMCM_RX; |
424 | pinfo->smcp->smc_smcmr |= SMCMR_REN; | 422 | pinfo->smcp->smc_smcmr |= (SMCMR_REN | SMCMR_TEN); |
425 | } else { | 423 | } else { |
426 | pinfo->sccp->scc_sccm |= UART_SCCM_RX; | 424 | pinfo->sccp->scc_sccm |= UART_SCCM_RX; |
425 | pinfo->sccp->scc_gsmrl |= (SCC_GSMRL_ENR | SCC_GSMRL_ENT); | ||
427 | } | 426 | } |
428 | 427 | ||
429 | if (!(pinfo->flags & FLAG_CONSOLE)) | 428 | if (!(pinfo->flags & FLAG_CONSOLE)) |
@@ -1350,11 +1349,10 @@ static int cpm_uart_init(void) { | |||
1350 | pr_info("cpm_uart: WARNING: no UART devices found on platform bus!\n"); | 1349 | pr_info("cpm_uart: WARNING: no UART devices found on platform bus!\n"); |
1351 | pr_info( | 1350 | pr_info( |
1352 | "cpm_uart: the driver will guess configuration, but this mode is no longer supported.\n"); | 1351 | "cpm_uart: the driver will guess configuration, but this mode is no longer supported.\n"); |
1353 | #ifndef CONFIG_SERIAL_CPM_CONSOLE | 1352 | |
1354 | ret = cpm_uart_init_portdesc(); | 1353 | /* Don't run this again, if the console driver did it already */ |
1355 | if (ret) | 1354 | if (cpm_uart_nr == 0) |
1356 | return ret; | 1355 | cpm_uart_init_portdesc(); |
1357 | #endif | ||
1358 | 1356 | ||
1359 | cpm_reg.nr = cpm_uart_nr; | 1357 | cpm_reg.nr = cpm_uart_nr; |
1360 | ret = uart_register_driver(&cpm_reg); | 1358 | ret = uart_register_driver(&cpm_reg); |
@@ -1366,6 +1364,8 @@ static int cpm_uart_init(void) { | |||
1366 | int con = cpm_uart_port_map[i]; | 1364 | int con = cpm_uart_port_map[i]; |
1367 | cpm_uart_ports[con].port.line = i; | 1365 | cpm_uart_ports[con].port.line = i; |
1368 | cpm_uart_ports[con].port.flags = UPF_BOOT_AUTOCONF; | 1366 | cpm_uart_ports[con].port.flags = UPF_BOOT_AUTOCONF; |
1367 | if (cpm_uart_ports[con].set_lineif) | ||
1368 | cpm_uart_ports[con].set_lineif(&cpm_uart_ports[con]); | ||
1369 | uart_add_one_port(&cpm_reg, &cpm_uart_ports[con].port); | 1369 | uart_add_one_port(&cpm_reg, &cpm_uart_ports[con].port); |
1370 | } | 1370 | } |
1371 | 1371 | ||
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm1.c b/drivers/serial/cpm_uart/cpm_uart_cpm1.c index 95afc37297a8..08e55fdc882a 100644 --- a/drivers/serial/cpm_uart/cpm_uart_cpm1.c +++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.c | |||
@@ -184,7 +184,7 @@ void cpm_uart_freebuf(struct uart_cpm_port *pinfo) | |||
184 | } | 184 | } |
185 | 185 | ||
186 | /* Setup any dynamic params in the uart desc */ | 186 | /* Setup any dynamic params in the uart desc */ |
187 | int cpm_uart_init_portdesc(void) | 187 | int __init cpm_uart_init_portdesc(void) |
188 | { | 188 | { |
189 | pr_debug("CPM uart[-]:init portdesc\n"); | 189 | pr_debug("CPM uart[-]:init portdesc\n"); |
190 | 190 | ||
diff --git a/drivers/video/nvidia/nv_hw.c b/drivers/video/nvidia/nv_hw.c index 9ed640d35728..ea426115c6f9 100644 --- a/drivers/video/nvidia/nv_hw.c +++ b/drivers/video/nvidia/nv_hw.c | |||
@@ -145,12 +145,18 @@ static void nvGetClocks(struct nvidia_par *par, unsigned int *MClk, | |||
145 | 145 | ||
146 | if (par->Architecture >= NV_ARCH_40) { | 146 | if (par->Architecture >= NV_ARCH_40) { |
147 | pll = NV_RD32(par->PMC, 0x4020); | 147 | pll = NV_RD32(par->PMC, 0x4020); |
148 | P = (pll >> 16) & 0x03; | 148 | P = (pll >> 16) & 0x07; |
149 | pll = NV_RD32(par->PMC, 0x4024); | 149 | pll = NV_RD32(par->PMC, 0x4024); |
150 | M = pll & 0xFF; | 150 | M = pll & 0xFF; |
151 | N = (pll >> 8) & 0xFF; | 151 | N = (pll >> 8) & 0xFF; |
152 | MB = (pll >> 16) & 0xFF; | 152 | if (((par->Chipset & 0xfff0) == 0x0290) || |
153 | NB = (pll >> 24) & 0xFF; | 153 | ((par->Chipset & 0xfff0) == 0x0390)) { |
154 | MB = 1; | ||
155 | NB = 1; | ||
156 | } else { | ||
157 | MB = (pll >> 16) & 0xFF; | ||
158 | NB = (pll >> 24) & 0xFF; | ||
159 | } | ||
154 | *MClk = ((N * NB * par->CrystalFreqKHz) / (M * MB)) >> P; | 160 | *MClk = ((N * NB * par->CrystalFreqKHz) / (M * MB)) >> P; |
155 | 161 | ||
156 | pll = NV_RD32(par->PMC, 0x4000); | 162 | pll = NV_RD32(par->PMC, 0x4000); |
diff --git a/drivers/video/nvidia/nv_setup.c b/drivers/video/nvidia/nv_setup.c index a18a9aebf05f..61dc46fecf2b 100644 --- a/drivers/video/nvidia/nv_setup.c +++ b/drivers/video/nvidia/nv_setup.c | |||
@@ -359,6 +359,7 @@ int NVCommonSetup(struct fb_info *info) | |||
359 | case 0x0186: | 359 | case 0x0186: |
360 | case 0x0187: | 360 | case 0x0187: |
361 | case 0x018D: | 361 | case 0x018D: |
362 | case 0x0228: | ||
362 | case 0x0286: | 363 | case 0x0286: |
363 | case 0x028C: | 364 | case 0x028C: |
364 | case 0x0316: | 365 | case 0x0316: |
@@ -382,6 +383,10 @@ int NVCommonSetup(struct fb_info *info) | |||
382 | case 0x034C: | 383 | case 0x034C: |
383 | case 0x0160: | 384 | case 0x0160: |
384 | case 0x0166: | 385 | case 0x0166: |
386 | case 0x0169: | ||
387 | case 0x016B: | ||
388 | case 0x016C: | ||
389 | case 0x016D: | ||
385 | case 0x00C8: | 390 | case 0x00C8: |
386 | case 0x00CC: | 391 | case 0x00CC: |
387 | case 0x0144: | 392 | case 0x0144: |
@@ -639,12 +644,23 @@ int NVCommonSetup(struct fb_info *info) | |||
639 | par->fpHeight = NV_RD32(par->PRAMDAC, 0x0800) + 1; | 644 | par->fpHeight = NV_RD32(par->PRAMDAC, 0x0800) + 1; |
640 | par->fpSyncs = NV_RD32(par->PRAMDAC, 0x0848) & 0x30000033; | 645 | par->fpSyncs = NV_RD32(par->PRAMDAC, 0x0848) & 0x30000033; |
641 | 646 | ||
642 | printk("Panel size is %i x %i\n", par->fpWidth, par->fpHeight); | 647 | printk("nvidiafb: Panel size is %i x %i\n", par->fpWidth, par->fpHeight); |
643 | } | 648 | } |
644 | 649 | ||
645 | if (monA) | 650 | if (monA) |
646 | info->monspecs = *monA; | 651 | info->monspecs = *monA; |
647 | 652 | ||
653 | if (!par->FlatPanel || !par->twoHeads) | ||
654 | par->FPDither = 0; | ||
655 | |||
656 | par->LVDS = 0; | ||
657 | if (par->FlatPanel && par->twoHeads) { | ||
658 | NV_WR32(par->PRAMDAC0, 0x08B0, 0x00010004); | ||
659 | if (par->PRAMDAC0[0x08b4] & 1) | ||
660 | par->LVDS = 1; | ||
661 | printk("nvidiafb: Panel is %s\n", par->LVDS ? "LVDS" : "TMDS"); | ||
662 | } | ||
663 | |||
648 | kfree(edidA); | 664 | kfree(edidA); |
649 | kfree(edidB); | 665 | kfree(edidB); |
650 | done: | 666 | done: |
diff --git a/drivers/video/nvidia/nv_type.h b/drivers/video/nvidia/nv_type.h index acdc26693402..86e65dea60d3 100644 --- a/drivers/video/nvidia/nv_type.h +++ b/drivers/video/nvidia/nv_type.h | |||
@@ -129,6 +129,7 @@ struct nvidia_par { | |||
129 | int fpHeight; | 129 | int fpHeight; |
130 | int PanelTweak; | 130 | int PanelTweak; |
131 | int paneltweak; | 131 | int paneltweak; |
132 | int LVDS; | ||
132 | int pm_state; | 133 | int pm_state; |
133 | u32 crtcSync_read; | 134 | u32 crtcSync_read; |
134 | u32 fpSyncs; | 135 | u32 fpSyncs; |
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index eb24107bcc81..538e947610e1 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c | |||
@@ -1160,20 +1160,20 @@ static u32 __devinit nvidia_get_arch(struct fb_info *info) | |||
1160 | case 0x0340: /* GeForceFX 5700 */ | 1160 | case 0x0340: /* GeForceFX 5700 */ |
1161 | arch = NV_ARCH_30; | 1161 | arch = NV_ARCH_30; |
1162 | break; | 1162 | break; |
1163 | case 0x0040: | 1163 | case 0x0040: /* GeForce 6800 */ |
1164 | case 0x00C0: | 1164 | case 0x00C0: /* GeForce 6800 */ |
1165 | case 0x0120: | 1165 | case 0x0120: /* GeForce 6800 */ |
1166 | case 0x0130: | 1166 | case 0x0130: |
1167 | case 0x0140: | 1167 | case 0x0140: /* GeForce 6600 */ |
1168 | case 0x0160: | 1168 | case 0x0160: /* GeForce 6200 */ |
1169 | case 0x01D0: | 1169 | case 0x01D0: /* GeForce 7200, 7300, 7400 */ |
1170 | case 0x0090: | 1170 | case 0x0090: /* GeForce 7800 */ |
1171 | case 0x0210: | 1171 | case 0x0210: /* GeForce 6800 */ |
1172 | case 0x0220: | 1172 | case 0x0220: /* GeForce 6200 */ |
1173 | case 0x0230: | 1173 | case 0x0230: |
1174 | case 0x0240: | 1174 | case 0x0240: /* GeForce 6100 */ |
1175 | case 0x0290: | 1175 | case 0x0290: /* GeForce 7900 */ |
1176 | case 0x0390: | 1176 | case 0x0390: /* GeForce 7600 */ |
1177 | arch = NV_ARCH_40; | 1177 | arch = NV_ARCH_40; |
1178 | break; | 1178 | break; |
1179 | case 0x0020: /* TNT, TNT2 */ | 1179 | case 0x0020: /* TNT, TNT2 */ |