Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251140
b: refs/heads/master
c: 900e599
h: refs/heads/master
v: v3
  • Loading branch information
shaohua.li@intel.com authored and Jens Axboe committed May 6, 2011
1 parent ae40f0c commit 609e6f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 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: 3ac0cc4508709d42ec9aa351086c7d38bfc0660c
refs/heads/master: 900e599eb0c16390ff671652a44e0ea90532220e
13 changes: 7 additions & 6 deletions trunk/drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1089,21 +1089,21 @@ static int atapi_drain_needed(struct request *rq)
static int ata_scsi_dev_config(struct scsi_device *sdev,
struct ata_device *dev)
{
struct request_queue *q = sdev->request_queue;

if (!ata_id_has_unload(dev->id))
dev->flags |= ATA_DFLAG_NO_UNLOAD;

/* configure max sectors */
blk_queue_max_hw_sectors(sdev->request_queue, dev->max_sectors);
blk_queue_max_hw_sectors(q, dev->max_sectors);

if (dev->class == ATA_DEV_ATAPI) {
struct request_queue *q = sdev->request_queue;
void *buf;

sdev->sector_size = ATA_SECT_SIZE;

/* set DMA padding */
blk_queue_update_dma_pad(sdev->request_queue,
ATA_DMA_PAD_SZ - 1);
blk_queue_update_dma_pad(q, ATA_DMA_PAD_SZ - 1);

/* configure draining */
buf = kmalloc(ATAPI_MAX_DRAIN, q->bounce_gfp | GFP_KERNEL);
Expand Down Expand Up @@ -1131,8 +1131,7 @@ static int ata_scsi_dev_config(struct scsi_device *sdev,
"sector_size=%u > PAGE_SIZE, PIO may malfunction\n",
sdev->sector_size);

blk_queue_update_dma_alignment(sdev->request_queue,
sdev->sector_size - 1);
blk_queue_update_dma_alignment(q, sdev->sector_size - 1);

if (dev->flags & ATA_DFLAG_AN)
set_bit(SDEV_EVT_MEDIA_CHANGE, sdev->supported_events);
Expand All @@ -1145,6 +1144,8 @@ static int ata_scsi_dev_config(struct scsi_device *sdev,
scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, depth);
}

blk_queue_flush_queueable(q, false);

dev->sdev = sdev;
return 0;
}
Expand Down

0 comments on commit 609e6f5

Please sign in to comment.