diff options
-rw-r--r-- | arch/x86/kernel/quirks.c | 9 | ||||
-rw-r--r-- | drivers/ide/Kconfig | 26 | ||||
-rw-r--r-- | drivers/ide/arm/bast-ide.c | 12 | ||||
-rw-r--r-- | drivers/ide/arm/palm_bk3710.c | 74 | ||||
-rw-r--r-- | drivers/ide/ide-cd.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-disk.c | 18 | ||||
-rw-r--r-- | drivers/ide/ide-dma.c | 14 | ||||
-rw-r--r-- | drivers/ide/ide-io.c | 19 | ||||
-rw-r--r-- | drivers/ide/ide-iops.c | 10 | ||||
-rw-r--r-- | drivers/ide/ide-lib.c | 9 | ||||
-rw-r--r-- | drivers/ide/ide-probe.c | 4 | ||||
-rw-r--r-- | drivers/ide/ide-tape.c | 34 | ||||
-rw-r--r-- | drivers/ide/ide.c | 4 | ||||
-rw-r--r-- | drivers/ide/legacy/gayle.c | 2 | ||||
-rw-r--r-- | drivers/ide/pci/cs5520.c | 5 | ||||
-rw-r--r-- | drivers/ide/pci/pdc202xx_old.c | 22 | ||||
-rw-r--r-- | fs/lockd/host.c | 10 | ||||
-rw-r--r-- | fs/lockd/svclock.c | 28 | ||||
-rw-r--r-- | include/linux/ide.h | 13 | ||||
-rw-r--r-- | include/linux/sunrpc/svc.h | 13 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_sendto.c | 3 |
21 files changed, 154 insertions, 177 deletions
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c index 1941482d4ca3..c47208fc5932 100644 --- a/arch/x86/kernel/quirks.c +++ b/arch/x86/kernel/quirks.c | |||
@@ -11,7 +11,7 @@ | |||
11 | static void __devinit quirk_intel_irqbalance(struct pci_dev *dev) | 11 | static void __devinit quirk_intel_irqbalance(struct pci_dev *dev) |
12 | { | 12 | { |
13 | u8 config, rev; | 13 | u8 config, rev; |
14 | u32 word; | 14 | u16 word; |
15 | 15 | ||
16 | /* BIOS may enable hardware IRQ balancing for | 16 | /* BIOS may enable hardware IRQ balancing for |
17 | * E7520/E7320/E7525(revision ID 0x9 and below) | 17 | * E7520/E7320/E7525(revision ID 0x9 and below) |
@@ -26,8 +26,11 @@ static void __devinit quirk_intel_irqbalance(struct pci_dev *dev) | |||
26 | pci_read_config_byte(dev, 0xf4, &config); | 26 | pci_read_config_byte(dev, 0xf4, &config); |
27 | pci_write_config_byte(dev, 0xf4, config|0x2); | 27 | pci_write_config_byte(dev, 0xf4, config|0x2); |
28 | 28 | ||
29 | /* read xTPR register */ | 29 | /* |
30 | raw_pci_read(0, 0, 0x40, 0x4c, 2, &word); | 30 | * read xTPR register. We may not have a pci_dev for device 8 |
31 | * because it might be hidden until the above write. | ||
32 | */ | ||
33 | pci_bus_read_config_word(dev->bus, PCI_DEVFN(8, 0), 0x4c, &word); | ||
31 | 34 | ||
32 | if (!(word & (1 << 13))) { | 35 | if (!(word & (1 << 13))) { |
33 | dev_info(&dev->dev, "Intel E7520/7320/7525 detected; " | 36 | dev_info(&dev->dev, "Intel E7520/7320/7525 detected; " |
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 043c34ad0a05..df752e690e47 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig | |||
@@ -378,6 +378,9 @@ config BLK_DEV_IDEPNP | |||
378 | would like the kernel to automatically detect and activate | 378 | would like the kernel to automatically detect and activate |
379 | it, say Y here. | 379 | it, say Y here. |
380 | 380 | ||
381 | config BLK_DEV_IDEDMA_SFF | ||
382 | bool | ||
383 | |||
381 | if PCI | 384 | if PCI |
382 | 385 | ||
383 | comment "PCI IDE chipsets support" | 386 | comment "PCI IDE chipsets support" |
@@ -459,6 +462,7 @@ config BLK_DEV_RZ1000 | |||
459 | config BLK_DEV_IDEDMA_PCI | 462 | config BLK_DEV_IDEDMA_PCI |
460 | bool | 463 | bool |
461 | select BLK_DEV_IDEPCI | 464 | select BLK_DEV_IDEPCI |
465 | select BLK_DEV_IDEDMA_SFF | ||
462 | 466 | ||
463 | config BLK_DEV_AEC62XX | 467 | config BLK_DEV_AEC62XX |
464 | tristate "AEC62XX chipset support" | 468 | tristate "AEC62XX chipset support" |
@@ -688,23 +692,6 @@ config BLK_DEV_PDC202XX_OLD | |||
688 | 692 | ||
689 | If unsure, say N. | 693 | If unsure, say N. |
690 | 694 | ||
691 | config PDC202XX_BURST | ||
692 | bool "Special UDMA Feature" | ||
693 | depends on BLK_DEV_PDC202XX_OLD | ||
694 | help | ||
695 | This option causes the pdc202xx driver to enable UDMA modes on the | ||
696 | PDC202xx even when the PDC202xx BIOS has not done so. | ||
697 | |||
698 | It was originally designed for the PDC20246/Ultra33, whose BIOS will | ||
699 | only setup UDMA on the first two PDC20246 cards. It has also been | ||
700 | used successfully on a PDC20265/Ultra100, allowing use of UDMA modes | ||
701 | when the PDC20265 BIOS has been disabled (for faster boot up). | ||
702 | |||
703 | Please read the comments at the top of | ||
704 | <file:drivers/ide/pci/pdc202xx_old.c>. | ||
705 | |||
706 | If unsure, say N. | ||
707 | |||
708 | config BLK_DEV_PDC202XX_NEW | 695 | config BLK_DEV_PDC202XX_NEW |
709 | tristate "PROMISE PDC202{68|69|70|71|75|76|77} support" | 696 | tristate "PROMISE PDC202{68|69|70|71|75|76|77} support" |
710 | select BLK_DEV_IDEDMA_PCI | 697 | select BLK_DEV_IDEDMA_PCI |
@@ -1016,7 +1003,7 @@ config BLK_DEV_Q40IDE | |||
1016 | config BLK_DEV_PALMCHIP_BK3710 | 1003 | config BLK_DEV_PALMCHIP_BK3710 |
1017 | tristate "Palmchip bk3710 IDE controller support" | 1004 | tristate "Palmchip bk3710 IDE controller support" |
1018 | depends on ARCH_DAVINCI | 1005 | depends on ARCH_DAVINCI |
1019 | select BLK_DEV_IDEDMA_PCI | 1006 | select BLK_DEV_IDEDMA_SFF |
1020 | help | 1007 | help |
1021 | Say Y here if you want to support the onchip IDE controller on the | 1008 | Say Y here if you want to support the onchip IDE controller on the |
1022 | TI DaVinci SoC | 1009 | TI DaVinci SoC |
@@ -1124,7 +1111,8 @@ config BLK_DEV_UMC8672 | |||
1124 | endif | 1111 | endif |
1125 | 1112 | ||
1126 | config BLK_DEV_IDEDMA | 1113 | config BLK_DEV_IDEDMA |
1127 | def_bool BLK_DEV_IDEDMA_PCI || BLK_DEV_IDEDMA_PMAC || BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA | 1114 | def_bool BLK_DEV_IDEDMA_SFF || BLK_DEV_IDEDMA_PMAC || \ |
1115 | BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA | ||
1128 | 1116 | ||
1129 | config IDE_ARCH_OBSOLETE_INIT | 1117 | config IDE_ARCH_OBSOLETE_INIT |
1130 | def_bool ALPHA || (ARM && !ARCH_L7200) || BLACKFIN || X86 || IA64 || M32R || MIPS || PARISC || PPC || (SUPERH64 && BLK_DEV_IDEPCI) || SPARC | 1118 | def_bool ALPHA || (ARM && !ARCH_L7200) || BLACKFIN || X86 || IA64 || M32R || MIPS || PARISC || PPC || (SUPERH64 && BLK_DEV_IDEPCI) || SPARC |
diff --git a/drivers/ide/arm/bast-ide.c b/drivers/ide/arm/bast-ide.c index 0e7574c0ee60..161d30c8481e 100644 --- a/drivers/ide/arm/bast-ide.c +++ b/drivers/ide/arm/bast-ide.c | |||
@@ -21,12 +21,7 @@ | |||
21 | #include <asm/arch/bast-map.h> | 21 | #include <asm/arch/bast-map.h> |
22 | #include <asm/arch/bast-irq.h> | 22 | #include <asm/arch/bast-irq.h> |
23 | 23 | ||
24 | /* list of registered interfaces */ | 24 | static int __init bastide_register(unsigned int base, unsigned int aux, int irq) |
25 | static ide_hwif_t *ifs[2]; | ||
26 | |||
27 | static int __init | ||
28 | bastide_register(unsigned int base, unsigned int aux, int irq, | ||
29 | ide_hwif_t **hwif) | ||
30 | { | 25 | { |
31 | ide_hwif_t *hwif; | 26 | ide_hwif_t *hwif; |
32 | hw_regs_t hw; | 27 | hw_regs_t hw; |
@@ -76,8 +71,9 @@ static int __init bastide_init(void) | |||
76 | 71 | ||
77 | printk("BAST: IDE driver, (c) 2003-2004 Simtec Electronics\n"); | 72 | printk("BAST: IDE driver, (c) 2003-2004 Simtec Electronics\n"); |
78 | 73 | ||
79 | bastide_register(BAST_VA_IDEPRI, BAST_VA_IDEPRIAUX, IRQ_IDE0, &ifs[0]); | 74 | bastide_register(BAST_VA_IDEPRI, BAST_VA_IDEPRIAUX, IRQ_IDE0); |
80 | bastide_register(BAST_VA_IDESEC, BAST_VA_IDESECAUX, IRQ_IDE1, &ifs[1]); | 75 | bastide_register(BAST_VA_IDESEC, BAST_VA_IDESECAUX, IRQ_IDE1); |
76 | |||
81 | return 0; | 77 | return 0; |
82 | } | 78 | } |
83 | 79 | ||
diff --git a/drivers/ide/arm/palm_bk3710.c b/drivers/ide/arm/palm_bk3710.c index c3069970a012..8e1f6bd33887 100644 --- a/drivers/ide/arm/palm_bk3710.c +++ b/drivers/ide/arm/palm_bk3710.c | |||
@@ -311,15 +311,37 @@ static void __devinit palm_bk3710_chipinit(void __iomem *base) | |||
311 | palm_bk3710_setpiomode(base, NULL, 0, 600, 0); | 311 | palm_bk3710_setpiomode(base, NULL, 0, 600, 0); |
312 | palm_bk3710_setpiomode(base, NULL, 1, 600, 0); | 312 | palm_bk3710_setpiomode(base, NULL, 1, 600, 0); |
313 | } | 313 | } |
314 | |||
315 | static u8 __devinit palm_bk3710_cable_detect(ide_hwif_t *hwif) | ||
316 | { | ||
317 | return ATA_CBL_PATA80; | ||
318 | } | ||
319 | |||
320 | static void __devinit palm_bk3710_init_hwif(ide_hwif_t *hwif) | ||
321 | { | ||
322 | hwif->set_pio_mode = palm_bk3710_set_pio_mode; | ||
323 | hwif->set_dma_mode = palm_bk3710_set_dma_mode; | ||
324 | |||
325 | hwif->cable_detect = palm_bk3710_cable_detect; | ||
326 | } | ||
327 | |||
328 | static const struct ide_port_info __devinitdata palm_bk3710_port_info = { | ||
329 | .init_hwif = palm_bk3710_init_hwif, | ||
330 | .host_flags = IDE_HFLAG_NO_DMA, /* hack (no PCI) */ | ||
331 | .pio_mask = ATA_PIO4, | ||
332 | .udma_mask = ATA_UDMA4, /* (input clk 99MHz) */ | ||
333 | .mwdma_mask = ATA_MWDMA2, | ||
334 | }; | ||
335 | |||
314 | static int __devinit palm_bk3710_probe(struct platform_device *pdev) | 336 | static int __devinit palm_bk3710_probe(struct platform_device *pdev) |
315 | { | 337 | { |
316 | hw_regs_t ide_ctlr_info; | ||
317 | int index = 0; | ||
318 | int pribase; | ||
319 | struct clk *clkp; | 338 | struct clk *clkp; |
320 | struct resource *mem, *irq; | 339 | struct resource *mem, *irq; |
321 | ide_hwif_t *hwif; | 340 | ide_hwif_t *hwif; |
322 | void __iomem *base; | 341 | void __iomem *base; |
342 | int pribase, i; | ||
343 | hw_regs_t hw; | ||
344 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | ||
323 | 345 | ||
324 | clkp = clk_get(NULL, "IDECLK"); | 346 | clkp = clk_get(NULL, "IDECLK"); |
325 | if (IS_ERR(clkp)) | 347 | if (IS_ERR(clkp)) |
@@ -330,7 +352,7 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev) | |||
330 | ide_palm_clk = clk_get_rate(ideclkp)/100000; | 352 | ide_palm_clk = clk_get_rate(ideclkp)/100000; |
331 | ide_palm_clk = (10000/ide_palm_clk) + 1; | 353 | ide_palm_clk = (10000/ide_palm_clk) + 1; |
332 | /* Register the IDE interface with Linux ATA Interface */ | 354 | /* Register the IDE interface with Linux ATA Interface */ |
333 | memset(&ide_ctlr_info, 0, sizeof(ide_ctlr_info)); | 355 | memset(&hw, 0, sizeof(hw)); |
334 | 356 | ||
335 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 357 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
336 | if (mem == NULL) { | 358 | if (mem == NULL) { |
@@ -349,32 +371,42 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev) | |||
349 | palm_bk3710_chipinit(base); | 371 | palm_bk3710_chipinit(base); |
350 | 372 | ||
351 | pribase = mem->start + IDE_PALM_ATA_PRI_REG_OFFSET; | 373 | pribase = mem->start + IDE_PALM_ATA_PRI_REG_OFFSET; |
352 | for (index = 0; index < IDE_NR_PORTS - 2; index++) | 374 | for (i = 0; i < IDE_NR_PORTS - 2; i++) |
353 | ide_ctlr_info.io_ports[index] = pribase + index; | 375 | hw.io_ports[i] = pribase + i; |
354 | ide_ctlr_info.io_ports[IDE_CONTROL_OFFSET] = mem->start + | 376 | hw.io_ports[IDE_CONTROL_OFFSET] = mem->start + |
355 | IDE_PALM_ATA_PRI_CTL_OFFSET; | 377 | IDE_PALM_ATA_PRI_CTL_OFFSET; |
356 | ide_ctlr_info.irq = irq->start; | 378 | hw.irq = irq->start; |
357 | ide_ctlr_info.chipset = ide_palm3710; | 379 | hw.chipset = ide_palm3710; |
358 | 380 | ||
359 | if (ide_register_hw(&ide_ctlr_info, NULL, &hwif) < 0) { | 381 | hwif = ide_deprecated_find_port(hw.io_ports[IDE_DATA_OFFSET]); |
360 | printk(KERN_WARNING "Palm Chip BK3710 IDE Register Fail\n"); | 382 | if (hwif == NULL) |
361 | return -ENODEV; | 383 | goto out; |
362 | } | 384 | |
385 | i = hwif->index; | ||
386 | |||
387 | if (hwif->present) | ||
388 | ide_unregister(i, 0, 0); | ||
389 | else if (!hwif->hold) | ||
390 | ide_init_port_data(hwif, i); | ||
391 | |||
392 | ide_init_port_hw(hwif, &hw); | ||
363 | 393 | ||
364 | hwif->set_pio_mode = &palm_bk3710_set_pio_mode; | ||
365 | hwif->set_dma_mode = &palm_bk3710_set_dma_mode; | ||
366 | hwif->mmio = 1; | 394 | hwif->mmio = 1; |
367 | default_hwif_mmiops(hwif); | 395 | default_hwif_mmiops(hwif); |
368 | hwif->cbl = ATA_CBL_PATA80; | ||
369 | hwif->ultra_mask = 0x1f; /* Ultra DMA Mode 4 Max | ||
370 | (input clk 99MHz) */ | ||
371 | hwif->mwdma_mask = 0x7; | ||
372 | hwif->drives[0].autotune = 1; | ||
373 | hwif->drives[1].autotune = 1; | ||
374 | 396 | ||
375 | ide_setup_dma(hwif, mem->start); | 397 | ide_setup_dma(hwif, mem->start); |
376 | 398 | ||
399 | idx[0] = i; | ||
400 | |||
401 | ide_device_add(idx, &palm_bk3710_port_info); | ||
402 | |||
403 | if (!hwif->present) | ||
404 | goto out; | ||
405 | |||
377 | return 0; | 406 | return 0; |
407 | out: | ||
408 | printk(KERN_WARNING "Palm Chip BK3710 IDE Register Fail\n"); | ||
409 | return -ENODEV; | ||
378 | } | 410 | } |
379 | 411 | ||
380 | static struct platform_driver platform_bk_driver = { | 412 | static struct platform_driver platform_bk_driver = { |
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 5e42c19a03e3..354c91d06a6d 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -1555,7 +1555,7 @@ int ide_cd_read_toc(ide_drive_t *drive, struct request_sense *sense) | |||
1555 | if (stat) | 1555 | if (stat) |
1556 | return stat; | 1556 | return stat; |
1557 | 1557 | ||
1558 | toc->hdr.toc_length = ntohs (toc->hdr.toc_length); | 1558 | toc->hdr.toc_length = be16_to_cpu(toc->hdr.toc_length); |
1559 | 1559 | ||
1560 | if (info->cd_flags & IDE_CD_FLAG_TOCTRACKS_AS_BCD) { | 1560 | if (info->cd_flags & IDE_CD_FLAG_TOCTRACKS_AS_BCD) { |
1561 | toc->hdr.first_track = BCD2BIN(toc->hdr.first_track); | 1561 | toc->hdr.first_track = BCD2BIN(toc->hdr.first_track); |
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 3c69822507e2..aed8b31ca561 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c | |||
@@ -590,20 +590,24 @@ static ide_proc_entry_t idedisk_proc[] = { | |||
590 | static void idedisk_prepare_flush(struct request_queue *q, struct request *rq) | 590 | static void idedisk_prepare_flush(struct request_queue *q, struct request *rq) |
591 | { | 591 | { |
592 | ide_drive_t *drive = q->queuedata; | 592 | ide_drive_t *drive = q->queuedata; |
593 | ide_task_t task; | 593 | ide_task_t *task = kmalloc(sizeof(*task), GFP_ATOMIC); |
594 | 594 | ||
595 | memset(&task, 0, sizeof(task)); | 595 | /* FIXME: map struct ide_taskfile on rq->cmd[] */ |
596 | BUG_ON(task == NULL); | ||
597 | |||
598 | memset(task, 0, sizeof(*task)); | ||
596 | if (ide_id_has_flush_cache_ext(drive->id) && | 599 | if (ide_id_has_flush_cache_ext(drive->id) && |
597 | (drive->capacity64 >= (1UL << 28))) | 600 | (drive->capacity64 >= (1UL << 28))) |
598 | task.tf.command = WIN_FLUSH_CACHE_EXT; | 601 | task->tf.command = WIN_FLUSH_CACHE_EXT; |
599 | else | 602 | else |
600 | task.tf.command = WIN_FLUSH_CACHE; | 603 | task->tf.command = WIN_FLUSH_CACHE; |
601 | task.tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE; | 604 | task->tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE | |
602 | task.data_phase = TASKFILE_NO_DATA; | 605 | IDE_TFLAG_DYN; |
606 | task->data_phase = TASKFILE_NO_DATA; | ||
603 | 607 | ||
604 | rq->cmd_type = REQ_TYPE_ATA_TASKFILE; | 608 | rq->cmd_type = REQ_TYPE_ATA_TASKFILE; |
605 | rq->cmd_flags |= REQ_SOFTBARRIER; | 609 | rq->cmd_flags |= REQ_SOFTBARRIER; |
606 | rq->special = &task; | 610 | rq->special = task; |
607 | } | 611 | } |
608 | 612 | ||
609 | /* | 613 | /* |
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index a4bb32883c6b..d0e7b537353e 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -198,7 +198,7 @@ int ide_build_sglist(ide_drive_t *drive, struct request *rq) | |||
198 | 198 | ||
199 | EXPORT_SYMBOL_GPL(ide_build_sglist); | 199 | EXPORT_SYMBOL_GPL(ide_build_sglist); |
200 | 200 | ||
201 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI | 201 | #ifdef CONFIG_BLK_DEV_IDEDMA_SFF |
202 | /** | 202 | /** |
203 | * ide_build_dmatable - build IDE DMA table | 203 | * ide_build_dmatable - build IDE DMA table |
204 | * | 204 | * |
@@ -316,7 +316,7 @@ void ide_destroy_dmatable (ide_drive_t *drive) | |||
316 | 316 | ||
317 | EXPORT_SYMBOL_GPL(ide_destroy_dmatable); | 317 | EXPORT_SYMBOL_GPL(ide_destroy_dmatable); |
318 | 318 | ||
319 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI | 319 | #ifdef CONFIG_BLK_DEV_IDEDMA_SFF |
320 | /** | 320 | /** |
321 | * config_drive_for_dma - attempt to activate IDE DMA | 321 | * config_drive_for_dma - attempt to activate IDE DMA |
322 | * @drive: the drive to place in DMA mode | 322 | * @drive: the drive to place in DMA mode |
@@ -424,7 +424,7 @@ void ide_dma_host_set(ide_drive_t *drive, int on) | |||
424 | } | 424 | } |
425 | 425 | ||
426 | EXPORT_SYMBOL_GPL(ide_dma_host_set); | 426 | EXPORT_SYMBOL_GPL(ide_dma_host_set); |
427 | #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ | 427 | #endif /* CONFIG_BLK_DEV_IDEDMA_SFF */ |
428 | 428 | ||
429 | /** | 429 | /** |
430 | * ide_dma_off_quietly - Generic DMA kill | 430 | * ide_dma_off_quietly - Generic DMA kill |
@@ -474,7 +474,7 @@ void ide_dma_on(ide_drive_t *drive) | |||
474 | drive->hwif->dma_host_set(drive, 1); | 474 | drive->hwif->dma_host_set(drive, 1); |
475 | } | 475 | } |
476 | 476 | ||
477 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI | 477 | #ifdef CONFIG_BLK_DEV_IDEDMA_SFF |
478 | /** | 478 | /** |
479 | * ide_dma_setup - begin a DMA phase | 479 | * ide_dma_setup - begin a DMA phase |
480 | * @drive: target device | 480 | * @drive: target device |
@@ -591,7 +591,7 @@ static int __ide_dma_test_irq(ide_drive_t *drive) | |||
591 | } | 591 | } |
592 | #else | 592 | #else |
593 | static inline int config_drive_for_dma(ide_drive_t *drive) { return 0; } | 593 | static inline int config_drive_for_dma(ide_drive_t *drive) { return 0; } |
594 | #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ | 594 | #endif /* CONFIG_BLK_DEV_IDEDMA_SFF */ |
595 | 595 | ||
596 | int __ide_dma_bad_drive (ide_drive_t *drive) | 596 | int __ide_dma_bad_drive (ide_drive_t *drive) |
597 | { | 597 | { |
@@ -840,7 +840,7 @@ void ide_check_dma_crc(ide_drive_t *drive) | |||
840 | ide_dma_on(drive); | 840 | ide_dma_on(drive); |
841 | } | 841 | } |
842 | 842 | ||
843 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI | 843 | #ifdef CONFIG_BLK_DEV_IDEDMA_SFF |
844 | void ide_dma_lost_irq (ide_drive_t *drive) | 844 | void ide_dma_lost_irq (ide_drive_t *drive) |
845 | { | 845 | { |
846 | printk("%s: DMA interrupt recovery\n", drive->name); | 846 | printk("%s: DMA interrupt recovery\n", drive->name); |
@@ -1002,4 +1002,4 @@ void ide_setup_dma(ide_hwif_t *hwif, unsigned long base) | |||
1002 | } | 1002 | } |
1003 | 1003 | ||
1004 | EXPORT_SYMBOL_GPL(ide_setup_dma); | 1004 | EXPORT_SYMBOL_GPL(ide_setup_dma); |
1005 | #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ | 1005 | #endif /* CONFIG_BLK_DEV_IDEDMA_SFF */ |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 3addbe478d26..715379605a7b 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -361,17 +361,21 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err) | |||
361 | spin_unlock_irqrestore(&ide_lock, flags); | 361 | spin_unlock_irqrestore(&ide_lock, flags); |
362 | 362 | ||
363 | if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) { | 363 | if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) { |
364 | ide_task_t *args = (ide_task_t *) rq->special; | 364 | ide_task_t *task = (ide_task_t *)rq->special; |
365 | |||
365 | if (rq->errors == 0) | 366 | if (rq->errors == 0) |
366 | rq->errors = !OK_STAT(stat,READY_STAT,BAD_STAT); | 367 | rq->errors = !OK_STAT(stat, READY_STAT, BAD_STAT); |
367 | 368 | ||
368 | if (args) { | 369 | if (task) { |
369 | struct ide_taskfile *tf = &args->tf; | 370 | struct ide_taskfile *tf = &task->tf; |
370 | 371 | ||
371 | tf->error = err; | 372 | tf->error = err; |
372 | tf->status = stat; | 373 | tf->status = stat; |
373 | 374 | ||
374 | ide_tf_read(drive, args); | 375 | ide_tf_read(drive, task); |
376 | |||
377 | if (task->tf_flags & IDE_TFLAG_DYN) | ||
378 | kfree(task); | ||
375 | } | 379 | } |
376 | } else if (blk_pm_request(rq)) { | 380 | } else if (blk_pm_request(rq)) { |
377 | struct request_pm_state *pm = rq->data; | 381 | struct request_pm_state *pm = rq->data; |
@@ -388,7 +392,8 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err) | |||
388 | spin_lock_irqsave(&ide_lock, flags); | 392 | spin_lock_irqsave(&ide_lock, flags); |
389 | HWGROUP(drive)->rq = NULL; | 393 | HWGROUP(drive)->rq = NULL; |
390 | rq->errors = err; | 394 | rq->errors = err; |
391 | if (__blk_end_request(rq, (rq->errors ? -EIO : 0), 0)) | 395 | if (unlikely(__blk_end_request(rq, (rq->errors ? -EIO : 0), |
396 | blk_rq_bytes(rq)))) | ||
392 | BUG(); | 397 | BUG(); |
393 | spin_unlock_irqrestore(&ide_lock, flags); | 398 | spin_unlock_irqrestore(&ide_lock, flags); |
394 | } | 399 | } |
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index c32e759df208..c419266234a7 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -786,15 +786,11 @@ static void __ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, | |||
786 | { | 786 | { |
787 | ide_hwgroup_t *hwgroup = HWGROUP(drive); | 787 | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
788 | 788 | ||
789 | if (hwgroup->handler != NULL) { | 789 | BUG_ON(hwgroup->handler); |
790 | printk(KERN_CRIT "%s: ide_set_handler: handler not null; " | ||
791 | "old=%p, new=%p\n", | ||
792 | drive->name, hwgroup->handler, handler); | ||
793 | } | ||
794 | hwgroup->handler = handler; | 790 | hwgroup->handler = handler; |
795 | hwgroup->expiry = expiry; | 791 | hwgroup->expiry = expiry; |
796 | hwgroup->timer.expires = jiffies + timeout; | 792 | hwgroup->timer.expires = jiffies + timeout; |
797 | hwgroup->req_gen_timer = hwgroup->req_gen; | 793 | hwgroup->req_gen_timer = hwgroup->req_gen; |
798 | add_timer(&hwgroup->timer); | 794 | add_timer(&hwgroup->timer); |
799 | } | 795 | } |
800 | 796 | ||
@@ -827,11 +823,9 @@ void ide_execute_command(ide_drive_t *drive, u8 cmd, ide_handler_t *handler, | |||
827 | unsigned timeout, ide_expiry_t *expiry) | 823 | unsigned timeout, ide_expiry_t *expiry) |
828 | { | 824 | { |
829 | unsigned long flags; | 825 | unsigned long flags; |
830 | ide_hwgroup_t *hwgroup = HWGROUP(drive); | ||
831 | ide_hwif_t *hwif = HWIF(drive); | 826 | ide_hwif_t *hwif = HWIF(drive); |
832 | 827 | ||
833 | spin_lock_irqsave(&ide_lock, flags); | 828 | spin_lock_irqsave(&ide_lock, flags); |
834 | BUG_ON(hwgroup->handler); | ||
835 | __ide_set_handler(drive, handler, timeout, expiry); | 829 | __ide_set_handler(drive, handler, timeout, expiry); |
836 | hwif->OUTBSYNC(drive, cmd, IDE_COMMAND_REG); | 830 | hwif->OUTBSYNC(drive, cmd, IDE_COMMAND_REG); |
837 | /* | 831 | /* |
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c index 1ff676cc6473..29e2c9719c30 100644 --- a/drivers/ide/ide-lib.c +++ b/drivers/ide/ide-lib.c | |||
@@ -21,15 +21,6 @@ | |||
21 | #include <asm/uaccess.h> | 21 | #include <asm/uaccess.h> |
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | 23 | ||
24 | /* | ||
25 | * IDE library routines. These are plug in code that most | ||
26 | * drivers can use but occasionally may be weird enough | ||
27 | * to want to do their own thing with | ||
28 | * | ||
29 | * Add common non I/O op stuff here. Make sure it has proper | ||
30 | * kernel-doc function headers or your patch will be rejected | ||
31 | */ | ||
32 | |||
33 | static const char *udma_str[] = | 24 | static const char *udma_str[] = |
34 | { "UDMA/16", "UDMA/25", "UDMA/33", "UDMA/44", | 25 | { "UDMA/16", "UDMA/25", "UDMA/33", "UDMA/44", |
35 | "UDMA/66", "UDMA/100", "UDMA/133", "UDMA7" }; | 26 | "UDMA/66", "UDMA/100", "UDMA/133", "UDMA7" }; |
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 6daea896c5db..4a2cb2868226 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -1051,7 +1051,7 @@ static int init_irq (ide_hwif_t *hwif) | |||
1051 | int sa = 0; | 1051 | int sa = 0; |
1052 | #if defined(__mc68000__) | 1052 | #if defined(__mc68000__) |
1053 | sa = IRQF_SHARED; | 1053 | sa = IRQF_SHARED; |
1054 | #endif /* __mc68000__ || CONFIG_APUS */ | 1054 | #endif /* __mc68000__ */ |
1055 | 1055 | ||
1056 | if (IDE_CHIPSET_IS_PCI(hwif->chipset)) | 1056 | if (IDE_CHIPSET_IS_PCI(hwif->chipset)) |
1057 | sa = IRQF_SHARED; | 1057 | sa = IRQF_SHARED; |
@@ -1355,7 +1355,7 @@ static void ide_init_port(ide_hwif_t *hwif, unsigned int port, | |||
1355 | hwif->ultra_mask = d->udma_mask; | 1355 | hwif->ultra_mask = d->udma_mask; |
1356 | 1356 | ||
1357 | /* reset DMA masks only for SFF-style DMA controllers */ | 1357 | /* reset DMA masks only for SFF-style DMA controllers */ |
1358 | if ((d->host_flags && IDE_HFLAG_NO_DMA) == 0 && hwif->dma_base == 0) | 1358 | if ((d->host_flags & IDE_HFLAG_NO_DMA) == 0 && hwif->dma_base == 0) |
1359 | hwif->swdma_mask = hwif->mwdma_mask = hwif->ultra_mask = 0; | 1359 | hwif->swdma_mask = hwif->mwdma_mask = hwif->ultra_mask = 0; |
1360 | 1360 | ||
1361 | if (d->host_flags & IDE_HFLAG_RQSIZE_256) | 1361 | if (d->host_flags & IDE_HFLAG_RQSIZE_256) |
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 49dd2e7bae7a..0598ecfd5f37 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -466,9 +466,6 @@ static void ide_tape_put(struct ide_tape_obj *tape) | |||
466 | /* 0 = no tape is loaded, so we don't rewind after ejecting */ | 466 | /* 0 = no tape is loaded, so we don't rewind after ejecting */ |
467 | #define IDETAPE_MEDIUM_PRESENT 9 | 467 | #define IDETAPE_MEDIUM_PRESENT 9 |
468 | 468 | ||
469 | /* A define for the READ BUFFER command */ | ||
470 | #define IDETAPE_RETRIEVE_FAULTY_BLOCK 6 | ||
471 | |||
472 | /* Some defines for the SPACE command */ | 469 | /* Some defines for the SPACE command */ |
473 | #define IDETAPE_SPACE_OVER_FILEMARK 1 | 470 | #define IDETAPE_SPACE_OVER_FILEMARK 1 |
474 | #define IDETAPE_SPACE_TO_EOD 3 | 471 | #define IDETAPE_SPACE_TO_EOD 3 |
@@ -490,7 +487,6 @@ enum { | |||
490 | REQ_IDETAPE_PC2 = (1 << 1), /* packet command (second stage) */ | 487 | REQ_IDETAPE_PC2 = (1 << 1), /* packet command (second stage) */ |
491 | REQ_IDETAPE_READ = (1 << 2), | 488 | REQ_IDETAPE_READ = (1 << 2), |
492 | REQ_IDETAPE_WRITE = (1 << 3), | 489 | REQ_IDETAPE_WRITE = (1 << 3), |
493 | REQ_IDETAPE_READ_BUFFER = (1 << 4), | ||
494 | }; | 490 | }; |
495 | 491 | ||
496 | /* Error codes returned in rq->errors to the higher part of the driver. */ | 492 | /* Error codes returned in rq->errors to the higher part of the driver. */ |
@@ -1523,29 +1519,6 @@ static void idetape_create_read_cmd(idetape_tape_t *tape, idetape_pc_t *pc, | |||
1523 | set_bit(PC_DMA_RECOMMENDED, &pc->flags); | 1519 | set_bit(PC_DMA_RECOMMENDED, &pc->flags); |
1524 | } | 1520 | } |
1525 | 1521 | ||
1526 | static void idetape_create_read_buffer_cmd(idetape_tape_t *tape, | ||
1527 | idetape_pc_t *pc, struct idetape_bh *bh) | ||
1528 | { | ||
1529 | int size = 32768; | ||
1530 | struct idetape_bh *p = bh; | ||
1531 | |||
1532 | idetape_init_pc(pc); | ||
1533 | pc->c[0] = READ_BUFFER; | ||
1534 | pc->c[1] = IDETAPE_RETRIEVE_FAULTY_BLOCK; | ||
1535 | pc->c[7] = size >> 8; | ||
1536 | pc->c[8] = size & 0xff; | ||
1537 | pc->callback = &idetape_pc_callback; | ||
1538 | pc->bh = bh; | ||
1539 | atomic_set(&bh->b_count, 0); | ||
1540 | pc->buffer = NULL; | ||
1541 | while (p) { | ||
1542 | atomic_set(&p->b_count, 0); | ||
1543 | p = p->b_reqnext; | ||
1544 | } | ||
1545 | pc->request_transfer = size; | ||
1546 | pc->buffer_size = size; | ||
1547 | } | ||
1548 | |||
1549 | static void idetape_create_write_cmd(idetape_tape_t *tape, idetape_pc_t *pc, | 1522 | static void idetape_create_write_cmd(idetape_tape_t *tape, idetape_pc_t *pc, |
1550 | unsigned int length, struct idetape_bh *bh) | 1523 | unsigned int length, struct idetape_bh *bh) |
1551 | { | 1524 | { |
@@ -1655,13 +1628,6 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive, | |||
1655 | (struct idetape_bh *)rq->special); | 1628 | (struct idetape_bh *)rq->special); |
1656 | goto out; | 1629 | goto out; |
1657 | } | 1630 | } |
1658 | if (rq->cmd[0] & REQ_IDETAPE_READ_BUFFER) { | ||
1659 | tape->postpone_cnt = 0; | ||
1660 | pc = idetape_next_pc_storage(drive); | ||
1661 | idetape_create_read_buffer_cmd(tape, pc, | ||
1662 | (struct idetape_bh *)rq->special); | ||
1663 | goto out; | ||
1664 | } | ||
1665 | if (rq->cmd[0] & REQ_IDETAPE_PC1) { | 1631 | if (rq->cmd[0] & REQ_IDETAPE_PC1) { |
1666 | pc = (idetape_pc_t *) rq->buffer; | 1632 | pc = (idetape_pc_t *) rq->buffer; |
1667 | rq->cmd[0] &= ~(REQ_IDETAPE_PC1); | 1633 | rq->cmd[0] &= ~(REQ_IDETAPE_PC1); |
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index ad0e9955f73c..4a8952a6c3da 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -44,8 +44,6 @@ | |||
44 | * inspiration from lots of linux users, esp. hamish@zot.apana.org.au | 44 | * inspiration from lots of linux users, esp. hamish@zot.apana.org.au |
45 | */ | 45 | */ |
46 | 46 | ||
47 | #define REVISION "Revision: 7.00alpha2" | ||
48 | |||
49 | #define _IDE_C /* Tell ide.h it's really us */ | 47 | #define _IDE_C /* Tell ide.h it's really us */ |
50 | 48 | ||
51 | #include <linux/module.h> | 49 | #include <linux/module.h> |
@@ -1618,7 +1616,7 @@ static int __init ide_init(void) | |||
1618 | { | 1616 | { |
1619 | int ret; | 1617 | int ret; |
1620 | 1618 | ||
1621 | printk(KERN_INFO "Uniform Multi-Platform E-IDE driver " REVISION "\n"); | 1619 | printk(KERN_INFO "Uniform Multi-Platform E-IDE driver\n"); |
1622 | system_bus_speed = ide_system_bus_speed(); | 1620 | system_bus_speed = ide_system_bus_speed(); |
1623 | 1621 | ||
1624 | printk(KERN_INFO "ide: Assuming %dMHz system bus speed " | 1622 | printk(KERN_INFO "ide: Assuming %dMHz system bus speed " |
diff --git a/drivers/ide/legacy/gayle.c b/drivers/ide/legacy/gayle.c index 9d3851d27677..b7d81090d5da 100644 --- a/drivers/ide/legacy/gayle.c +++ b/drivers/ide/legacy/gayle.c | |||
@@ -94,7 +94,7 @@ static int gayle_ack_intr_a1200(ide_hwif_t *hwif) | |||
94 | 94 | ||
95 | static void __init gayle_setup_ports(hw_regs_t *hw, unsigned long base, | 95 | static void __init gayle_setup_ports(hw_regs_t *hw, unsigned long base, |
96 | unsigned long ctl, unsigned long irq_port, | 96 | unsigned long ctl, unsigned long irq_port, |
97 | ide_ack_intr_t *ack_intr); | 97 | ide_ack_intr_t *ack_intr) |
98 | { | 98 | { |
99 | int i; | 99 | int i; |
100 | 100 | ||
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c index 0be1a824102b..1c163e4ef03f 100644 --- a/drivers/ide/pci/cs5520.c +++ b/drivers/ide/pci/cs5520.c | |||
@@ -147,11 +147,6 @@ static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_devic | |||
147 | 147 | ||
148 | /* We must not grab the entire device, it has 'ISA' space in its | 148 | /* We must not grab the entire device, it has 'ISA' space in its |
149 | * BARS too and we will freak out other bits of the kernel | 149 | * BARS too and we will freak out other bits of the kernel |
150 | * | ||
151 | * pci_enable_device_bars() is going away. I replaced it with | ||
152 | * IO only enable for now but I'll need confirmation this is | ||
153 | * allright for that device. If not, it will need some kind of | ||
154 | * quirk. --BenH. | ||
155 | */ | 150 | */ |
156 | if (pci_enable_device_io(dev)) { | 151 | if (pci_enable_device_io(dev)) { |
157 | printk(KERN_WARNING "%s: Unable to enable 55x0.\n", d->name); | 152 | printk(KERN_WARNING "%s: Unable to enable 55x0.\n", d->name); |
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c index da4329790387..150422ec3cfa 100644 --- a/drivers/ide/pci/pdc202xx_old.c +++ b/drivers/ide/pci/pdc202xx_old.c | |||
@@ -3,26 +3,6 @@ | |||
3 | * Copyright (C) 2006-2007 MontaVista Software, Inc. | 3 | * Copyright (C) 2006-2007 MontaVista Software, Inc. |
4 | * Copyright (C) 2007 Bartlomiej Zolnierkiewicz | 4 | * Copyright (C) 2007 Bartlomiej Zolnierkiewicz |
5 | * | 5 | * |
6 | * Promise Ultra33 cards with BIOS v1.20 through 1.28 will need this | ||
7 | * compiled into the kernel if you have more than one card installed. | ||
8 | * Note that BIOS v1.29 is reported to fix the problem. Since this is | ||
9 | * safe chipset tuning, including this support is harmless | ||
10 | * | ||
11 | * Promise Ultra66 cards with BIOS v1.11 this | ||
12 | * compiled into the kernel if you have more than one card installed. | ||
13 | * | ||
14 | * Promise Ultra100 cards. | ||
15 | * | ||
16 | * The latest chipset code will support the following :: | ||
17 | * Three Ultra33 controllers and 12 drives. | ||
18 | * 8 are UDMA supported and 4 are limited to DMA mode 2 multi-word. | ||
19 | * The 8/4 ratio is a BIOS code limit by promise. | ||
20 | * | ||
21 | * UNLESS you enable "CONFIG_PDC202XX_BURST" | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | /* | ||
26 | * Portions Copyright (C) 1999 Promise Technology, Inc. | 6 | * Portions Copyright (C) 1999 Promise Technology, Inc. |
27 | * Author: Frank Tiernan (frankt@promise.com) | 7 | * Author: Frank Tiernan (frankt@promise.com) |
28 | * Released under terms of General Public License | 8 | * Released under terms of General Public License |
@@ -344,7 +324,6 @@ static void __devinit init_dma_pdc202xx(ide_hwif_t *hwif, unsigned long dmabase) | |||
344 | (primary_mode & 1) ? "MASTER" : "PCI", | 324 | (primary_mode & 1) ? "MASTER" : "PCI", |
345 | (secondary_mode & 1) ? "MASTER" : "PCI" ); | 325 | (secondary_mode & 1) ? "MASTER" : "PCI" ); |
346 | 326 | ||
347 | #ifdef CONFIG_PDC202XX_BURST | ||
348 | if (!(udma_speed_flag & 1)) { | 327 | if (!(udma_speed_flag & 1)) { |
349 | printk(KERN_INFO "%s: FORCING BURST BIT 0x%02x->0x%02x ", | 328 | printk(KERN_INFO "%s: FORCING BURST BIT 0x%02x->0x%02x ", |
350 | hwif->cds->name, udma_speed_flag, | 329 | hwif->cds->name, udma_speed_flag, |
@@ -352,7 +331,6 @@ static void __devinit init_dma_pdc202xx(ide_hwif_t *hwif, unsigned long dmabase) | |||
352 | outb(udma_speed_flag | 1, dmabase | 0x1f); | 331 | outb(udma_speed_flag | 1, dmabase | 0x1f); |
353 | printk("%sACTIVE\n", (inb(dmabase | 0x1f) & 1) ? "" : "IN"); | 332 | printk("%sACTIVE\n", (inb(dmabase | 0x1f) & 1) ? "" : "IN"); |
354 | } | 333 | } |
355 | #endif /* CONFIG_PDC202XX_BURST */ | ||
356 | 334 | ||
357 | ide_setup_dma(hwif, dmabase); | 335 | ide_setup_dma(hwif, dmabase); |
358 | } | 336 | } |
diff --git a/fs/lockd/host.c b/fs/lockd/host.c index ca6b16fc3101..f1ef49fff118 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c | |||
@@ -243,10 +243,18 @@ nlm_bind_host(struct nlm_host *host) | |||
243 | .program = &nlm_program, | 243 | .program = &nlm_program, |
244 | .version = host->h_version, | 244 | .version = host->h_version, |
245 | .authflavor = RPC_AUTH_UNIX, | 245 | .authflavor = RPC_AUTH_UNIX, |
246 | .flags = (RPC_CLNT_CREATE_HARDRTRY | | 246 | .flags = (RPC_CLNT_CREATE_NOPING | |
247 | RPC_CLNT_CREATE_AUTOBIND), | 247 | RPC_CLNT_CREATE_AUTOBIND), |
248 | }; | 248 | }; |
249 | 249 | ||
250 | /* | ||
251 | * lockd retries server side blocks automatically so we want | ||
252 | * those to be soft RPC calls. Client side calls need to be | ||
253 | * hard RPC tasks. | ||
254 | */ | ||
255 | if (!host->h_server) | ||
256 | args.flags |= RPC_CLNT_CREATE_HARDRTRY; | ||
257 | |||
250 | clnt = rpc_create(&args); | 258 | clnt = rpc_create(&args); |
251 | if (!IS_ERR(clnt)) | 259 | if (!IS_ERR(clnt)) |
252 | host->h_rpcclnt = clnt; | 260 | host->h_rpcclnt = clnt; |
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index 2f4d8fa66689..fe9bdb4a220c 100644 --- a/fs/lockd/svclock.c +++ b/fs/lockd/svclock.c | |||
@@ -763,11 +763,20 @@ callback: | |||
763 | dprintk("lockd: GRANTing blocked lock.\n"); | 763 | dprintk("lockd: GRANTing blocked lock.\n"); |
764 | block->b_granted = 1; | 764 | block->b_granted = 1; |
765 | 765 | ||
766 | /* Schedule next grant callback in 30 seconds */ | 766 | /* keep block on the list, but don't reattempt until the RPC |
767 | nlmsvc_insert_block(block, 30 * HZ); | 767 | * completes or the submission fails |
768 | */ | ||
769 | nlmsvc_insert_block(block, NLM_NEVER); | ||
770 | |||
771 | /* Call the client -- use a soft RPC task since nlmsvc_retry_blocked | ||
772 | * will queue up a new one if this one times out | ||
773 | */ | ||
774 | error = nlm_async_call(block->b_call, NLMPROC_GRANTED_MSG, | ||
775 | &nlmsvc_grant_ops); | ||
768 | 776 | ||
769 | /* Call the client */ | 777 | /* RPC submission failed, wait a bit and retry */ |
770 | nlm_async_call(block->b_call, NLMPROC_GRANTED_MSG, &nlmsvc_grant_ops); | 778 | if (error < 0) |
779 | nlmsvc_insert_block(block, 10 * HZ); | ||
771 | } | 780 | } |
772 | 781 | ||
773 | /* | 782 | /* |
@@ -786,6 +795,17 @@ static void nlmsvc_grant_callback(struct rpc_task *task, void *data) | |||
786 | 795 | ||
787 | dprintk("lockd: GRANT_MSG RPC callback\n"); | 796 | dprintk("lockd: GRANT_MSG RPC callback\n"); |
788 | 797 | ||
798 | /* if the block is not on a list at this point then it has | ||
799 | * been invalidated. Don't try to requeue it. | ||
800 | * | ||
801 | * FIXME: it's possible that the block is removed from the list | ||
802 | * after this check but before the nlmsvc_insert_block. In that | ||
803 | * case it will be added back. Perhaps we need better locking | ||
804 | * for nlm_blocked? | ||
805 | */ | ||
806 | if (list_empty(&block->b_list)) | ||
807 | return; | ||
808 | |||
789 | /* Technically, we should down the file semaphore here. Since we | 809 | /* Technically, we should down the file semaphore here. Since we |
790 | * move the block towards the head of the queue only, no harm | 810 | * move the block towards the head of the queue only, no harm |
791 | * can be done, though. */ | 811 | * can be done, though. */ |
diff --git a/include/linux/ide.h b/include/linux/ide.h index acec99da832d..a3b69c10d667 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -906,6 +906,8 @@ enum { | |||
906 | IDE_TFLAG_IN_DEVICE, | 906 | IDE_TFLAG_IN_DEVICE, |
907 | /* force 16-bit I/O operations */ | 907 | /* force 16-bit I/O operations */ |
908 | IDE_TFLAG_IO_16BIT = (1 << 30), | 908 | IDE_TFLAG_IO_16BIT = (1 << 30), |
909 | /* ide_task_t was allocated using kmalloc() */ | ||
910 | IDE_TFLAG_DYN = (1 << 31), | ||
909 | }; | 911 | }; |
910 | 912 | ||
911 | struct ide_taskfile { | 913 | struct ide_taskfile { |
@@ -998,8 +1000,7 @@ extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *o | |||
998 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, u8 *); | 1000 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, u8 *); |
999 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); | 1001 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); |
1000 | 1002 | ||
1001 | /* FIXME: palm_bk3710 uses BLK_DEV_IDEDMA_PCI without BLK_DEV_IDEPCI! */ | 1003 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI |
1002 | #if defined(CONFIG_BLK_DEV_IDEPCI) && defined(CONFIG_BLK_DEV_IDEDMA_PCI) | ||
1003 | void ide_hwif_setup_dma(ide_hwif_t *, const struct ide_port_info *); | 1004 | void ide_hwif_setup_dma(ide_hwif_t *, const struct ide_port_info *); |
1004 | #else | 1005 | #else |
1005 | static inline void ide_hwif_setup_dma(ide_hwif_t *hwif, | 1006 | static inline void ide_hwif_setup_dma(ide_hwif_t *hwif, |
@@ -1146,7 +1147,7 @@ ide_startstop_t ide_dma_intr(ide_drive_t *); | |||
1146 | int ide_build_sglist(ide_drive_t *, struct request *); | 1147 | int ide_build_sglist(ide_drive_t *, struct request *); |
1147 | void ide_destroy_dmatable(ide_drive_t *); | 1148 | void ide_destroy_dmatable(ide_drive_t *); |
1148 | 1149 | ||
1149 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI | 1150 | #ifdef CONFIG_BLK_DEV_IDEDMA_SFF |
1150 | extern int ide_build_dmatable(ide_drive_t *, struct request *); | 1151 | extern int ide_build_dmatable(ide_drive_t *, struct request *); |
1151 | extern int ide_release_dma(ide_hwif_t *); | 1152 | extern int ide_release_dma(ide_hwif_t *); |
1152 | extern void ide_setup_dma(ide_hwif_t *, unsigned long); | 1153 | extern void ide_setup_dma(ide_hwif_t *, unsigned long); |
@@ -1157,7 +1158,7 @@ extern void ide_dma_start(ide_drive_t *); | |||
1157 | extern int __ide_dma_end(ide_drive_t *); | 1158 | extern int __ide_dma_end(ide_drive_t *); |
1158 | extern void ide_dma_lost_irq(ide_drive_t *); | 1159 | extern void ide_dma_lost_irq(ide_drive_t *); |
1159 | extern void ide_dma_timeout(ide_drive_t *); | 1160 | extern void ide_dma_timeout(ide_drive_t *); |
1160 | #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ | 1161 | #endif /* CONFIG_BLK_DEV_IDEDMA_SFF */ |
1161 | 1162 | ||
1162 | #else | 1163 | #else |
1163 | static inline int ide_id_dma_bug(ide_drive_t *drive) { return 0; } | 1164 | static inline int ide_id_dma_bug(ide_drive_t *drive) { return 0; } |
@@ -1171,7 +1172,7 @@ static inline int ide_set_dma(ide_drive_t *drive) { return 1; } | |||
1171 | static inline void ide_check_dma_crc(ide_drive_t *drive) { ; } | 1172 | static inline void ide_check_dma_crc(ide_drive_t *drive) { ; } |
1172 | #endif /* CONFIG_BLK_DEV_IDEDMA */ | 1173 | #endif /* CONFIG_BLK_DEV_IDEDMA */ |
1173 | 1174 | ||
1174 | #ifndef CONFIG_BLK_DEV_IDEDMA_PCI | 1175 | #ifndef CONFIG_BLK_DEV_IDEDMA_SFF |
1175 | static inline void ide_release_dma(ide_hwif_t *drive) {;} | 1176 | static inline void ide_release_dma(ide_hwif_t *drive) {;} |
1176 | #endif | 1177 | #endif |
1177 | 1178 | ||
@@ -1294,7 +1295,7 @@ static inline void ide_dump_identify(u8 *id) | |||
1294 | static inline int hwif_to_node(ide_hwif_t *hwif) | 1295 | static inline int hwif_to_node(ide_hwif_t *hwif) |
1295 | { | 1296 | { |
1296 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 1297 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
1297 | return dev ? pcibus_to_node(dev->bus) : -1; | 1298 | return hwif->dev ? pcibus_to_node(dev->bus) : -1; |
1298 | } | 1299 | } |
1299 | 1300 | ||
1300 | static inline ide_drive_t *ide_get_paired_drive(ide_drive_t *drive) | 1301 | static inline ide_drive_t *ide_get_paired_drive(ide_drive_t *drive) |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 64c771056187..64c97552964a 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -409,16 +409,13 @@ char * svc_print_addr(struct svc_rqst *, char *, size_t); | |||
409 | * for all cases without actually generating the checksum, so we just use a | 409 | * for all cases without actually generating the checksum, so we just use a |
410 | * static value. | 410 | * static value. |
411 | */ | 411 | */ |
412 | static inline void | 412 | static inline void svc_reserve_auth(struct svc_rqst *rqstp, int space) |
413 | svc_reserve_auth(struct svc_rqst *rqstp, int space) | ||
414 | { | 413 | { |
415 | int added_space = 0; | 414 | int added_space = 0; |
416 | 415 | ||
417 | switch(rqstp->rq_authop->flavour) { | 416 | if (rqstp->rq_authop->flavour) |
418 | case RPC_AUTH_GSS: | 417 | added_space = RPC_MAX_AUTH_SIZE; |
419 | added_space = RPC_MAX_AUTH_SIZE; | 418 | svc_reserve(rqstp, space + added_space); |
420 | } | ||
421 | return svc_reserve(rqstp, space + added_space); | ||
422 | } | 419 | } |
423 | 420 | ||
424 | #endif /* SUNRPC_SVC_H */ | 421 | #endif /* SUNRPC_SVC_H */ |
diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c index 3e321949e1dc..0598b229c11d 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c +++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c | |||
@@ -159,7 +159,8 @@ static int send_write(struct svcxprt_rdma *xprt, struct svc_rqst *rqstp, | |||
159 | BUG_ON(sge_count >= 32); | 159 | BUG_ON(sge_count >= 32); |
160 | dprintk("svcrdma: RDMA_WRITE rmr=%x, to=%llx, xdr_off=%d, " | 160 | dprintk("svcrdma: RDMA_WRITE rmr=%x, to=%llx, xdr_off=%d, " |
161 | "write_len=%d, xdr_sge=%p, sge_count=%d\n", | 161 | "write_len=%d, xdr_sge=%p, sge_count=%d\n", |
162 | rmr, to, xdr_off, write_len, xdr_sge, sge_count); | 162 | rmr, (unsigned long long)to, xdr_off, |
163 | write_len, xdr_sge, sge_count); | ||
163 | 164 | ||
164 | ctxt = svc_rdma_get_context(xprt); | 165 | ctxt = svc_rdma_get_context(xprt); |
165 | ctxt->count = 0; | 166 | ctxt->count = 0; |