diff options
Diffstat (limited to 'drivers')
49 files changed, 381 insertions, 142 deletions
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 6eaece96524e..d1e8df187222 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig | |||
@@ -152,9 +152,22 @@ config BLK_DEV_IDEDISK | |||
152 | If unsure, say Y. | 152 | If unsure, say Y. |
153 | 153 | ||
154 | config IDEDISK_MULTI_MODE | 154 | config IDEDISK_MULTI_MODE |
155 | bool "Use multi-mode by default" | 155 | bool "Use multiple sector mode for Programmed Input/Output by default" |
156 | help | 156 | help |
157 | If you get this error, try to say Y here: | 157 | This setting is irrelevant for most IDE disks, with direct memory |
158 | access, to which multiple sector mode does not apply. Multiple sector | ||
159 | mode is a feature of most modern IDE hard drives, permitting the | ||
160 | transfer of multiple sectors per Programmed Input/Output interrupt, | ||
161 | rather than the usual one sector per interrupt. When this feature is | ||
162 | enabled, it can reduce operating system overhead for disk Programmed | ||
163 | Input/Output. On some systems, it also can increase the data | ||
164 | throughput of Programmed Input/Output. Some drives, however, seemed | ||
165 | to run slower with multiple sector mode enabled. Some drives claimed | ||
166 | to support multiple sector mode, but lost data at some settings. | ||
167 | Under rare circumstances, such failures could result in massive | ||
168 | filesystem corruption. | ||
169 | |||
170 | If you get the following error, try to say Y here: | ||
158 | 171 | ||
159 | hda: set_multmode: status=0x51 { DriveReady SeekComplete Error } | 172 | hda: set_multmode: status=0x51 { DriveReady SeekComplete Error } |
160 | hda: set_multmode: error=0x04 { DriveStatusError } | 173 | hda: set_multmode: error=0x04 { DriveStatusError } |
@@ -380,9 +393,10 @@ config IDEPCI_SHARE_IRQ | |||
380 | config IDEPCI_PCIBUS_ORDER | 393 | config IDEPCI_PCIBUS_ORDER |
381 | def_bool BLK_DEV_IDE=y && BLK_DEV_IDEPCI | 394 | def_bool BLK_DEV_IDE=y && BLK_DEV_IDEPCI |
382 | 395 | ||
396 | # TODO: split it on per host driver config options (or module parameters) | ||
383 | config BLK_DEV_OFFBOARD | 397 | config BLK_DEV_OFFBOARD |
384 | bool "Boot off-board chipsets first support" | 398 | bool "Boot off-board chipsets first support" |
385 | depends on BLK_DEV_IDEPCI | 399 | depends on BLK_DEV_IDEPCI && (BLK_DEV_AEC62XX || BLK_DEV_GENERIC || BLK_DEV_HPT34X || BLK_DEV_HPT366 || BLK_DEV_PDC202XX_NEW || BLK_DEV_PDC202XX_OLD || BLK_DEV_TC86C001) |
386 | help | 400 | help |
387 | Normally, IDE controllers built into the motherboard (on-board | 401 | Normally, IDE controllers built into the motherboard (on-board |
388 | controllers) are assigned to ide0 and ide1 while those on add-in PCI | 402 | controllers) are assigned to ide0 and ide1 while those on add-in PCI |
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 428f7a8a00b6..e3add70b9cd8 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -340,7 +340,7 @@ static int config_drive_for_dma (ide_drive_t *drive) | |||
340 | 340 | ||
341 | if (drive->media != ide_disk) { | 341 | if (drive->media != ide_disk) { |
342 | if (hwif->host_flags & IDE_HFLAG_NO_ATAPI_DMA) | 342 | if (hwif->host_flags & IDE_HFLAG_NO_ATAPI_DMA) |
343 | return -1; | 343 | return 0; |
344 | } | 344 | } |
345 | 345 | ||
346 | /* | 346 | /* |
@@ -752,7 +752,8 @@ u8 ide_find_dma_mode(ide_drive_t *drive, u8 req_mode) | |||
752 | mode = XFER_MW_DMA_1; | 752 | mode = XFER_MW_DMA_1; |
753 | } | 753 | } |
754 | 754 | ||
755 | printk(KERN_DEBUG "%s: selected mode 0x%x\n", drive->name, mode); | 755 | printk(KERN_DEBUG "%s: %s mode selected\n", drive->name, |
756 | mode ? ide_xfer_verbose(mode) : "no DMA"); | ||
756 | 757 | ||
757 | return min(mode, req_mode); | 758 | return min(mode, req_mode); |
758 | } | 759 | } |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index c89f0d3058e9..755011827afa 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -340,6 +340,8 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err) | |||
340 | if (args) { | 340 | if (args) { |
341 | args[0] = stat; | 341 | args[0] = stat; |
342 | args[1] = err; | 342 | args[1] = err; |
343 | /* be sure we're looking at the low order bits */ | ||
344 | hwif->OUTB(drive->ctl & ~0x80, IDE_CONTROL_REG); | ||
343 | args[2] = hwif->INB(IDE_NSECTOR_REG); | 345 | args[2] = hwif->INB(IDE_NSECTOR_REG); |
344 | args[3] = hwif->INB(IDE_SECTOR_REG); | 346 | args[3] = hwif->INB(IDE_SECTOR_REG); |
345 | args[4] = hwif->INB(IDE_LCYL_REG); | 347 | args[4] = hwif->INB(IDE_LCYL_REG); |
@@ -654,7 +656,8 @@ static ide_startstop_t drive_cmd_intr (ide_drive_t *drive) | |||
654 | int retries = 10; | 656 | int retries = 10; |
655 | 657 | ||
656 | local_irq_enable_in_hardirq(); | 658 | local_irq_enable_in_hardirq(); |
657 | if ((stat & DRQ_STAT) && args && args[3]) { | 659 | if (rq->cmd_type == REQ_TYPE_ATA_CMD && |
660 | (stat & DRQ_STAT) && args && args[3]) { | ||
658 | u8 io_32bit = drive->io_32bit; | 661 | u8 io_32bit = drive->io_32bit; |
659 | drive->io_32bit = 0; | 662 | drive->io_32bit = 0; |
660 | hwif->ata_input_data(drive, &args[4], args[3] * SECTOR_WORDS); | 663 | hwif->ata_input_data(drive, &args[4], args[3] * SECTOR_WORDS); |
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index dcda0f109df5..e17a9ee120ea 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -403,8 +403,12 @@ void ide_fix_driveid (struct hd_driveid *id) | |||
403 | #endif | 403 | #endif |
404 | } | 404 | } |
405 | 405 | ||
406 | /* FIXME: exported for use by the USB storage (isd200.c) code only */ | 406 | /* |
407 | EXPORT_SYMBOL(ide_fix_driveid); | 407 | * ide_fixstring() cleans up and (optionally) byte-swaps a text string, |
408 | * removing leading/trailing blanks and compressing internal blanks. | ||
409 | * It is primarily used to tidy up the model name/number fields as | ||
410 | * returned by the WIN_[P]IDENTIFY commands. | ||
411 | */ | ||
408 | 412 | ||
409 | void ide_fixstring (u8 *s, const int bytecount, const int byteswap) | 413 | void ide_fixstring (u8 *s, const int bytecount, const int byteswap) |
410 | { | 414 | { |
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 6a6f2e066b46..56fb0b843429 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -172,11 +172,12 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd) | |||
172 | ide_fixstring(id->fw_rev, sizeof(id->fw_rev), bswap); | 172 | ide_fixstring(id->fw_rev, sizeof(id->fw_rev), bswap); |
173 | ide_fixstring(id->serial_no, sizeof(id->serial_no), bswap); | 173 | ide_fixstring(id->serial_no, sizeof(id->serial_no), bswap); |
174 | 174 | ||
175 | /* we depend on this a lot! */ | ||
176 | id->model[sizeof(id->model)-1] = '\0'; | ||
177 | |||
175 | if (strstr(id->model, "E X A B Y T E N E S T")) | 178 | if (strstr(id->model, "E X A B Y T E N E S T")) |
176 | goto err_misc; | 179 | goto err_misc; |
177 | 180 | ||
178 | /* we depend on this a lot! */ | ||
179 | id->model[sizeof(id->model)-1] = '\0'; | ||
180 | printk("%s: %s, ", drive->name, id->model); | 181 | printk("%s: %s, ", drive->name, id->model); |
181 | drive->present = 1; | 182 | drive->present = 1; |
182 | drive->dead = 0; | 183 | drive->dead = 0; |
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index d066546f2831..2b60f1b0437e 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -471,6 +471,7 @@ static int ide_diag_taskfile(ide_drive_t *drive, ide_task_t *args, unsigned long | |||
471 | struct request rq; | 471 | struct request rq; |
472 | 472 | ||
473 | memset(&rq, 0, sizeof(rq)); | 473 | memset(&rq, 0, sizeof(rq)); |
474 | rq.ref_count = 1; | ||
474 | rq.cmd_type = REQ_TYPE_ATA_TASKFILE; | 475 | rq.cmd_type = REQ_TYPE_ATA_TASKFILE; |
475 | rq.buffer = buf; | 476 | rq.buffer = buf; |
476 | 477 | ||
@@ -511,6 +512,7 @@ int ide_raw_taskfile (ide_drive_t *drive, ide_task_t *args, u8 *buf) | |||
511 | 512 | ||
512 | EXPORT_SYMBOL(ide_raw_taskfile); | 513 | EXPORT_SYMBOL(ide_raw_taskfile); |
513 | 514 | ||
515 | #ifdef CONFIG_IDE_TASK_IOCTL | ||
514 | int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg) | 516 | int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg) |
515 | { | 517 | { |
516 | ide_task_request_t *req_task; | 518 | ide_task_request_t *req_task; |
@@ -660,6 +662,7 @@ abort: | |||
660 | 662 | ||
661 | return err; | 663 | return err; |
662 | } | 664 | } |
665 | #endif | ||
663 | 666 | ||
664 | int ide_wait_cmd (ide_drive_t *drive, u8 cmd, u8 nsect, u8 feature, u8 sectors, u8 *buf) | 667 | int ide_wait_cmd (ide_drive_t *drive, u8 cmd, u8 nsect, u8 feature, u8 sectors, u8 *buf) |
665 | { | 668 | { |
diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c index 9329d4a810e5..63625a0be712 100644 --- a/drivers/ide/pci/piix.c +++ b/drivers/ide/pci/piix.c | |||
@@ -302,6 +302,7 @@ struct ich_laptop { | |||
302 | 302 | ||
303 | static const struct ich_laptop ich_laptop[] = { | 303 | static const struct ich_laptop ich_laptop[] = { |
304 | /* devid, subvendor, subdev */ | 304 | /* devid, subvendor, subdev */ |
305 | { 0x27DF, 0x1025, 0x0102 }, /* ICH7 on Acer 5602aWLMi */ | ||
305 | { 0x27DF, 0x0005, 0x0280 }, /* ICH7 on Acer 5602WLMi */ | 306 | { 0x27DF, 0x0005, 0x0280 }, /* ICH7 on Acer 5602WLMi */ |
306 | { 0x27DF, 0x1025, 0x0110 }, /* ICH7 on Acer 3682WLMi */ | 307 | { 0x27DF, 0x1025, 0x0110 }, /* ICH7 on Acer 3682WLMi */ |
307 | { 0x27DF, 0x1043, 0x1267 }, /* ICH7 on Asus W5F */ | 308 | { 0x27DF, 0x1043, 0x1267 }, /* ICH7 on Asus W5F */ |
diff --git a/drivers/isdn/hisax/Kconfig b/drivers/isdn/hisax/Kconfig index a3b945ac3256..7832d8ba8e44 100644 --- a/drivers/isdn/hisax/Kconfig +++ b/drivers/isdn/hisax/Kconfig | |||
@@ -109,7 +109,7 @@ config HISAX_16_3 | |||
109 | 109 | ||
110 | config HISAX_TELESPCI | 110 | config HISAX_TELESPCI |
111 | bool "Teles PCI" | 111 | bool "Teles PCI" |
112 | depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) | 112 | depends on PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) |
113 | help | 113 | help |
114 | This enables HiSax support for the Teles PCI. | 114 | This enables HiSax support for the Teles PCI. |
115 | See <file:Documentation/isdn/README.HiSax> on how to configure it. | 115 | See <file:Documentation/isdn/README.HiSax> on how to configure it. |
@@ -237,7 +237,7 @@ config HISAX_MIC | |||
237 | 237 | ||
238 | config HISAX_NETJET | 238 | config HISAX_NETJET |
239 | bool "NETjet card" | 239 | bool "NETjet card" |
240 | depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) | 240 | depends on PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) |
241 | help | 241 | help |
242 | This enables HiSax support for the NetJet from Traverse | 242 | This enables HiSax support for the NetJet from Traverse |
243 | Technologies. | 243 | Technologies. |
@@ -248,7 +248,7 @@ config HISAX_NETJET | |||
248 | 248 | ||
249 | config HISAX_NETJET_U | 249 | config HISAX_NETJET_U |
250 | bool "NETspider U card" | 250 | bool "NETspider U card" |
251 | depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) | 251 | depends on PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) |
252 | help | 252 | help |
253 | This enables HiSax support for the Netspider U interface ISDN card | 253 | This enables HiSax support for the Netspider U interface ISDN card |
254 | from Traverse Technologies. | 254 | from Traverse Technologies. |
@@ -287,7 +287,7 @@ config HISAX_HSTSAPHIR | |||
287 | 287 | ||
288 | config HISAX_BKM_A4T | 288 | config HISAX_BKM_A4T |
289 | bool "Telekom A4T card" | 289 | bool "Telekom A4T card" |
290 | depends on PCI | 290 | depends on PCI && PCI_LEGACY |
291 | help | 291 | help |
292 | This enables HiSax support for the Telekom A4T card. | 292 | This enables HiSax support for the Telekom A4T card. |
293 | 293 | ||
@@ -297,7 +297,7 @@ config HISAX_BKM_A4T | |||
297 | 297 | ||
298 | config HISAX_SCT_QUADRO | 298 | config HISAX_SCT_QUADRO |
299 | bool "Scitel Quadro card" | 299 | bool "Scitel Quadro card" |
300 | depends on PCI | 300 | depends on PCI && PCI_LEGACY |
301 | help | 301 | help |
302 | This enables HiSax support for the Scitel Quadro card. | 302 | This enables HiSax support for the Scitel Quadro card. |
303 | 303 | ||
@@ -316,7 +316,7 @@ config HISAX_GAZEL | |||
316 | 316 | ||
317 | config HISAX_HFC_PCI | 317 | config HISAX_HFC_PCI |
318 | bool "HFC PCI-Bus cards" | 318 | bool "HFC PCI-Bus cards" |
319 | depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) | 319 | depends on PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) |
320 | help | 320 | help |
321 | This enables HiSax support for the HFC-S PCI 2BDS0 based cards. | 321 | This enables HiSax support for the HFC-S PCI 2BDS0 based cards. |
322 | 322 | ||
@@ -325,7 +325,7 @@ config HISAX_HFC_PCI | |||
325 | 325 | ||
326 | config HISAX_W6692 | 326 | config HISAX_W6692 |
327 | bool "Winbond W6692 based cards" | 327 | bool "Winbond W6692 based cards" |
328 | depends on PCI | 328 | depends on PCI && PCI_LEGACY |
329 | help | 329 | help |
330 | This enables HiSax support for Winbond W6692 based PCI ISDN cards. | 330 | This enables HiSax support for Winbond W6692 based PCI ISDN cards. |
331 | 331 | ||
@@ -341,7 +341,7 @@ config HISAX_HFC_SX | |||
341 | 341 | ||
342 | config HISAX_ENTERNOW_PCI | 342 | config HISAX_ENTERNOW_PCI |
343 | bool "Formula-n enter:now PCI card" | 343 | bool "Formula-n enter:now PCI card" |
344 | depends on HISAX_NETJET && PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) | 344 | depends on HISAX_NETJET && PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) |
345 | help | 345 | help |
346 | This enables HiSax support for the Formula-n enter:now PCI | 346 | This enables HiSax support for the Formula-n enter:now PCI |
347 | ISDN card. | 347 | ISDN card. |
@@ -411,7 +411,7 @@ config HISAX_HFC4S8S | |||
411 | 411 | ||
412 | config HISAX_FRITZ_PCIPNP | 412 | config HISAX_FRITZ_PCIPNP |
413 | tristate "AVM Fritz!Card PCI/PCIv2/PnP support (EXPERIMENTAL)" | 413 | tristate "AVM Fritz!Card PCI/PCIv2/PnP support (EXPERIMENTAL)" |
414 | depends on PCI && EXPERIMENTAL | 414 | depends on PCI && PCI_LEGACY && EXPERIMENTAL |
415 | help | 415 | help |
416 | This enables the driver for the AVM Fritz!Card PCI, | 416 | This enables the driver for the AVM Fritz!Card PCI, |
417 | Fritz!Card PCI v2 and Fritz!Card PnP. | 417 | Fritz!Card PCI v2 and Fritz!Card PnP. |
diff --git a/drivers/isdn/hisax/avm_pci.c b/drivers/isdn/hisax/avm_pci.c index f8b79783c8b3..035d158779df 100644 --- a/drivers/isdn/hisax/avm_pci.c +++ b/drivers/isdn/hisax/avm_pci.c | |||
@@ -830,7 +830,7 @@ static int __devinit avm_pnp_setup(struct IsdnCardState *cs) | |||
830 | 830 | ||
831 | #endif /* __ISAPNP__ */ | 831 | #endif /* __ISAPNP__ */ |
832 | 832 | ||
833 | #ifndef CONFIG_PCI | 833 | #ifndef CONFIG_PCI_LEGACY |
834 | 834 | ||
835 | static int __devinit avm_pci_setup(struct IsdnCardState *cs) | 835 | static int __devinit avm_pci_setup(struct IsdnCardState *cs) |
836 | { | 836 | { |
@@ -872,7 +872,7 @@ static int __devinit avm_pci_setup(struct IsdnCardState *cs) | |||
872 | return (1); | 872 | return (1); |
873 | } | 873 | } |
874 | 874 | ||
875 | #endif /* CONFIG_PCI */ | 875 | #endif /* CONFIG_PCI_LEGACY */ |
876 | 876 | ||
877 | int __devinit | 877 | int __devinit |
878 | setup_avm_pcipnp(struct IsdnCard *card) | 878 | setup_avm_pcipnp(struct IsdnCard *card) |
diff --git a/drivers/isdn/hisax/diva.c b/drivers/isdn/hisax/diva.c index 826745078746..2d670856d141 100644 --- a/drivers/isdn/hisax/diva.c +++ b/drivers/isdn/hisax/diva.c | |||
@@ -1148,7 +1148,7 @@ static int __devinit setup_diva_isapnp(struct IsdnCard *card) | |||
1148 | 1148 | ||
1149 | #endif /* ISAPNP */ | 1149 | #endif /* ISAPNP */ |
1150 | 1150 | ||
1151 | #ifdef CONFIG_PCI | 1151 | #ifdef CONFIG_PCI_LEGACY |
1152 | static struct pci_dev *dev_diva __devinitdata = NULL; | 1152 | static struct pci_dev *dev_diva __devinitdata = NULL; |
1153 | static struct pci_dev *dev_diva_u __devinitdata = NULL; | 1153 | static struct pci_dev *dev_diva_u __devinitdata = NULL; |
1154 | static struct pci_dev *dev_diva201 __devinitdata = NULL; | 1154 | static struct pci_dev *dev_diva201 __devinitdata = NULL; |
@@ -1229,14 +1229,14 @@ static int __devinit setup_diva_pci(struct IsdnCard *card) | |||
1229 | return (1); /* card found */ | 1229 | return (1); /* card found */ |
1230 | } | 1230 | } |
1231 | 1231 | ||
1232 | #else /* if !CONFIG_PCI */ | 1232 | #else /* if !CONFIG_PCI_LEGACY */ |
1233 | 1233 | ||
1234 | static int __devinit setup_diva_pci(struct IsdnCard *card) | 1234 | static int __devinit setup_diva_pci(struct IsdnCard *card) |
1235 | { | 1235 | { |
1236 | return (-1); /* card not found; continue search */ | 1236 | return (-1); /* card not found; continue search */ |
1237 | } | 1237 | } |
1238 | 1238 | ||
1239 | #endif /* CONFIG_PCI */ | 1239 | #endif /* CONFIG_PCI_LEGACY */ |
1240 | 1240 | ||
1241 | int __devinit | 1241 | int __devinit |
1242 | setup_diva(struct IsdnCard *card) | 1242 | setup_diva(struct IsdnCard *card) |
diff --git a/drivers/isdn/hisax/elsa.c b/drivers/isdn/hisax/elsa.c index 948a9b290fd1..2b2677ba0230 100644 --- a/drivers/isdn/hisax/elsa.c +++ b/drivers/isdn/hisax/elsa.c | |||
@@ -1025,7 +1025,7 @@ setup_elsa_pcmcia(struct IsdnCard *card) | |||
1025 | cs->irq); | 1025 | cs->irq); |
1026 | } | 1026 | } |
1027 | 1027 | ||
1028 | #ifdef CONFIG_PCI | 1028 | #ifdef CONFIG_PCI_LEGACY |
1029 | static struct pci_dev *dev_qs1000 __devinitdata = NULL; | 1029 | static struct pci_dev *dev_qs1000 __devinitdata = NULL; |
1030 | static struct pci_dev *dev_qs3000 __devinitdata = NULL; | 1030 | static struct pci_dev *dev_qs3000 __devinitdata = NULL; |
1031 | 1031 | ||
@@ -1093,7 +1093,7 @@ setup_elsa_pci(struct IsdnCard *card) | |||
1093 | { | 1093 | { |
1094 | return (1); | 1094 | return (1); |
1095 | } | 1095 | } |
1096 | #endif /* CONFIG_PCI */ | 1096 | #endif /* CONFIG_PCI_LEGACY */ |
1097 | 1097 | ||
1098 | static int __devinit | 1098 | static int __devinit |
1099 | setup_elsa_common(struct IsdnCard *card) | 1099 | setup_elsa_common(struct IsdnCard *card) |
diff --git a/drivers/isdn/hisax/gazel.c b/drivers/isdn/hisax/gazel.c index 3efa719b6d29..f66620ad8e7c 100644 --- a/drivers/isdn/hisax/gazel.c +++ b/drivers/isdn/hisax/gazel.c | |||
@@ -532,6 +532,7 @@ setup_gazelisa(struct IsdnCard *card, struct IsdnCardState *cs) | |||
532 | return (0); | 532 | return (0); |
533 | } | 533 | } |
534 | 534 | ||
535 | #ifdef CONFIG_PCI_LEGACY | ||
535 | static struct pci_dev *dev_tel __devinitdata = NULL; | 536 | static struct pci_dev *dev_tel __devinitdata = NULL; |
536 | 537 | ||
537 | static int __devinit | 538 | static int __devinit |
@@ -620,6 +621,7 @@ setup_gazelpci(struct IsdnCardState *cs) | |||
620 | 621 | ||
621 | return (0); | 622 | return (0); |
622 | } | 623 | } |
624 | #endif /* CONFIG_PCI_LEGACY */ | ||
623 | 625 | ||
624 | int __devinit | 626 | int __devinit |
625 | setup_gazel(struct IsdnCard *card) | 627 | setup_gazel(struct IsdnCard *card) |
@@ -639,7 +641,7 @@ setup_gazel(struct IsdnCard *card) | |||
639 | return (0); | 641 | return (0); |
640 | } else { | 642 | } else { |
641 | 643 | ||
642 | #ifdef CONFIG_PCI | 644 | #ifdef CONFIG_PCI_LEGACY |
643 | if (setup_gazelpci(cs)) | 645 | if (setup_gazelpci(cs)) |
644 | return (0); | 646 | return (0); |
645 | #else | 647 | #else |
diff --git a/drivers/isdn/hisax/niccy.c b/drivers/isdn/hisax/niccy.c index e5918c6fe73d..bd9921128aa8 100644 --- a/drivers/isdn/hisax/niccy.c +++ b/drivers/isdn/hisax/niccy.c | |||
@@ -223,7 +223,6 @@ static int niccy_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
223 | return 0; | 223 | return 0; |
224 | } | 224 | } |
225 | 225 | ||
226 | static struct pci_dev *niccy_dev __devinitdata = NULL; | ||
227 | #ifdef __ISAPNP__ | 226 | #ifdef __ISAPNP__ |
228 | static struct pnp_card *pnp_c __devinitdata = NULL; | 227 | static struct pnp_card *pnp_c __devinitdata = NULL; |
229 | #endif | 228 | #endif |
@@ -299,7 +298,9 @@ int __devinit setup_niccy(struct IsdnCard *card) | |||
299 | return 0; | 298 | return 0; |
300 | } | 299 | } |
301 | } else { | 300 | } else { |
302 | #ifdef CONFIG_PCI | 301 | #ifdef CONFIG_PCI_LEGACY |
302 | static struct pci_dev *niccy_dev __devinitdata; | ||
303 | |||
303 | u_int pci_ioaddr; | 304 | u_int pci_ioaddr; |
304 | cs->subtyp = 0; | 305 | cs->subtyp = 0; |
305 | if ((niccy_dev = pci_find_device(PCI_VENDOR_ID_SATSAGEM, | 306 | if ((niccy_dev = pci_find_device(PCI_VENDOR_ID_SATSAGEM, |
@@ -356,7 +357,7 @@ int __devinit setup_niccy(struct IsdnCard *card) | |||
356 | printk(KERN_WARNING "Niccy: io0 0 and NO_PCI_BIOS\n"); | 357 | printk(KERN_WARNING "Niccy: io0 0 and NO_PCI_BIOS\n"); |
357 | printk(KERN_WARNING "Niccy: unable to config NICCY PCI\n"); | 358 | printk(KERN_WARNING "Niccy: unable to config NICCY PCI\n"); |
358 | return 0; | 359 | return 0; |
359 | #endif /* CONFIG_PCI */ | 360 | #endif /* CONFIG_PCI_LEGACY */ |
360 | } | 361 | } |
361 | printk(KERN_INFO "HiSax: %s %s config irq:%d data:0x%X ale:0x%X\n", | 362 | printk(KERN_INFO "HiSax: %s %s config irq:%d data:0x%X ale:0x%X\n", |
362 | CardType[cs->typ], (cs->subtyp == 1) ? "PnP" : "PCI", | 363 | CardType[cs->typ], (cs->subtyp == 1) ? "PnP" : "PCI", |
diff --git a/drivers/isdn/hisax/sedlbauer.c b/drivers/isdn/hisax/sedlbauer.c index 03dfc32166a0..95425f3d2220 100644 --- a/drivers/isdn/hisax/sedlbauer.c +++ b/drivers/isdn/hisax/sedlbauer.c | |||
@@ -600,7 +600,7 @@ setup_sedlbauer_isapnp(struct IsdnCard *card, int *bytecnt) | |||
600 | } | 600 | } |
601 | #endif /* __ISAPNP__ */ | 601 | #endif /* __ISAPNP__ */ |
602 | 602 | ||
603 | #ifdef CONFIG_PCI | 603 | #ifdef CONFIG_PCI_LEGACY |
604 | static struct pci_dev *dev_sedl __devinitdata = NULL; | 604 | static struct pci_dev *dev_sedl __devinitdata = NULL; |
605 | 605 | ||
606 | static int __devinit | 606 | static int __devinit |
@@ -675,7 +675,7 @@ setup_sedlbauer_pci(struct IsdnCard *card) | |||
675 | return (1); | 675 | return (1); |
676 | } | 676 | } |
677 | 677 | ||
678 | #endif /* CONFIG_PCI */ | 678 | #endif /* CONFIG_PCI_LEGACY */ |
679 | 679 | ||
680 | int __devinit | 680 | int __devinit |
681 | setup_sedlbauer(struct IsdnCard *card) | 681 | setup_sedlbauer(struct IsdnCard *card) |
diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig index dd9bd4310c84..1604f0490404 100644 --- a/drivers/media/Kconfig +++ b/drivers/media/Kconfig | |||
@@ -151,6 +151,7 @@ config VIDEO_IR_I2C | |||
151 | 151 | ||
152 | config VIDEO_IR | 152 | config VIDEO_IR |
153 | tristate | 153 | tristate |
154 | depends on INPUT | ||
154 | select VIDEO_IR_I2C if I2C | 155 | select VIDEO_IR_I2C if I2C |
155 | 156 | ||
156 | config VIDEO_TVEEPROM | 157 | config VIDEO_TVEEPROM |
diff --git a/drivers/media/common/saa7146_core.c b/drivers/media/common/saa7146_core.c index cb034ead95ab..7d04a6fd1acb 100644 --- a/drivers/media/common/saa7146_core.c +++ b/drivers/media/common/saa7146_core.c | |||
@@ -59,43 +59,89 @@ void saa7146_setgpio(struct saa7146_dev *dev, int port, u32 data) | |||
59 | } | 59 | } |
60 | 60 | ||
61 | /* This DEBI code is based on the saa7146 Stradis driver by Nathan Laredo */ | 61 | /* This DEBI code is based on the saa7146 Stradis driver by Nathan Laredo */ |
62 | int saa7146_wait_for_debi_done(struct saa7146_dev *dev, int nobusyloop) | 62 | static inline int saa7146_wait_for_debi_done_sleep(struct saa7146_dev *dev, |
63 | unsigned long us1, unsigned long us2) | ||
63 | { | 64 | { |
64 | unsigned long start; | 65 | unsigned long timeout; |
65 | int err; | 66 | int err; |
66 | 67 | ||
67 | /* wait for registers to be programmed */ | 68 | /* wait for registers to be programmed */ |
68 | start = jiffies; | 69 | timeout = jiffies + usecs_to_jiffies(us1); |
69 | while (1) { | 70 | while (1) { |
70 | err = time_after(jiffies, start + HZ/20); | 71 | err = time_after(jiffies, timeout); |
71 | if (saa7146_read(dev, MC2) & 2) | 72 | if (saa7146_read(dev, MC2) & 2) |
72 | break; | 73 | break; |
73 | if (err) { | 74 | if (err) { |
74 | DEB_S(("timed out while waiting for registers getting programmed\n")); | 75 | printk(KERN_ERR "%s: %s timed out while waiting for " |
76 | "registers getting programmed\n", | ||
77 | dev->name, __FUNCTION__); | ||
75 | return -ETIMEDOUT; | 78 | return -ETIMEDOUT; |
76 | } | 79 | } |
77 | if (nobusyloop) | 80 | msleep(1); |
78 | msleep(1); | ||
79 | } | 81 | } |
80 | 82 | ||
81 | /* wait for transfer to complete */ | 83 | /* wait for transfer to complete */ |
82 | start = jiffies; | 84 | timeout = jiffies + usecs_to_jiffies(us2); |
83 | while (1) { | 85 | while (1) { |
84 | err = time_after(jiffies, start + HZ/4); | 86 | err = time_after(jiffies, timeout); |
85 | if (!(saa7146_read(dev, PSR) & SPCI_DEBI_S)) | 87 | if (!(saa7146_read(dev, PSR) & SPCI_DEBI_S)) |
86 | break; | 88 | break; |
87 | saa7146_read(dev, MC2); | 89 | saa7146_read(dev, MC2); |
88 | if (err) { | 90 | if (err) { |
89 | DEB_S(("timed out while waiting for transfer completion\n")); | 91 | DEB_S(("%s: %s timed out while waiting for transfer " |
92 | "completion\n", dev->name, __FUNCTION__)); | ||
90 | return -ETIMEDOUT; | 93 | return -ETIMEDOUT; |
91 | } | 94 | } |
92 | if (nobusyloop) | 95 | msleep(1); |
93 | msleep(1); | ||
94 | } | 96 | } |
95 | 97 | ||
96 | return 0; | 98 | return 0; |
97 | } | 99 | } |
98 | 100 | ||
101 | static inline int saa7146_wait_for_debi_done_busyloop(struct saa7146_dev *dev, | ||
102 | unsigned long us1, unsigned long us2) | ||
103 | { | ||
104 | unsigned long loops; | ||
105 | |||
106 | /* wait for registers to be programmed */ | ||
107 | loops = us1; | ||
108 | while (1) { | ||
109 | if (saa7146_read(dev, MC2) & 2) | ||
110 | break; | ||
111 | if (!loops--) { | ||
112 | printk(KERN_ERR "%s: %s timed out while waiting for " | ||
113 | "registers getting programmed\n", | ||
114 | dev->name, __FUNCTION__); | ||
115 | return -ETIMEDOUT; | ||
116 | } | ||
117 | udelay(1); | ||
118 | } | ||
119 | |||
120 | /* wait for transfer to complete */ | ||
121 | loops = us2 / 5; | ||
122 | while (1) { | ||
123 | if (!(saa7146_read(dev, PSR) & SPCI_DEBI_S)) | ||
124 | break; | ||
125 | saa7146_read(dev, MC2); | ||
126 | if (!loops--) { | ||
127 | DEB_S(("%s: %s timed out while waiting for transfer " | ||
128 | "completion\n", dev->name, __FUNCTION__)); | ||
129 | return -ETIMEDOUT; | ||
130 | } | ||
131 | udelay(5); | ||
132 | } | ||
133 | |||
134 | return 0; | ||
135 | } | ||
136 | |||
137 | int saa7146_wait_for_debi_done(struct saa7146_dev *dev, int nobusyloop) | ||
138 | { | ||
139 | if (nobusyloop) | ||
140 | return saa7146_wait_for_debi_done_sleep(dev, 50000, 250000); | ||
141 | else | ||
142 | return saa7146_wait_for_debi_done_busyloop(dev, 50000, 250000); | ||
143 | } | ||
144 | |||
99 | /**************************************************************************** | 145 | /**************************************************************************** |
100 | * general helper functions | 146 | * general helper functions |
101 | ****************************************************************************/ | 147 | ****************************************************************************/ |
diff --git a/drivers/media/dvb/frontends/mt2131.c b/drivers/media/dvb/frontends/mt2131.c index 4b93931de4e1..13cf16668171 100644 --- a/drivers/media/dvb/frontends/mt2131.c +++ b/drivers/media/dvb/frontends/mt2131.c | |||
@@ -116,7 +116,7 @@ static int mt2131_set_params(struct dvb_frontend *fe, | |||
116 | f_lo1 = (f_lo1 / 250) * 250; | 116 | f_lo1 = (f_lo1 / 250) * 250; |
117 | f_lo2 = f_lo1 - freq - MT2131_IF2; | 117 | f_lo2 = f_lo1 - freq - MT2131_IF2; |
118 | 118 | ||
119 | priv->frequency = (f_lo1 - f_lo2 - MT2131_IF2) * 1000, | 119 | priv->frequency = (f_lo1 - f_lo2 - MT2131_IF2) * 1000; |
120 | 120 | ||
121 | /* Frequency LO1 = 16MHz * (DIV1 + NUM1/8192 ) */ | 121 | /* Frequency LO1 = 16MHz * (DIV1 + NUM1/8192 ) */ |
122 | num1 = f_lo1 * 64 / (MT2131_FREF / 128); | 122 | num1 = f_lo1 * 64 / (MT2131_FREF / 128); |
diff --git a/drivers/media/dvb/frontends/s5h1409.c b/drivers/media/dvb/frontends/s5h1409.c index 30e8a705fad4..8dee7ec9456a 100644 --- a/drivers/media/dvb/frontends/s5h1409.c +++ b/drivers/media/dvb/frontends/s5h1409.c | |||
@@ -42,6 +42,9 @@ struct s5h1409_state { | |||
42 | fe_modulation_t current_modulation; | 42 | fe_modulation_t current_modulation; |
43 | 43 | ||
44 | u32 current_frequency; | 44 | u32 current_frequency; |
45 | |||
46 | u32 is_qam_locked; | ||
47 | u32 qam_state; | ||
45 | }; | 48 | }; |
46 | 49 | ||
47 | static int debug = 0; | 50 | static int debug = 0; |
@@ -94,6 +97,7 @@ static struct init_tab { | |||
94 | { 0xac, 0x1003, }, | 97 | { 0xac, 0x1003, }, |
95 | { 0xad, 0x103f, }, | 98 | { 0xad, 0x103f, }, |
96 | { 0xe2, 0x0100, }, | 99 | { 0xe2, 0x0100, }, |
100 | { 0xe3, 0x0000, }, | ||
97 | { 0x28, 0x1010, }, | 101 | { 0x28, 0x1010, }, |
98 | { 0xb1, 0x000e, }, | 102 | { 0xb1, 0x000e, }, |
99 | }; | 103 | }; |
@@ -335,6 +339,8 @@ static int s5h1409_softreset(struct dvb_frontend* fe) | |||
335 | 339 | ||
336 | s5h1409_writereg(state, 0xf5, 0); | 340 | s5h1409_writereg(state, 0xf5, 0); |
337 | s5h1409_writereg(state, 0xf5, 1); | 341 | s5h1409_writereg(state, 0xf5, 1); |
342 | state->is_qam_locked = 0; | ||
343 | state->qam_state = 0; | ||
338 | return 0; | 344 | return 0; |
339 | } | 345 | } |
340 | 346 | ||
@@ -349,6 +355,11 @@ static int s5h1409_set_if_freq(struct dvb_frontend* fe, int KHz) | |||
349 | s5h1409_writereg(state, 0x87, 0x01be); | 355 | s5h1409_writereg(state, 0x87, 0x01be); |
350 | s5h1409_writereg(state, 0x88, 0x0436); | 356 | s5h1409_writereg(state, 0x88, 0x0436); |
351 | s5h1409_writereg(state, 0x89, 0x054d); | 357 | s5h1409_writereg(state, 0x89, 0x054d); |
358 | } else | ||
359 | if (KHz == 4000) { | ||
360 | s5h1409_writereg(state, 0x87, 0x014b); | ||
361 | s5h1409_writereg(state, 0x88, 0x0cb5); | ||
362 | s5h1409_writereg(state, 0x89, 0x03e2); | ||
352 | } else { | 363 | } else { |
353 | printk("%s() Invalid arg = %d KHz\n", __FUNCTION__, KHz); | 364 | printk("%s() Invalid arg = %d KHz\n", __FUNCTION__, KHz); |
354 | ret = -1; | 365 | ret = -1; |
@@ -361,7 +372,7 @@ static int s5h1409_set_spectralinversion(struct dvb_frontend* fe, int inverted) | |||
361 | { | 372 | { |
362 | struct s5h1409_state* state = fe->demodulator_priv; | 373 | struct s5h1409_state* state = fe->demodulator_priv; |
363 | 374 | ||
364 | dprintk("%s()\n", __FUNCTION__); | 375 | dprintk("%s(%d)\n", __FUNCTION__, inverted); |
365 | 376 | ||
366 | if(inverted == 1) | 377 | if(inverted == 1) |
367 | return s5h1409_writereg(state, 0x1b, 0x1101); /* Inverted */ | 378 | return s5h1409_writereg(state, 0x1b, 0x1101); /* Inverted */ |
@@ -382,14 +393,10 @@ static int s5h1409_enable_modulation(struct dvb_frontend* fe, | |||
382 | s5h1409_writereg(state, 0xf4, 0); | 393 | s5h1409_writereg(state, 0xf4, 0); |
383 | break; | 394 | break; |
384 | case QAM_64: | 395 | case QAM_64: |
385 | dprintk("%s() QAM_64\n", __FUNCTION__); | ||
386 | s5h1409_writereg(state, 0xf4, 1); | ||
387 | s5h1409_writereg(state, 0x85, 0x100); | ||
388 | break; | ||
389 | case QAM_256: | 396 | case QAM_256: |
390 | dprintk("%s() QAM_256\n", __FUNCTION__); | 397 | dprintk("%s() QAM_AUTO (64/256)\n", __FUNCTION__); |
391 | s5h1409_writereg(state, 0xf4, 1); | 398 | s5h1409_writereg(state, 0xf4, 1); |
392 | s5h1409_writereg(state, 0x85, 0x101); | 399 | s5h1409_writereg(state, 0x85, 0x110); |
393 | break; | 400 | break; |
394 | default: | 401 | default: |
395 | dprintk("%s() Invalid modulation\n", __FUNCTION__); | 402 | dprintk("%s() Invalid modulation\n", __FUNCTION__); |
@@ -423,7 +430,7 @@ static int s5h1409_set_gpio(struct dvb_frontend* fe, int enable) | |||
423 | if (enable) | 430 | if (enable) |
424 | return s5h1409_writereg(state, 0xe3, 0x1100); | 431 | return s5h1409_writereg(state, 0xe3, 0x1100); |
425 | else | 432 | else |
426 | return s5h1409_writereg(state, 0xe3, 0); | 433 | return s5h1409_writereg(state, 0xe3, 0x1000); |
427 | } | 434 | } |
428 | 435 | ||
429 | static int s5h1409_sleep(struct dvb_frontend* fe, int enable) | 436 | static int s5h1409_sleep(struct dvb_frontend* fe, int enable) |
@@ -444,6 +451,66 @@ static int s5h1409_register_reset(struct dvb_frontend* fe) | |||
444 | return s5h1409_writereg(state, 0xfa, 0); | 451 | return s5h1409_writereg(state, 0xfa, 0); |
445 | } | 452 | } |
446 | 453 | ||
454 | static void s5h1409_set_qam_amhum_mode(struct dvb_frontend *fe) | ||
455 | { | ||
456 | struct s5h1409_state *state = fe->demodulator_priv; | ||
457 | u16 reg; | ||
458 | |||
459 | if (state->is_qam_locked) | ||
460 | return; | ||
461 | |||
462 | /* QAM EQ lock check */ | ||
463 | reg = s5h1409_readreg(state, 0xf0); | ||
464 | |||
465 | if ((reg >> 13) & 0x1) { | ||
466 | |||
467 | state->is_qam_locked = 1; | ||
468 | reg &= 0xff; | ||
469 | |||
470 | s5h1409_writereg(state, 0x96, 0x00c); | ||
471 | if ((reg < 0x38) || (reg > 0x68) ) { | ||
472 | s5h1409_writereg(state, 0x93, 0x3332); | ||
473 | s5h1409_writereg(state, 0x9e, 0x2c37); | ||
474 | } else { | ||
475 | s5h1409_writereg(state, 0x93, 0x3130); | ||
476 | s5h1409_writereg(state, 0x9e, 0x2836); | ||
477 | } | ||
478 | |||
479 | } else { | ||
480 | s5h1409_writereg(state, 0x96, 0x0008); | ||
481 | s5h1409_writereg(state, 0x93, 0x3332); | ||
482 | s5h1409_writereg(state, 0x9e, 0x2c37); | ||
483 | } | ||
484 | } | ||
485 | |||
486 | static void s5h1409_set_qam_interleave_mode(struct dvb_frontend *fe) | ||
487 | { | ||
488 | struct s5h1409_state *state = fe->demodulator_priv; | ||
489 | u16 reg, reg1, reg2; | ||
490 | |||
491 | reg = s5h1409_readreg(state, 0xf1); | ||
492 | |||
493 | /* Master lock */ | ||
494 | if ((reg >> 15) & 0x1) { | ||
495 | if (state->qam_state != 2) { | ||
496 | state->qam_state = 2; | ||
497 | reg1 = s5h1409_readreg(state, 0xb2); | ||
498 | reg2 = s5h1409_readreg(state, 0xad); | ||
499 | |||
500 | s5h1409_writereg(state, 0x96, 0x20); | ||
501 | s5h1409_writereg(state, 0xad, | ||
502 | ( ((reg1 & 0xf000) >> 4) | (reg2 & 0xf0ff)) ); | ||
503 | s5h1409_writereg(state, 0xab, 0x1100); | ||
504 | } | ||
505 | } else { | ||
506 | if (state->qam_state != 1) { | ||
507 | state->qam_state = 1; | ||
508 | s5h1409_writereg(state, 0x96, 0x08); | ||
509 | s5h1409_writereg(state, 0xab, 0x1101); | ||
510 | } | ||
511 | } | ||
512 | } | ||
513 | |||
447 | /* Talk to the demod, set the FEC, GUARD, QAM settings etc */ | 514 | /* Talk to the demod, set the FEC, GUARD, QAM settings etc */ |
448 | static int s5h1409_set_frontend (struct dvb_frontend* fe, | 515 | static int s5h1409_set_frontend (struct dvb_frontend* fe, |
449 | struct dvb_frontend_parameters *p) | 516 | struct dvb_frontend_parameters *p) |
@@ -458,12 +525,21 @@ static int s5h1409_set_frontend (struct dvb_frontend* fe, | |||
458 | 525 | ||
459 | s5h1409_enable_modulation(fe, p->u.vsb.modulation); | 526 | s5h1409_enable_modulation(fe, p->u.vsb.modulation); |
460 | 527 | ||
528 | /* Allow the demod to settle */ | ||
529 | msleep(100); | ||
530 | |||
461 | if (fe->ops.tuner_ops.set_params) { | 531 | if (fe->ops.tuner_ops.set_params) { |
462 | if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 1); | 532 | if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 1); |
463 | fe->ops.tuner_ops.set_params(fe, p); | 533 | fe->ops.tuner_ops.set_params(fe, p); |
464 | if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); | 534 | if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); |
465 | } | 535 | } |
466 | 536 | ||
537 | /* Optimize the demod for QAM */ | ||
538 | if (p->u.vsb.modulation != VSB_8) { | ||
539 | s5h1409_set_qam_amhum_mode(fe); | ||
540 | s5h1409_set_qam_interleave_mode(fe); | ||
541 | } | ||
542 | |||
467 | return 0; | 543 | return 0; |
468 | } | 544 | } |
469 | 545 | ||
@@ -495,8 +571,8 @@ static int s5h1409_init (struct dvb_frontend* fe) | |||
495 | s5h1409_set_gpio(fe, state->config->gpio); | 571 | s5h1409_set_gpio(fe, state->config->gpio); |
496 | s5h1409_softreset(fe); | 572 | s5h1409_softreset(fe); |
497 | 573 | ||
498 | /* Note: Leaving the I2C gate open here. */ | 574 | /* Note: Leaving the I2C gate closed. */ |
499 | s5h1409_i2c_gate_ctrl(fe, 1); | 575 | s5h1409_i2c_gate_ctrl(fe, 0); |
500 | 576 | ||
501 | return 0; | 577 | return 0; |
502 | } | 578 | } |
diff --git a/drivers/media/dvb/frontends/stv0297.c b/drivers/media/dvb/frontends/stv0297.c index 17e5cb561cd8..7c23775f77db 100644 --- a/drivers/media/dvb/frontends/stv0297.c +++ b/drivers/media/dvb/frontends/stv0297.c | |||
@@ -358,11 +358,23 @@ static int stv0297_read_ber(struct dvb_frontend *fe, u32 * ber) | |||
358 | static int stv0297_read_signal_strength(struct dvb_frontend *fe, u16 * strength) | 358 | static int stv0297_read_signal_strength(struct dvb_frontend *fe, u16 * strength) |
359 | { | 359 | { |
360 | struct stv0297_state *state = fe->demodulator_priv; | 360 | struct stv0297_state *state = fe->demodulator_priv; |
361 | u8 STRENGTH[2]; | 361 | u8 STRENGTH[3]; |
362 | 362 | u16 tmp; | |
363 | stv0297_readregs(state, 0x41, STRENGTH, 2); | 363 | |
364 | *strength = (STRENGTH[1] & 0x03) << 8 | STRENGTH[0]; | 364 | stv0297_readregs(state, 0x41, STRENGTH, 3); |
365 | 365 | tmp = (STRENGTH[1] & 0x03) << 8 | STRENGTH[0]; | |
366 | if (STRENGTH[2] & 0x20) { | ||
367 | if (tmp < 0x200) | ||
368 | tmp = 0; | ||
369 | else | ||
370 | tmp = tmp - 0x200; | ||
371 | } else { | ||
372 | if (tmp > 0x1ff) | ||
373 | tmp = 0; | ||
374 | else | ||
375 | tmp = 0x1ff - tmp; | ||
376 | } | ||
377 | *strength = (tmp << 7) | (tmp >> 2); | ||
366 | return 0; | 378 | return 0; |
367 | } | 379 | } |
368 | 380 | ||
diff --git a/drivers/media/dvb/frontends/tda10021.c b/drivers/media/dvb/frontends/tda10021.c index 4cd9e82c4669..45137d2ebfb9 100644 --- a/drivers/media/dvb/frontends/tda10021.c +++ b/drivers/media/dvb/frontends/tda10021.c | |||
@@ -301,6 +301,8 @@ static int tda10021_read_ber(struct dvb_frontend* fe, u32* ber) | |||
301 | u32 _ber = tda10021_readreg(state, 0x14) | | 301 | u32 _ber = tda10021_readreg(state, 0x14) | |
302 | (tda10021_readreg(state, 0x15) << 8) | | 302 | (tda10021_readreg(state, 0x15) << 8) | |
303 | ((tda10021_readreg(state, 0x16) & 0x0f) << 16); | 303 | ((tda10021_readreg(state, 0x16) & 0x0f) << 16); |
304 | _tda10021_writereg(state, 0x10, (tda10021_readreg(state, 0x10) & ~0xc0) | ||
305 | | (tda10021_inittab[0x10] & 0xc0)); | ||
304 | *ber = 10 * _ber; | 306 | *ber = 10 * _ber; |
305 | 307 | ||
306 | return 0; | 308 | return 0; |
@@ -310,7 +312,11 @@ static int tda10021_read_signal_strength(struct dvb_frontend* fe, u16* strength) | |||
310 | { | 312 | { |
311 | struct tda10021_state* state = fe->demodulator_priv; | 313 | struct tda10021_state* state = fe->demodulator_priv; |
312 | 314 | ||
315 | u8 config = tda10021_readreg(state, 0x02); | ||
313 | u8 gain = tda10021_readreg(state, 0x17); | 316 | u8 gain = tda10021_readreg(state, 0x17); |
317 | if (config & 0x02) | ||
318 | /* the agc value is inverted */ | ||
319 | gain = ~gain; | ||
314 | *strength = (gain << 8) | gain; | 320 | *strength = (gain << 8) | gain; |
315 | 321 | ||
316 | return 0; | 322 | return 0; |
diff --git a/drivers/media/dvb/frontends/ves1820.c b/drivers/media/dvb/frontends/ves1820.c index 066b73b75698..60433b5011fd 100644 --- a/drivers/media/dvb/frontends/ves1820.c +++ b/drivers/media/dvb/frontends/ves1820.c | |||
@@ -47,7 +47,7 @@ struct ves1820_state { | |||
47 | static int verbose; | 47 | static int verbose; |
48 | 48 | ||
49 | static u8 ves1820_inittab[] = { | 49 | static u8 ves1820_inittab[] = { |
50 | 0x69, 0x6A, 0x93, 0x12, 0x12, 0x46, 0x26, 0x1A, | 50 | 0x69, 0x6A, 0x93, 0x1A, 0x12, 0x46, 0x26, 0x1A, |
51 | 0x43, 0x6A, 0xAA, 0xAA, 0x1E, 0x85, 0x43, 0x20, | 51 | 0x43, 0x6A, 0xAA, 0xAA, 0x1E, 0x85, 0x43, 0x20, |
52 | 0xE0, 0x00, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, | 52 | 0xE0, 0x00, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, |
53 | 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, | 53 | 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, |
diff --git a/drivers/media/dvb/ttpci/Kconfig b/drivers/media/dvb/ttpci/Kconfig index 6d53289b3276..54b91f26ca63 100644 --- a/drivers/media/dvb/ttpci/Kconfig +++ b/drivers/media/dvb/ttpci/Kconfig | |||
@@ -84,7 +84,7 @@ config DVB_BUDGET | |||
84 | 84 | ||
85 | config DVB_BUDGET_CI | 85 | config DVB_BUDGET_CI |
86 | tristate "Budget cards with onboard CI connector" | 86 | tristate "Budget cards with onboard CI connector" |
87 | depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 | 87 | depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 && INPUT |
88 | select VIDEO_SAA7146 | 88 | select VIDEO_SAA7146 |
89 | select DVB_STV0297 if !DVB_FE_CUSTOMISE | 89 | select DVB_STV0297 if !DVB_FE_CUSTOMISE |
90 | select DVB_STV0299 if !DVB_FE_CUSTOMISE | 90 | select DVB_STV0299 if !DVB_FE_CUSTOMISE |
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index 2e571eb9313a..c9f14bfc8544 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig | |||
@@ -363,7 +363,7 @@ endmenu # encoder / decoder chips | |||
363 | 363 | ||
364 | config VIDEO_VIVI | 364 | config VIDEO_VIVI |
365 | tristate "Virtual Video Driver" | 365 | tristate "Virtual Video Driver" |
366 | depends on VIDEO_V4L2 && !SPARC32 && !SPARC64 && PCI | 366 | depends on VIDEO_V4L2 && !SPARC32 && !SPARC64 |
367 | select VIDEOBUF_VMALLOC | 367 | select VIDEOBUF_VMALLOC |
368 | default n | 368 | default n |
369 | ---help--- | 369 | ---help--- |
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index 9feeb636ff9b..a88b56e6ca05 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c | |||
@@ -2881,10 +2881,6 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, | |||
2881 | if (NULL == fmt) | 2881 | if (NULL == fmt) |
2882 | return -EINVAL; | 2882 | return -EINVAL; |
2883 | mutex_lock(&fh->cap.lock); | 2883 | mutex_lock(&fh->cap.lock); |
2884 | if (fmt->depth != pic->depth) { | ||
2885 | retval = -EINVAL; | ||
2886 | goto fh_unlock_and_return; | ||
2887 | } | ||
2888 | if (fmt->flags & FORMAT_FLAGS_RAW) { | 2884 | if (fmt->flags & FORMAT_FLAGS_RAW) { |
2889 | /* VIDIOCMCAPTURE uses gbufsize, not RAW_BPL * | 2885 | /* VIDIOCMCAPTURE uses gbufsize, not RAW_BPL * |
2890 | RAW_LINES * 2. F1 is stored at offset 0, F2 | 2886 | RAW_LINES * 2. F1 is stored at offset 0, F2 |
@@ -3117,6 +3113,8 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, | |||
3117 | vm->width,vm->height,field); | 3113 | vm->width,vm->height,field); |
3118 | if (0 != retval) | 3114 | if (0 != retval) |
3119 | goto fh_unlock_and_return; | 3115 | goto fh_unlock_and_return; |
3116 | btv->init.width = vm->width; | ||
3117 | btv->init.height = vm->height; | ||
3120 | spin_lock_irqsave(&btv->s_lock,flags); | 3118 | spin_lock_irqsave(&btv->s_lock,flags); |
3121 | buffer_queue(&fh->cap,&buf->vb); | 3119 | buffer_queue(&fh->cap,&buf->vb); |
3122 | spin_unlock_irqrestore(&btv->s_lock,flags); | 3120 | spin_unlock_irqrestore(&btv->s_lock,flags); |
diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c index b63cab336920..7ae499c9c54c 100644 --- a/drivers/media/video/cafe_ccic.c +++ b/drivers/media/video/cafe_ccic.c | |||
@@ -3,6 +3,9 @@ | |||
3 | * multifunction chip. Currently works with the Omnivision OV7670 | 3 | * multifunction chip. Currently works with the Omnivision OV7670 |
4 | * sensor. | 4 | * sensor. |
5 | * | 5 | * |
6 | * The data sheet for this device can be found at: | ||
7 | * http://www.marvell.com/products/pcconn/88ALP01.jsp | ||
8 | * | ||
6 | * Copyright 2006 One Laptop Per Child Association, Inc. | 9 | * Copyright 2006 One Laptop Per Child Association, Inc. |
7 | * Copyright 2006-7 Jonathan Corbet <corbet@lwn.net> | 10 | * Copyright 2006-7 Jonathan Corbet <corbet@lwn.net> |
8 | * | 11 | * |
@@ -2232,13 +2235,16 @@ static int cafe_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2232 | { | 2235 | { |
2233 | struct cafe_camera *cam = cafe_find_by_pdev(pdev); | 2236 | struct cafe_camera *cam = cafe_find_by_pdev(pdev); |
2234 | int ret; | 2237 | int ret; |
2238 | enum cafe_state cstate; | ||
2235 | 2239 | ||
2236 | ret = pci_save_state(pdev); | 2240 | ret = pci_save_state(pdev); |
2237 | if (ret) | 2241 | if (ret) |
2238 | return ret; | 2242 | return ret; |
2243 | cstate = cam->state; /* HACK - stop_dma sets to idle */ | ||
2239 | cafe_ctlr_stop_dma(cam); | 2244 | cafe_ctlr_stop_dma(cam); |
2240 | cafe_ctlr_power_down(cam); | 2245 | cafe_ctlr_power_down(cam); |
2241 | pci_disable_device(pdev); | 2246 | pci_disable_device(pdev); |
2247 | cam->state = cstate; | ||
2242 | return 0; | 2248 | return 0; |
2243 | } | 2249 | } |
2244 | 2250 | ||
diff --git a/drivers/media/video/cx23885/Kconfig b/drivers/media/video/cx23885/Kconfig index 72004a07b2d5..d8b1ccb44913 100644 --- a/drivers/media/video/cx23885/Kconfig +++ b/drivers/media/video/cx23885/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config VIDEO_CX23885 | 1 | config VIDEO_CX23885 |
2 | tristate "Conexant cx23885 (2388x successor) support" | 2 | tristate "Conexant cx23885 (2388x successor) support" |
3 | depends on DVB_CORE && VIDEO_DEV && PCI && I2C | 3 | depends on DVB_CORE && VIDEO_DEV && PCI && I2C && INPUT |
4 | select I2C_ALGOBIT | 4 | select I2C_ALGOBIT |
5 | select FW_LOADER | 5 | select FW_LOADER |
6 | select VIDEO_BTCX | 6 | select VIDEO_BTCX |
diff --git a/drivers/media/video/cx88/Kconfig b/drivers/media/video/cx88/Kconfig index eeb5224ca101..ceb31d4a2512 100644 --- a/drivers/media/video/cx88/Kconfig +++ b/drivers/media/video/cx88/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config VIDEO_CX88 | 1 | config VIDEO_CX88 |
2 | tristate "Conexant 2388x (bt878 successor) support" | 2 | tristate "Conexant 2388x (bt878 successor) support" |
3 | depends on VIDEO_DEV && PCI && I2C | 3 | depends on VIDEO_DEV && PCI && I2C && INPUT |
4 | select I2C_ALGOBIT | 4 | select I2C_ALGOBIT |
5 | select FW_LOADER | 5 | select FW_LOADER |
6 | select VIDEO_BTCX | 6 | select VIDEO_BTCX |
diff --git a/drivers/media/video/em28xx/Kconfig b/drivers/media/video/em28xx/Kconfig index 5b6a40371602..c1127802ad9c 100644 --- a/drivers/media/video/em28xx/Kconfig +++ b/drivers/media/video/em28xx/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config VIDEO_EM28XX | 1 | config VIDEO_EM28XX |
2 | tristate "Empia EM2800/2820/2840 USB video capture support" | 2 | tristate "Empia EM2800/2820/2840 USB video capture support" |
3 | depends on VIDEO_V4L1 && I2C | 3 | depends on VIDEO_V4L1 && I2C && INPUT |
4 | select VIDEO_TUNER | 4 | select VIDEO_TUNER |
5 | select VIDEO_TVEEPROM | 5 | select VIDEO_TVEEPROM |
6 | select VIDEO_IR | 6 | select VIDEO_IR |
diff --git a/drivers/media/video/em28xx/em28xx-i2c.c b/drivers/media/video/em28xx/em28xx-i2c.c index 997d067e32e0..e3a4aa7a9df4 100644 --- a/drivers/media/video/em28xx/em28xx-i2c.c +++ b/drivers/media/video/em28xx/em28xx-i2c.c | |||
@@ -416,8 +416,10 @@ static int attach_inform(struct i2c_client *client) | |||
416 | struct em28xx *dev = client->adapter->algo_data; | 416 | struct em28xx *dev = client->adapter->algo_data; |
417 | 417 | ||
418 | switch (client->addr << 1) { | 418 | switch (client->addr << 1) { |
419 | case 0x43: | 419 | case 0x86: |
420 | case 0x4b: | 420 | case 0x84: |
421 | case 0x96: | ||
422 | case 0x94: | ||
421 | { | 423 | { |
422 | struct tuner_setup tun_setup; | 424 | struct tuner_setup tun_setup; |
423 | 425 | ||
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index a4c2a907124a..2529c298b862 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/usb.h> | 32 | #include <linux/usb.h> |
33 | #include <linux/i2c.h> | 33 | #include <linux/i2c.h> |
34 | #include <linux/version.h> | 34 | #include <linux/version.h> |
35 | #include <linux/mm.h> | ||
35 | #include <linux/video_decoder.h> | 36 | #include <linux/video_decoder.h> |
36 | #include <linux/mutex.h> | 37 | #include <linux/mutex.h> |
37 | 38 | ||
diff --git a/drivers/media/video/planb.c b/drivers/media/video/planb.c index ce4b2f9791ee..36047d4e70f6 100644 --- a/drivers/media/video/planb.c +++ b/drivers/media/video/planb.c | |||
@@ -91,7 +91,6 @@ static void planb_close(struct video_device *); | |||
91 | static int planb_ioctl(struct video_device *, unsigned int, void *); | 91 | static int planb_ioctl(struct video_device *, unsigned int, void *); |
92 | static int planb_init_done(struct video_device *); | 92 | static int planb_init_done(struct video_device *); |
93 | static int planb_mmap(struct video_device *, const char *, unsigned long); | 93 | static int planb_mmap(struct video_device *, const char *, unsigned long); |
94 | static void planb_irq(int, void *); | ||
95 | static void release_planb(void); | 94 | static void release_planb(void); |
96 | int init_planbs(struct video_init *); | 95 | int init_planbs(struct video_init *); |
97 | 96 | ||
@@ -1315,7 +1314,7 @@ cmd_tab_data_end: | |||
1315 | return c1; | 1314 | return c1; |
1316 | } | 1315 | } |
1317 | 1316 | ||
1318 | static void planb_irq(int irq, void *dev_id) | 1317 | static irqreturn_t planb_irq(int irq, void *dev_id) |
1319 | { | 1318 | { |
1320 | unsigned int stat, astat; | 1319 | unsigned int stat, astat; |
1321 | struct planb *pb = (struct planb *)dev_id; | 1320 | struct planb *pb = (struct planb *)dev_id; |
@@ -1358,13 +1357,14 @@ static void planb_irq(int irq, void *dev_id) | |||
1358 | pb->frame_stat[fr] = GBUFFER_DONE; | 1357 | pb->frame_stat[fr] = GBUFFER_DONE; |
1359 | pb->grabbing--; | 1358 | pb->grabbing--; |
1360 | wake_up_interruptible(&pb->capq); | 1359 | wake_up_interruptible(&pb->capq); |
1361 | return; | 1360 | return IRQ_HANDLED; |
1362 | } | 1361 | } |
1363 | /* incorrect interrupts? */ | 1362 | /* incorrect interrupts? */ |
1364 | pb->intr_mask = PLANB_CLR_IRQ; | 1363 | pb->intr_mask = PLANB_CLR_IRQ; |
1365 | out_le32(&pb->planb_base->intr_stat, PLANB_CLR_IRQ); | 1364 | out_le32(&pb->planb_base->intr_stat, PLANB_CLR_IRQ); |
1366 | printk(KERN_ERR "PlanB: IRQ lockup, cleared intrrupts" | 1365 | printk(KERN_ERR "PlanB: IRQ lockup, cleared intrrupts" |
1367 | " unconditionally\n"); | 1366 | " unconditionally\n"); |
1367 | return IRQ_HANDLED; | ||
1368 | } | 1368 | } |
1369 | 1369 | ||
1370 | /******************************* | 1370 | /******************************* |
@@ -2090,7 +2090,7 @@ static int init_planb(struct planb *pb) | |||
2090 | /* clear interrupt mask */ | 2090 | /* clear interrupt mask */ |
2091 | pb->intr_mask = PLANB_CLR_IRQ; | 2091 | pb->intr_mask = PLANB_CLR_IRQ; |
2092 | 2092 | ||
2093 | result = request_irq(pb->irq, planb_irq, 0, "PlanB", (void *)pb); | 2093 | result = request_irq(pb->irq, planb_irq, 0, "PlanB", pb); |
2094 | if (result < 0) { | 2094 | if (result < 0) { |
2095 | if (result==-EINVAL) | 2095 | if (result==-EINVAL) |
2096 | printk(KERN_ERR "PlanB: Bad irq number (%d) " | 2096 | printk(KERN_ERR "PlanB: Bad irq number (%d) " |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c index f569b00201dd..46f156fb108c 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c +++ b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c | |||
@@ -410,7 +410,7 @@ static int parse_mtoken(const char *ptr,unsigned int len, | |||
410 | int msk; | 410 | int msk; |
411 | *valptr = 0; | 411 | *valptr = 0; |
412 | for (idx = 0, msk = 1; valid_bits; idx++, msk <<= 1) { | 412 | for (idx = 0, msk = 1; valid_bits; idx++, msk <<= 1) { |
413 | if (!msk & valid_bits) continue; | 413 | if (!(msk & valid_bits)) continue; |
414 | valid_bits &= ~msk; | 414 | valid_bits &= ~msk; |
415 | if (!names[idx]) continue; | 415 | if (!names[idx]) continue; |
416 | slen = strlen(names[idx]); | 416 | slen = strlen(names[idx]); |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-main.c b/drivers/media/video/pvrusb2/pvrusb2-main.c index ca9e2789c8ca..11b3b2e84b90 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-main.c +++ b/drivers/media/video/pvrusb2/pvrusb2-main.c | |||
@@ -136,14 +136,13 @@ static int __init pvr_init(void) | |||
136 | 136 | ||
137 | static void __exit pvr_exit(void) | 137 | static void __exit pvr_exit(void) |
138 | { | 138 | { |
139 | |||
140 | pvr2_trace(PVR2_TRACE_INIT,"pvr_exit"); | 139 | pvr2_trace(PVR2_TRACE_INIT,"pvr_exit"); |
141 | 140 | ||
141 | usb_deregister(&pvr_driver); | ||
142 | |||
142 | #ifdef CONFIG_VIDEO_PVRUSB2_SYSFS | 143 | #ifdef CONFIG_VIDEO_PVRUSB2_SYSFS |
143 | pvr2_sysfs_class_destroy(class_ptr); | 144 | pvr2_sysfs_class_destroy(class_ptr); |
144 | #endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */ | 145 | #endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */ |
145 | |||
146 | usb_deregister(&pvr_driver); | ||
147 | } | 146 | } |
148 | 147 | ||
149 | module_init(pvr_init); | 148 | module_init(pvr_init); |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c index 2ee3c3049e8f..3c57a7d8200b 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c +++ b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c | |||
@@ -905,13 +905,6 @@ struct pvr2_sysfs *pvr2_sysfs_create(struct pvr2_context *mp, | |||
905 | } | 905 | } |
906 | 906 | ||
907 | 907 | ||
908 | static int pvr2_sysfs_hotplug(struct device *d, | ||
909 | struct kobj_uevent_env *env) | ||
910 | { | ||
911 | /* Even though we don't do anything here, we still need this function | ||
912 | because sysfs will still try to call it. */ | ||
913 | return 0; | ||
914 | } | ||
915 | 908 | ||
916 | struct pvr2_sysfs_class *pvr2_sysfs_class_create(void) | 909 | struct pvr2_sysfs_class *pvr2_sysfs_class_create(void) |
917 | { | 910 | { |
@@ -922,7 +915,6 @@ struct pvr2_sysfs_class *pvr2_sysfs_class_create(void) | |||
922 | clp->class.name = "pvrusb2"; | 915 | clp->class.name = "pvrusb2"; |
923 | clp->class.class_release = pvr2_sysfs_class_release; | 916 | clp->class.class_release = pvr2_sysfs_class_release; |
924 | clp->class.dev_release = pvr2_sysfs_release; | 917 | clp->class.dev_release = pvr2_sysfs_release; |
925 | clp->class.dev_uevent = pvr2_sysfs_hotplug; | ||
926 | if (class_register(&clp->class)) { | 918 | if (class_register(&clp->class)) { |
927 | pvr2_sysfs_trace( | 919 | pvr2_sysfs_trace( |
928 | "Registration failed for pvr2_sysfs_class id=%p",clp); | 920 | "Registration failed for pvr2_sysfs_class id=%p",clp); |
diff --git a/drivers/media/video/saa7134/Kconfig b/drivers/media/video/saa7134/Kconfig index d6d8d660196d..3aa8cb2b860a 100644 --- a/drivers/media/video/saa7134/Kconfig +++ b/drivers/media/video/saa7134/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config VIDEO_SAA7134 | 1 | config VIDEO_SAA7134 |
2 | tristate "Philips SAA7134 support" | 2 | tristate "Philips SAA7134 support" |
3 | depends on VIDEO_DEV && PCI && I2C | 3 | depends on VIDEO_DEV && PCI && I2C && INPUT |
4 | select VIDEOBUF_DMA_SG | 4 | select VIDEOBUF_DMA_SG |
5 | select VIDEO_IR | 5 | select VIDEO_IR |
6 | select VIDEO_TUNER | 6 | select VIDEO_TUNER |
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c index c6f7279669c1..b9c5cf7dc849 100644 --- a/drivers/media/video/saa7134/saa7134-alsa.c +++ b/drivers/media/video/saa7134/saa7134-alsa.c | |||
@@ -543,8 +543,10 @@ static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream, | |||
543 | V4L functions, and force ALSA to use that as the DMA area */ | 543 | V4L functions, and force ALSA to use that as the DMA area */ |
544 | 544 | ||
545 | substream->runtime->dma_area = dev->dmasound.dma.vmalloc; | 545 | substream->runtime->dma_area = dev->dmasound.dma.vmalloc; |
546 | substream->runtime->dma_bytes = dev->dmasound.bufsize; | ||
547 | substream->runtime->dma_addr = 0; | ||
546 | 548 | ||
547 | return 1; | 549 | return 0; |
548 | 550 | ||
549 | } | 551 | } |
550 | 552 | ||
@@ -652,6 +654,17 @@ static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream) | |||
652 | } | 654 | } |
653 | 655 | ||
654 | /* | 656 | /* |
657 | * page callback (needed for mmap) | ||
658 | */ | ||
659 | |||
660 | static struct page *snd_card_saa7134_page(struct snd_pcm_substream *substream, | ||
661 | unsigned long offset) | ||
662 | { | ||
663 | void *pageptr = substream->runtime->dma_area + offset; | ||
664 | return vmalloc_to_page(pageptr); | ||
665 | } | ||
666 | |||
667 | /* | ||
655 | * ALSA capture callbacks definition | 668 | * ALSA capture callbacks definition |
656 | */ | 669 | */ |
657 | 670 | ||
@@ -664,6 +677,7 @@ static struct snd_pcm_ops snd_card_saa7134_capture_ops = { | |||
664 | .prepare = snd_card_saa7134_capture_prepare, | 677 | .prepare = snd_card_saa7134_capture_prepare, |
665 | .trigger = snd_card_saa7134_capture_trigger, | 678 | .trigger = snd_card_saa7134_capture_trigger, |
666 | .pointer = snd_card_saa7134_capture_pointer, | 679 | .pointer = snd_card_saa7134_capture_pointer, |
680 | .page = snd_card_saa7134_page, | ||
667 | }; | 681 | }; |
668 | 682 | ||
669 | /* | 683 | /* |
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index a4c192fb4e41..4f3dad9ae6d6 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -2996,11 +2996,11 @@ struct saa7134_board saa7134_boards[] = { | |||
2996 | },{ | 2996 | },{ |
2997 | .name = name_comp1, | 2997 | .name = name_comp1, |
2998 | .vmux = 0, | 2998 | .vmux = 0, |
2999 | .amux = LINE2, | 2999 | .amux = LINE1, |
3000 | },{ | 3000 | },{ |
3001 | .name = name_svideo, | 3001 | .name = name_svideo, |
3002 | .vmux = 8, | 3002 | .vmux = 8, |
3003 | .amux = LINE2, | 3003 | .amux = LINE1, |
3004 | }}, | 3004 | }}, |
3005 | }, | 3005 | }, |
3006 | [SAA7134_BOARD_FLYDVBS_LR300] = { | 3006 | [SAA7134_BOARD_FLYDVBS_LR300] = { |
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 6a777604f070..9e99f3636d3d 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | /* standard i2c insmod options */ | 31 | /* standard i2c insmod options */ |
32 | static unsigned short normal_i2c[] = { | 32 | static unsigned short normal_i2c[] = { |
33 | #ifdef CONFIG_TUNER_TEA5761 | 33 | #if defined(CONFIG_TUNER_TEA5761) || (defined(CONFIG_TUNER_TEA5761_MODULE) && defined(MODULE)) |
34 | 0x10, | 34 | 0x10, |
35 | #endif | 35 | #endif |
36 | 0x42, 0x43, 0x4a, 0x4b, /* tda8290 */ | 36 | 0x42, 0x43, 0x4a, 0x4b, /* tda8290 */ |
@@ -292,7 +292,6 @@ static void set_type(struct i2c_client *c, unsigned int type, | |||
292 | } | 292 | } |
293 | t->mode_mask = T_RADIO; | 293 | t->mode_mask = T_RADIO; |
294 | break; | 294 | break; |
295 | #ifdef CONFIG_TUNER_TEA5761 | ||
296 | case TUNER_TEA5761: | 295 | case TUNER_TEA5761: |
297 | if (tea5761_attach(&t->fe, t->i2c.adapter, t->i2c.addr) == NULL) { | 296 | if (tea5761_attach(&t->fe, t->i2c.adapter, t->i2c.addr) == NULL) { |
298 | t->type = TUNER_ABSENT; | 297 | t->type = TUNER_ABSENT; |
@@ -301,7 +300,6 @@ static void set_type(struct i2c_client *c, unsigned int type, | |||
301 | } | 300 | } |
302 | t->mode_mask = T_RADIO; | 301 | t->mode_mask = T_RADIO; |
303 | break; | 302 | break; |
304 | #endif | ||
305 | case TUNER_PHILIPS_FMD1216ME_MK3: | 303 | case TUNER_PHILIPS_FMD1216ME_MK3: |
306 | buffer[0] = 0x0b; | 304 | buffer[0] = 0x0b; |
307 | buffer[1] = 0xdc; | 305 | buffer[1] = 0xdc; |
@@ -594,7 +592,6 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind) | |||
594 | /* autodetection code based on the i2c addr */ | 592 | /* autodetection code based on the i2c addr */ |
595 | if (!no_autodetect) { | 593 | if (!no_autodetect) { |
596 | switch (addr) { | 594 | switch (addr) { |
597 | #ifdef CONFIG_TUNER_TEA5761 | ||
598 | case 0x10: | 595 | case 0x10: |
599 | if (tea5761_autodetection(t->i2c.adapter, t->i2c.addr) != EINVAL) { | 596 | if (tea5761_autodetection(t->i2c.adapter, t->i2c.addr) != EINVAL) { |
600 | t->type = TUNER_TEA5761; | 597 | t->type = TUNER_TEA5761; |
@@ -606,7 +603,6 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind) | |||
606 | goto register_client; | 603 | goto register_client; |
607 | } | 604 | } |
608 | break; | 605 | break; |
609 | #endif | ||
610 | case 0x42: | 606 | case 0x42: |
611 | case 0x43: | 607 | case 0x43: |
612 | case 0x4a: | 608 | case 0x4a: |
diff --git a/drivers/media/video/tvp5150.c b/drivers/media/video/tvp5150.c index e2f1c972754b..25d0aef88ef5 100644 --- a/drivers/media/video/tvp5150.c +++ b/drivers/media/video/tvp5150.c | |||
@@ -799,10 +799,10 @@ static inline void tvp5150_reset(struct i2c_client *c) | |||
799 | tvp5150_write_inittab(c, tvp5150_init_enable); | 799 | tvp5150_write_inittab(c, tvp5150_init_enable); |
800 | 800 | ||
801 | /* Initialize image preferences */ | 801 | /* Initialize image preferences */ |
802 | tvp5150_write(c, TVP5150_BRIGHT_CTL, decoder->bright >> 8); | 802 | tvp5150_write(c, TVP5150_BRIGHT_CTL, decoder->bright); |
803 | tvp5150_write(c, TVP5150_CONTRAST_CTL, decoder->contrast >> 8); | 803 | tvp5150_write(c, TVP5150_CONTRAST_CTL, decoder->contrast); |
804 | tvp5150_write(c, TVP5150_SATURATION_CTL, decoder->contrast >> 8); | 804 | tvp5150_write(c, TVP5150_SATURATION_CTL, decoder->contrast); |
805 | tvp5150_write(c, TVP5150_HUE_CTL, (decoder->hue - 32768) >> 8); | 805 | tvp5150_write(c, TVP5150_HUE_CTL, decoder->hue); |
806 | 806 | ||
807 | tvp5150_set_std(c, decoder->norm); | 807 | tvp5150_set_std(c, decoder->norm); |
808 | }; | 808 | }; |
@@ -1077,10 +1077,10 @@ static int tvp5150_detect_client(struct i2c_adapter *adapter, | |||
1077 | core->norm = V4L2_STD_ALL; /* Default is autodetect */ | 1077 | core->norm = V4L2_STD_ALL; /* Default is autodetect */ |
1078 | core->route.input = TVP5150_COMPOSITE1; | 1078 | core->route.input = TVP5150_COMPOSITE1; |
1079 | core->enable = 1; | 1079 | core->enable = 1; |
1080 | core->bright = 32768; | 1080 | core->bright = 128; |
1081 | core->contrast = 32768; | 1081 | core->contrast = 128; |
1082 | core->hue = 32768; | 1082 | core->hue = 0; |
1083 | core->sat = 32768; | 1083 | core->sat = 128; |
1084 | 1084 | ||
1085 | if (rv) { | 1085 | if (rv) { |
1086 | kfree(c); | 1086 | kfree(c); |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 09440d783e65..cad519910767 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -7365,10 +7365,6 @@ static int tg3_open(struct net_device *dev) | |||
7365 | } else if (pci_enable_msi(tp->pdev) == 0) { | 7365 | } else if (pci_enable_msi(tp->pdev) == 0) { |
7366 | u32 msi_mode; | 7366 | u32 msi_mode; |
7367 | 7367 | ||
7368 | /* Hardware bug - MSI won't work if INTX disabled. */ | ||
7369 | if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) | ||
7370 | pci_intx(tp->pdev, 1); | ||
7371 | |||
7372 | msi_mode = tr32(MSGINT_MODE); | 7368 | msi_mode = tr32(MSGINT_MODE); |
7373 | tw32(MSGINT_MODE, msi_mode | MSGINT_MODE_ENABLE); | 7369 | tw32(MSGINT_MODE, msi_mode | MSGINT_MODE_ENABLE); |
7374 | tp->tg3_flags2 |= TG3_FLG2_USING_MSI; | 7370 | tp->tg3_flags2 |= TG3_FLG2_USING_MSI; |
@@ -12681,11 +12677,6 @@ static int tg3_resume(struct pci_dev *pdev) | |||
12681 | if (err) | 12677 | if (err) |
12682 | return err; | 12678 | return err; |
12683 | 12679 | ||
12684 | /* Hardware bug - MSI won't work if INTX disabled. */ | ||
12685 | if ((tp->tg3_flags2 & TG3_FLG2_5780_CLASS) && | ||
12686 | (tp->tg3_flags2 & TG3_FLG2_USING_MSI)) | ||
12687 | pci_intx(tp->pdev, 1); | ||
12688 | |||
12689 | netif_device_attach(dev); | 12680 | netif_device_attach(dev); |
12690 | 12681 | ||
12691 | tg3_full_lock(tp, 0); | 12682 | tg3_full_lock(tp, 0); |
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index 7a1d6d512837..e1ca42591ac4 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig | |||
@@ -21,6 +21,17 @@ config PCI_MSI | |||
21 | 21 | ||
22 | If you don't know what to do here, say N. | 22 | If you don't know what to do here, say N. |
23 | 23 | ||
24 | config PCI_LEGACY | ||
25 | bool "Enable deprecated pci_find_* API" | ||
26 | depends on PCI | ||
27 | default y | ||
28 | help | ||
29 | Say Y here if you want to include support for the deprecated | ||
30 | pci_find_slot() and pci_find_device() APIs. Most drivers have | ||
31 | been converted over to using the proper hotplug APIs, so this | ||
32 | option serves to include/exclude only a few drivers that are | ||
33 | still using this API. | ||
34 | |||
24 | config PCI_DEBUG | 35 | config PCI_DEBUG |
25 | bool "PCI Debugging" | 36 | bool "PCI Debugging" |
26 | depends on PCI && DEBUG_KERNEL | 37 | depends on PCI && DEBUG_KERNEL |
diff --git a/drivers/pci/hotplug/Kconfig b/drivers/pci/hotplug/Kconfig index 63d62752fb91..a64449d489d6 100644 --- a/drivers/pci/hotplug/Kconfig +++ b/drivers/pci/hotplug/Kconfig | |||
@@ -41,7 +41,7 @@ config HOTPLUG_PCI_FAKE | |||
41 | 41 | ||
42 | config HOTPLUG_PCI_COMPAQ | 42 | config HOTPLUG_PCI_COMPAQ |
43 | tristate "Compaq PCI Hotplug driver" | 43 | tristate "Compaq PCI Hotplug driver" |
44 | depends on X86 && PCI_BIOS | 44 | depends on X86 && PCI_BIOS && PCI_LEGACY |
45 | help | 45 | help |
46 | Say Y here if you have a motherboard with a Compaq PCI Hotplug | 46 | Say Y here if you have a motherboard with a Compaq PCI Hotplug |
47 | controller. | 47 | controller. |
@@ -63,7 +63,7 @@ config HOTPLUG_PCI_COMPAQ_NVRAM | |||
63 | 63 | ||
64 | config HOTPLUG_PCI_IBM | 64 | config HOTPLUG_PCI_IBM |
65 | tristate "IBM PCI Hotplug driver" | 65 | tristate "IBM PCI Hotplug driver" |
66 | depends on X86_IO_APIC && X86 && PCI_BIOS | 66 | depends on X86_IO_APIC && X86 && PCI_BIOS && PCI_LEGACY |
67 | help | 67 | help |
68 | Say Y here if you have a motherboard with a IBM PCI Hotplug | 68 | Say Y here if you have a motherboard with a IBM PCI Hotplug |
69 | controller. | 69 | controller. |
@@ -119,7 +119,7 @@ config HOTPLUG_PCI_CPCI_ZT5550 | |||
119 | 119 | ||
120 | config HOTPLUG_PCI_CPCI_GENERIC | 120 | config HOTPLUG_PCI_CPCI_GENERIC |
121 | tristate "Generic port I/O CompactPCI Hotplug driver" | 121 | tristate "Generic port I/O CompactPCI Hotplug driver" |
122 | depends on HOTPLUG_PCI_CPCI && X86 | 122 | depends on HOTPLUG_PCI_CPCI && X86 && PCI_LEGACY |
123 | help | 123 | help |
124 | Say Y here if you have a CompactPCI system card that exposes the #ENUM | 124 | Say Y here if you have a CompactPCI system card that exposes the #ENUM |
125 | hotswap signal as a bit in a system register that can be read through | 125 | hotswap signal as a bit in a system register that can be read through |
diff --git a/drivers/pci/hotplug/cpqphp_ctrl.c b/drivers/pci/hotplug/cpqphp_ctrl.c index 3ef0a4875a62..856d57b4d604 100644 --- a/drivers/pci/hotplug/cpqphp_ctrl.c +++ b/drivers/pci/hotplug/cpqphp_ctrl.c | |||
@@ -1931,16 +1931,14 @@ void cpqhp_pushbutton_thread(unsigned long slot) | |||
1931 | return ; | 1931 | return ; |
1932 | } | 1932 | } |
1933 | 1933 | ||
1934 | if (func != NULL && ctrl != NULL) { | 1934 | if (cpqhp_process_SS(ctrl, func) != 0) { |
1935 | if (cpqhp_process_SS(ctrl, func) != 0) { | 1935 | amber_LED_on(ctrl, hp_slot); |
1936 | amber_LED_on (ctrl, hp_slot); | 1936 | green_LED_on(ctrl, hp_slot); |
1937 | green_LED_on (ctrl, hp_slot); | ||
1938 | |||
1939 | set_SOGO(ctrl); | ||
1940 | 1937 | ||
1941 | /* Wait for SOBS to be unset */ | 1938 | set_SOGO(ctrl); |
1942 | wait_for_ctrl_irq (ctrl); | 1939 | |
1943 | } | 1940 | /* Wait for SOBS to be unset */ |
1941 | wait_for_ctrl_irq(ctrl); | ||
1944 | } | 1942 | } |
1945 | 1943 | ||
1946 | p_slot->state = STATIC_STATE; | 1944 | p_slot->state = STATIC_STATE; |
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 87e01615053d..07c9f09c856d 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c | |||
@@ -224,6 +224,12 @@ static struct msi_desc* alloc_msi_entry(void) | |||
224 | return entry; | 224 | return entry; |
225 | } | 225 | } |
226 | 226 | ||
227 | static void pci_intx_for_msi(struct pci_dev *dev, int enable) | ||
228 | { | ||
229 | if (!(dev->dev_flags & PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG)) | ||
230 | pci_intx(dev, enable); | ||
231 | } | ||
232 | |||
227 | #ifdef CONFIG_PM | 233 | #ifdef CONFIG_PM |
228 | static void __pci_restore_msi_state(struct pci_dev *dev) | 234 | static void __pci_restore_msi_state(struct pci_dev *dev) |
229 | { | 235 | { |
@@ -237,7 +243,7 @@ static void __pci_restore_msi_state(struct pci_dev *dev) | |||
237 | entry = get_irq_msi(dev->irq); | 243 | entry = get_irq_msi(dev->irq); |
238 | pos = entry->msi_attrib.pos; | 244 | pos = entry->msi_attrib.pos; |
239 | 245 | ||
240 | pci_intx(dev, 0); /* disable intx */ | 246 | pci_intx_for_msi(dev, 0); |
241 | msi_set_enable(dev, 0); | 247 | msi_set_enable(dev, 0); |
242 | write_msi_msg(dev->irq, &entry->msg); | 248 | write_msi_msg(dev->irq, &entry->msg); |
243 | if (entry->msi_attrib.maskbit) | 249 | if (entry->msi_attrib.maskbit) |
@@ -260,7 +266,7 @@ static void __pci_restore_msix_state(struct pci_dev *dev) | |||
260 | return; | 266 | return; |
261 | 267 | ||
262 | /* route the table */ | 268 | /* route the table */ |
263 | pci_intx(dev, 0); /* disable intx */ | 269 | pci_intx_for_msi(dev, 0); |
264 | msix_set_enable(dev, 0); | 270 | msix_set_enable(dev, 0); |
265 | 271 | ||
266 | list_for_each_entry(entry, &dev->msi_list, list) { | 272 | list_for_each_entry(entry, &dev->msi_list, list) { |
@@ -343,7 +349,7 @@ static int msi_capability_init(struct pci_dev *dev) | |||
343 | } | 349 | } |
344 | 350 | ||
345 | /* Set MSI enabled bits */ | 351 | /* Set MSI enabled bits */ |
346 | pci_intx(dev, 0); /* disable intx */ | 352 | pci_intx_for_msi(dev, 0); |
347 | msi_set_enable(dev, 1); | 353 | msi_set_enable(dev, 1); |
348 | dev->msi_enabled = 1; | 354 | dev->msi_enabled = 1; |
349 | 355 | ||
@@ -433,7 +439,7 @@ static int msix_capability_init(struct pci_dev *dev, | |||
433 | i++; | 439 | i++; |
434 | } | 440 | } |
435 | /* Set MSI-X enabled bits */ | 441 | /* Set MSI-X enabled bits */ |
436 | pci_intx(dev, 0); /* disable intx */ | 442 | pci_intx_for_msi(dev, 0); |
437 | msix_set_enable(dev, 1); | 443 | msix_set_enable(dev, 1); |
438 | dev->msix_enabled = 1; | 444 | dev->msix_enabled = 1; |
439 | 445 | ||
@@ -528,7 +534,7 @@ void pci_disable_msi(struct pci_dev* dev) | |||
528 | return; | 534 | return; |
529 | 535 | ||
530 | msi_set_enable(dev, 0); | 536 | msi_set_enable(dev, 0); |
531 | pci_intx(dev, 1); /* enable intx */ | 537 | pci_intx_for_msi(dev, 1); |
532 | dev->msi_enabled = 0; | 538 | dev->msi_enabled = 0; |
533 | 539 | ||
534 | BUG_ON(list_empty(&dev->msi_list)); | 540 | BUG_ON(list_empty(&dev->msi_list)); |
@@ -640,7 +646,7 @@ void pci_disable_msix(struct pci_dev* dev) | |||
640 | return; | 646 | return; |
641 | 647 | ||
642 | msix_set_enable(dev, 0); | 648 | msix_set_enable(dev, 0); |
643 | pci_intx(dev, 1); /* enable intx */ | 649 | pci_intx_for_msi(dev, 1); |
644 | dev->msix_enabled = 0; | 650 | dev->msix_enabled = 0; |
645 | 651 | ||
646 | msix_free_all_irqs(dev); | 652 | msix_free_all_irqs(dev); |
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 6e2760b6c20a..6d1a21611818 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
@@ -143,8 +143,8 @@ const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, | |||
143 | * system is in its list of supported devices. Returns the matching | 143 | * system is in its list of supported devices. Returns the matching |
144 | * pci_device_id structure or %NULL if there is no match. | 144 | * pci_device_id structure or %NULL if there is no match. |
145 | */ | 145 | */ |
146 | const struct pci_device_id *pci_match_device(struct pci_driver *drv, | 146 | static const struct pci_device_id *pci_match_device(struct pci_driver *drv, |
147 | struct pci_dev *dev) | 147 | struct pci_dev *dev) |
148 | { | 148 | { |
149 | struct pci_dynid *dynid; | 149 | struct pci_dynid *dynid; |
150 | 150 | ||
@@ -559,7 +559,6 @@ static int __init pci_driver_init(void) | |||
559 | postcore_initcall(pci_driver_init); | 559 | postcore_initcall(pci_driver_init); |
560 | 560 | ||
561 | EXPORT_SYMBOL(pci_match_id); | 561 | EXPORT_SYMBOL(pci_match_id); |
562 | EXPORT_SYMBOL(pci_match_device); | ||
563 | EXPORT_SYMBOL(__pci_register_driver); | 562 | EXPORT_SYMBOL(__pci_register_driver); |
564 | EXPORT_SYMBOL(pci_unregister_driver); | 563 | EXPORT_SYMBOL(pci_unregister_driver); |
565 | EXPORT_SYMBOL(pci_dev_driver); | 564 | EXPORT_SYMBOL(pci_dev_driver); |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index d0bb5b9d2120..26cc4dcf4f0e 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -1621,12 +1621,8 @@ static void __init quirk_disable_all_msi(struct pci_dev *dev) | |||
1621 | printk(KERN_WARNING "PCI: MSI quirk detected. MSI deactivated.\n"); | 1621 | printk(KERN_WARNING "PCI: MSI quirk detected. MSI deactivated.\n"); |
1622 | } | 1622 | } |
1623 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCNB_LE, quirk_disable_all_msi); | 1623 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCNB_LE, quirk_disable_all_msi); |
1624 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000_PCIX, quirk_disable_all_msi); | ||
1625 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS400_200, quirk_disable_all_msi); | 1624 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS400_200, quirk_disable_all_msi); |
1626 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_all_msi); | 1625 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_all_msi); |
1627 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RD580, quirk_disable_all_msi); | ||
1628 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RX790, quirk_disable_all_msi); | ||
1629 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS690, quirk_disable_all_msi); | ||
1630 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351, quirk_disable_all_msi); | 1626 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351, quirk_disable_all_msi); |
1631 | 1627 | ||
1632 | /* Disable MSI on chipsets that are known to not support it */ | 1628 | /* Disable MSI on chipsets that are known to not support it */ |
@@ -1678,6 +1674,9 @@ static void __devinit quirk_msi_ht_cap(struct pci_dev *dev) | |||
1678 | } | 1674 | } |
1679 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE, | 1675 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE, |
1680 | quirk_msi_ht_cap); | 1676 | quirk_msi_ht_cap); |
1677 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, | ||
1678 | PCI_DEVICE_ID_SERVERWORKS_HT1000_PXB, | ||
1679 | quirk_msi_ht_cap); | ||
1681 | 1680 | ||
1682 | /* The nVidia CK804 chipset may have 2 HT MSI mappings. | 1681 | /* The nVidia CK804 chipset may have 2 HT MSI mappings. |
1683 | * MSI are supported if the MSI capability set in any of these mappings. | 1682 | * MSI are supported if the MSI capability set in any of these mappings. |
@@ -1705,4 +1704,48 @@ static void __devinit quirk_nvidia_ck804_msi_ht_cap(struct pci_dev *dev) | |||
1705 | } | 1704 | } |
1706 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE, | 1705 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE, |
1707 | quirk_nvidia_ck804_msi_ht_cap); | 1706 | quirk_nvidia_ck804_msi_ht_cap); |
1707 | |||
1708 | static void __devinit quirk_msi_intx_disable_bug(struct pci_dev *dev) | ||
1709 | { | ||
1710 | dev->dev_flags |= PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG; | ||
1711 | } | ||
1712 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM, | ||
1713 | PCI_DEVICE_ID_TIGON3_5780, | ||
1714 | quirk_msi_intx_disable_bug); | ||
1715 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM, | ||
1716 | PCI_DEVICE_ID_TIGON3_5780S, | ||
1717 | quirk_msi_intx_disable_bug); | ||
1718 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM, | ||
1719 | PCI_DEVICE_ID_TIGON3_5714, | ||
1720 | quirk_msi_intx_disable_bug); | ||
1721 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM, | ||
1722 | PCI_DEVICE_ID_TIGON3_5714S, | ||
1723 | quirk_msi_intx_disable_bug); | ||
1724 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM, | ||
1725 | PCI_DEVICE_ID_TIGON3_5715, | ||
1726 | quirk_msi_intx_disable_bug); | ||
1727 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM, | ||
1728 | PCI_DEVICE_ID_TIGON3_5715S, | ||
1729 | quirk_msi_intx_disable_bug); | ||
1730 | |||
1731 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4390, | ||
1732 | quirk_msi_intx_disable_bug); | ||
1733 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4391, | ||
1734 | quirk_msi_intx_disable_bug); | ||
1735 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4392, | ||
1736 | quirk_msi_intx_disable_bug); | ||
1737 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4393, | ||
1738 | quirk_msi_intx_disable_bug); | ||
1739 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4394, | ||
1740 | quirk_msi_intx_disable_bug); | ||
1741 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4395, | ||
1742 | quirk_msi_intx_disable_bug); | ||
1743 | |||
1744 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4373, | ||
1745 | quirk_msi_intx_disable_bug); | ||
1746 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4374, | ||
1747 | quirk_msi_intx_disable_bug); | ||
1748 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4375, | ||
1749 | quirk_msi_intx_disable_bug); | ||
1750 | |||
1708 | #endif /* CONFIG_PCI_MSI */ | 1751 | #endif /* CONFIG_PCI_MSI */ |
diff --git a/drivers/pci/search.c b/drivers/pci/search.c index b001b5922e33..8541034021f0 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c | |||
@@ -113,6 +113,8 @@ pci_find_next_bus(const struct pci_bus *from) | |||
113 | return b; | 113 | return b; |
114 | } | 114 | } |
115 | 115 | ||
116 | #ifdef CONFIG_PCI_LEGACY | ||
117 | |||
116 | /** | 118 | /** |
117 | * pci_find_slot - locate PCI device from a given PCI slot | 119 | * pci_find_slot - locate PCI device from a given PCI slot |
118 | * @bus: number of PCI bus on which desired PCI device resides | 120 | * @bus: number of PCI bus on which desired PCI device resides |
@@ -137,6 +139,8 @@ pci_find_slot(unsigned int bus, unsigned int devfn) | |||
137 | return NULL; | 139 | return NULL; |
138 | } | 140 | } |
139 | 141 | ||
142 | #endif /* CONFIG_PCI_LEGACY */ | ||
143 | |||
140 | /** | 144 | /** |
141 | * pci_get_slot - locate PCI device for a given PCI slot | 145 | * pci_get_slot - locate PCI device for a given PCI slot |
142 | * @bus: PCI bus on which desired PCI device resides | 146 | * @bus: PCI bus on which desired PCI device resides |
@@ -200,6 +204,7 @@ struct pci_dev * pci_get_bus_and_slot(unsigned int bus, unsigned int devfn) | |||
200 | return NULL; | 204 | return NULL; |
201 | } | 205 | } |
202 | 206 | ||
207 | #ifdef CONFIG_PCI_LEGACY | ||
203 | /** | 208 | /** |
204 | * pci_find_subsys - begin or continue searching for a PCI device by vendor/subvendor/device/subdevice id | 209 | * pci_find_subsys - begin or continue searching for a PCI device by vendor/subvendor/device/subdevice id |
205 | * @vendor: PCI vendor id to match, or %PCI_ANY_ID to match all vendor ids | 210 | * @vendor: PCI vendor id to match, or %PCI_ANY_ID to match all vendor ids |
@@ -278,6 +283,7 @@ pci_find_device(unsigned int vendor, unsigned int device, const struct pci_dev * | |||
278 | { | 283 | { |
279 | return pci_find_subsys(vendor, device, PCI_ANY_ID, PCI_ANY_ID, from); | 284 | return pci_find_subsys(vendor, device, PCI_ANY_ID, PCI_ANY_ID, from); |
280 | } | 285 | } |
286 | #endif /* CONFIG_PCI_LEGACY */ | ||
281 | 287 | ||
282 | /** | 288 | /** |
283 | * pci_get_subsys - begin or continue searching for a PCI device by vendor/subvendor/device/subdevice id | 289 | * pci_get_subsys - begin or continue searching for a PCI device by vendor/subvendor/device/subdevice id |
@@ -468,8 +474,11 @@ int pci_dev_present(const struct pci_device_id *ids) | |||
468 | EXPORT_SYMBOL(pci_dev_present); | 474 | EXPORT_SYMBOL(pci_dev_present); |
469 | EXPORT_SYMBOL(pci_find_present); | 475 | EXPORT_SYMBOL(pci_find_present); |
470 | 476 | ||
477 | #ifdef CONFIG_PCI_LEGACY | ||
471 | EXPORT_SYMBOL(pci_find_device); | 478 | EXPORT_SYMBOL(pci_find_device); |
472 | EXPORT_SYMBOL(pci_find_slot); | 479 | EXPORT_SYMBOL(pci_find_slot); |
480 | #endif /* CONFIG_PCI_LEGACY */ | ||
481 | |||
473 | /* For boot time work */ | 482 | /* For boot time work */ |
474 | EXPORT_SYMBOL(pci_find_bus); | 483 | EXPORT_SYMBOL(pci_find_bus); |
475 | EXPORT_SYMBOL(pci_find_next_bus); | 484 | EXPORT_SYMBOL(pci_find_next_bus); |
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index 86cf10efb0c1..a6676be87843 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig | |||
@@ -725,7 +725,7 @@ config SCSI_FD_MCS | |||
725 | 725 | ||
726 | config SCSI_GDTH | 726 | config SCSI_GDTH |
727 | tristate "Intel/ICP (former GDT SCSI Disk Array) RAID Controller support" | 727 | tristate "Intel/ICP (former GDT SCSI Disk Array) RAID Controller support" |
728 | depends on (ISA || EISA || PCI) && SCSI && ISA_DMA_API | 728 | depends on (ISA || EISA || PCI) && SCSI && ISA_DMA_API && PCI_LEGACY |
729 | ---help--- | 729 | ---help--- |
730 | Formerly called GDT SCSI Disk Array Controller Support. | 730 | Formerly called GDT SCSI Disk Array Controller Support. |
731 | 731 | ||
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c index 0e357562ce9e..ceb03c9e749f 100644 --- a/drivers/serial/8250_pci.c +++ b/drivers/serial/8250_pci.c | |||
@@ -1986,6 +1986,7 @@ static int pciserial_suspend_one(struct pci_dev *dev, pm_message_t state) | |||
1986 | 1986 | ||
1987 | static int pciserial_resume_one(struct pci_dev *dev) | 1987 | static int pciserial_resume_one(struct pci_dev *dev) |
1988 | { | 1988 | { |
1989 | int err; | ||
1989 | struct serial_private *priv = pci_get_drvdata(dev); | 1990 | struct serial_private *priv = pci_get_drvdata(dev); |
1990 | 1991 | ||
1991 | pci_set_power_state(dev, PCI_D0); | 1992 | pci_set_power_state(dev, PCI_D0); |
@@ -1995,7 +1996,9 @@ static int pciserial_resume_one(struct pci_dev *dev) | |||
1995 | /* | 1996 | /* |
1996 | * The device may have been disabled. Re-enable it. | 1997 | * The device may have been disabled. Re-enable it. |
1997 | */ | 1998 | */ |
1998 | pci_enable_device(dev); | 1999 | err = pci_enable_device(dev); |
2000 | if (err) | ||
2001 | return err; | ||
1999 | 2002 | ||
2000 | pciserial_resume_ports(priv); | 2003 | pciserial_resume_ports(priv); |
2001 | } | 2004 | } |