Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139416
b: refs/heads/master
c: 06a449e
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Mar 31, 2009
1 parent ad11483 commit dca1c1e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 41 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a08915ba594da66145f33a972db578a58b9135f1
refs/heads/master: 06a449e30135aabb6686c95bf0c42b46d169a3b3
36 changes: 1 addition & 35 deletions trunk/drivers/ide/ide-cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,31 +509,6 @@ static int ide_cd_check_ireason(ide_drive_t *drive, struct request *rq,
return -1;
}

/*
* Assume that the drive will always provide data in multiples of at least
* SECTOR_SIZE, as it gets hairy to keep track of the transfers otherwise.
*/
static int ide_cd_check_transfer_size(ide_drive_t *drive, int len)
{
ide_debug_log(IDE_DBG_FUNC, "len: %d", len);

if ((len % SECTOR_SIZE) == 0)
return 0;

printk(KERN_ERR PFX "%s: %s: Bad transfer size %d\n", drive->name,
__func__, len);

if (drive->atapi_flags & IDE_AFLAG_LIMIT_NFRAMES)
printk(KERN_ERR PFX "This drive is not supported by this "
"version of the driver\n");
else {
printk(KERN_ERR PFX "Trying to limit transfer sizes\n");
drive->atapi_flags |= IDE_AFLAG_LIMIT_NFRAMES;
}

return 1;
}

static ide_startstop_t ide_cd_prepare_rw_request(ide_drive_t *drive,
struct request *rq)
{
Expand Down Expand Up @@ -752,13 +727,7 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
if (rc)
goto out_end;

if (blk_fs_request(rq)) {
if (write == 0) {
if (ide_cd_check_transfer_size(drive, len))
goto out_end;
}
cmd->last_xfer_len = 0;
}
cmd->last_xfer_len = 0;

if (ireason == 0) {
write = 1;
Expand Down Expand Up @@ -1619,9 +1588,6 @@ static const struct ide_proc_devset *ide_cd_proc_devsets(ide_drive_t *drive)
#endif

static const struct cd_list_entry ide_cd_quirks_list[] = {
/* Limit transfer size per interrupt. */
{ "SAMSUNG CD-ROM SCR-2430", NULL, IDE_AFLAG_LIMIT_NFRAMES },
{ "SAMSUNG CD-ROM SCR-2432", NULL, IDE_AFLAG_LIMIT_NFRAMES },
/* SCR-3231 doesn't support the SET_CD_SPEED command. */
{ "SAMSUNG CD-ROM SCR-3231", NULL, IDE_AFLAG_NO_SPEED_SELECT },
/* Old NEC260 (not R) was released before ATAPI 1.2 spec. */
Expand Down
5 changes: 0 additions & 5 deletions trunk/include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -458,11 +458,6 @@ enum {
IDE_AFLAG_TOCADDR_AS_BCD = (1 << 3),
/* TOC track numbers are in BCD. */
IDE_AFLAG_TOCTRACKS_AS_BCD = (1 << 4),
/*
* Drive does not provide data in multiples of SECTOR_SIZE
* when more than one interrupt is needed.
*/
IDE_AFLAG_LIMIT_NFRAMES = (1 << 5),
/* Saved TOC information is current. */
IDE_AFLAG_TOC_VALID = (1 << 6),
/* We think that the drive door is locked. */
Expand Down

0 comments on commit dca1c1e

Please sign in to comment.