All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: jgarzik@pobox.com, albertcc@tw.ibm.com, linux-ide@vger.kernel.org
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 1/4] libata: make ata_dev_knobble() per-device
Date: Sun, 12 Feb 2006 23:32:58 +0900	[thread overview]
Message-ID: <11397547784183-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <11397547782407-git-send-email-htejun@gmail.com>

ata_dev_knobble() unconditionally used the first device of the port to
determine whether a device is bridged or not.  This causes bridge
limit to be incorrectly applied or unapplied for hosts with slave
devices (e.g. ata_piix).

Signed-off-by: Tejun Heo <htejun@gmail.com>

---

 drivers/scsi/libata-core.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

f6a90d153c45a62fb4fdd3a3c575e8163182d675
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 7a88e91..01d0ca8 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -1121,9 +1121,10 @@ err_out:
 }
 
 
-static inline u8 ata_dev_knobble(const struct ata_port *ap)
+static inline u8 ata_dev_knobble(const struct ata_port *ap,
+				 struct ata_device *dev)
 {
-	return ((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(ap->device->id)));
+	return ((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(dev->id)));
 }
 
 /**
@@ -1137,9 +1138,9 @@ static inline u8 ata_dev_knobble(const s
 void ata_dev_config(struct ata_port *ap, unsigned int i)
 {
 	/* limit bridge transfers to udma5, 200 sectors */
-	if (ata_dev_knobble(ap)) {
+	if (ata_dev_knobble(ap, &ap->device[i])) {
 		printk(KERN_INFO "ata%u(%u): applying bridge limits\n",
-			ap->id, ap->device->devno);
+		       ap->id, i);
 		ap->udma_mask &= ATA_UDMA5;
 		ap->host->max_sectors = ATA_MAX_SECTORS;
 		ap->host->hostt->max_sectors = ATA_MAX_SECTORS;
-- 
1.1.5



  parent reply	other threads:[~2006-02-12 14:33 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-12 14:32 [PATCHSET] libata: make some configurations per-dev Tejun Heo
2006-02-12 14:32 ` [PATCH 2/4] libata: move cdb_len for host to device Tejun Heo
2006-02-12 14:32 ` Tejun Heo [this message]
2006-02-12 19:29   ` [PATCH 1/4] libata: make ata_dev_knobble() per-device Jeff Garzik
2006-02-12 14:32 ` [PATCH 3/4] libata: add per-device max_sectors Tejun Heo
2006-02-12 19:37   ` Jeff Garzik
2006-02-13  0:47     ` Tejun Heo
2006-02-13  4:58       ` Jeff Garzik
2006-02-15  7:24         ` [PATCH] libata: increase LBA48 max sectors to 65535 Tejun Heo
2006-02-15 13:07           ` Jens Axboe
2006-02-15 15:04             ` Tejun Heo
2006-02-15 15:12               ` Jens Axboe
2006-02-15 15:30                 ` Tejun Heo
2006-02-15 19:03                 ` Mark Lord
2006-02-15 20:21                 ` Jeff Garzik
2006-02-15 23:05                   ` Mark Lord
2006-02-20 11:23                     ` Jeff Garzik
2006-02-20 13:54                       ` Mark Lord
2006-02-20 13:58                         ` Jens Axboe
2006-02-16  7:42                   ` Jens Axboe
2006-02-20 11:25                     ` Jeff Garzik
2006-02-20 11:44                       ` Jens Axboe
2006-02-20 21:59           ` Jeff Garzik
2006-02-12 14:32 ` [PATCH 4/4] libata: kill sht->max_sectors Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11397547784183-git-send-email-htejun@gmail.com \
    --to=htejun@gmail.com \
    --cc=albertcc@tw.ibm.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.