On Wed, Apr 06, 2005 at 11:40:57AM +0200, Gaudenz Steinlin wrote: > On Wed, Apr 06, 2005 at 07:16:09AM +0200, Christian Perrier wrote: > > > Actually, I think that it is ata_piix. I am attaching my working > > > 2.6.11.5 kernel config and the output of lsmod. I am not using an > > > initrd image. However, if I modprobe ata_piix and sd_mod, the > > > installer still does not find the hard drive. I don't find any > > > entries in /dev/scsi either. It does not help to modprobe all of the > > > other sata_* modules either. > > > > > > So, loading ata_piix should be the Right Way for discover when finding > > your SATA chipset but what you say it that this is not enough with the > > D-I kernel, right?? > > > > So, this problem is dual: > > > > -discover needs to load the correct module?: easy to fix in pci.lst > I've added the missing information to pci.lst. > > > > -the kernel module must properly handle your hardware?: not easy to > > fix if this fails with the current 2.6.8-2 kernel we have in D-I > > > > For everyone reading this?: is this the correct conclusion? > > I think this conculsion is correct. Horm: Is there any need to reassign > this bug to the kernel (if yes which package?)? > > The only problem reported in this bug not yet solved is the second > network card: > 0000:04:02.0 0280: 8086:4224 (rev 05) > 0000:04:02.0 Network controller: Intel Corp.: Unknown device 4224 (rev 05)
If you want to reassign this bug to the kernel, I'd assign it to kernel-source-2.6.8. Actually, I think there is already a bug there relating to this, and I would be interested in someone testing the attached patches (applogies if you have seen these before, a problem a lot like this is being discussed in a couple of places) though I don't think they have much chance of making it into Sarge. -- Horms
# origin: bzolnier (BitKeeper) # cset: 1.1938.134.1 (2.6) key=416b214bV7CwIRgRqoomLi6qTfcGmw # URL: http://linux.bkbits.net:8080/linux-2.6/[EMAIL PROTECTED] # inclusion: upstream # descrition: [PATCH] libata: PCI IDE legacy mode fix # revision date: Wed, 06 Apr 2005 17:25:20 +0900 # # S rset: ChangeSet|1.1938.132.2..1.1938.134.1 # I rset: drivers/scsi/libata-core.c|1.100..1.101 # I rset: include/linux/libata.h|1.55..1.56 # I rset: drivers/scsi/ata_piix.c|1.31..1.32 # # Key: # S: Skipped ChangeSet file only # O: Original Followed by Updated # U: Updated Included with updated range of versions # I: Included Included verbatim # E: Excluded Excluded on request from user # D: Deleted Manually deleted by subsequent user edit # R: Revised Manually revised by subsequent user edit # # # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/11 20:11:55-04:00 [EMAIL PROTECTED] # [PATCH] libata: PCI IDE legacy mode fix # # In PCI IDE legacy mode ap->port_no is incorrectly set to zero for # the second port. Fix it by adding ->hard_port_no to struct ata_probe_ent # and struct ata_port (per Jeff's suggestion) and teaching ata_piix.c # to use it instead of ->port_no. # # Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> # # include/linux/libata.h # 2004/10/11 15:52:22-04:00 [EMAIL PROTECTED] +2 -0 # PCI IDE legacy mode fix # # drivers/scsi/libata-core.c # 2004/10/11 15:52:22-04:00 [EMAIL PROTECTED] +8 -0 # PCI IDE legacy mode fix # # drivers/scsi/ata_piix.c # 2004/10/11 15:52:22-04:00 [EMAIL PROTECTED] +10 -10 # PCI IDE legacy mode fix # # ===== drivers/scsi/libata-core.c 1.100 vs 1.101 ===== --- 1.100/drivers/scsi/libata-core.c 2004-09-16 15:45:15 +09:00 +++ 1.101/drivers/scsi/libata-core.c 2004-10-12 04:52:22 +09:00 @@ -3032,6 +3032,8 @@ static void ata_host_init(struct ata_por ap->ctl = ATA_DEVCTL_OBS; ap->host_set = host_set; ap->port_no = port_no; + ap->hard_port_no = + ent->legacy_mode ? ent->hard_port_no : port_no; ap->pio_mask = ent->pio_mask; ap->mwdma_mask = ent->mwdma_mask; ap->udma_mask = ent->udma_mask; @@ -3338,8 +3340,14 @@ ata_pci_init_legacy_mode(struct pci_dev probe_ent[0].n_ports = 1; probe_ent[0].irq = 14; + probe_ent[0].hard_port_no = 0; + probe_ent[0].legacy_mode = 1; + probe_ent[1].n_ports = 1; probe_ent[1].irq = 15; + + probe_ent[1].hard_port_no = 1; + probe_ent[1].legacy_mode = 1; probe_ent[0].port[0].cmd_addr = 0x1f0; probe_ent[0].port[0].altstatus_addr = ===== include/linux/libata.h 1.55 vs 1.56 ===== --- 1.55/include/linux/libata.h 2004-09-16 15:45:15 +09:00 +++ 1.56/include/linux/libata.h 2004-10-12 04:52:22 +09:00 @@ -189,6 +189,7 @@ struct ata_probe_ent { Scsi_Host_Template *sht; struct ata_ioports port[ATA_MAX_PORTS]; unsigned int n_ports; + unsigned int hard_port_no; unsigned int pio_mask; unsigned int mwdma_mask; unsigned int udma_mask; @@ -273,6 +274,7 @@ struct ata_port { unsigned long flags; /* ATA_FLAG_xxx */ unsigned int id; /* unique id req'd by scsi midlyr */ unsigned int port_no; /* unique port #; from zero */ + unsigned int hard_port_no; /* hardware port #; from zero */ struct ata_prd *prd; /* our SG list */ dma_addr_t prd_dma; /* and its DMA mapping */ ===== drivers/scsi/ata_piix.c 1.31 vs 1.32 ===== --- 1.31/drivers/scsi/ata_piix.c 2004-09-16 15:45:15 +09:00 +++ 1.32/drivers/scsi/ata_piix.c 2004-10-12 04:52:22 +09:00 @@ -268,7 +268,7 @@ static void piix_pata_cbl_detect(struct goto cbl40; /* check BIOS cable detect results */ - mask = ap->port_no == 0 ? PIIX_80C_PRI : PIIX_80C_SEC; + mask = ap->hard_port_no == 0 ? PIIX_80C_PRI : PIIX_80C_SEC; pci_read_config_byte(pdev, PIIX_IOCFG, &tmp); if ((tmp & mask) == 0) goto cbl40; @@ -294,7 +294,7 @@ cbl40: static void piix_pata_phy_reset(struct ata_port *ap) { if (!pci_test_config_bits(ap->host_set->pdev, - &piix_enable_bits[ap->port_no])) { + &piix_enable_bits[ap->hard_port_no])) { ata_port_disable(ap); printk(KERN_INFO "ata%u: port disabled. ignoring.\n", ap->id); return; @@ -327,8 +327,8 @@ static int piix_sata_probe (struct ata_p int orig_mask, mask, i; u8 pcs; - mask = (PIIX_PORT_PRESENT << ap->port_no) | - (PIIX_PORT_ENABLED << ap->port_no); + mask = (PIIX_PORT_PRESENT << ap->hard_port_no) | + (PIIX_PORT_ENABLED << ap->hard_port_no); pci_read_config_byte(pdev, ICH5_PCS, &pcs); orig_mask = (int) pcs & 0xff; @@ -345,7 +345,7 @@ static int piix_sata_probe (struct ata_p mask = (PIIX_PORT_PRESENT << i) | (PIIX_PORT_ENABLED << i); if ((orig_mask & mask) == mask) - if (combined || (i == ap->port_no)) + if (combined || (i == ap->hard_port_no)) return 1; } @@ -394,7 +394,7 @@ static void piix_set_piomode (struct ata unsigned int pio = adev->pio_mode - XFER_PIO_0; struct pci_dev *dev = ap->host_set->pdev; unsigned int is_slave = (adev->devno != 0); - unsigned int master_port= ap->port_no ? 0x42 : 0x40; + unsigned int master_port= ap->hard_port_no ? 0x42 : 0x40; unsigned int slave_port = 0x44; u16 master_data; u8 slave_data; @@ -412,10 +412,10 @@ static void piix_set_piomode (struct ata /* enable PPE, IE and TIME */ master_data |= 0x0070; pci_read_config_byte(dev, slave_port, &slave_data); - slave_data &= (ap->port_no ? 0x0f : 0xf0); + slave_data &= (ap->hard_port_no ? 0x0f : 0xf0); slave_data |= (timings[pio][0] << 2) | - (timings[pio][1] << (ap->port_no ? 4 : 0)); + (timings[pio][1] << (ap->hard_port_no ? 4 : 0)); } else { master_data &= 0xccf8; /* enable PPE, IE and TIME */ @@ -445,9 +445,9 @@ static void piix_set_dmamode (struct ata { unsigned int udma = adev->dma_mode; /* FIXME: MWDMA too */ struct pci_dev *dev = ap->host_set->pdev; - u8 maslave = ap->port_no ? 0x42 : 0x40; + u8 maslave = ap->hard_port_no ? 0x42 : 0x40; u8 speed = udma; - unsigned int drive_dn = (ap->port_no ? 2 : 0) + adev->devno; + unsigned int drive_dn = (ap->hard_port_no ? 2 : 0) + adev->devno; int a_speed = 3 << (drive_dn * 4); int u_flag = 1 << drive_dn; int v_flag = 0x01 << drive_dn;
# origin: jason.d.gaston (BitKeeper) # cset: 1.1966.19.1 (2.6) key=41ddef86je30CbKgp5uBV9FbFEHpYQ # URL: http://linux.bkbits.net:8080/linux-2.6/[EMAIL PROTECTED] # inclusion: upstream # descrition: [PATCH] SATA support for Intel ICH7 # revision date: Wed, 06 Apr 2005 17:24:52 +0900 # # S rset: ChangeSet|1.1966.10.3..1.1966.19.1 # I rset: drivers/pci/quirks.c|1.64..1.65 # I rset: drivers/scsi/ahci.c|1.9..1.10 # I rset: drivers/scsi/ata_piix.c|1.35..1.36 # # Key: # S: Skipped ChangeSet file only # O: Original Followed by Updated # U: Updated Included with updated range of versions # I: Included Included verbatim # E: Excluded Excluded on request from user # D: Deleted Manually deleted by subsequent user edit # R: Revised Manually revised by subsequent user edit # # # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/01/06 21:10:14-05:00 [EMAIL PROTECTED] # [PATCH] SATA support for Intel ICH7 # # Reposting patch with word wrap turned off. Please let me know if # this is still not formated correctly. # # This patch adds the Intel ICH7 DID's to the ata_piix.c SATA driver, # ahci.c SATA AHCI driver and quirks.c for ICH7 SATA support. # # Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> # # drivers/scsi/ata_piix.c # 2004/12/28 10:07:38-05:00 [EMAIL PROTECTED] +15 -0 # SATA support for Intel ICH7 - 2.6.10 - repost # # drivers/scsi/ahci.c # 2004/12/28 10:07:38-05:00 [EMAIL PROTECTED] +6 -2 # SATA support for Intel ICH7 - 2.6.10 - repost # # drivers/pci/quirks.c # 2004/12/30 07:24:21-05:00 [EMAIL PROTECTED] +5 -1 # SATA support for Intel ICH7 - 2.6.10 - repost # # ===== drivers/pci/quirks.c 1.64 vs 1.65 ===== --- 1.64/drivers/pci/quirks.c 2004-12-24 13:38:24 +09:00 +++ 1.65/drivers/pci/quirks.c 2004-12-30 21:24:21 +09:00 @@ -1144,6 +1144,10 @@ static void __devinit quirk_intel_ide_co case 0x2653: ich = 6; break; + case 0x27c0: + case 0x27c4: + ich = 7; + break; default: /* we do not handle this PCI device */ return; @@ -1163,7 +1167,7 @@ static void __devinit quirk_intel_ide_co else return; /* not in combined mode */ } else { - WARN_ON(ich != 6); + WARN_ON((ich != 6) && (ich != 7)); tmp &= 0x3; /* interesting bits 1:0 */ if (tmp & (1 << 0)) comb = (1 << 2); /* PATA port 0, SATA port 1 */ ===== drivers/scsi/ahci.c 1.9 vs 1.10 ===== --- 1.9/drivers/scsi/ahci.c 2004-12-08 08:54:23 +09:00 +++ 1.10/drivers/scsi/ahci.c 2004-12-29 00:07:38 +09:00 @@ -239,9 +239,13 @@ static struct ata_port_info ahci_port_in static struct pci_device_id ahci_pci_tbl[] = { { PCI_VENDOR_ID_INTEL, 0x2652, PCI_ANY_ID, PCI_ANY_ID, 0, 0, - board_ahci }, + board_ahci }, /* ICH6 */ { PCI_VENDOR_ID_INTEL, 0x2653, PCI_ANY_ID, PCI_ANY_ID, 0, 0, - board_ahci }, + board_ahci }, /* ICH6M */ + { PCI_VENDOR_ID_INTEL, 0x27c1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, + board_ahci }, /* ICH7 */ + { PCI_VENDOR_ID_INTEL, 0x27c5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, + board_ahci }, /* ICH7M */ { } /* terminate list */ }; ===== drivers/scsi/ata_piix.c 1.35 vs 1.36 ===== --- 1.35/drivers/scsi/ata_piix.c 2004-11-14 04:24:05 +09:00 +++ 1.36/drivers/scsi/ata_piix.c 2004-12-29 00:07:38 +09:00 @@ -60,6 +60,7 @@ enum { piix4_pata = 2, ich6_sata = 3, ich6_sata_rm = 4, + ich7_sata = 5, }; static int piix_init_one (struct pci_dev *pdev, @@ -90,6 +91,8 @@ static struct pci_device_id piix_pci_tbl { 0x8086, 0x2651, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata }, { 0x8086, 0x2652, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_rm }, { 0x8086, 0x2653, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_rm }, + { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich7_sata }, + { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich7_sata }, { } /* terminate list */ }; @@ -226,6 +229,18 @@ static struct ata_port_info piix_port_in }, /* ich6_sata_rm */ + { + .sht = &piix_sht, + .host_flags = ATA_FLAG_SATA | ATA_FLAG_SRST | + PIIX_FLAG_COMBINED | PIIX_FLAG_CHECKINTR | + ATA_FLAG_SLAVE_POSS | PIIX_FLAG_AHCI, + .pio_mask = 0x1f, /* pio0-4 */ + .mwdma_mask = 0x07, /* mwdma0-2 */ + .udma_mask = 0x7f, /* udma0-6 */ + .port_ops = &piix_sata_ops, + }, + + /* ich7_sata */ { .sht = &piix_sht, .host_flags = ATA_FLAG_SATA | ATA_FLAG_SRST |