]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge upstream kernel changes into 'C/H/S support' branch of libata.
authorJeff Garzik <jgarzik@pretzel.yyz.us>
Wed, 22 Jun 2005 17:07:28 +0000 (13:07 -0400)
committerJeff Garzik <jgarzik@pobox.com>
Wed, 22 Jun 2005 17:07:28 +0000 (13:07 -0400)
1  2 
drivers/scsi/libata-core.c
drivers/scsi/libata-scsi.c
include/linux/ata.h
include/linux/libata.h

index 96355b05fe5c7e980df16820e59520783cb0fcf0,36b401fee1f184d0ba6edcebd48a21e463bab89f..141de479caca949e4069bb765f741c1fbf71cbc6
@@@ -1984,59 -2127,14 +2165,62 @@@ static void ata_dev_set_xfermode(struc
        DPRINTK("EXIT\n");
  }
  
 +/**
 + *    ata_dev_init_params - Issue INIT DEV PARAMS command
 + *    @ap: Port associated with device @dev
 + *    @dev: Device to which command will be sent
 + *
 + *    LOCKING:
 + */
 +
 +static void ata_dev_init_params(struct ata_port *ap, struct ata_device *dev)
 +{
 +      DECLARE_COMPLETION(wait);
 +      struct ata_queued_cmd *qc;
 +      int rc;
 +      unsigned long flags;
 +      u16 sectors = dev->id[6];
 +      u16 heads   = dev->id[3];
 +
 +      /* Number of sectors per track 1-255. Number of heads 1-16 */
 +      if (sectors < 1 || sectors > 255 || heads < 1 || heads > 16)
 +              return;
 +
 +      /* set up init dev params taskfile */
 +      DPRINTK("init dev params \n");
 +
 +      qc = ata_qc_new_init(ap, dev);
 +      BUG_ON(qc == NULL);
 +
 +      qc->tf.command = ATA_CMD_INIT_DEV_PARAMS;
 +      qc->tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
 +      qc->tf.protocol = ATA_PROT_NODATA;
 +      qc->tf.nsect = sectors;
 +      qc->tf.device |= (heads - 1) & 0x0f; /* max head = num. of heads - 1 */
 +
 +      qc->waiting = &wait;
 +      qc->complete_fn = ata_qc_complete_noop;
 +
 +      spin_lock_irqsave(&ap->host_set->lock, flags);
 +      rc = ata_qc_issue(qc);
 +      spin_unlock_irqrestore(&ap->host_set->lock, flags);
 +
 +      if (rc)
 +              ata_port_disable(ap);
 +      else
 +              wait_for_completion(&wait);
 +
 +      DPRINTK("EXIT\n");
 +}
 +
  /**
-  *    ata_sg_clean -
-  *    @qc:
+  *    ata_sg_clean - Unmap DMA memory associated with command
+  *    @qc: Command containing DMA memory to be released
+  *
+  *    Unmap all mapped DMA memory associated with this command.
   *
   *    LOCKING:
+  *    spin_lock_irqsave(host_set lock)
   */
  
  static void ata_sg_clean(struct ata_queued_cmd *qc)
Simple merge
Simple merge
Simple merge