projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
[powerpc.git]
/
drivers
/
ide
/
ide.c
diff --git
a/drivers/ide/ide.c
b/drivers/ide/ide.c
index
defd4b4
..
287a662
100644
(file)
--- a/
drivers/ide/ide.c
+++ b/
drivers/ide/ide.c
@@
-450,7
+450,7
@@
void ide_hwif_release_regions(ide_hwif_t *hwif)
* @hwif: hwif to update
* @tmp_hwif: template
*
* @hwif: hwif to update
* @tmp_hwif: template
*
- * Restore hwif to a previous state by copying most settngs
+ * Restore hwif to a previous state by copying most sett
i
ngs
* from the template.
*/
* from the template.
*/
@@
-539,9
+539,10
@@
static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif)
hwif->dma_vendor3 = tmp_hwif->dma_vendor3;
hwif->dma_prdtable = tmp_hwif->dma_prdtable;
hwif->dma_vendor3 = tmp_hwif->dma_vendor3;
hwif->dma_prdtable = tmp_hwif->dma_prdtable;
- hwif->dma_extra = tmp_hwif->dma_extra;
hwif->config_data = tmp_hwif->config_data;
hwif->select_data = tmp_hwif->select_data;
hwif->config_data = tmp_hwif->config_data;
hwif->select_data = tmp_hwif->select_data;
+ hwif->extra_base = tmp_hwif->extra_base;
+ hwif->extra_ports = tmp_hwif->extra_ports;
hwif->autodma = tmp_hwif->autodma;
hwif->udma_four = tmp_hwif->udma_four;
hwif->no_dsc = tmp_hwif->no_dsc;
hwif->autodma = tmp_hwif->autodma;
hwif->udma_four = tmp_hwif->udma_four;
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)
}
/**
}
/**
- * ide_unregister - free an
ide
interface
+ * ide_unregister - free an
IDE
interface
* @index: index of interface (will change soon to a pointer)
*
* Perform the final unregister of an IDE interface. At the moment
* @index: index of interface (will change soon to a pointer)
*
* 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)
* deadlocking the IDE layer. The shutdown callback is called
* before we take the lock and free resources. It is up to the
* caller to be sure there is no pending I/O here, and that
* deadlocking the IDE layer. The shutdown callback is called
* before we take the lock and free resources. It is up to the
* caller to be sure there is no pending I/O here, and that
- * the interfce will not be reopened (present/vanishing locking
- * isn
t yet done btw
). After we commit to the final kill we
+ * the interf
a
ce will not be reopened (present/vanishing locking
+ * isn
't yet done BTW
). After we commit to the final kill we
* call the cleanup callback with the ide locks held.
*
* Unregister restores the hwif structures to the default state.
* call the cleanup callback with the ide locks held.
*
* Unregister restores the hwif structures to the default state.
@@
-674,6
+675,9
@@
void ide_unregister(unsigned int index)
hwif->dma_status = 0;
hwif->dma_vendor3 = 0;
hwif->dma_prdtable = 0;
hwif->dma_status = 0;
hwif->dma_vendor3 = 0;
hwif->dma_prdtable = 0;
+
+ hwif->extra_base = 0;
+ hwif->extra_ports = 0;
}
/* copy original settings */
}
/* copy original settings */
@@
-1207,7
+1211,7
@@
int system_bus_clock (void)
EXPORT_SYMBOL(system_bus_clock);
EXPORT_SYMBOL(system_bus_clock);
-static int generic_ide_suspend(struct device *dev, pm_message_t
state
)
+static int generic_ide_suspend(struct device *dev, pm_message_t
mesg
)
{
ide_drive_t *drive = dev->driver_data;
struct request rq;
{
ide_drive_t *drive = dev->driver_data;
struct request rq;
@@
-1217,11
+1221,13
@@
static int generic_ide_suspend(struct device *dev, pm_message_t state)
memset(&rq, 0, sizeof(rq));
memset(&rqpm, 0, sizeof(rqpm));
memset(&args, 0, sizeof(args));
memset(&rq, 0, sizeof(rq));
memset(&rqpm, 0, sizeof(rqpm));
memset(&args, 0, sizeof(args));
- rq.
flags = REQ
_PM_SUSPEND;
+ rq.
cmd_type = REQ_TYPE
_PM_SUSPEND;
rq.special = &args;
rq.special = &args;
- rq.
end_io_
data = &rqpm;
+ rq.data = &rqpm;
rqpm.pm_step = ide_pm_state_start_suspend;
rqpm.pm_step = ide_pm_state_start_suspend;
- rqpm.pm_state = state.event;
+ if (mesg.event == PM_EVENT_PRETHAW)
+ mesg.event = PM_EVENT_FREEZE;
+ rqpm.pm_state = mesg.event;
return ide_do_drive_cmd(drive, &rq, ide_wait);
}
return ide_do_drive_cmd(drive, &rq, ide_wait);
}
@@
-1236,9
+1242,9
@@
static int generic_ide_resume(struct device *dev)
memset(&rq, 0, sizeof(rq));
memset(&rqpm, 0, sizeof(rqpm));
memset(&args, 0, sizeof(args));
memset(&rq, 0, sizeof(rq));
memset(&rqpm, 0, sizeof(rqpm));
memset(&args, 0, sizeof(args));
- rq.
flags = REQ
_PM_RESUME;
+ rq.
cmd_type = REQ_TYPE
_PM_RESUME;
rq.special = &args;
rq.special = &args;
- rq.
end_io_
data = &rqpm;
+ rq.data = &rqpm;
rqpm.pm_step = ide_pm_state_start_resume;
rqpm.pm_state = PM_EVENT_ON;
rqpm.pm_step = ide_pm_state_start_resume;
rqpm.pm_state = PM_EVENT_ON;
@@
-1358,6
+1364,11
@@
int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device
spin_lock_irqsave(&ide_lock, flags);
spin_lock_irqsave(&ide_lock, flags);
+ if (HWGROUP(drive)->resetting) {
+ spin_unlock_irqrestore(&ide_lock, flags);
+ return -EBUSY;
+ }
+
ide_abort(drive, "drive reset");
BUG_ON(HWGROUP(drive)->handler);
ide_abort(drive, "drive reset");
BUG_ON(HWGROUP(drive)->handler);
@@
-1991,10
+2002,16
@@
EXPORT_SYMBOL_GPL(ide_bus_type);
*/
static int __init ide_init(void)
{
*/
static int __init ide_init(void)
{
+ int ret;
+
printk(KERN_INFO "Uniform Multi-Platform E-IDE driver " REVISION "\n");
system_bus_speed = ide_system_bus_speed();
printk(KERN_INFO "Uniform Multi-Platform E-IDE driver " REVISION "\n");
system_bus_speed = ide_system_bus_speed();
- bus_register(&ide_bus_type);
+ ret = bus_register(&ide_bus_type);
+ if (ret < 0) {
+ printk(KERN_WARNING "IDE: bus_register error: %d\n", ret);
+ return ret;
+ }
init_ide_data();
init_ide_data();