diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/alim15x3.c | 10 | ||||
-rw-r--r-- | drivers/ide/ide-atapi.c | 6 | ||||
-rw-r--r-- | drivers/ide/ide-pci-generic.c | 11 | ||||
-rw-r--r-- | drivers/ide/ide-tape.c | 1 | ||||
-rw-r--r-- | drivers/ide/pdc202xx_old.c | 22 |
5 files changed, 27 insertions, 23 deletions
diff --git a/drivers/ide/alim15x3.c b/drivers/ide/alim15x3.c index 537da1cde16d..e59b6dee9ae2 100644 --- a/drivers/ide/alim15x3.c +++ b/drivers/ide/alim15x3.c | |||
@@ -402,27 +402,23 @@ static u8 ali_cable_detect(ide_hwif_t *hwif) | |||
402 | return cbl; | 402 | return cbl; |
403 | } | 403 | } |
404 | 404 | ||
405 | #if !defined(CONFIG_SPARC64) && !defined(CONFIG_PPC) | 405 | #ifndef CONFIG_SPARC64 |
406 | /** | 406 | /** |
407 | * init_hwif_ali15x3 - Initialize the ALI IDE x86 stuff | 407 | * init_hwif_ali15x3 - Initialize the ALI IDE x86 stuff |
408 | * @hwif: interface to configure | 408 | * @hwif: interface to configure |
409 | * | 409 | * |
410 | * Obtain the IRQ tables for an ALi based IDE solution on the PC | 410 | * Obtain the IRQ tables for an ALi based IDE solution on the PC |
411 | * class platforms. This part of the code isn't applicable to the | 411 | * class platforms. This part of the code isn't applicable to the |
412 | * Sparc and PowerPC systems. | 412 | * Sparc systems. |
413 | */ | 413 | */ |
414 | 414 | ||
415 | static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif) | 415 | static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif) |
416 | { | 416 | { |
417 | struct pci_dev *dev = to_pci_dev(hwif->dev); | ||
418 | u8 ideic, inmir; | 417 | u8 ideic, inmir; |
419 | s8 irq_routing_table[] = { -1, 9, 3, 10, 4, 5, 7, 6, | 418 | s8 irq_routing_table[] = { -1, 9, 3, 10, 4, 5, 7, 6, |
420 | 1, 11, 0, 12, 0, 14, 0, 15 }; | 419 | 1, 11, 0, 12, 0, 14, 0, 15 }; |
421 | int irq = -1; | 420 | int irq = -1; |
422 | 421 | ||
423 | if (dev->device == PCI_DEVICE_ID_AL_M5229) | ||
424 | hwif->irq = hwif->channel ? 15 : 14; | ||
425 | |||
426 | if (isa_dev) { | 422 | if (isa_dev) { |
427 | /* | 423 | /* |
428 | * read IDE interface control | 424 | * read IDE interface control |
@@ -455,7 +451,7 @@ static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif) | |||
455 | } | 451 | } |
456 | #else | 452 | #else |
457 | #define init_hwif_ali15x3 NULL | 453 | #define init_hwif_ali15x3 NULL |
458 | #endif /* !defined(CONFIG_SPARC64) && !defined(CONFIG_PPC) */ | 454 | #endif /* CONFIG_SPARC64 */ |
459 | 455 | ||
460 | /** | 456 | /** |
461 | * init_dma_ali15x3 - set up DMA on ALi15x3 | 457 | * init_dma_ali15x3 - set up DMA on ALi15x3 |
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index 8a894fa37b53..757e5956b132 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c | |||
@@ -415,6 +415,12 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive) | |||
415 | if ((pc->flags & PC_FLAG_WAIT_FOR_DSC) && (stat & ATA_DSC) == 0) | 415 | if ((pc->flags & PC_FLAG_WAIT_FOR_DSC) && (stat & ATA_DSC) == 0) |
416 | dsc = 1; | 416 | dsc = 1; |
417 | 417 | ||
418 | /* | ||
419 | * ->pc_callback() might change rq->data_len for | ||
420 | * residual count, cache total length. | ||
421 | */ | ||
422 | done = blk_rq_bytes(rq); | ||
423 | |||
418 | /* Command finished - Call the callback function */ | 424 | /* Command finished - Call the callback function */ |
419 | uptodate = drive->pc_callback(drive, dsc); | 425 | uptodate = drive->pc_callback(drive, dsc); |
420 | 426 | ||
diff --git a/drivers/ide/ide-pci-generic.c b/drivers/ide/ide-pci-generic.c index 61111fd27130..39d4e01f5c9c 100644 --- a/drivers/ide/ide-pci-generic.c +++ b/drivers/ide/ide-pci-generic.c | |||
@@ -33,6 +33,16 @@ static int ide_generic_all; /* Set to claim all devices */ | |||
33 | module_param_named(all_generic_ide, ide_generic_all, bool, 0444); | 33 | module_param_named(all_generic_ide, ide_generic_all, bool, 0444); |
34 | MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE storage controllers."); | 34 | MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE storage controllers."); |
35 | 35 | ||
36 | static void netcell_quirkproc(ide_drive_t *drive) | ||
37 | { | ||
38 | /* mark words 85-87 as valid */ | ||
39 | drive->id[ATA_ID_CSF_DEFAULT] |= 0x4000; | ||
40 | } | ||
41 | |||
42 | static const struct ide_port_ops netcell_port_ops = { | ||
43 | .quirkproc = netcell_quirkproc, | ||
44 | }; | ||
45 | |||
36 | #define DECLARE_GENERIC_PCI_DEV(extra_flags) \ | 46 | #define DECLARE_GENERIC_PCI_DEV(extra_flags) \ |
37 | { \ | 47 | { \ |
38 | .name = DRV_NAME, \ | 48 | .name = DRV_NAME, \ |
@@ -74,6 +84,7 @@ static const struct ide_port_info generic_chipsets[] __devinitdata = { | |||
74 | 84 | ||
75 | { /* 6: Revolution */ | 85 | { /* 6: Revolution */ |
76 | .name = DRV_NAME, | 86 | .name = DRV_NAME, |
87 | .port_ops = &netcell_port_ops, | ||
77 | .host_flags = IDE_HFLAG_CLEAR_SIMPLEX | | 88 | .host_flags = IDE_HFLAG_CLEAR_SIMPLEX | |
78 | IDE_HFLAG_TRUST_BIOS_FOR_DMA | | 89 | IDE_HFLAG_TRUST_BIOS_FOR_DMA | |
79 | IDE_HFLAG_OFF_BOARD, | 90 | IDE_HFLAG_OFF_BOARD, |
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 683ff37d4079..d9764f0bc82f 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -892,6 +892,7 @@ static int idetape_queue_rw_tail(ide_drive_t *drive, int cmd, int size) | |||
892 | rq->cmd_type = REQ_TYPE_SPECIAL; | 892 | rq->cmd_type = REQ_TYPE_SPECIAL; |
893 | rq->cmd[13] = cmd; | 893 | rq->cmd[13] = cmd; |
894 | rq->rq_disk = tape->disk; | 894 | rq->rq_disk = tape->disk; |
895 | rq->__sector = tape->first_frame; | ||
895 | 896 | ||
896 | if (size) { | 897 | if (size) { |
897 | ret = blk_rq_map_kern(drive->queue, rq, tape->buf, size, | 898 | ret = blk_rq_map_kern(drive->queue, rq, tape->buf, size, |
diff --git a/drivers/ide/pdc202xx_old.c b/drivers/ide/pdc202xx_old.c index c2a16a8f486d..e24ecc87a9b1 100644 --- a/drivers/ide/pdc202xx_old.c +++ b/drivers/ide/pdc202xx_old.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org> | 2 | * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org> |
3 | * Copyright (C) 2006-2007 MontaVista Software, Inc. | 3 | * Copyright (C) 2006-2007, 2009 MontaVista Software, Inc. |
4 | * Copyright (C) 2007 Bartlomiej Zolnierkiewicz | 4 | * Copyright (C) 2007 Bartlomiej Zolnierkiewicz |
5 | * | 5 | * |
6 | * Portions Copyright (C) 1999 Promise Technology, Inc. | 6 | * Portions Copyright (C) 1999 Promise Technology, Inc. |
@@ -227,28 +227,19 @@ somebody_else: | |||
227 | return (dma_stat & 4) == 4; /* return 1 if INTR asserted */ | 227 | return (dma_stat & 4) == 4; /* return 1 if INTR asserted */ |
228 | } | 228 | } |
229 | 229 | ||
230 | static void pdc202xx_reset_host (ide_hwif_t *hwif) | 230 | static void pdc202xx_reset(ide_drive_t *drive) |
231 | { | 231 | { |
232 | ide_hwif_t *hwif = drive->hwif; | ||
232 | unsigned long high_16 = hwif->extra_base - 16; | 233 | unsigned long high_16 = hwif->extra_base - 16; |
233 | u8 udma_speed_flag = inb(high_16 | 0x001f); | 234 | u8 udma_speed_flag = inb(high_16 | 0x001f); |
234 | 235 | ||
236 | printk(KERN_WARNING "PDC202xx: software reset...\n"); | ||
237 | |||
235 | outb(udma_speed_flag | 0x10, high_16 | 0x001f); | 238 | outb(udma_speed_flag | 0x10, high_16 | 0x001f); |
236 | mdelay(100); | 239 | mdelay(100); |
237 | outb(udma_speed_flag & ~0x10, high_16 | 0x001f); | 240 | outb(udma_speed_flag & ~0x10, high_16 | 0x001f); |
238 | mdelay(2000); /* 2 seconds ?! */ | 241 | mdelay(2000); /* 2 seconds ?! */ |
239 | 242 | ||
240 | printk(KERN_WARNING "PDC202XX: %s channel reset.\n", | ||
241 | hwif->channel ? "Secondary" : "Primary"); | ||
242 | } | ||
243 | |||
244 | static void pdc202xx_reset (ide_drive_t *drive) | ||
245 | { | ||
246 | ide_hwif_t *hwif = drive->hwif; | ||
247 | ide_hwif_t *mate = hwif->mate; | ||
248 | |||
249 | pdc202xx_reset_host(hwif); | ||
250 | pdc202xx_reset_host(mate); | ||
251 | |||
252 | ide_set_max_pio(drive); | 243 | ide_set_max_pio(drive); |
253 | } | 244 | } |
254 | 245 | ||
@@ -328,9 +319,8 @@ static const struct ide_dma_ops pdc20246_dma_ops = { | |||
328 | .dma_start = ide_dma_start, | 319 | .dma_start = ide_dma_start, |
329 | .dma_end = ide_dma_end, | 320 | .dma_end = ide_dma_end, |
330 | .dma_test_irq = pdc202xx_dma_test_irq, | 321 | .dma_test_irq = pdc202xx_dma_test_irq, |
331 | .dma_lost_irq = pdc202xx_dma_lost_irq, | 322 | .dma_lost_irq = ide_dma_lost_irq, |
332 | .dma_timer_expiry = ide_dma_sff_timer_expiry, | 323 | .dma_timer_expiry = ide_dma_sff_timer_expiry, |
333 | .dma_clear = pdc202xx_reset, | ||
334 | .dma_sff_read_status = ide_dma_sff_read_status, | 324 | .dma_sff_read_status = ide_dma_sff_read_status, |
335 | }; | 325 | }; |
336 | 326 | ||