linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4/15] ide: use drive->select.all for REQ_TYPE_ATA_TASK in execute_drive_cmd()
@ 2007-10-27 17:46 Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; only message in thread
From: Bartlomiej Zolnierkiewicz @ 2007-10-27 17:46 UTC (permalink / raw)
  To: linux-ide


Use drive->select.all for REQ_TYPE_ATA_TASK requests in execute_drive_cmd()
(the obsolete bits 7 and 5 of the Device register need to be set).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide-io.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Index: b/drivers/ide/ide-io.c
===================================================================
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -899,7 +899,6 @@ static ide_startstop_t execute_drive_cmd
 		return do_rw_taskfile(drive, args);
 	} else if (rq->cmd_type == REQ_TYPE_ATA_TASK) {
 		u8 *args = rq->buffer;
-		u8 sel;
  
 		if (!args)
 			goto done;
@@ -917,10 +916,7 @@ static ide_startstop_t execute_drive_cmd
  		hwif->OUTB(args[3], IDE_SECTOR_REG);
  		hwif->OUTB(args[4], IDE_LCYL_REG);
  		hwif->OUTB(args[5], IDE_HCYL_REG);
- 		sel = (args[6] & ~0x10);
- 		if (drive->select.b.unit)
- 			sel |= 0x10;
- 		hwif->OUTB(sel, IDE_SELECT_REG);
+ 		hwif->OUTB((args[6] & 0xEF)|drive->select.all, IDE_SELECT_REG);
  		ide_cmd(drive, args[0], args[2], &drive_cmd_intr);
  		return ide_started;
  	} else if (rq->cmd_type == REQ_TYPE_ATA_CMD) {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-10-27 17:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-27 17:46 [PATCH 4/15] ide: use drive->select.all for REQ_TYPE_ATA_TASK in execute_drive_cmd() Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).