Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146329
b: refs/heads/master
c: 1873b90
h: refs/heads/master
i:
  146327: 2735314
v: v3
  • Loading branch information
Tejun Heo committed Apr 18, 2009
1 parent 952b5dd commit 0be26c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 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: 46a802e852c2106d755f697819ea80cd3ffdc222
refs/heads/master: 1873b90cdea038715ec7140fccc2116fb930ffb5
12 changes: 4 additions & 8 deletions trunk/drivers/ide/ide-cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ static void cdrom_queue_request_sense(ide_drive_t *drive, void *sense,
if (sense == NULL)
sense = &info->sense_data;

memset(sense, 0, 18);

/* stuff the sense request in front of our current request */
blk_rq_init(NULL, rq);
rq->cmd_type = REQ_TYPE_ATA_PC;
Expand Down Expand Up @@ -504,14 +506,8 @@ static void ide_cd_request_sense_fixup(ide_drive_t *drive, struct ide_cmd *cmd)
* and some drives don't send them. Sigh.
*/
if (rq->cmd[0] == GPCMD_REQUEST_SENSE &&
cmd->nleft > 0 && cmd->nleft <= 5) {
unsigned int ofs = cmd->nbytes - cmd->nleft;

while (cmd->nleft > 0) {
*((u8 *)rq->data + ofs++) = 0;
cmd->nleft--;
}
}
cmd->nleft > 0 && cmd->nleft <= 5)
cmd->nleft = 0;
}

int ide_cd_queue_pc(ide_drive_t *drive, const unsigned char *cmd,
Expand Down

0 comments on commit 0be26c2

Please sign in to comment.