diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/agp/amd64-agp.c | 13 | ||||
-rw-r--r-- | drivers/char/agp/intel-agp.c | 8 | ||||
-rw-r--r-- | drivers/char/agp/parisc-agp.c | 23 | ||||
-rw-r--r-- | drivers/char/hvcs.c | 9 | ||||
-rw-r--r-- | drivers/char/hvsi.c | 1 | ||||
-rw-r--r-- | drivers/char/scc.h | 2 | ||||
-rw-r--r-- | drivers/char/sx.c | 5 | ||||
-rw-r--r-- | drivers/char/tpm/tpm_infineon.c | 4 |
8 files changed, 31 insertions, 34 deletions
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index 52f4361eb6e..d765afda9c2 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c | |||
@@ -271,15 +271,15 @@ static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp, | |||
271 | nb_order = (nb_order >> 1) & 7; | 271 | nb_order = (nb_order >> 1) & 7; |
272 | pci_read_config_dword(nb, AMD64_GARTAPERTUREBASE, &nb_base); | 272 | pci_read_config_dword(nb, AMD64_GARTAPERTUREBASE, &nb_base); |
273 | nb_aper = nb_base << 25; | 273 | nb_aper = nb_base << 25; |
274 | if (agp_aperture_valid(nb_aper, (32*1024*1024)<<nb_order)) { | ||
275 | return 0; | ||
276 | } | ||
277 | 274 | ||
278 | /* Northbridge seems to contain crap. Try the AGP bridge. */ | 275 | /* Northbridge seems to contain crap. Try the AGP bridge. */ |
279 | 276 | ||
280 | pci_read_config_word(agp, cap+0x14, &apsize); | 277 | pci_read_config_word(agp, cap+0x14, &apsize); |
281 | if (apsize == 0xffff) | 278 | if (apsize == 0xffff) { |
279 | if (agp_aperture_valid(nb_aper, (32*1024*1024)<<nb_order)) | ||
280 | return 0; | ||
282 | return -1; | 281 | return -1; |
282 | } | ||
283 | 283 | ||
284 | apsize &= 0xfff; | 284 | apsize &= 0xfff; |
285 | /* Some BIOS use weird encodings not in the AGPv3 table. */ | 285 | /* Some BIOS use weird encodings not in the AGPv3 table. */ |
@@ -301,6 +301,11 @@ static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp, | |||
301 | order = nb_order; | 301 | order = nb_order; |
302 | } | 302 | } |
303 | 303 | ||
304 | if (nb_order >= order) { | ||
305 | if (agp_aperture_valid(nb_aper, (32*1024*1024)<<nb_order)) | ||
306 | return 0; | ||
307 | } | ||
308 | |||
304 | dev_info(&agp->dev, "aperture from AGP @ %Lx size %u MB\n", | 309 | dev_info(&agp->dev, "aperture from AGP @ %Lx size %u MB\n", |
305 | aper, 32 << order); | 310 | aper, 32 << order); |
306 | if (order < 0 || !agp_aperture_valid(aper, (32*1024*1024)<<order)) | 311 | if (order < 0 || !agp_aperture_valid(aper, (32*1024*1024)<<order)) |
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index c7714185f83..4373adb2119 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c | |||
@@ -633,13 +633,15 @@ static void intel_i830_init_gtt_entries(void) | |||
633 | break; | 633 | break; |
634 | } | 634 | } |
635 | } | 635 | } |
636 | if (gtt_entries > 0) | 636 | if (gtt_entries > 0) { |
637 | dev_info(&agp_bridge->dev->dev, "detected %dK %s memory\n", | 637 | dev_info(&agp_bridge->dev->dev, "detected %dK %s memory\n", |
638 | gtt_entries / KB(1), local ? "local" : "stolen"); | 638 | gtt_entries / KB(1), local ? "local" : "stolen"); |
639 | else | 639 | gtt_entries /= KB(4); |
640 | } else { | ||
640 | dev_info(&agp_bridge->dev->dev, | 641 | dev_info(&agp_bridge->dev->dev, |
641 | "no pre-allocated video memory detected\n"); | 642 | "no pre-allocated video memory detected\n"); |
642 | gtt_entries /= KB(4); | 643 | gtt_entries = 0; |
644 | } | ||
643 | 645 | ||
644 | intel_private.gtt_entries = gtt_entries; | 646 | intel_private.gtt_entries = gtt_entries; |
645 | } | 647 | } |
diff --git a/drivers/char/agp/parisc-agp.c b/drivers/char/agp/parisc-agp.c index db60539bf67..699e3422ad9 100644 --- a/drivers/char/agp/parisc-agp.c +++ b/drivers/char/agp/parisc-agp.c | |||
@@ -359,9 +359,16 @@ fail: | |||
359 | return error; | 359 | return error; |
360 | } | 360 | } |
361 | 361 | ||
362 | static struct device *next_device(struct klist_iter *i) { | 362 | static int |
363 | struct klist_node * n = klist_next(i); | 363 | find_quicksilver(struct device *dev, void *data) |
364 | return n ? container_of(n, struct device, knode_parent) : NULL; | 364 | { |
365 | struct parisc_device **lba = data; | ||
366 | struct parisc_device *padev = to_parisc_device(dev); | ||
367 | |||
368 | if (IS_QUICKSILVER(padev)) | ||
369 | *lba = padev; | ||
370 | |||
371 | return 0; | ||
365 | } | 372 | } |
366 | 373 | ||
367 | static int | 374 | static int |
@@ -372,8 +379,6 @@ parisc_agp_init(void) | |||
372 | int err = -1; | 379 | int err = -1; |
373 | struct parisc_device *sba = NULL, *lba = NULL; | 380 | struct parisc_device *sba = NULL, *lba = NULL; |
374 | struct lba_device *lbadev = NULL; | 381 | struct lba_device *lbadev = NULL; |
375 | struct device *dev = NULL; | ||
376 | struct klist_iter i; | ||
377 | 382 | ||
378 | if (!sba_list) | 383 | if (!sba_list) |
379 | goto out; | 384 | goto out; |
@@ -386,13 +391,7 @@ parisc_agp_init(void) | |||
386 | } | 391 | } |
387 | 392 | ||
388 | /* Now search our Pluto for our precious AGP device... */ | 393 | /* Now search our Pluto for our precious AGP device... */ |
389 | klist_iter_init(&sba->dev.klist_children, &i); | 394 | device_for_each_child(&sba->dev, &lba, find_quicksilver); |
390 | while ((dev = next_device(&i))) { | ||
391 | struct parisc_device *padev = to_parisc_device(dev); | ||
392 | if (IS_QUICKSILVER(padev)) | ||
393 | lba = padev; | ||
394 | } | ||
395 | klist_iter_exit(&i); | ||
396 | 395 | ||
397 | if (!lba) { | 396 | if (!lba) { |
398 | printk(KERN_INFO DRVPFX "No AGP devices found.\n"); | 397 | printk(KERN_INFO DRVPFX "No AGP devices found.\n"); |
diff --git a/drivers/char/hvcs.c b/drivers/char/hvcs.c index 6e6eb445d37..c76bccf5354 100644 --- a/drivers/char/hvcs.c +++ b/drivers/char/hvcs.c | |||
@@ -1139,15 +1139,6 @@ static int hvcs_open(struct tty_struct *tty, struct file *filp) | |||
1139 | hvcsd->tty = tty; | 1139 | hvcsd->tty = tty; |
1140 | tty->driver_data = hvcsd; | 1140 | tty->driver_data = hvcsd; |
1141 | 1141 | ||
1142 | /* | ||
1143 | * Set this driver to low latency so that we actually have a chance at | ||
1144 | * catching a throttled TTY after we flip_buffer_push. Otherwise the | ||
1145 | * flush_to_async may not execute until after the kernel_thread has | ||
1146 | * yielded and resumed the next flip_buffer_push resulting in data | ||
1147 | * loss. | ||
1148 | */ | ||
1149 | tty->low_latency = 1; | ||
1150 | |||
1151 | memset(&hvcsd->buffer[0], 0x00, HVCS_BUFF_LEN); | 1142 | memset(&hvcsd->buffer[0], 0x00, HVCS_BUFF_LEN); |
1152 | 1143 | ||
1153 | /* | 1144 | /* |
diff --git a/drivers/char/hvsi.c b/drivers/char/hvsi.c index 406f8742a26..2989056a9e3 100644 --- a/drivers/char/hvsi.c +++ b/drivers/char/hvsi.c | |||
@@ -810,7 +810,6 @@ static int hvsi_open(struct tty_struct *tty, struct file *filp) | |||
810 | hp = &hvsi_ports[line]; | 810 | hp = &hvsi_ports[line]; |
811 | 811 | ||
812 | tty->driver_data = hp; | 812 | tty->driver_data = hp; |
813 | tty->low_latency = 1; /* avoid throttle/tty_flip_buffer_push race */ | ||
814 | 813 | ||
815 | mb(); | 814 | mb(); |
816 | if (hp->state == HVSI_FSP_DIED) | 815 | if (hp->state == HVSI_FSP_DIED) |
diff --git a/drivers/char/scc.h b/drivers/char/scc.h index 93998f5baff..341b1142bea 100644 --- a/drivers/char/scc.h +++ b/drivers/char/scc.h | |||
@@ -387,7 +387,7 @@ struct scc_port { | |||
387 | /* The SCC needs 3.5 PCLK cycles recovery time between to register | 387 | /* The SCC needs 3.5 PCLK cycles recovery time between to register |
388 | * accesses. PCLK runs with 8 MHz on an Atari, so this delay is 3.5 * | 388 | * accesses. PCLK runs with 8 MHz on an Atari, so this delay is 3.5 * |
389 | * 125 ns = 437.5 ns. This is too short for udelay(). | 389 | * 125 ns = 437.5 ns. This is too short for udelay(). |
390 | * 10/16/95: A tstb mfp.par_dt_reg takes 600ns (sure?) and thus should be | 390 | * 10/16/95: A tstb st_mfp.par_dt_reg takes 600ns (sure?) and thus should be |
391 | * quite right | 391 | * quite right |
392 | */ | 392 | */ |
393 | 393 | ||
diff --git a/drivers/char/sx.c b/drivers/char/sx.c index f146e90404f..518f2a25d91 100644 --- a/drivers/char/sx.c +++ b/drivers/char/sx.c | |||
@@ -1746,9 +1746,10 @@ static long sx_fw_ioctl(struct file *filp, unsigned int cmd, | |||
1746 | sx_dprintk(SX_DEBUG_FIRMWARE, "returning type= %ld\n", rc); | 1746 | sx_dprintk(SX_DEBUG_FIRMWARE, "returning type= %ld\n", rc); |
1747 | break; | 1747 | break; |
1748 | case SXIO_DO_RAMTEST: | 1748 | case SXIO_DO_RAMTEST: |
1749 | if (sx_initialized) /* Already initialized: better not ramtest the board. */ | 1749 | if (sx_initialized) { /* Already initialized: better not ramtest the board. */ |
1750 | rc = -EPERM; | 1750 | rc = -EPERM; |
1751 | break; | 1751 | break; |
1752 | } | ||
1752 | if (IS_SX_BOARD(board)) { | 1753 | if (IS_SX_BOARD(board)) { |
1753 | rc = do_memtest(board, 0, 0x7000); | 1754 | rc = do_memtest(board, 0, 0x7000); |
1754 | if (!rc) | 1755 | if (!rc) |
@@ -1788,7 +1789,7 @@ static long sx_fw_ioctl(struct file *filp, unsigned int cmd, | |||
1788 | nbytes - i : SX_CHUNK_SIZE)) { | 1789 | nbytes - i : SX_CHUNK_SIZE)) { |
1789 | kfree(tmp); | 1790 | kfree(tmp); |
1790 | rc = -EFAULT; | 1791 | rc = -EFAULT; |
1791 | break; | 1792 | goto out; |
1792 | } | 1793 | } |
1793 | memcpy_toio(board->base2 + offset + i, tmp, | 1794 | memcpy_toio(board->base2 + offset + i, tmp, |
1794 | (i + SX_CHUNK_SIZE > nbytes) ? | 1795 | (i + SX_CHUNK_SIZE > nbytes) ? |
diff --git a/drivers/char/tpm/tpm_infineon.c b/drivers/char/tpm/tpm_infineon.c index 726ee8a0277..ecba4942fc8 100644 --- a/drivers/char/tpm/tpm_infineon.c +++ b/drivers/char/tpm/tpm_infineon.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * SLD 9630 TT 1.1 and SLB 9635 TT 1.2 Trusted Platform Module | 4 | * SLD 9630 TT 1.1 and SLB 9635 TT 1.2 Trusted Platform Module |
5 | * Specifications at www.trustedcomputinggroup.org | 5 | * Specifications at www.trustedcomputinggroup.org |
6 | * | 6 | * |
7 | * Copyright (C) 2005, Marcel Selhorst <selhorst@crypto.rub.de> | 7 | * Copyright (C) 2005, Marcel Selhorst <m.selhorst@sirrix.com> |
8 | * Sirrix AG - security technologies, http://www.sirrix.com and | 8 | * Sirrix AG - security technologies, http://www.sirrix.com and |
9 | * Applied Data Security Group, Ruhr-University Bochum, Germany | 9 | * Applied Data Security Group, Ruhr-University Bochum, Germany |
10 | * Project-Homepage: http://www.prosec.rub.de/tpm | 10 | * Project-Homepage: http://www.prosec.rub.de/tpm |
@@ -636,7 +636,7 @@ static void __exit cleanup_inf(void) | |||
636 | module_init(init_inf); | 636 | module_init(init_inf); |
637 | module_exit(cleanup_inf); | 637 | module_exit(cleanup_inf); |
638 | 638 | ||
639 | MODULE_AUTHOR("Marcel Selhorst <selhorst@crypto.rub.de>"); | 639 | MODULE_AUTHOR("Marcel Selhorst <m.selhorst@sirrix.com>"); |
640 | MODULE_DESCRIPTION("Driver for Infineon TPM SLD 9630 TT 1.1 / SLB 9635 TT 1.2"); | 640 | MODULE_DESCRIPTION("Driver for Infineon TPM SLD 9630 TT 1.1 / SLB 9635 TT 1.2"); |
641 | MODULE_VERSION("1.9"); | 641 | MODULE_VERSION("1.9"); |
642 | MODULE_LICENSE("GPL"); | 642 | MODULE_LICENSE("GPL"); |