git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libata-sff: ap->[last_]ctl are SFF specific
[safe/jmp/linux-2.6]
/
drivers
/
ide
/
ide-disk.c
diff --git
a/drivers/ide/ide-disk.c
b/drivers/ide/ide-disk.c
index
3d92c9d
..
3b128dc
100644
(file)
--- a/
drivers/ide/ide-disk.c
+++ b/
drivers/ide/ide-disk.c
@@
-82,7
+82,7
@@
static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
sector_t block)
{
ide_hwif_t *hwif = drive->hwif;
sector_t block)
{
ide_hwif_t *hwif = drive->hwif;
- u16 nsectors = (u16)
rq->nr_sectors
;
+ u16 nsectors = (u16)
blk_rq_sectors(rq)
;
u8 lba48 = !!(drive->dev_flags & IDE_DFLAG_LBA48);
u8 dma = !!(drive->dev_flags & IDE_DFLAG_USING_DMA);
struct ide_cmd cmd;
u8 lba48 = !!(drive->dev_flags & IDE_DFLAG_LBA48);
u8 dma = !!(drive->dev_flags & IDE_DFLAG_USING_DMA);
struct ide_cmd cmd;
@@
-90,7
+90,7
@@
static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
ide_startstop_t rc;
if ((hwif->host_flags & IDE_HFLAG_NO_LBA48_DMA) && lba48 && dma) {
ide_startstop_t rc;
if ((hwif->host_flags & IDE_HFLAG_NO_LBA48_DMA) && lba48 && dma) {
- if (block +
rq->nr_sectors
> 1ULL << 28)
+ if (block +
blk_rq_sectors(rq)
> 1ULL << 28)
dma = 0;
else
lba48 = 0;
dma = 0;
else
lba48 = 0;
@@
-184,20
+184,13
@@
static ide_startstop_t ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
ide_hwif_t *hwif = drive->hwif;
BUG_ON(drive->dev_flags & IDE_DFLAG_BLOCKED);
ide_hwif_t *hwif = drive->hwif;
BUG_ON(drive->dev_flags & IDE_DFLAG_BLOCKED);
-
- if (!blk_fs_request(rq)) {
- blk_dump_rq_flags(rq, "ide_do_rw_disk - bad command");
- if (rq->errors == 0)
- rq->errors = -EIO;
- ide_complete_rq(drive, -EIO, ide_rq_bytes(rq));
- return ide_stopped;
- }
+ BUG_ON(!blk_fs_request(rq));
ledtrig_ide_activity();
ledtrig_ide_activity();
- pr_debug("%s: %sing: block=%llu, sectors=%
l
u, buffer=0x%08lx\n",
+ pr_debug("%s: %sing: block=%llu, sectors=%u, buffer=0x%08lx\n",
drive->name, rq_data_dir(rq) == READ ? "read" : "writ",
drive->name, rq_data_dir(rq) == READ ? "read" : "writ",
- (unsigned long long)block,
rq->nr_sectors
,
+ (unsigned long long)block,
blk_rq_sectors(rq)
,
(unsigned long)rq->buffer);
if (hwif->rw_disk)
(unsigned long)rq->buffer);
if (hwif->rw_disk)
@@
-461,8
+454,8
@@
static void idedisk_prepare_flush(struct request_queue *q, struct request *rq)
cmd->protocol = ATA_PROT_NODATA;
rq->cmd_type = REQ_TYPE_ATA_TASKFILE;
cmd->protocol = ATA_PROT_NODATA;
rq->cmd_type = REQ_TYPE_ATA_TASKFILE;
- rq->cmd_flags |= REQ_SOFTBARRIER;
rq->special = cmd;
rq->special = cmd;
+ cmd->rq = rq;
}
ide_devset_get(multcount, mult_count);
}
ide_devset_get(multcount, mult_count);
@@
-479,14
+472,14
@@
static int set_multcount(ide_drive_t *drive, int arg)
if (arg < 0 || arg > (drive->id[ATA_ID_MAX_MULTSECT] & 0xff))
return -EINVAL;
if (arg < 0 || arg > (drive->id[ATA_ID_MAX_MULTSECT] & 0xff))
return -EINVAL;
- if (drive->special
.b.set_multmode
)
+ if (drive->special
_flags & IDE_SFLAG_SET_MULTMODE
)
return -EBUSY;
rq = blk_get_request(drive->queue, READ, __GFP_WAIT);
rq->cmd_type = REQ_TYPE_ATA_TASKFILE;
drive->mult_req = arg;
return -EBUSY;
rq = blk_get_request(drive->queue, READ, __GFP_WAIT);
rq->cmd_type = REQ_TYPE_ATA_TASKFILE;
drive->mult_req = arg;
- drive->special
.b.set_multmode = 1
;
+ drive->special
_flags |= IDE_SFLAG_SET_MULTMODE
;
error = blk_execute_rq(drive->queue, NULL, rq, 0);
blk_put_request(rq);
error = blk_execute_rq(drive->queue, NULL, rq, 0);
blk_put_request(rq);
@@
-686,11
+679,11
@@
static void ide_disk_setup(ide_drive_t *drive)
if (max_s > hwif->rqsize)
max_s = hwif->rqsize;
if (max_s > hwif->rqsize)
max_s = hwif->rqsize;
- blk_queue_max_sectors(q, max_s);
+ blk_queue_max_
hw_
sectors(q, max_s);
}
printk(KERN_INFO "%s: max request size: %dKiB\n", drive->name,
}
printk(KERN_INFO "%s: max request size: %dKiB\n", drive->name,
-
q->max_sectors
/ 2);
+
queue_max_sectors(q)
/ 2);
if (ata_id_is_ssd(id))
queue_flag_set_unlocked(QUEUE_FLAG_NONROT, q);
if (ata_id_is_ssd(id))
queue_flag_set_unlocked(QUEUE_FLAG_NONROT, q);