* [PATCH #upstream-fixes 1/3] ahci: add missing nv IDs
@ 2010-03-11 2:37 Tejun Heo
2010-03-11 2:39 ` [PATCH #upstream-fixes 2/3] ahci: clean up board IDs Tejun Heo
2010-03-17 17:47 ` [PATCH #upstream-fixes 1/3] ahci: add missing nv IDs Jeff Garzik
0 siblings, 2 replies; 10+ messages in thread
From: Tejun Heo @ 2010-03-11 2:37 UTC (permalink / raw)
To: Jeff Garzik, linux-ide, pchen, kernel-bugzilla.20.drkshadow
bko#15481 shows that we're missing some NVIDIA ahci PCI IDs. Peer
Chen confirms that IDs 0x580-0x58f are reserved for cases where Linux
ID option is selected in the BIOS and are only used for mcp65-73. Add
0x0581-0x058f.
http://bugzilla.kernel.org/show_bug.cgi?id=15481
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Peer Chen <pchen@nvidia.com>
---
drivers/ata/ahci.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
Index: ata/drivers/ata/ahci.c
===================================================================
--- ata.orig/drivers/ata/ahci.c
+++ ata/drivers/ata/ahci.c
@@ -641,6 +641,21 @@ static const struct pci_device_id ahci_p
{ PCI_VDEVICE(NVIDIA, 0x055a), board_ahci_yesncq }, /* MCP67 */
{ PCI_VDEVICE(NVIDIA, 0x055b), board_ahci_yesncq }, /* MCP67 */
{ PCI_VDEVICE(NVIDIA, 0x0580), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0581), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0582), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0583), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0584), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0585), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0586), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0587), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0588), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0589), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x058a), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x058b), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x058c), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x058d), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x058e), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x058f), board_ahci_yesncq }, /* Linux ID */
{ PCI_VDEVICE(NVIDIA, 0x07f0), board_ahci_yesncq }, /* MCP73 */
{ PCI_VDEVICE(NVIDIA, 0x07f1), board_ahci_yesncq }, /* MCP73 */
{ PCI_VDEVICE(NVIDIA, 0x07f2), board_ahci_yesncq }, /* MCP73 */
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH #upstream-fixes 2/3] ahci: clean up board IDs
2010-03-11 2:37 [PATCH #upstream-fixes 1/3] ahci: add missing nv IDs Tejun Heo
@ 2010-03-11 2:39 ` Tejun Heo
2010-03-11 2:40 ` [PATCH #upstream-fixes 3/3] ahci: implement AHCI_HFLAG_NO_FPDMA_AA and update NV quirks Tejun Heo
2010-03-17 17:44 ` [PATCH #upstream-fixes 2/3] ahci: clean up board IDs Jeff Garzik
2010-03-17 17:47 ` [PATCH #upstream-fixes 1/3] ahci: add missing nv IDs Jeff Garzik
1 sibling, 2 replies; 10+ messages in thread
From: Tejun Heo @ 2010-03-11 2:39 UTC (permalink / raw)
To: Jeff Garzik, linux-ide, pchen, kernel-bugzilla.20.drkshadow
ahci over time has grown a number of board IDs and it's a bit of mess
right now. Clean it up such that,
* board_id_* now live in a separate enum board_ids and numbers are
assigned automatically.
* Board IDs assigned to features are separated from the ones assigned
to specific implementations and both are ordered alphabetically.
* For NV MCPs, define per-generation alias board_ids and assign
matching aliases in the pci id table. This makes mcp_linux, 67-73
use board_ahci_mcp65 instead of board_ahci_yesncq. Both are
identical in content.
* Kill now unused board_ahci_nopmp and board_ahci_yesncq.
This patch doesn't cause any functional change but will make future
changes to board_ids and quirks much less painful.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Peer Chen <pchen@nvidia.com>
---
This might seem a bit too much for #upstream-fixes but it contains no
functional changes and will ease future fixes, so I think including it
in -fixes would be better.
Thanks.
drivers/ata/ahci.c | 239 ++++++++++++++++++++++++++---------------------------
1 file changed, 118 insertions(+), 121 deletions(-)
Index: ata/drivers/ata/ahci.c
===================================================================
--- ata.orig/drivers/ata/ahci.c
+++ ata/drivers/ata/ahci.c
@@ -107,17 +107,6 @@ enum {
RX_FIS_SDB = 0x58, /* offset of SDB FIS data */
RX_FIS_UNK = 0x60, /* offset of Unknown FIS data */
- board_ahci = 0,
- board_ahci_vt8251 = 1,
- board_ahci_ign_iferr = 2,
- board_ahci_sb600 = 3,
- board_ahci_mv = 4,
- board_ahci_sb700 = 5, /* for SB700 and SB800 */
- board_ahci_mcp65 = 6,
- board_ahci_nopmp = 7,
- board_ahci_yesncq = 8,
- board_ahci_nosntf = 9,
-
/* global controller registers */
HOST_CAP = 0x00, /* host capabilities */
HOST_CTL = 0x04, /* global host control */
@@ -270,6 +259,28 @@ enum {
EM_CTL_ALHD = (1 << 26), /* Activity LED */
};
+enum board_ids {
+ /* board IDs by feature in alphabetical order */
+ board_ahci,
+ board_ahci_ign_iferr,
+ board_ahci_nosntf,
+
+ /* board IDs for specific chipsets in alphabetical order */
+ board_ahci_mcp65,
+ board_ahci_mv,
+ board_ahci_sb600,
+ board_ahci_sb700, /* for SB700 and SB800 */
+ board_ahci_vt8251,
+
+ /* aliases */
+ board_ahci_mcp_linux = board_ahci_mcp65,
+ board_ahci_mcp67 = board_ahci_mcp65,
+ board_ahci_mcp73 = board_ahci_mcp65,
+ board_ahci_mcp77 = board_ahci,
+ board_ahci_mcp79 = board_ahci,
+ board_ahci_mcp89 = board_ahci,
+};
+
struct ahci_cmd_hdr {
__le32 opts;
__le32 status;
@@ -462,6 +473,7 @@ static struct ata_port_operations ahci_s
#define AHCI_HFLAGS(flags) .private_data = (void *)(flags)
static const struct ata_port_info ahci_port_info[] = {
+ /* by features */
[board_ahci] =
{
.flags = AHCI_FLAG_COMMON,
@@ -469,31 +481,30 @@ static const struct ata_port_info ahci_p
.udma_mask = ATA_UDMA6,
.port_ops = &ahci_ops,
},
- [board_ahci_vt8251] =
+ [board_ahci_ign_iferr] =
{
- AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ | AHCI_HFLAG_NO_PMP),
+ AHCI_HFLAGS (AHCI_HFLAG_IGN_IRQ_IF_ERR),
.flags = AHCI_FLAG_COMMON,
.pio_mask = ATA_PIO4,
.udma_mask = ATA_UDMA6,
- .port_ops = &ahci_vt8251_ops,
+ .port_ops = &ahci_ops,
},
- [board_ahci_ign_iferr] =
+ [board_ahci_nosntf] =
{
- AHCI_HFLAGS (AHCI_HFLAG_IGN_IRQ_IF_ERR),
+ AHCI_HFLAGS (AHCI_HFLAG_NO_SNTF),
.flags = AHCI_FLAG_COMMON,
.pio_mask = ATA_PIO4,
.udma_mask = ATA_UDMA6,
.port_ops = &ahci_ops,
},
- [board_ahci_sb600] =
+ /* by chipsets */
+ [board_ahci_mcp65] =
{
- AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL |
- AHCI_HFLAG_NO_MSI | AHCI_HFLAG_SECT255 |
- AHCI_HFLAG_32BIT_ONLY),
+ AHCI_HFLAGS (AHCI_HFLAG_YES_NCQ),
.flags = AHCI_FLAG_COMMON,
.pio_mask = ATA_PIO4,
.udma_mask = ATA_UDMA6,
- .port_ops = &ahci_sb600_ops,
+ .port_ops = &ahci_ops,
},
[board_ahci_mv] =
{
@@ -505,45 +516,31 @@ static const struct ata_port_info ahci_p
.udma_mask = ATA_UDMA6,
.port_ops = &ahci_ops,
},
- [board_ahci_sb700] = /* for SB700 and SB800 */
+ [board_ahci_sb600] =
{
- AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL),
+ AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL |
+ AHCI_HFLAG_NO_MSI | AHCI_HFLAG_SECT255 |
+ AHCI_HFLAG_32BIT_ONLY),
.flags = AHCI_FLAG_COMMON,
.pio_mask = ATA_PIO4,
.udma_mask = ATA_UDMA6,
.port_ops = &ahci_sb600_ops,
},
- [board_ahci_mcp65] =
- {
- AHCI_HFLAGS (AHCI_HFLAG_YES_NCQ),
- .flags = AHCI_FLAG_COMMON,
- .pio_mask = ATA_PIO4,
- .udma_mask = ATA_UDMA6,
- .port_ops = &ahci_ops,
- },
- [board_ahci_nopmp] =
- {
- AHCI_HFLAGS (AHCI_HFLAG_NO_PMP),
- .flags = AHCI_FLAG_COMMON,
- .pio_mask = ATA_PIO4,
- .udma_mask = ATA_UDMA6,
- .port_ops = &ahci_ops,
- },
- [board_ahci_yesncq] =
+ [board_ahci_sb700] = /* for SB700 and SB800 */
{
- AHCI_HFLAGS (AHCI_HFLAG_YES_NCQ),
+ AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL),
.flags = AHCI_FLAG_COMMON,
.pio_mask = ATA_PIO4,
.udma_mask = ATA_UDMA6,
- .port_ops = &ahci_ops,
+ .port_ops = &ahci_sb600_ops,
},
- [board_ahci_nosntf] =
+ [board_ahci_vt8251] =
{
- AHCI_HFLAGS (AHCI_HFLAG_NO_SNTF),
+ AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ | AHCI_HFLAG_NO_PMP),
.flags = AHCI_FLAG_COMMON,
.pio_mask = ATA_PIO4,
.udma_mask = ATA_UDMA6,
- .port_ops = &ahci_ops,
+ .port_ops = &ahci_vt8251_ops,
},
};
@@ -628,82 +625,82 @@ static const struct pci_device_id ahci_p
{ PCI_VDEVICE(NVIDIA, 0x045d), board_ahci_mcp65 }, /* MCP65 */
{ PCI_VDEVICE(NVIDIA, 0x045e), board_ahci_mcp65 }, /* MCP65 */
{ PCI_VDEVICE(NVIDIA, 0x045f), board_ahci_mcp65 }, /* MCP65 */
- { PCI_VDEVICE(NVIDIA, 0x0550), board_ahci_yesncq }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x0551), board_ahci_yesncq }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x0552), board_ahci_yesncq }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x0553), board_ahci_yesncq }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x0554), board_ahci_yesncq }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x0555), board_ahci_yesncq }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x0556), board_ahci_yesncq }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x0557), board_ahci_yesncq }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x0558), board_ahci_yesncq }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x0559), board_ahci_yesncq }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x055a), board_ahci_yesncq }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x055b), board_ahci_yesncq }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x0580), board_ahci_yesncq }, /* Linux ID */
- { PCI_VDEVICE(NVIDIA, 0x0581), board_ahci_yesncq }, /* Linux ID */
- { PCI_VDEVICE(NVIDIA, 0x0582), board_ahci_yesncq }, /* Linux ID */
- { PCI_VDEVICE(NVIDIA, 0x0583), board_ahci_yesncq }, /* Linux ID */
- { PCI_VDEVICE(NVIDIA, 0x0584), board_ahci_yesncq }, /* Linux ID */
- { PCI_VDEVICE(NVIDIA, 0x0585), board_ahci_yesncq }, /* Linux ID */
- { PCI_VDEVICE(NVIDIA, 0x0586), board_ahci_yesncq }, /* Linux ID */
- { PCI_VDEVICE(NVIDIA, 0x0587), board_ahci_yesncq }, /* Linux ID */
- { PCI_VDEVICE(NVIDIA, 0x0588), board_ahci_yesncq }, /* Linux ID */
- { PCI_VDEVICE(NVIDIA, 0x0589), board_ahci_yesncq }, /* Linux ID */
- { PCI_VDEVICE(NVIDIA, 0x058a), board_ahci_yesncq }, /* Linux ID */
- { PCI_VDEVICE(NVIDIA, 0x058b), board_ahci_yesncq }, /* Linux ID */
- { PCI_VDEVICE(NVIDIA, 0x058c), board_ahci_yesncq }, /* Linux ID */
- { PCI_VDEVICE(NVIDIA, 0x058d), board_ahci_yesncq }, /* Linux ID */
- { PCI_VDEVICE(NVIDIA, 0x058e), board_ahci_yesncq }, /* Linux ID */
- { PCI_VDEVICE(NVIDIA, 0x058f), board_ahci_yesncq }, /* Linux ID */
- { PCI_VDEVICE(NVIDIA, 0x07f0), board_ahci_yesncq }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x07f1), board_ahci_yesncq }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x07f2), board_ahci_yesncq }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x07f3), board_ahci_yesncq }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x07f4), board_ahci_yesncq }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x07f5), board_ahci_yesncq }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x07f6), board_ahci_yesncq }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x07f7), board_ahci_yesncq }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x07f8), board_ahci_yesncq }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x07f9), board_ahci_yesncq }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x07fa), board_ahci_yesncq }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x07fb), board_ahci_yesncq }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x0ad0), board_ahci }, /* MCP77 */
- { PCI_VDEVICE(NVIDIA, 0x0ad1), board_ahci }, /* MCP77 */
- { PCI_VDEVICE(NVIDIA, 0x0ad2), board_ahci }, /* MCP77 */
- { PCI_VDEVICE(NVIDIA, 0x0ad3), board_ahci }, /* MCP77 */
- { PCI_VDEVICE(NVIDIA, 0x0ad4), board_ahci }, /* MCP77 */
- { PCI_VDEVICE(NVIDIA, 0x0ad5), board_ahci }, /* MCP77 */
- { PCI_VDEVICE(NVIDIA, 0x0ad6), board_ahci }, /* MCP77 */
- { PCI_VDEVICE(NVIDIA, 0x0ad7), board_ahci }, /* MCP77 */
- { PCI_VDEVICE(NVIDIA, 0x0ad8), board_ahci }, /* MCP77 */
- { PCI_VDEVICE(NVIDIA, 0x0ad9), board_ahci }, /* MCP77 */
- { PCI_VDEVICE(NVIDIA, 0x0ada), board_ahci }, /* MCP77 */
- { PCI_VDEVICE(NVIDIA, 0x0adb), board_ahci }, /* MCP77 */
- { PCI_VDEVICE(NVIDIA, 0x0ab4), board_ahci }, /* MCP79 */
- { PCI_VDEVICE(NVIDIA, 0x0ab5), board_ahci }, /* MCP79 */
- { PCI_VDEVICE(NVIDIA, 0x0ab6), board_ahci }, /* MCP79 */
- { PCI_VDEVICE(NVIDIA, 0x0ab7), board_ahci }, /* MCP79 */
- { PCI_VDEVICE(NVIDIA, 0x0ab8), board_ahci }, /* MCP79 */
- { PCI_VDEVICE(NVIDIA, 0x0ab9), board_ahci }, /* MCP79 */
- { PCI_VDEVICE(NVIDIA, 0x0aba), board_ahci }, /* MCP79 */
- { PCI_VDEVICE(NVIDIA, 0x0abb), board_ahci }, /* MCP79 */
- { PCI_VDEVICE(NVIDIA, 0x0abc), board_ahci }, /* MCP79 */
- { PCI_VDEVICE(NVIDIA, 0x0abd), board_ahci }, /* MCP79 */
- { PCI_VDEVICE(NVIDIA, 0x0abe), board_ahci }, /* MCP79 */
- { PCI_VDEVICE(NVIDIA, 0x0abf), board_ahci }, /* MCP79 */
- { PCI_VDEVICE(NVIDIA, 0x0d84), board_ahci }, /* MCP89 */
- { PCI_VDEVICE(NVIDIA, 0x0d85), board_ahci }, /* MCP89 */
- { PCI_VDEVICE(NVIDIA, 0x0d86), board_ahci }, /* MCP89 */
- { PCI_VDEVICE(NVIDIA, 0x0d87), board_ahci }, /* MCP89 */
- { PCI_VDEVICE(NVIDIA, 0x0d88), board_ahci }, /* MCP89 */
- { PCI_VDEVICE(NVIDIA, 0x0d89), board_ahci }, /* MCP89 */
- { PCI_VDEVICE(NVIDIA, 0x0d8a), board_ahci }, /* MCP89 */
- { PCI_VDEVICE(NVIDIA, 0x0d8b), board_ahci }, /* MCP89 */
- { PCI_VDEVICE(NVIDIA, 0x0d8c), board_ahci }, /* MCP89 */
- { PCI_VDEVICE(NVIDIA, 0x0d8d), board_ahci }, /* MCP89 */
- { PCI_VDEVICE(NVIDIA, 0x0d8e), board_ahci }, /* MCP89 */
- { PCI_VDEVICE(NVIDIA, 0x0d8f), board_ahci }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0550), board_ahci_mcp67 }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x0551), board_ahci_mcp67 }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x0552), board_ahci_mcp67 }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x0553), board_ahci_mcp67 }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x0554), board_ahci_mcp67 }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x0555), board_ahci_mcp67 }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x0556), board_ahci_mcp67 }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x0557), board_ahci_mcp67 }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x0558), board_ahci_mcp67 }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x0559), board_ahci_mcp67 }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x055a), board_ahci_mcp67 }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x055b), board_ahci_mcp67 }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x0580), board_ahci_mcp_linux }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0581), board_ahci_mcp_linux }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0582), board_ahci_mcp_linux }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0583), board_ahci_mcp_linux }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0584), board_ahci_mcp_linux }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0585), board_ahci_mcp_linux }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0586), board_ahci_mcp_linux }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0587), board_ahci_mcp_linux }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0588), board_ahci_mcp_linux }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0589), board_ahci_mcp_linux }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x058a), board_ahci_mcp_linux }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x058b), board_ahci_mcp_linux }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x058c), board_ahci_mcp_linux }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x058d), board_ahci_mcp_linux }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x058e), board_ahci_mcp_linux }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x058f), board_ahci_mcp_linux }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x07f0), board_ahci_mcp73 }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x07f1), board_ahci_mcp73 }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x07f2), board_ahci_mcp73 }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x07f3), board_ahci_mcp73 }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x07f4), board_ahci_mcp73 }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x07f5), board_ahci_mcp73 }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x07f6), board_ahci_mcp73 }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x07f7), board_ahci_mcp73 }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x07f8), board_ahci_mcp73 }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x07f9), board_ahci_mcp73 }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x07fa), board_ahci_mcp73 }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x07fb), board_ahci_mcp73 }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x0ad0), board_ahci_mcp77 }, /* MCP77 */
+ { PCI_VDEVICE(NVIDIA, 0x0ad1), board_ahci_mcp77 }, /* MCP77 */
+ { PCI_VDEVICE(NVIDIA, 0x0ad2), board_ahci_mcp77 }, /* MCP77 */
+ { PCI_VDEVICE(NVIDIA, 0x0ad3), board_ahci_mcp77 }, /* MCP77 */
+ { PCI_VDEVICE(NVIDIA, 0x0ad4), board_ahci_mcp77 }, /* MCP77 */
+ { PCI_VDEVICE(NVIDIA, 0x0ad5), board_ahci_mcp77 }, /* MCP77 */
+ { PCI_VDEVICE(NVIDIA, 0x0ad6), board_ahci_mcp77 }, /* MCP77 */
+ { PCI_VDEVICE(NVIDIA, 0x0ad7), board_ahci_mcp77 }, /* MCP77 */
+ { PCI_VDEVICE(NVIDIA, 0x0ad8), board_ahci_mcp77 }, /* MCP77 */
+ { PCI_VDEVICE(NVIDIA, 0x0ad9), board_ahci_mcp77 }, /* MCP77 */
+ { PCI_VDEVICE(NVIDIA, 0x0ada), board_ahci_mcp77 }, /* MCP77 */
+ { PCI_VDEVICE(NVIDIA, 0x0adb), board_ahci_mcp77 }, /* MCP77 */
+ { PCI_VDEVICE(NVIDIA, 0x0ab4), board_ahci_mcp79 }, /* MCP79 */
+ { PCI_VDEVICE(NVIDIA, 0x0ab5), board_ahci_mcp79 }, /* MCP79 */
+ { PCI_VDEVICE(NVIDIA, 0x0ab6), board_ahci_mcp79 }, /* MCP79 */
+ { PCI_VDEVICE(NVIDIA, 0x0ab7), board_ahci_mcp79 }, /* MCP79 */
+ { PCI_VDEVICE(NVIDIA, 0x0ab8), board_ahci_mcp79 }, /* MCP79 */
+ { PCI_VDEVICE(NVIDIA, 0x0ab9), board_ahci_mcp79 }, /* MCP79 */
+ { PCI_VDEVICE(NVIDIA, 0x0aba), board_ahci_mcp79 }, /* MCP79 */
+ { PCI_VDEVICE(NVIDIA, 0x0abb), board_ahci_mcp79 }, /* MCP79 */
+ { PCI_VDEVICE(NVIDIA, 0x0abc), board_ahci_mcp79 }, /* MCP79 */
+ { PCI_VDEVICE(NVIDIA, 0x0abd), board_ahci_mcp79 }, /* MCP79 */
+ { PCI_VDEVICE(NVIDIA, 0x0abe), board_ahci_mcp79 }, /* MCP79 */
+ { PCI_VDEVICE(NVIDIA, 0x0abf), board_ahci_mcp79 }, /* MCP79 */
+ { PCI_VDEVICE(NVIDIA, 0x0d84), board_ahci_mcp89 }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0d85), board_ahci_mcp89 }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0d86), board_ahci_mcp89 }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0d87), board_ahci_mcp89 }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0d88), board_ahci_mcp89 }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0d89), board_ahci_mcp89 }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0d8a), board_ahci_mcp89 }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0d8b), board_ahci_mcp89 }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0d8c), board_ahci_mcp89 }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0d8d), board_ahci_mcp89 }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0d8e), board_ahci_mcp89 }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0d8f), board_ahci_mcp89 }, /* MCP89 */
/* SiS */
{ PCI_VDEVICE(SI, 0x1184), board_ahci }, /* SiS 966 */
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH #upstream-fixes 3/3] ahci: implement AHCI_HFLAG_NO_FPDMA_AA and update NV quirks
2010-03-11 2:39 ` [PATCH #upstream-fixes 2/3] ahci: clean up board IDs Tejun Heo
@ 2010-03-11 2:40 ` Tejun Heo
2010-03-12 0:08 ` Robert Hancock
2010-03-17 17:44 ` [PATCH #upstream-fixes 2/3] ahci: clean up board IDs Jeff Garzik
1 sibling, 1 reply; 10+ messages in thread
From: Tejun Heo @ 2010-03-11 2:40 UTC (permalink / raw)
To: Jeff Garzik, linux-ide, pchen, kernel-bugzilla.20.drkshadow
It turns out different generations of MCPs have differing quirks.
* MCP 65-73 : FPDMA AA broken, lies about PMP support, forgets to report NCQ
* MCP 77-79 : FPDMA AA broken, lies about PMP support
* MCP 89 : FPDMA AA broken
Instead of turngin off FPDMA AA on all NVIDIAs, implement
HFLAG_NO_FPDMA_AA, define additional board IDs and apply necessary
quirks.
This fixes bko#15481 and the list of quirks is verified by Peer Chen.
http://bugzilla.kernel.org/show_bug.cgi?id=15481
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Peer Chen <pchen@nvidia.com>
---
drivers/ata/ahci.c | 39 +++++++++++++++++++++++++++++----------
1 file changed, 29 insertions(+), 10 deletions(-)
Index: ata/drivers/ata/ahci.c
===================================================================
--- ata.orig/drivers/ata/ahci.c
+++ ata/drivers/ata/ahci.c
@@ -239,6 +239,7 @@ enum {
AHCI_HFLAG_SRST_TOUT_IS_OFFLINE = (1 << 11), /* treat SRST timeout as
link offline */
AHCI_HFLAG_NO_SNTF = (1 << 12), /* no sntf */
+ AHCI_HFLAG_NO_FPDMA_AA = (1 << 13), /* no FPDMA AA */
/* ap->flags bits */
@@ -267,6 +268,8 @@ enum board_ids {
/* board IDs for specific chipsets in alphabetical order */
board_ahci_mcp65,
+ board_ahci_mcp77,
+ board_ahci_mcp89,
board_ahci_mv,
board_ahci_sb600,
board_ahci_sb700, /* for SB700 and SB800 */
@@ -276,9 +279,7 @@ enum board_ids {
board_ahci_mcp_linux = board_ahci_mcp65,
board_ahci_mcp67 = board_ahci_mcp65,
board_ahci_mcp73 = board_ahci_mcp65,
- board_ahci_mcp77 = board_ahci,
- board_ahci_mcp79 = board_ahci,
- board_ahci_mcp89 = board_ahci,
+ board_ahci_mcp79 = board_ahci_mcp77,
};
struct ahci_cmd_hdr {
@@ -500,7 +501,24 @@ static const struct ata_port_info ahci_p
/* by chipsets */
[board_ahci_mcp65] =
{
- AHCI_HFLAGS (AHCI_HFLAG_YES_NCQ),
+ AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA | AHCI_HFLAG_NO_PMP |
+ AHCI_HFLAG_YES_NCQ),
+ .flags = AHCI_FLAG_COMMON,
+ .pio_mask = ATA_PIO4,
+ .udma_mask = ATA_UDMA6,
+ .port_ops = &ahci_ops,
+ },
+ [board_ahci_mcp77] =
+ {
+ AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA | AHCI_HFLAG_NO_PMP),
+ .flags = AHCI_FLAG_COMMON,
+ .pio_mask = ATA_PIO4,
+ .udma_mask = ATA_UDMA6,
+ .port_ops = &ahci_ops,
+ },
+ [board_ahci_mcp89] =
+ {
+ AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA),
.flags = AHCI_FLAG_COMMON,
.pio_mask = ATA_PIO4,
.udma_mask = ATA_UDMA6,
@@ -3287,12 +3305,13 @@ static int ahci_init_one(struct pci_dev
/* prepare host */
if (hpriv->cap & HOST_CAP_NCQ) {
pi.flags |= ATA_FLAG_NCQ;
- /* Auto-activate optimization is supposed to be supported on
- all AHCI controllers indicating NCQ support, but it seems
- to be broken at least on some NVIDIA MCP79 chipsets.
- Until we get info on which NVIDIA chipsets don't have this
- issue, if any, disable AA on all NVIDIA AHCIs. */
- if (pdev->vendor != PCI_VENDOR_ID_NVIDIA)
+ /*
+ * Auto-activate optimization is supposed to be
+ * supported on all AHCI controllers indicating NCQ
+ * capability, but it seems to be broken on some
+ * chipsets including NVIDIAs.
+ */
+ if (!(hpriv->flags & AHCI_HFLAG_NO_FPDMA_AA))
pi.flags |= ATA_FLAG_FPDMA_AA;
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH #upstream-fixes 3/3] ahci: implement AHCI_HFLAG_NO_FPDMA_AA and update NV quirks
2010-03-11 2:40 ` [PATCH #upstream-fixes 3/3] ahci: implement AHCI_HFLAG_NO_FPDMA_AA and update NV quirks Tejun Heo
@ 2010-03-12 0:08 ` Robert Hancock
2010-03-12 1:16 ` Tejun Heo
0 siblings, 1 reply; 10+ messages in thread
From: Robert Hancock @ 2010-03-12 0:08 UTC (permalink / raw)
To: Tejun Heo; +Cc: Jeff Garzik, linux-ide, pchen, kernel-bugzilla.20.drkshadow
On 03/10/2010 08:40 PM, Tejun Heo wrote:
> It turns out different generations of MCPs have differing quirks.
>
> * MCP 65-73 : FPDMA AA broken, lies about PMP support, forgets to report NCQ
> * MCP 77-79 : FPDMA AA broken, lies about PMP support
> * MCP 89 : FPDMA AA broken
>
> Instead of turngin off FPDMA AA on all NVIDIAs, implement
> HFLAG_NO_FPDMA_AA, define additional board IDs and apply necessary
> quirks.
>
> This fixes bko#15481 and the list of quirks is verified by Peer Chen.
>
> http://bugzilla.kernel.org/show_bug.cgi?id=15481
>
> Signed-off-by: Tejun Heo<tj@kernel.org>
> Cc: Peer Chen<pchen@nvidia.com>
Is the FPDMA AA problem going to be fixed in whatever follows MCP89?
This change is only safe if it will be, since a new chipset will fall
into the generic case and it'll get turned back on.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH #upstream-fixes 3/3] ahci: implement AHCI_HFLAG_NO_FPDMA_AA and update NV quirks
2010-03-12 0:08 ` Robert Hancock
@ 2010-03-12 1:16 ` Tejun Heo
0 siblings, 0 replies; 10+ messages in thread
From: Tejun Heo @ 2010-03-12 1:16 UTC (permalink / raw)
To: Robert Hancock
Cc: Jeff Garzik, linux-ide, pchen, kernel-bugzilla.20.drkshadow
Hello,
On 03/12/2010 09:08 AM, Robert Hancock wrote:
> On 03/10/2010 08:40 PM, Tejun Heo wrote:
>> It turns out different generations of MCPs have differing quirks.
>>
>> * MCP 65-73 : FPDMA AA broken, lies about PMP support, forgets to
>> report NCQ
>> * MCP 77-79 : FPDMA AA broken, lies about PMP support
>> * MCP 89 : FPDMA AA broken
>>
>> Instead of turngin off FPDMA AA on all NVIDIAs, implement
>> HFLAG_NO_FPDMA_AA, define additional board IDs and apply necessary
>> quirks.
>>
>> This fixes bko#15481 and the list of quirks is verified by Peer Chen.
>>
>> http://bugzilla.kernel.org/show_bug.cgi?id=15481
>>
>> Signed-off-by: Tejun Heo<tj@kernel.org>
>> Cc: Peer Chen<pchen@nvidia.com>
>
> Is the FPDMA AA problem going to be fixed in whatever follows MCP89?
> This change is only safe if it will be, since a new chipset will fall
> into the generic case and it'll get turned back on.
Yeap, it would be great if NVIDIA fixes it but that said blacklisting
by default usually isn't a very good idea because it often falls
through the crack and after a while not many people remember what
happened when. If NVIDIA doesn't fix the next revision, we'll know
soon enough.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH #upstream-fixes 2/3] ahci: clean up board IDs
2010-03-11 2:39 ` [PATCH #upstream-fixes 2/3] ahci: clean up board IDs Tejun Heo
2010-03-11 2:40 ` [PATCH #upstream-fixes 3/3] ahci: implement AHCI_HFLAG_NO_FPDMA_AA and update NV quirks Tejun Heo
@ 2010-03-17 17:44 ` Jeff Garzik
2010-03-17 22:58 ` Tejun Heo
1 sibling, 1 reply; 10+ messages in thread
From: Jeff Garzik @ 2010-03-17 17:44 UTC (permalink / raw)
To: Tejun Heo; +Cc: linux-ide, pchen, kernel-bugzilla.20.drkshadow
On 03/10/2010 09:39 PM, Tejun Heo wrote:
> ahci over time has grown a number of board IDs and it's a bit of mess
> right now. Clean it up such that,
>
> * board_id_* now live in a separate enum board_ids and numbers are
> assigned automatically.
>
> * Board IDs assigned to features are separated from the ones assigned
> to specific implementations and both are ordered alphabetically.
>
> * For NV MCPs, define per-generation alias board_ids and assign
> matching aliases in the pci id table. This makes mcp_linux, 67-73
> use board_ahci_mcp65 instead of board_ahci_yesncq. Both are
> identical in content.
>
> * Kill now unused board_ahci_nopmp and board_ahci_yesncq.
>
> This patch doesn't cause any functional change but will make future
> changes to board_ids and quirks much less painful.
>
> Signed-off-by: Tejun Heo<tj@kernel.org>
> Cc: Peer Chen<pchen@nvidia.com>
> ---
> This might seem a bit too much for #upstream-fixes but it contains no
> functional changes and will ease future fixes, so I think including it
> in -fixes would be better.
It actually makes merging a lot more difficult, considering that libahci
-- which includes large amounts of ahci code movement -- was committed
to #upstream a week before this patch was posted.
Because of libahci changes, I think patch #2 (this patch) and patch #3
are more appropriate for #upstream.
The "(pdev->vendor != PCI_VENDOR_ID_NVIDIA)" may be overly broad, but
it's not wrong for 2.6.34, IMO.
Jeff
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH #upstream-fixes 1/3] ahci: add missing nv IDs
2010-03-11 2:37 [PATCH #upstream-fixes 1/3] ahci: add missing nv IDs Tejun Heo
2010-03-11 2:39 ` [PATCH #upstream-fixes 2/3] ahci: clean up board IDs Tejun Heo
@ 2010-03-17 17:47 ` Jeff Garzik
1 sibling, 0 replies; 10+ messages in thread
From: Jeff Garzik @ 2010-03-17 17:47 UTC (permalink / raw)
To: Tejun Heo; +Cc: linux-ide, pchen, kernel-bugzilla.20.drkshadow
On 03/10/2010 09:37 PM, Tejun Heo wrote:
> bko#15481 shows that we're missing some NVIDIA ahci PCI IDs. Peer
> Chen confirms that IDs 0x580-0x58f are reserved for cases where Linux
> ID option is selected in the BIOS and are only used for mcp65-73. Add
> 0x0581-0x058f.
>
> http://bugzilla.kernel.org/show_bug.cgi?id=15481
>
> Signed-off-by: Tejun Heo<tj@kernel.org>
> Cc: Peer Chen<pchen@nvidia.com>
> ---
> drivers/ata/ahci.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
applied #upstream-fixes
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH #upstream-fixes 2/3] ahci: clean up board IDs
2010-03-17 17:44 ` [PATCH #upstream-fixes 2/3] ahci: clean up board IDs Jeff Garzik
@ 2010-03-17 22:58 ` Tejun Heo
2010-03-17 23:04 ` Jeff Garzik
0 siblings, 1 reply; 10+ messages in thread
From: Tejun Heo @ 2010-03-17 22:58 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-ide, pchen, kernel-bugzilla.20.drkshadow
Hello,
On 03/18/2010 02:44 AM, Jeff Garzik wrote:
> It actually makes merging a lot more difficult, considering that libahci
> -- which includes large amounts of ahci code movement -- was committed
> to #upstream a week before this patch was posted.
>
> Because of libahci changes, I think patch #2 (this patch) and patch #3
> are more appropriate for #upstream.
>
> The "(pdev->vendor != PCI_VENDOR_ID_NVIDIA)" may be overly broad, but
> it's not wrong for 2.6.34, IMO.
Hmmm... the actual fix is in #3. I'll prep separate patches for
upstream and upstream-fixes.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH #upstream-fixes 2/3] ahci: clean up board IDs
2010-03-17 22:58 ` Tejun Heo
@ 2010-03-17 23:04 ` Jeff Garzik
2010-03-18 0:02 ` Tejun Heo
0 siblings, 1 reply; 10+ messages in thread
From: Jeff Garzik @ 2010-03-17 23:04 UTC (permalink / raw)
To: Tejun Heo; +Cc: linux-ide, pchen, kernel-bugzilla.20.drkshadow
On 03/17/2010 06:58 PM, Tejun Heo wrote:
> Hello,
>
> On 03/18/2010 02:44 AM, Jeff Garzik wrote:
>> It actually makes merging a lot more difficult, considering that libahci
>> -- which includes large amounts of ahci code movement -- was committed
>> to #upstream a week before this patch was posted.
>>
>> Because of libahci changes, I think patch #2 (this patch) and patch #3
>> are more appropriate for #upstream.
>>
>> The "(pdev->vendor != PCI_VENDOR_ID_NVIDIA)" may be overly broad, but
>> it's not wrong for 2.6.34, IMO.
>
> Hmmm... the actual fix is in #3. I'll prep separate patches for
> upstream and upstream-fixes.
What does it fix, specifically? AFAICS, the patch changes the AHCI
state from
no FPDMA AA for all NVIDIA
to
some FPDMA AA for NVIDIA
thus the current state of the code is not broken and in need of fixing,
but merely overly conservative. Am I missing something?
Jeff
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH #upstream-fixes 2/3] ahci: clean up board IDs
2010-03-17 23:04 ` Jeff Garzik
@ 2010-03-18 0:02 ` Tejun Heo
0 siblings, 0 replies; 10+ messages in thread
From: Tejun Heo @ 2010-03-18 0:02 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-ide, pchen, kernel-bugzilla.20.drkshadow
On 03/18/2010 08:04 AM, Jeff Garzik wrote:
> What does it fix, specifically? AFAICS, the patch changes the AHCI
> state from
>
> no FPDMA AA for all NVIDIA
>
> to
>
> some FPDMA AA for NVIDIA
>
> thus the current state of the code is not broken and in need of fixing,
> but merely overly conservative. Am I missing something?
No, you're not. I was confusing #3 contained the fix for bko#15471
when it was actually in #1. Will refresh the patches for #upstream.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-03-18 0:02 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-11 2:37 [PATCH #upstream-fixes 1/3] ahci: add missing nv IDs Tejun Heo
2010-03-11 2:39 ` [PATCH #upstream-fixes 2/3] ahci: clean up board IDs Tejun Heo
2010-03-11 2:40 ` [PATCH #upstream-fixes 3/3] ahci: implement AHCI_HFLAG_NO_FPDMA_AA and update NV quirks Tejun Heo
2010-03-12 0:08 ` Robert Hancock
2010-03-12 1:16 ` Tejun Heo
2010-03-17 17:44 ` [PATCH #upstream-fixes 2/3] ahci: clean up board IDs Jeff Garzik
2010-03-17 22:58 ` Tejun Heo
2010-03-17 23:04 ` Jeff Garzik
2010-03-18 0:02 ` Tejun Heo
2010-03-17 17:47 ` [PATCH #upstream-fixes 1/3] ahci: add missing nv IDs Jeff Garzik
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.