From e9c05afa80ba9368ec5f78d493b17a8f836ef508 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Mon, 14 Nov 2005 00:24:18 +0900 Subject: [PATCH] sil24: add missing ata_pad_free() sil24_port_stop() is missing call to ata_pad_free() thus leaking pad buffer when a port is stopped. This patch adds it. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/scsi/sata_sil24.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c index d3198d9a72c..55e744d6db8 100644 --- a/drivers/scsi/sata_sil24.c +++ b/drivers/scsi/sata_sil24.c @@ -687,6 +687,7 @@ static void sil24_port_stop(struct ata_port *ap) struct sil24_port_priv *pp = ap->private_data; sil24_cblk_free(pp, dev); + ata_pad_free(ap, dev); kfree(pp); } -- cgit v1.2.3 From e12a1be6e8fa47ae6cdc4127a1b4640e19c288eb Mon Sep 17 00:00:00 2001 From: Mark Lord Date: Sat, 12 Nov 2005 18:55:45 -0500 Subject: [PATCH] libata: fix comments on ata_tf_from_fis() Fix description on comments for ata_tf_from_fis(). Signed-off-by: Mark Lord Signed-off-by: Jeff Garzik --- drivers/scsi/libata-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index e51d9a8a279..d81db3a3d4b 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -532,8 +532,7 @@ void ata_tf_to_fis(const struct ata_taskfile *tf, u8 *fis, u8 pmp) * @fis: Buffer from which data will be input * @tf: Taskfile to output * - * Converts a standard ATA taskfile to a Serial ATA - * FIS structure (Register - Host to Device). + * Converts a serial ATA FIS structure to a standard ATA taskfile. * * LOCKING: * Inherited from caller. -- cgit v1.2.3 From dcc2d1e7f0acf7d3f7ae632a73cd5f828ef9de20 Mon Sep 17 00:00:00 2001 From: Mark Lord Date: Sun, 13 Nov 2005 16:22:06 -0500 Subject: [libata passthru] address slave devices correctly --- drivers/scsi/libata-scsi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 261be24e1df..0df4b682965 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c @@ -2276,6 +2276,12 @@ ata_scsi_pass_thru(struct ata_queued_cmd *qc, const u8 *scsicmd) tf->device = scsicmd[8]; tf->command = scsicmd[9]; } + /* + * If slave is possible, enforce correct master/slave bit + */ + if (qc->ap->flags & ATA_FLAG_SLAVE_POSS) + tf->device = qc->dev->devno ? + tf->device | ATA_DEV1 : tf->device & ~ATA_DEV1; /* * Filter SET_FEATURES - XFER MODE command -- otherwise, -- cgit v1.2.3