Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57555
b: refs/heads/master
c: 1dce589
h: refs/heads/master
i:
  57553: dd745ec
  57551: fa10e61
v: v3
  • Loading branch information
Albert Lee authored and Jeff Garzik committed Jun 10, 2007
1 parent 3661d01 commit c83f2f2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 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: f93f1078d08e0f63a6a4bdaa154de3642fc03d5d
refs/heads/master: 1dce589c38c36ae69614840ee230183f3a7d43c5
20 changes: 16 additions & 4 deletions trunk/drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2551,10 +2551,6 @@ static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc)
if (tf->protocol == ATA_PROT_DMA && dev->dma_mode == 0)
goto invalid_fld;

if (cdb[1] & 0xe0)
/* PIO multi not supported yet */
goto invalid_fld;

/*
* 12 and 16 byte CDBs use different offsets to
* provide the various register values.
Expand Down Expand Up @@ -2606,6 +2602,22 @@ static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc)
tf->device = qc->dev->devno ?
tf->device | ATA_DEV1 : tf->device & ~ATA_DEV1;

/* sanity check for pio multi commands */
if ((cdb[1] & 0xe0) && !is_multi_taskfile(tf))
goto invalid_fld;

if (is_multi_taskfile(tf)) {
unsigned int multi_count = 1 << (cdb[1] >> 5);

/* compare the passed through multi_count
* with the cached multi_count of libata
*/
if (multi_count != dev->multi_count)
ata_dev_printk(dev, KERN_WARNING,
"invalid multi_count %u ignored\n",
multi_count);
}

/* READ/WRITE LONG use a non-standard sect_size */
qc->sect_size = ATA_SECT_SIZE;
switch (tf->command) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/ata.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ enum ata_tf_protocols {
/* ATA taskfile protocols */
ATA_PROT_UNKNOWN, /* unknown/invalid */
ATA_PROT_NODATA, /* no data */
ATA_PROT_PIO, /* PIO single sector */
ATA_PROT_PIO, /* PIO data xfer */
ATA_PROT_DMA, /* DMA */
ATA_PROT_NCQ, /* NCQ */
ATA_PROT_ATAPI, /* packet command, PIO data xfer*/
Expand Down

0 comments on commit c83f2f2

Please sign in to comment.