aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r--drivers/ide/ide.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 2b1a1389c318..8c3f06242280 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -450,7 +450,7 @@ void ide_hwif_release_regions(ide_hwif_t *hwif)
450 * @hwif: hwif to update 450 * @hwif: hwif to update
451 * @tmp_hwif: template 451 * @tmp_hwif: template
452 * 452 *
453 * Restore hwif to a previous state by copying most settngs 453 * Restore hwif to a previous state by copying most settings
454 * from the template. 454 * from the template.
455 */ 455 */
456 456
@@ -539,9 +539,10 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif)
539 hwif->dma_vendor3 = tmp_hwif->dma_vendor3; 539 hwif->dma_vendor3 = tmp_hwif->dma_vendor3;
540 hwif->dma_prdtable = tmp_hwif->dma_prdtable; 540 hwif->dma_prdtable = tmp_hwif->dma_prdtable;
541 541
542 hwif->dma_extra = tmp_hwif->dma_extra;
543 hwif->config_data = tmp_hwif->config_data; 542 hwif->config_data = tmp_hwif->config_data;
544 hwif->select_data = tmp_hwif->select_data; 543 hwif->select_data = tmp_hwif->select_data;
544 hwif->extra_base = tmp_hwif->extra_base;
545 hwif->extra_ports = tmp_hwif->extra_ports;
545 hwif->autodma = tmp_hwif->autodma; 546 hwif->autodma = tmp_hwif->autodma;
546 hwif->udma_four = tmp_hwif->udma_four; 547 hwif->udma_four = tmp_hwif->udma_four;
547 hwif->no_dsc = tmp_hwif->no_dsc; 548 hwif->no_dsc = tmp_hwif->no_dsc;
@@ -550,7 +551,7 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif)
550} 551}
551 552
552/** 553/**
553 * ide_unregister - free an ide interface 554 * ide_unregister - free an IDE interface
554 * @index: index of interface (will change soon to a pointer) 555 * @index: index of interface (will change soon to a pointer)
555 * 556 *
556 * Perform the final unregister of an IDE interface. At the moment 557 * Perform the final unregister of an IDE interface. At the moment
@@ -563,8 +564,8 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif)
563 * deadlocking the IDE layer. The shutdown callback is called 564 * deadlocking the IDE layer. The shutdown callback is called
564 * before we take the lock and free resources. It is up to the 565 * before we take the lock and free resources. It is up to the
565 * caller to be sure there is no pending I/O here, and that 566 * caller to be sure there is no pending I/O here, and that
566 * the interfce will not be reopened (present/vanishing locking 567 * the interface will not be reopened (present/vanishing locking
567 * isnt yet done btw). After we commit to the final kill we 568 * isn't yet done BTW). After we commit to the final kill we
568 * call the cleanup callback with the ide locks held. 569 * call the cleanup callback with the ide locks held.
569 * 570 *
570 * Unregister restores the hwif structures to the default state. 571 * Unregister restores the hwif structures to the default state.
@@ -674,6 +675,9 @@ void ide_unregister(unsigned int index)
674 hwif->dma_status = 0; 675 hwif->dma_status = 0;
675 hwif->dma_vendor3 = 0; 676 hwif->dma_vendor3 = 0;
676 hwif->dma_prdtable = 0; 677 hwif->dma_prdtable = 0;
678
679 hwif->extra_base = 0;
680 hwif->extra_ports = 0;
677 } 681 }
678 682
679 /* copy original settings */ 683 /* copy original settings */