linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH] ata_piix: fix MAP VALUE interpretation for for ICH6/7
Date: Wed, 1 Feb 2006 14:13:11 +0900	[thread overview]
Message-ID: <20060201051311.GA28302@htj.dyndns.org> (raw)
In-Reply-To: <43D98C23.4040004@pobox.com>

On Thu, Jan 26, 2006 at 09:57:39PM -0500, Jeff Garzik wrote:
> Tejun Heo wrote:
> >Unlike their older siblings, ICH6 and 7 use different scheme for MAP
> >VALUE.  This patch makes ata_piix interpret MV properly on ICH6/7.
> >
> >Pre-ICH6/7
> >
> > The value of these bits indicate the address range the SATA port
> > responds to, and whether or not the SATA and IDE functions are
> > combined.
> >
> > 000 = Non-combined. P0 is primary master. P1 is secondary master.
> > 001 = Non-combined. P0 is secondary master. P1 is primary master.
> > 100 = Combined. P0 is primary master. P1 is primary slave. P-ATA is
> >       2:0 Map Value secondary.
> > 101 = Combined. P0 is primary slave. P1 is primary master. P-ATA is
> >       secondary.
> > 110 = Combined. P-ATA is primary. P0 is secondary master. P1 is
> >       secondary slave.
> > 111 = Combined. P-ATA is primary. P0 is secondary slave. P1 is
> >       secondary master.
> >
> >ICH6/7
> >
> > Map Value - R/W. Map Value (MV): The value in the bits below indicate
> >the address range the SATA ports responds to, and whether or not the
> >PATA and SATA functions are combined. When in combined mode, the AHCI
> >memory space is not available and AHCI may not be used.
> >
> > 00 = Non-combined. P0 is primary master, P2 is the primary slave. P1
> >      is secondary master, P3 is the 1:0 secondary slave (desktop
> >      only). P0 is primary master, P2 is the primary slave (mobile
> >      only).
> > 01 = Combined. IDE is primary. P1 is secondary master, P3 is the
> >      secondary slave. (desktop only)
> > 10 = Combined. P0 is primary master. P2 is primary slave. IDE is secondary
> > 11 = Reserved
> >
> >Signed-off-by: Tejun Heo <htejun@gmail.com>
> 
> applied to upstream-2.6.17.  patch looks OK, but only testing on 
> ICH5+6+7 will really convince me.  Documentation has often been confused 
> before, and the only data I've received from you is "it works for me." 
> So, proceeding with caution :)
> 

Here are some results on my ICH7 (ASUS P5LD2).  This is on vanilla
2.6.15.  I've added printk of PMR in piix_init_one().  You can see
bridge limit is being applied to an IDE drive hooked on the PATA port
due to PMR misinterpretation.  If I put my SATA DVD writer (PX716SA)
which has SATA bridge embedded on the combined SATA port, the opposite
happens.  Bridge limit is not applied when it's needed.

Also note that quirk_intel_ide_combined() in drivers/pci/quirks.c is
already interpreting ICH6/7 MAP value correctly.


Pri PATA + Sec SATA (combined)
==============================

ata_piix: PMR=0x1

ata1: SATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xFFA0 irq 14
ata1: dev 0 cfg 49:2f00 82:7c69 83:4009 84:4000 85:7c69 86:0001 87:4000 88:041f
ata1: dev 0 ATA-5, max UDMA/66, 25410672 sectors: LBA
ata1(0): applying bridge limits
ata1: dev 0 configured for UDMA/66
scsi1 : ata_piix
  Vendor: ATA       Model: Maxtor 91301U3    Rev: FA57
  Type:   Direct-Access                      ANSI SCSI revision: 05
ata2: SATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xFFA8 irq 15
ata2: dev 0 cfg 49:2f00 82:346b 83:7d01 84:4023 85:3469 86:3c01 87:4023 88:207f
ata2: dev 0 ATA-7, max UDMA/133, 312581808 sectors: LBA48
ata2: dev 0 configured for UDMA/133
scsi2 : ata_piix
  Vendor: ATA       Model: ST3160812AS       Rev: 3.AA
  Type:   Direct-Access                      ANSI SCSI revision: 05

# lspci -s 00:1f
0000:00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)
0000:00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family) Serial ATA Storage Controllers cc=IDE (rev 01)
0000:00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01)

# lspci -ns 00:1f
0000:00:1f.0 0601: 8086:27b8 (rev 01)
0000:00:1f.2 0101: 8086:27c0 (rev 01)
0000:00:1f.3 0c05: 8086:27da (rev 01)


SATA only
=========

ata_piix: PMR=0x0

ata1: SATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xFFA0 irq 14
ata1: dev 0 cfg 49:2f00 82:7c6b 83:5b09 84:4043 85:7c69 86:1a01 87:4043 88:207f
ata1: dev 0 ATA-7, max UDMA/133, 160086528 sectors: LBA
ata1: dev 1 cfg 49:2f00 82:746b 83:7f01 84:4023 85:7469 86:3c01 87:4023 88:20ff
ata1: dev 1 ATA-7, max UDMA7, 312581808 sectors: LBA48
ata1: dev 0 configured for UDMA/133
ata1: dev 1 configured for UDMA/133
scsi1 : ata_piix
  Vendor: ATA       Model: Maxtor 6B080M0    Rev: BANC
  Type:   Direct-Access                      ANSI SCSI revision: 05
  Vendor: ATA       Model: SAMSUNG HD160JJ   Rev: ZM10
  Type:   Direct-Access                      ANSI SCSI revision: 05
ata2: SATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xFFA8 irq 15
ata2: dev 0 cfg 49:2f00 82:346b 83:7d01 84:4023 85:3469 86:3c01 87:4023 88:207f
ata2: dev 0 ATA-7, max UDMA/133, 312581808 sectors: LBA48
ata2: dev 0 configured for UDMA/133
scsi2 : ata_piix
  Vendor: ATA       Model: ST3160812AS       Rev: 3.AA
  Type:   Direct-Access                      ANSI SCSI revision: 05

# lspci -s 00:1f
0000:00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)
0000:00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family) Serial ATA Storage Controllers cc=IDE (rev 01)
0000:00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01)

# lspci -ns 00:1f
0000:00:1f.0 0601: 8086:27b8 (rev 01)
0000:00:1f.2 0101: 8086:27c0 (rev 01)
0000:00:1f.3 0c05: 8086:27da (rev 01)


PATA only
=========

# lspci -s 00:1f
0000:00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)
0000:00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)
0000:00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01)

# lspci -ns 00:1f
0000:00:1f.0 0601: 8086:27b8 (rev 01)
0000:00:1f.1 0101: 8086:27df (rev 01)
0000:00:1f.3 0c05: 8086:27da (rev 01)

      parent reply	other threads:[~2006-02-01  5:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-18  8:17 [PATCH] ata_piix: fix MAP VALUE interpretation for for ICH6/7 Tejun Heo
2005-12-19  5:38 ` Jeff Garzik
2005-12-19  5:42   ` Tejun Heo
2006-01-23 12:25   ` Tejun Heo
2006-01-27  2:57 ` Jeff Garzik
2006-01-27  7:35   ` Tejun
2006-02-01  5:13   ` Tejun Heo [this message]

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=20060201051311.GA28302@htj.dyndns.org \
    --to=htejun@gmail.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 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).