diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 13:09:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 13:09:16 -0400 |
commit | 92d15c2ccbb3e31a3fc71ad28fdb55e1319383c0 (patch) | |
tree | 8d83c0dc3c6b935d8367e331872f242b742f0a8a /drivers/ide/ide-io.c | |
parent | f20bf6125605acbbc7eb8c9420d7221c91aa83eb (diff) | |
parent | 644bd2f048972d75eb1979b1fdca257d528ce687 (diff) |
Merge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block: (63 commits)
Fix memory leak in dm-crypt
SPARC64: sg chaining support
SPARC: sg chaining support
PPC: sg chaining support
PS3: sg chaining support
IA64: sg chaining support
x86-64: enable sg chaining
x86-64: update pci-gart iommu to sg helpers
x86-64: update nommu to sg helpers
x86-64: update calgary iommu to sg helpers
swiotlb: sg chaining support
i386: enable sg chaining
i386 dma_map_sg: convert to using sg helpers
mmc: need to zero sglist on init
Panic in blk_rq_map_sg() from CCISS driver
remove sglist_len
remove blk_queue_max_phys_segments in libata
revert sg segment size ifdefs
Fixup u14-34f ENABLE_SG_CHAINING
qla1280: enable use_sg_chaining option
...
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r-- | drivers/ide/ide-io.c | 38 |
1 files changed, 2 insertions, 36 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 4cece930114c..04273d3c147c 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -322,41 +322,6 @@ static void ide_complete_pm_request (ide_drive_t *drive, struct request *rq) | |||
322 | spin_unlock_irqrestore(&ide_lock, flags); | 322 | spin_unlock_irqrestore(&ide_lock, flags); |
323 | } | 323 | } |
324 | 324 | ||
325 | /* | ||
326 | * FIXME: probably move this somewhere else, name is bad too :) | ||
327 | */ | ||
328 | u64 ide_get_error_location(ide_drive_t *drive, char *args) | ||
329 | { | ||
330 | u32 high, low; | ||
331 | u8 hcyl, lcyl, sect; | ||
332 | u64 sector; | ||
333 | |||
334 | high = 0; | ||
335 | hcyl = args[5]; | ||
336 | lcyl = args[4]; | ||
337 | sect = args[3]; | ||
338 | |||
339 | if (ide_id_has_flush_cache_ext(drive->id)) { | ||
340 | low = (hcyl << 16) | (lcyl << 8) | sect; | ||
341 | HWIF(drive)->OUTB(drive->ctl|0x80, IDE_CONTROL_REG); | ||
342 | high = ide_read_24(drive); | ||
343 | } else { | ||
344 | u8 cur = HWIF(drive)->INB(IDE_SELECT_REG); | ||
345 | if (cur & 0x40) { | ||
346 | high = cur & 0xf; | ||
347 | low = (hcyl << 16) | (lcyl << 8) | sect; | ||
348 | } else { | ||
349 | low = hcyl * drive->head * drive->sect; | ||
350 | low += lcyl * drive->sect; | ||
351 | low += sect - 1; | ||
352 | } | ||
353 | } | ||
354 | |||
355 | sector = ((u64) high << 24) | low; | ||
356 | return sector; | ||
357 | } | ||
358 | EXPORT_SYMBOL(ide_get_error_location); | ||
359 | |||
360 | /** | 325 | /** |
361 | * ide_end_drive_cmd - end an explicit drive command | 326 | * ide_end_drive_cmd - end an explicit drive command |
362 | * @drive: command | 327 | * @drive: command |
@@ -881,7 +846,8 @@ void ide_init_sg_cmd(ide_drive_t *drive, struct request *rq) | |||
881 | ide_hwif_t *hwif = drive->hwif; | 846 | ide_hwif_t *hwif = drive->hwif; |
882 | 847 | ||
883 | hwif->nsect = hwif->nleft = rq->nr_sectors; | 848 | hwif->nsect = hwif->nleft = rq->nr_sectors; |
884 | hwif->cursg = hwif->cursg_ofs = 0; | 849 | hwif->cursg_ofs = 0; |
850 | hwif->cursg = NULL; | ||
885 | } | 851 | } |
886 | 852 | ||
887 | EXPORT_SYMBOL_GPL(ide_init_sg_cmd); | 853 | EXPORT_SYMBOL_GPL(ide_init_sg_cmd); |