Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86617
b: refs/heads/master
c: b445c56
h: refs/heads/master
i:
  86615: d336ba6
v: v3
  • Loading branch information
Jeff Garzik committed Mar 1, 2008
1 parent ab6933a commit a4239d2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 931506d3b2208362efc678ee863ee42a90755e89
refs/heads/master: b445c56815d84b9fce40707f99811bdc354458e0
10 changes: 10 additions & 0 deletions trunk/drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1694,12 +1694,17 @@ void ata_scsi_rbuf_fill(struct ata_scsi_args *args,
u8 *rbuf;
unsigned int buflen, rc;
struct scsi_cmnd *cmd = args->cmd;
unsigned long flags;

local_irq_save(flags);

buflen = ata_scsi_rbuf_get(cmd, &rbuf);
memset(rbuf, 0, buflen);
rc = actor(args, rbuf, buflen);
ata_scsi_rbuf_put(cmd, rbuf);

local_irq_restore(flags);

if (rc == 0)
cmd->result = SAM_STAT_GOOD;
args->done(cmd);
Expand Down Expand Up @@ -2473,6 +2478,9 @@ static void atapi_qc_complete(struct ata_queued_cmd *qc)
if ((scsicmd[0] == INQUIRY) && ((scsicmd[1] & 0x03) == 0)) {
u8 *buf = NULL;
unsigned int buflen;
unsigned long flags;

local_irq_save(flags);

buflen = ata_scsi_rbuf_get(cmd, &buf);

Expand All @@ -2490,6 +2498,8 @@ static void atapi_qc_complete(struct ata_queued_cmd *qc)
}

ata_scsi_rbuf_put(cmd, buf);

local_irq_restore(flags);
}

cmd->result = SAM_STAT_GOOD;
Expand Down

0 comments on commit a4239d2

Please sign in to comment.