diff options
-rw-r--r-- | drivers/ide/ide-taskfile.c | 36 | ||||
-rw-r--r-- | mm/slub.c | 12 |
2 files changed, 36 insertions, 12 deletions
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 0518a2e948cf..4c86a8d84b4c 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -423,6 +423,25 @@ void task_end_request(ide_drive_t *drive, struct request *rq, u8 stat) | |||
423 | } | 423 | } |
424 | 424 | ||
425 | /* | 425 | /* |
426 | * We got an interrupt on a task_in case, but no errors and no DRQ. | ||
427 | * | ||
428 | * It might be a spurious irq (shared irq), but it might be a | ||
429 | * command that had no output. | ||
430 | */ | ||
431 | static ide_startstop_t task_in_unexpected(ide_drive_t *drive, struct request *rq, u8 stat) | ||
432 | { | ||
433 | /* Command all done? */ | ||
434 | if (OK_STAT(stat, READY_STAT, BUSY_STAT)) { | ||
435 | task_end_request(drive, rq, stat); | ||
436 | return ide_stopped; | ||
437 | } | ||
438 | |||
439 | /* Assume it was a spurious irq */ | ||
440 | ide_set_handler(drive, &task_in_intr, WAIT_WORSTCASE, NULL); | ||
441 | return ide_started; | ||
442 | } | ||
443 | |||
444 | /* | ||
426 | * Handler for command with PIO data-in phase (Read/Read Multiple). | 445 | * Handler for command with PIO data-in phase (Read/Read Multiple). |
427 | */ | 446 | */ |
428 | static ide_startstop_t task_in_intr(ide_drive_t *drive) | 447 | static ide_startstop_t task_in_intr(ide_drive_t *drive) |
@@ -431,18 +450,17 @@ static ide_startstop_t task_in_intr(ide_drive_t *drive) | |||
431 | struct request *rq = HWGROUP(drive)->rq; | 450 | struct request *rq = HWGROUP(drive)->rq; |
432 | u8 stat = ide_read_status(drive); | 451 | u8 stat = ide_read_status(drive); |
433 | 452 | ||
434 | /* new way for dealing with premature shared PCI interrupts */ | 453 | /* Error? */ |
435 | if (!OK_STAT(stat, DRQ_STAT, BAD_R_STAT)) { | 454 | if (stat & ERR_STAT) |
436 | if (stat & (ERR_STAT | DRQ_STAT)) | 455 | return task_error(drive, rq, __FUNCTION__, stat); |
437 | return task_error(drive, rq, __FUNCTION__, stat); | 456 | |
438 | /* No data yet, so wait for another IRQ. */ | 457 | /* Didn't want any data? Odd. */ |
439 | ide_set_handler(drive, &task_in_intr, WAIT_WORSTCASE, NULL); | 458 | if (!(stat & DRQ_STAT)) |
440 | return ide_started; | 459 | return task_in_unexpected(drive, rq, stat); |
441 | } | ||
442 | 460 | ||
443 | ide_pio_datablock(drive, rq, 0); | 461 | ide_pio_datablock(drive, rq, 0); |
444 | 462 | ||
445 | /* If it was the last datablock check status and finish transfer. */ | 463 | /* Are we done? Check status and finish transfer. */ |
446 | if (!hwif->nleft) { | 464 | if (!hwif->nleft) { |
447 | stat = wait_drive_not_busy(drive); | 465 | stat = wait_drive_not_busy(drive); |
448 | if (!OK_STAT(stat, 0, BAD_STAT)) | 466 | if (!OK_STAT(stat, 0, BAD_STAT)) |
@@ -1536,9 +1536,15 @@ new_slab: | |||
1536 | * That is only possible if certain conditions are met that are being | 1536 | * That is only possible if certain conditions are met that are being |
1537 | * checked when a slab is created. | 1537 | * checked when a slab is created. |
1538 | */ | 1538 | */ |
1539 | if (!(gfpflags & __GFP_NORETRY) && (s->flags & __PAGE_ALLOC_FALLBACK)) | 1539 | if (!(gfpflags & __GFP_NORETRY) && |
1540 | return kmalloc_large(s->objsize, gfpflags); | 1540 | (s->flags & __PAGE_ALLOC_FALLBACK)) { |
1541 | 1541 | if (gfpflags & __GFP_WAIT) | |
1542 | local_irq_enable(); | ||
1543 | object = kmalloc_large(s->objsize, gfpflags); | ||
1544 | if (gfpflags & __GFP_WAIT) | ||
1545 | local_irq_disable(); | ||
1546 | return object; | ||
1547 | } | ||
1542 | return NULL; | 1548 | return NULL; |
1543 | debug: | 1549 | debug: |
1544 | if (!alloc_debug_processing(s, c->page, object, addr)) | 1550 | if (!alloc_debug_processing(s, c->page, object, addr)) |