diff options
Diffstat (limited to 'drivers/block/floppy.c')
-rw-r--r-- | drivers/block/floppy.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 553f43a90953..a7d6347aaa79 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -191,6 +191,7 @@ static int print_unex = 1; | |||
191 | #include <linux/mutex.h> | 191 | #include <linux/mutex.h> |
192 | #include <linux/io.h> | 192 | #include <linux/io.h> |
193 | #include <linux/uaccess.h> | 193 | #include <linux/uaccess.h> |
194 | #include <linux/async.h> | ||
194 | 195 | ||
195 | /* | 196 | /* |
196 | * PS/2 floppies have much slower step rates than regular floppies. | 197 | * PS/2 floppies have much slower step rates than regular floppies. |
@@ -2516,8 +2517,7 @@ static int make_raw_rw_request(void) | |||
2516 | set_fdc((long)current_req->rq_disk->private_data); | 2517 | set_fdc((long)current_req->rq_disk->private_data); |
2517 | 2518 | ||
2518 | raw_cmd = &default_raw_cmd; | 2519 | raw_cmd = &default_raw_cmd; |
2519 | raw_cmd->flags = FD_RAW_SPIN | FD_RAW_NEED_DISK | FD_RAW_NEED_DISK | | 2520 | raw_cmd->flags = FD_RAW_SPIN | FD_RAW_NEED_DISK | FD_RAW_NEED_SEEK; |
2520 | FD_RAW_NEED_SEEK; | ||
2521 | raw_cmd->cmd_count = NR_RW; | 2521 | raw_cmd->cmd_count = NR_RW; |
2522 | if (rq_data_dir(current_req) == READ) { | 2522 | if (rq_data_dir(current_req) == READ) { |
2523 | raw_cmd->flags |= FD_RAW_READ; | 2523 | raw_cmd->flags |= FD_RAW_READ; |
@@ -4123,7 +4123,7 @@ static struct kobject *floppy_find(dev_t dev, int *part, void *data) | |||
4123 | return get_disk(disks[drive]); | 4123 | return get_disk(disks[drive]); |
4124 | } | 4124 | } |
4125 | 4125 | ||
4126 | static int __init floppy_init(void) | 4126 | static int __init do_floppy_init(void) |
4127 | { | 4127 | { |
4128 | int i, unit, drive; | 4128 | int i, unit, drive; |
4129 | int err, dr; | 4129 | int err, dr; |
@@ -4338,6 +4338,24 @@ out_put_disk: | |||
4338 | return err; | 4338 | return err; |
4339 | } | 4339 | } |
4340 | 4340 | ||
4341 | #ifndef MODULE | ||
4342 | static __init void floppy_async_init(void *data, async_cookie_t cookie) | ||
4343 | { | ||
4344 | do_floppy_init(); | ||
4345 | } | ||
4346 | #endif | ||
4347 | |||
4348 | static int __init floppy_init(void) | ||
4349 | { | ||
4350 | #ifdef MODULE | ||
4351 | return do_floppy_init(); | ||
4352 | #else | ||
4353 | /* Don't hold up the bootup by the floppy initialization */ | ||
4354 | async_schedule(floppy_async_init, NULL); | ||
4355 | return 0; | ||
4356 | #endif | ||
4357 | } | ||
4358 | |||
4341 | static const struct io_region { | 4359 | static const struct io_region { |
4342 | int offset; | 4360 | int offset; |
4343 | int size; | 4361 | int size; |