Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110550
b: refs/heads/master
c: 8bff7c6
h: refs/heads/master
v: v3
  • Loading branch information
Jens Axboe committed Oct 9, 2008
1 parent 5747405 commit b9c8e2d
Show file tree
Hide file tree
Showing 3 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: a68bbddba486020c9c74825ce90c4c1ec463e0e8
refs/heads/master: 8bff7c6b0f63c7ee9c5e3a076338d74125b8debb
4 changes: 4 additions & 0 deletions trunk/drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,10 @@ static int ata_scsi_dev_config(struct scsi_device *sdev,

blk_queue_dma_drain(q, atapi_drain_needed, buf, ATAPI_MAX_DRAIN);
} else {
if (ata_id_is_ssd(dev->id))
queue_flag_set_unlocked(QUEUE_FLAG_NONROT,
sdev->request_queue);

/* ATA devices must be sector aligned */
blk_queue_update_dma_alignment(sdev->request_queue,
ATA_SECT_SIZE - 1);
Expand Down
6 changes: 6 additions & 0 deletions trunk/include/linux/ata.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ enum {
ATA_ID_DLF = 128,
ATA_ID_CSFO = 129,
ATA_ID_CFA_POWER = 160,
ATA_ID_ROT_SPEED = 217,
ATA_ID_PIO4 = (1 << 1),

ATA_ID_SERNO_LEN = 20,
Expand Down Expand Up @@ -691,6 +692,11 @@ static inline int ata_id_is_cfa(const u16 *id)
return 0;
}

static inline int ata_id_is_ssd(const u16 *id)
{
return id[ATA_ID_ROT_SPEED] == 0x01;
}

static inline int ata_drive_40wire(const u16 *dev_id)
{
if (ata_id_is_sata(dev_id))
Expand Down

0 comments on commit b9c8e2d

Please sign in to comment.