diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-31 14:15:13 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-31 14:15:13 -0400 |
commit | 06a449e30135aabb6686c95bf0c42b46d169a3b3 (patch) | |
tree | 7774a868c28b11d375428d1aaeb04fc8a5956be0 /drivers/ide | |
parent | a08915ba594da66145f33a972db578a58b9135f1 (diff) |
ide-cd: fix non-SECTOR_SIZE-multiples PIO transfers for fs requests
We now support arbitrary number of bytes per-IRQ also for fs requests
so remove ide_cd_check_transfer_size() and IDE_AFLAG_LIMIT_NFRAMES.
Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-cd.c | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 5f15859c2c73..c0cefe5becf3 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -509,31 +509,6 @@ static int ide_cd_check_ireason(ide_drive_t *drive, struct request *rq, | |||
509 | return -1; | 509 | return -1; |
510 | } | 510 | } |
511 | 511 | ||
512 | /* | ||
513 | * Assume that the drive will always provide data in multiples of at least | ||
514 | * SECTOR_SIZE, as it gets hairy to keep track of the transfers otherwise. | ||
515 | */ | ||
516 | static int ide_cd_check_transfer_size(ide_drive_t *drive, int len) | ||
517 | { | ||
518 | ide_debug_log(IDE_DBG_FUNC, "len: %d", len); | ||
519 | |||
520 | if ((len % SECTOR_SIZE) == 0) | ||
521 | return 0; | ||
522 | |||
523 | printk(KERN_ERR PFX "%s: %s: Bad transfer size %d\n", drive->name, | ||
524 | __func__, len); | ||
525 | |||
526 | if (drive->atapi_flags & IDE_AFLAG_LIMIT_NFRAMES) | ||
527 | printk(KERN_ERR PFX "This drive is not supported by this " | ||
528 | "version of the driver\n"); | ||
529 | else { | ||
530 | printk(KERN_ERR PFX "Trying to limit transfer sizes\n"); | ||
531 | drive->atapi_flags |= IDE_AFLAG_LIMIT_NFRAMES; | ||
532 | } | ||
533 | |||
534 | return 1; | ||
535 | } | ||
536 | |||
537 | static ide_startstop_t ide_cd_prepare_rw_request(ide_drive_t *drive, | 512 | static ide_startstop_t ide_cd_prepare_rw_request(ide_drive_t *drive, |
538 | struct request *rq) | 513 | struct request *rq) |
539 | { | 514 | { |
@@ -752,13 +727,7 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) | |||
752 | if (rc) | 727 | if (rc) |
753 | goto out_end; | 728 | goto out_end; |
754 | 729 | ||
755 | if (blk_fs_request(rq)) { | 730 | cmd->last_xfer_len = 0; |
756 | if (write == 0) { | ||
757 | if (ide_cd_check_transfer_size(drive, len)) | ||
758 | goto out_end; | ||
759 | } | ||
760 | cmd->last_xfer_len = 0; | ||
761 | } | ||
762 | 731 | ||
763 | if (ireason == 0) { | 732 | if (ireason == 0) { |
764 | write = 1; | 733 | write = 1; |
@@ -1619,9 +1588,6 @@ static const struct ide_proc_devset *ide_cd_proc_devsets(ide_drive_t *drive) | |||
1619 | #endif | 1588 | #endif |
1620 | 1589 | ||
1621 | static const struct cd_list_entry ide_cd_quirks_list[] = { | 1590 | static const struct cd_list_entry ide_cd_quirks_list[] = { |
1622 | /* Limit transfer size per interrupt. */ | ||
1623 | { "SAMSUNG CD-ROM SCR-2430", NULL, IDE_AFLAG_LIMIT_NFRAMES }, | ||
1624 | { "SAMSUNG CD-ROM SCR-2432", NULL, IDE_AFLAG_LIMIT_NFRAMES }, | ||
1625 | /* SCR-3231 doesn't support the SET_CD_SPEED command. */ | 1591 | /* SCR-3231 doesn't support the SET_CD_SPEED command. */ |
1626 | { "SAMSUNG CD-ROM SCR-3231", NULL, IDE_AFLAG_NO_SPEED_SELECT }, | 1592 | { "SAMSUNG CD-ROM SCR-3231", NULL, IDE_AFLAG_NO_SPEED_SELECT }, |
1627 | /* Old NEC260 (not R) was released before ATAPI 1.2 spec. */ | 1593 | /* Old NEC260 (not R) was released before ATAPI 1.2 spec. */ |