* hotplug works, but newly plug not @ 2006-05-24 15:25 Ming Zhang 2006-05-24 20:51 ` Tejun Heo 0 siblings, 1 reply; 12+ messages in thread From: Ming Zhang @ 2006-05-24 15:25 UTC (permalink / raw) To: linux-ide-list Hi All I use the libata patch from http://home-tj.org/wiki/index.php/Libata-tj-stable with my supermicro MB ( ICH7R chip). The AHCI works as desired in most of the time. If I have disk(s) plugged in during boot. Then after boot, I kept unplug and plug many times and it works fine. but i noticed that if I have the disk(s) unplugged during boot, then after boot, I plug the disk and nothing shows. if I try to do rescan by run the rescan lun script, i saw these from dmesg. Anything clue ? Thanks! Ming --------------------------------------- ata4: soft resetting port ata4: SATA link down (SStatus 0 SControl 0) ata4: EH complete ata3: soft resetting port ata3: SATA link down (SStatus 0 SControl 0) ata3: EH complete ata4: soft resetting port ata4: SATA link down (SStatus 0 SControl 0) ata4: EH complete ata3: soft resetting port ata3: SATA link down (SStatus 0 SControl 0) ata3: EH complete ata4: soft resetting port ata4: SATA link down (SStatus 0 SControl 0) ata4: EH complete ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: hotplug works, but newly plug not 2006-05-24 15:25 hotplug works, but newly plug not Ming Zhang @ 2006-05-24 20:51 ` Tejun Heo 2006-05-24 21:09 ` Ming Zhang 0 siblings, 1 reply; 12+ messages in thread From: Tejun Heo @ 2006-05-24 20:51 UTC (permalink / raw) To: mingz; +Cc: linux-ide-list, Jeff Garzik [-- Attachment #1: Type: text/plain, Size: 1379 bytes --] Ming Zhang wrote: > Hi All > > I use the libata patch from > http://home-tj.org/wiki/index.php/Libata-tj-stable with my supermicro MB > ( ICH7R chip). The AHCI works as desired in most of the time. > > If I have disk(s) plugged in during boot. Then after boot, I kept unplug > and plug many times and it works fine. > > but i noticed that if I have the disk(s) unplugged during boot, then > after boot, I plug the disk and nothing shows. if I try to do rescan by > run the rescan lun script, i saw these from dmesg. > > Anything clue ? Thanks! > > Ming > > --------------------------------------- > ata4: soft resetting port > ata4: SATA link down (SStatus 0 SControl 0) > ata4: EH complete > ata3: soft resetting port > ata3: SATA link down (SStatus 0 SControl 0) > ata3: EH complete > ata4: soft resetting port > ata4: SATA link down (SStatus 0 SControl 0) > ata4: EH complete > ata3: soft resetting port > ata3: SATA link down (SStatus 0 SControl 0) > ata3: EH complete > ata4: soft resetting port > ata4: SATA link down (SStatus 0 SControl 0) > ata4: EH complete Hello, That never happened to me on AHCI mode but I experienced similar thing with piix mode. It might be that your BIOS doesn't turn on PCS enable bits for empty ports and thus the empty ports cannot be used after boot. Can you try the attached patch? (only compile-tested, be cautious) -- tejun [-- Attachment #2: patch --] [-- Type: text/plain, Size: 568 bytes --] diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index 45fd71d..83751dd 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c @@ -1306,6 +1306,15 @@ static int ahci_init_one (struct pci_dev have_msi = 0; } + { + u8 orig_pcs, pcs; + pci_read_config_byte(pdev, 0x92, &orig_pcs); + pci_write_config_byte(pdev, 0x92, 0xf); + pci_read_config_byte(pdev, 0x92, &pcs); + dev_printk(KERN_INFO, &pdev->dev, "pcs 0x%x->0x%x\n", + orig_pcs, pcs); + } + probe_ent = kmalloc(sizeof(*probe_ent), GFP_KERNEL); if (probe_ent == NULL) { rc = -ENOMEM; ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: hotplug works, but newly plug not 2006-05-24 20:51 ` Tejun Heo @ 2006-05-24 21:09 ` Ming Zhang 2006-05-24 21:20 ` Ming Zhang 2006-05-25 15:09 ` Ming Zhang 0 siblings, 2 replies; 12+ messages in thread From: Ming Zhang @ 2006-05-24 21:09 UTC (permalink / raw) To: Tejun Heo; +Cc: linux-ide-list, Jeff Garzik On Wed, 2006-05-24 at 13:51 -0700, Tejun Heo wrote: > Ming Zhang wrote: > > Hi All > > > > I use the libata patch from > > http://home-tj.org/wiki/index.php/Libata-tj-stable with my supermicro MB > > ( ICH7R chip). The AHCI works as desired in most of the time. > > > > If I have disk(s) plugged in during boot. Then after boot, I kept unplug > > and plug many times and it works fine. > > > > but i noticed that if I have the disk(s) unplugged during boot, then > > after boot, I plug the disk and nothing shows. if I try to do rescan by > > run the rescan lun script, i saw these from dmesg. > > > > Anything clue ? Thanks! > > > > Ming > > > > --------------------------------------- > > ata4: soft resetting port > > ata4: SATA link down (SStatus 0 SControl 0) > > ata4: EH complete > > ata3: soft resetting port > > ata3: SATA link down (SStatus 0 SControl 0) > > ata3: EH complete > > ata4: soft resetting port > > ata4: SATA link down (SStatus 0 SControl 0) > > ata4: EH complete > > ata3: soft resetting port > > ata3: SATA link down (SStatus 0 SControl 0) > > ata3: EH complete > > ata4: soft resetting port > > ata4: SATA link down (SStatus 0 SControl 0) > > ata4: EH complete > > Hello, > > That never happened to me on AHCI mode but I experienced similar thing > with piix mode. It might be that your BIOS doesn't turn on PCS enable the BIOS has a option to switch between AHCI and PIIX. So I guess the reason is as you said. also this is kernel boot log related to this. could u point out the place for this pcs in AHCI spec? i just printed AHCI and can not find related information about this PCS. the code operate at offset 0x92 but i can not find anything about that. libata version 1.30 loaded. ahci 0000:00:1f.2: version 1.3 ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 19 (level, low) -> IRQ 19 ahci 0000:00:1f.2: pcs 0x11->0x1f PCI: Setting latency timer of device 0000:00:1f.2 to 64 ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 4 ports 3 Gbps 0x1 impl SATA mode ahci 0000:00:1f.2: flags: 64bit ncq pm led clo pio slum part ata1: SATA max UDMA/133 cmd 0xF881C500 ctl 0x0 bmdma 0x0 irq 19 ata2: SATA max UDMA/133 cmd 0xF881C580 ctl 0x0 bmdma 0x0 irq 19 ata3: SATA max UDMA/133 cmd 0xF881C600 ctl 0x0 bmdma 0x0 irq 19 ata4: SATA max UDMA/133 cmd 0xF881C680 ctl 0x0 bmdma 0x0 irq 19 scsi0 : ahci ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300) ata1.00: cfg 49:2f00 82:74eb 83:7feb 84:4123 85:74e9 86:3c03 87:4123 88:007f ata1.00: ATA-7, max UDMA/133, 781422768 sectors: LBA48 ata1.00: configured for UDMA/133 scsi1 : ahci ata2: SATA link down (SStatus 0 SControl 0) scsi2 : ahci ata3: SATA link down (SStatus 0 SControl 0) scsi3 : ahci ata4: SATA link down (SStatus 0 SControl 0) Vendor: ATA Model: HDS724040KLSA80 Rev: KFAO Type: Direct-Access ANSI SCSI revision: 05 SCSI device sda: 781422768 512-byte hdwr sectors (400088 MB) sda: Write Protect is off sda: Mode Sense: 00 3a 00 00 SCSI device sda: drive cache: write back SCSI device sda: 781422768 512-byte hdwr sectors (400088 MB) sda: Write Protect is off sda: Mode Sense: 00 3a 00 00 SCSI device sda: drive cache: write back sda: sd 0:0:0:0: Attached scsi disk sda sd 0:0:0:0: Attached scsi generic sg0 type 0 > bits for empty ports and thus the empty ports cannot be used after boot. > Can you try the attached patch? (only compile-tested, be cautious) > > plain text document attachment (patch) > diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c > index 45fd71d..83751dd 100644 > --- a/drivers/scsi/ahci.c > +++ b/drivers/scsi/ahci.c > @@ -1306,6 +1306,15 @@ static int ahci_init_one (struct pci_dev > have_msi = 0; > } > > + { > + u8 orig_pcs, pcs; > + pci_read_config_byte(pdev, 0x92, &orig_pcs); > + pci_write_config_byte(pdev, 0x92, 0xf); > + pci_read_config_byte(pdev, 0x92, &pcs); > + dev_printk(KERN_INFO, &pdev->dev, "pcs 0x%x->0x%x\n", > + orig_pcs, pcs); > + } > + > probe_ent = kmalloc(sizeof(*probe_ent), GFP_KERNEL); > if (probe_ent == NULL) { > rc = -ENOMEM; ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: hotplug works, but newly plug not 2006-05-24 21:09 ` Ming Zhang @ 2006-05-24 21:20 ` Ming Zhang 2006-05-24 21:25 ` Tejun Heo 2006-05-25 15:09 ` Ming Zhang 1 sibling, 1 reply; 12+ messages in thread From: Ming Zhang @ 2006-05-24 21:20 UTC (permalink / raw) To: Tejun Heo; +Cc: linux-ide-list, Jeff Garzik my fault. forgot to say that the patch does not change the behavior. nothing happen after plug a disk to empty slot. ming On Wed, 2006-05-24 at 17:09 -0400, Ming Zhang wrote: > On Wed, 2006-05-24 at 13:51 -0700, Tejun Heo wrote: > > Ming Zhang wrote: > > > Hi All > > > > > > I use the libata patch from > > > http://home-tj.org/wiki/index.php/Libata-tj-stable with my supermicro MB > > > ( ICH7R chip). The AHCI works as desired in most of the time. > > > > > > If I have disk(s) plugged in during boot. Then after boot, I kept unplug > > > and plug many times and it works fine. > > > > > > but i noticed that if I have the disk(s) unplugged during boot, then > > > after boot, I plug the disk and nothing shows. if I try to do rescan by > > > run the rescan lun script, i saw these from dmesg. > > > > > > Anything clue ? Thanks! > > > > > > Ming > > > > > > --------------------------------------- > > > ata4: soft resetting port > > > ata4: SATA link down (SStatus 0 SControl 0) > > > ata4: EH complete > > > ata3: soft resetting port > > > ata3: SATA link down (SStatus 0 SControl 0) > > > ata3: EH complete > > > ata4: soft resetting port > > > ata4: SATA link down (SStatus 0 SControl 0) > > > ata4: EH complete > > > ata3: soft resetting port > > > ata3: SATA link down (SStatus 0 SControl 0) > > > ata3: EH complete > > > ata4: soft resetting port > > > ata4: SATA link down (SStatus 0 SControl 0) > > > ata4: EH complete > > > > Hello, > > > > That never happened to me on AHCI mode but I experienced similar thing > > with piix mode. It might be that your BIOS doesn't turn on PCS enable > > the BIOS has a option to switch between AHCI and PIIX. So I guess the > reason is as you said. > > also this is kernel boot log related to this. could u point out the > place for this pcs in AHCI spec? i just printed AHCI and can not find > related information about this PCS. the code operate at offset 0x92 but > i can not find anything about that. > > > libata version 1.30 loaded. > ahci 0000:00:1f.2: version 1.3 > ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 19 (level, low) -> IRQ 19 > ahci 0000:00:1f.2: pcs 0x11->0x1f > PCI: Setting latency timer of device 0000:00:1f.2 to 64 > ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 4 ports 3 Gbps 0x1 impl SATA > mode > ahci 0000:00:1f.2: flags: 64bit ncq pm led clo pio slum part > ata1: SATA max UDMA/133 cmd 0xF881C500 ctl 0x0 bmdma 0x0 irq 19 > ata2: SATA max UDMA/133 cmd 0xF881C580 ctl 0x0 bmdma 0x0 irq 19 > ata3: SATA max UDMA/133 cmd 0xF881C600 ctl 0x0 bmdma 0x0 irq 19 > ata4: SATA max UDMA/133 cmd 0xF881C680 ctl 0x0 bmdma 0x0 irq 19 > scsi0 : ahci > ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300) > ata1.00: cfg 49:2f00 82:74eb 83:7feb 84:4123 85:74e9 86:3c03 87:4123 > 88:007f > ata1.00: ATA-7, max UDMA/133, 781422768 sectors: LBA48 > ata1.00: configured for UDMA/133 > scsi1 : ahci > ata2: SATA link down (SStatus 0 SControl 0) > scsi2 : ahci > ata3: SATA link down (SStatus 0 SControl 0) > scsi3 : ahci > ata4: SATA link down (SStatus 0 SControl 0) > Vendor: ATA Model: HDS724040KLSA80 Rev: KFAO > Type: Direct-Access ANSI SCSI revision: 05 > SCSI device sda: 781422768 512-byte hdwr sectors (400088 MB) > sda: Write Protect is off > sda: Mode Sense: 00 3a 00 00 > SCSI device sda: drive cache: write back > SCSI device sda: 781422768 512-byte hdwr sectors (400088 MB) > sda: Write Protect is off > sda: Mode Sense: 00 3a 00 00 > SCSI device sda: drive cache: write back > sda: > sd 0:0:0:0: Attached scsi disk sda > sd 0:0:0:0: Attached scsi generic sg0 type 0 > > > > > > bits for empty ports and thus the empty ports cannot be used after boot. > > Can you try the attached patch? (only compile-tested, be cautious) > > > > plain text document attachment (patch) > > diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c > > index 45fd71d..83751dd 100644 > > --- a/drivers/scsi/ahci.c > > +++ b/drivers/scsi/ahci.c > > @@ -1306,6 +1306,15 @@ static int ahci_init_one (struct pci_dev > > have_msi = 0; > > } > > > > + { > > + u8 orig_pcs, pcs; > > + pci_read_config_byte(pdev, 0x92, &orig_pcs); > > + pci_write_config_byte(pdev, 0x92, 0xf); > > + pci_read_config_byte(pdev, 0x92, &pcs); > > + dev_printk(KERN_INFO, &pdev->dev, "pcs 0x%x->0x%x\n", > > + orig_pcs, pcs); > > + } > > + > > probe_ent = kmalloc(sizeof(*probe_ent), GFP_KERNEL); > > if (probe_ent == NULL) { > > rc = -ENOMEM; > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: hotplug works, but newly plug not 2006-05-24 21:20 ` Ming Zhang @ 2006-05-24 21:25 ` Tejun Heo 2006-05-24 21:32 ` Ming Zhang 0 siblings, 1 reply; 12+ messages in thread From: Tejun Heo @ 2006-05-24 21:25 UTC (permalink / raw) To: mingz; +Cc: linux-ide-list, Jeff Garzik Ming Zhang wrote: > my fault. forgot to say that the patch does not change the behavior. > nothing happen after plug a disk to empty slot. > Can you change 0xf to 0xff of the following line in the patch and see if anything changes? pci_write_config_byte(pdev, 0x92, 0xf); ^^^^-> 0xff -- tejun ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: hotplug works, but newly plug not 2006-05-24 21:25 ` Tejun Heo @ 2006-05-24 21:32 ` Ming Zhang 0 siblings, 0 replies; 12+ messages in thread From: Ming Zhang @ 2006-05-24 21:32 UTC (permalink / raw) To: Tejun Heo; +Cc: linux-ide-list, Jeff Garzik nothing changed. no plug detected. ahci 0000:00:1f.2: version 1.3 ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 19 (level, low) -> IRQ 19 ahci 0000:00:1f.2: pcs 0xf->0xf PCI: Setting latency timer of device 0000:00:1f.2 to 64 ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 4 ports 3 Gbps 0x0 impl SATA mode ahci 0000:00:1f.2: flags: 64bit ncq pm led clo pio slum part ata5: SATA max UDMA/133 cmd 0xF8820500 ctl 0x0 bmdma 0x0 irq 19 ata6: SATA max UDMA/133 cmd 0xF8820580 ctl 0x0 bmdma 0x0 irq 19 ata7: SATA max UDMA/133 cmd 0xF8820600 ctl 0x0 bmdma 0x0 irq 19 ata8: SATA max UDMA/133 cmd 0xF8820680 ctl 0x0 bmdma 0x0 irq 19 scsi4 : ahci ata5: SATA link down (SStatus 0 SControl 0) scsi5 : ahci ata6: SATA link down (SStatus 0 SControl 0) scsi6 : ahci ata7: SATA link down (SStatus 0 SControl 0) scsi7 : ahci ata8: SATA link down (SStatus 0 SControl 0) On Wed, 2006-05-24 at 14:25 -0700, Tejun Heo wrote: > Ming Zhang wrote: > > my fault. forgot to say that the patch does not change the behavior. > > nothing happen after plug a disk to empty slot. > > > > Can you change 0xf to 0xff of the following line in the patch and see if > anything changes? > > pci_write_config_byte(pdev, 0x92, 0xf); > ^^^^-> 0xff > > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: hotplug works, but newly plug not 2006-05-24 21:09 ` Ming Zhang 2006-05-24 21:20 ` Ming Zhang @ 2006-05-25 15:09 ` Ming Zhang 2006-05-25 15:14 ` Jeff Garzik 1 sibling, 1 reply; 12+ messages in thread From: Ming Zhang @ 2006-05-25 15:09 UTC (permalink / raw) To: Tejun Heo; +Cc: linux-ide-list, Jeff Garzik Hi Tejun I read the whole AHCI but I still could not find out what is the magic number 0x92. Is this in some Intel doc? Ming On Wed, 2006-05-24 at 17:09 -0400, Ming Zhang wrote: > On Wed, 2006-05-24 at 13:51 -0700, Tejun Heo wrote: > > Ming Zhang wrote: > > > Hi All > > > > > > I use the libata patch from > > > http://home-tj.org/wiki/index.php/Libata-tj-stable with my supermicro MB > > > ( ICH7R chip). The AHCI works as desired in most of the time. > > > > > > If I have disk(s) plugged in during boot. Then after boot, I kept unplug > > > and plug many times and it works fine. > > > > > > but i noticed that if I have the disk(s) unplugged during boot, then > > > after boot, I plug the disk and nothing shows. if I try to do rescan by > > > run the rescan lun script, i saw these from dmesg. > > > > > > Anything clue ? Thanks! > > > > > > Ming > > > > > > --------------------------------------- > > > ata4: soft resetting port > > > ata4: SATA link down (SStatus 0 SControl 0) > > > ata4: EH complete > > > ata3: soft resetting port > > > ata3: SATA link down (SStatus 0 SControl 0) > > > ata3: EH complete > > > ata4: soft resetting port > > > ata4: SATA link down (SStatus 0 SControl 0) > > > ata4: EH complete > > > ata3: soft resetting port > > > ata3: SATA link down (SStatus 0 SControl 0) > > > ata3: EH complete > > > ata4: soft resetting port > > > ata4: SATA link down (SStatus 0 SControl 0) > > > ata4: EH complete > > > > Hello, > > > > That never happened to me on AHCI mode but I experienced similar thing > > with piix mode. It might be that your BIOS doesn't turn on PCS enable > > the BIOS has a option to switch between AHCI and PIIX. So I guess the > reason is as you said. > > also this is kernel boot log related to this. could u point out the > place for this pcs in AHCI spec? i just printed AHCI and can not find > related information about this PCS. the code operate at offset 0x92 but > i can not find anything about that. > > > libata version 1.30 loaded. > ahci 0000:00:1f.2: version 1.3 > ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 19 (level, low) -> IRQ 19 > ahci 0000:00:1f.2: pcs 0x11->0x1f > PCI: Setting latency timer of device 0000:00:1f.2 to 64 > ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 4 ports 3 Gbps 0x1 impl SATA > mode > ahci 0000:00:1f.2: flags: 64bit ncq pm led clo pio slum part > ata1: SATA max UDMA/133 cmd 0xF881C500 ctl 0x0 bmdma 0x0 irq 19 > ata2: SATA max UDMA/133 cmd 0xF881C580 ctl 0x0 bmdma 0x0 irq 19 > ata3: SATA max UDMA/133 cmd 0xF881C600 ctl 0x0 bmdma 0x0 irq 19 > ata4: SATA max UDMA/133 cmd 0xF881C680 ctl 0x0 bmdma 0x0 irq 19 > scsi0 : ahci > ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300) > ata1.00: cfg 49:2f00 82:74eb 83:7feb 84:4123 85:74e9 86:3c03 87:4123 > 88:007f > ata1.00: ATA-7, max UDMA/133, 781422768 sectors: LBA48 > ata1.00: configured for UDMA/133 > scsi1 : ahci > ata2: SATA link down (SStatus 0 SControl 0) > scsi2 : ahci > ata3: SATA link down (SStatus 0 SControl 0) > scsi3 : ahci > ata4: SATA link down (SStatus 0 SControl 0) > Vendor: ATA Model: HDS724040KLSA80 Rev: KFAO > Type: Direct-Access ANSI SCSI revision: 05 > SCSI device sda: 781422768 512-byte hdwr sectors (400088 MB) > sda: Write Protect is off > sda: Mode Sense: 00 3a 00 00 > SCSI device sda: drive cache: write back > SCSI device sda: 781422768 512-byte hdwr sectors (400088 MB) > sda: Write Protect is off > sda: Mode Sense: 00 3a 00 00 > SCSI device sda: drive cache: write back > sda: > sd 0:0:0:0: Attached scsi disk sda > sd 0:0:0:0: Attached scsi generic sg0 type 0 > > > > > > bits for empty ports and thus the empty ports cannot be used after boot. > > Can you try the attached patch? (only compile-tested, be cautious) > > > > plain text document attachment (patch) > > diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c > > index 45fd71d..83751dd 100644 > > --- a/drivers/scsi/ahci.c > > +++ b/drivers/scsi/ahci.c > > @@ -1306,6 +1306,15 @@ static int ahci_init_one (struct pci_dev > > have_msi = 0; > > } > > > > + { > > + u8 orig_pcs, pcs; > > + pci_read_config_byte(pdev, 0x92, &orig_pcs); > > + pci_write_config_byte(pdev, 0x92, 0xf); > > + pci_read_config_byte(pdev, 0x92, &pcs); > > + dev_printk(KERN_INFO, &pdev->dev, "pcs 0x%x->0x%x\n", > > + orig_pcs, pcs); > > + } > > + > > probe_ent = kmalloc(sizeof(*probe_ent), GFP_KERNEL); > > if (probe_ent == NULL) { > > rc = -ENOMEM; > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: hotplug works, but newly plug not 2006-05-25 15:09 ` Ming Zhang @ 2006-05-25 15:14 ` Jeff Garzik 2006-05-25 15:17 ` Ming Zhang ` (2 more replies) 0 siblings, 3 replies; 12+ messages in thread From: Jeff Garzik @ 2006-05-25 15:14 UTC (permalink / raw) To: mingz; +Cc: Tejun Heo, linux-ide-list Ming Zhang wrote: > I read the whole AHCI but I still could not find out what is the magic > number 0x92. Is this in some Intel doc? AHCI spec only documents generic PCI config registers. Each vendor has their own vendor-specific registers. Intel's are documented publicly on the developer website. Jeff ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: hotplug works, but newly plug not 2006-05-25 15:14 ` Jeff Garzik @ 2006-05-25 15:17 ` Ming Zhang 2006-05-25 16:04 ` Ming Zhang 2006-05-25 16:15 ` Ming Zhang 2 siblings, 0 replies; 12+ messages in thread From: Ming Zhang @ 2006-05-25 15:17 UTC (permalink / raw) To: Jeff Garzik; +Cc: Tejun Heo, linux-ide-list On Thu, 2006-05-25 at 11:14 -0400, Jeff Garzik wrote: > Ming Zhang wrote: > > I read the whole AHCI but I still could not find out what is the magic > > number 0x92. Is this in some Intel doc? > > AHCI spec only documents generic PCI config registers. Each vendor has > their own vendor-specific registers. Intel's are documented publicly on > the developer website. > > Jeff > > Thanks! I will grab one now. Ming ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: hotplug works, but newly plug not 2006-05-25 15:14 ` Jeff Garzik 2006-05-25 15:17 ` Ming Zhang @ 2006-05-25 16:04 ` Ming Zhang 2006-05-25 17:08 ` Ming Zhang 2006-05-25 16:15 ` Ming Zhang 2 siblings, 1 reply; 12+ messages in thread From: Ming Zhang @ 2006-05-25 16:04 UTC (permalink / raw) To: Jeff Garzik; +Cc: Tejun Heo, linux-ide-list I added these 2 lines in ahci_host_init() writel(1 << i, mmio + HOST_IRQ_STAT); /* set irq mask (enables interrupts) */ writel(DEF_PORT_IRQ, port_mmio + PORT_IRQ_MASK); ~~~~~~code i added tmp = readl(port_mmio + PORT_IRQ_MASK); VPRINTK("PORT_IRQ_MASK 0x%x\n", tmp); ~~~~~~~~~~~~~ And I got this dmesg with VPRINTK enabled in libata.h. Does this mean that IRQ is not enabled on this port at all? ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 19 (level, low) -> IRQ 19 ahci 0000:00:1f.2: pcs 0x8f->0x8f ahci_host_init: cap 0xc720ff03 port_map 0x0 n_ports 4 ahci_host_init: mmio f8820400 port_mmio f8820500 ahci_setup_port: ENTER, base==0xf8820400, port_idx 0 ahci_setup_port: base now==0xf8820500 ahci_setup_port: EXIT ahci_host_init: PORT_CMD 0x0 ahci_host_init: PORT_SCR_ERR 0x0 ahci_host_init: PORT_IRQ_STAT 0x0 ahci_host_init: PORT_IRQ_MASK 0x0 ahci_host_init: mmio f8820400 port_mmio f8820580 ahci_setup_port: ENTER, base==0xf8820400, port_idx 1 ahci_setup_port: base now==0xf8820580 ahci_setup_port: EXIT ahci_host_init: PORT_CMD 0x0 ahci_host_init: PORT_SCR_ERR 0x0 ahci_host_init: PORT_IRQ_STAT 0x0 ahci_host_init: PORT_IRQ_MASK 0x0 ... On Thu, 2006-05-25 at 11:14 -0400, Jeff Garzik wrote: > Ming Zhang wrote: > > I read the whole AHCI but I still could not find out what is the magic > > number 0x92. Is this in some Intel doc? > > AHCI spec only documents generic PCI config registers. Each vendor has > their own vendor-specific registers. Intel's are documented publicly on > the developer website. > > Jeff > > > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: hotplug works, but newly plug not 2006-05-25 16:04 ` Ming Zhang @ 2006-05-25 17:08 ` Ming Zhang 0 siblings, 0 replies; 12+ messages in thread From: Ming Zhang @ 2006-05-25 17:08 UTC (permalink / raw) To: Jeff Garzik; +Cc: Tejun Heo, linux-ide-list This time I boot with 2 disks in slot. So the IRQ_MASK is set successfully for 2 ports and left as 0 for another 2 ports. Ming ======================== May 25 13:00:53 localhost kernel: ahci_setup_port: base now==0xf881c500 May 25 13:00:53 localhost kernel: ahci_setup_port: EXIT May 25 13:00:53 localhost kernel: ahci_host_init: PORT_CMD 0x0 May 25 13:00:53 localhost kernel: ahci_host_init: PORT_SCR_ERR 0x0 May 25 13:00:53 localhost kernel: ahci_host_init: PORT_IRQ_STAT 0x0 May 25 13:00:53 localhost kernel: ahci_host_init: PORT_IRQ_MASK 0x0 May 25 13:00:53 localhost kernel: ahci_host_init: mmio f881c400 port_mmio f881c580 May 25 13:00:53 localhost kernel: ahci_setup_port: ENTER, base==0xf881c400, port_idx 1 May 25 13:00:53 localhost kernel: ahci_setup_port: base now==0xf881c580 May 25 13:00:53 localhost kernel: ahci_setup_port: EXIT May 25 13:00:53 localhost kernel: ahci_host_init: PORT_CMD 0x6 May 25 13:00:53 localhost kernel: ahci_host_init: PORT_SCR_ERR 0x4050000 May 25 13:00:53 localhost kernel: ahci_host_init: PORT_IRQ_STAT 0x0 May 25 13:00:53 localhost kernel: ahci_host_init: PORT_IRQ_MASK 0x7840007f May 25 13:00:53 localhost kernel: ahci_host_init: mmio f881c400 port_mmio f881c600 May 25 13:00:53 localhost kernel: ahci_setup_port: ENTER, base==0xf881c400, port_idx 2 May 25 13:00:53 localhost kernel: ahci_setup_port: base now==0xf881c600 May 25 13:00:53 localhost kernel: ahci_setup_port: EXIT May 25 13:00:53 localhost kernel: ahci_host_init: PORT_CMD 0x0 May 25 13:00:53 localhost kernel: ahci_host_init: PORT_SCR_ERR 0x0 May 25 13:00:53 localhost kernel: ahci_host_init: PORT_IRQ_STAT 0x0 May 25 13:00:53 localhost kernel: ahci_host_init: PORT_IRQ_MASK 0x0 May 25 13:00:53 localhost kernel: ahci_host_init: mmio f881c400 port_mmio f881c680 May 25 13:00:53 localhost kernel: ahci_setup_port: ENTER, base==0xf881c400, port_idx 3 May 25 13:00:53 localhost kernel: ahci_setup_port: base now==0xf881c680 May 25 13:00:53 localhost kernel: ahci_setup_port: EXIT May 25 13:00:53 localhost kernel: ahci_host_init: PORT_CMD 0x6 May 25 13:00:53 localhost kernel: ahci_host_init: PORT_SCR_ERR 0x4050000 May 25 13:00:53 localhost kernel: ahci_host_init: PORT_IRQ_STAT 0x0 May 25 13:00:53 localhost kernel: ahci_host_init: PORT_IRQ_MASK 0x7840007f May 25 13:00:53 localhost kernel: ahci_host_init: HOST_CTL 0x80000000 May 25 13:00:53 localhost kernel: ahci_host_init: HOST_CTL 0x80000002 On Thu, 2006-05-25 at 12:04 -0400, Ming Zhang wrote: > I added these 2 lines in ahci_host_init() > > writel(1 << i, mmio + HOST_IRQ_STAT); > > /* set irq mask (enables interrupts) */ > writel(DEF_PORT_IRQ, port_mmio + PORT_IRQ_MASK); > > ~~~~~~code i added > tmp = readl(port_mmio + PORT_IRQ_MASK); > VPRINTK("PORT_IRQ_MASK 0x%x\n", tmp); > ~~~~~~~~~~~~~ > > And I got this dmesg with VPRINTK enabled in libata.h. Does this mean > that IRQ is not enabled on this port at all? > > ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 19 (level, low) -> IRQ 19 > ahci 0000:00:1f.2: pcs 0x8f->0x8f > ahci_host_init: cap 0xc720ff03 port_map 0x0 n_ports 4 > ahci_host_init: mmio f8820400 port_mmio f8820500 > ahci_setup_port: ENTER, base==0xf8820400, port_idx 0 > ahci_setup_port: base now==0xf8820500 > ahci_setup_port: EXIT > ahci_host_init: PORT_CMD 0x0 > ahci_host_init: PORT_SCR_ERR 0x0 > ahci_host_init: PORT_IRQ_STAT 0x0 > ahci_host_init: PORT_IRQ_MASK 0x0 > ahci_host_init: mmio f8820400 port_mmio f8820580 > ahci_setup_port: ENTER, base==0xf8820400, port_idx 1 > ahci_setup_port: base now==0xf8820580 > ahci_setup_port: EXIT > ahci_host_init: PORT_CMD 0x0 > ahci_host_init: PORT_SCR_ERR 0x0 > ahci_host_init: PORT_IRQ_STAT 0x0 > ahci_host_init: PORT_IRQ_MASK 0x0 > ... > > > On Thu, 2006-05-25 at 11:14 -0400, Jeff Garzik wrote: > > Ming Zhang wrote: > > > I read the whole AHCI but I still could not find out what is the magic > > > number 0x92. Is this in some Intel doc? > > > > AHCI spec only documents generic PCI config registers. Each vendor has > > their own vendor-specific registers. Intel's are documented publicly on > > the developer website. > > > > Jeff > > > > > > > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: hotplug works, but newly plug not 2006-05-25 15:14 ` Jeff Garzik 2006-05-25 15:17 ` Ming Zhang 2006-05-25 16:04 ` Ming Zhang @ 2006-05-25 16:15 ` Ming Zhang 2 siblings, 0 replies; 12+ messages in thread From: Ming Zhang @ 2006-05-25 16:15 UTC (permalink / raw) To: Jeff Garzik; +Cc: Tejun Heo, linux-ide-list also I downloaded Intel ICH7 Data sheet which contains all pci configuration registers defines. thx for pointing out this. also i saw that ahci_host_init() will set low 4 bits to 0xF anyway for intel chip, and high 4 bits are RO. so the patch set 0xf or 0xFF make no sense here. so what can i do now? thx! Ming On Thu, 2006-05-25 at 11:14 -0400, Jeff Garzik wrote: > Ming Zhang wrote: > > I read the whole AHCI but I still could not find out what is the magic > > number 0x92. Is this in some Intel doc? > > AHCI spec only documents generic PCI config registers. Each vendor has > their own vendor-specific registers. Intel's are documented publicly on > the developer website. > > Jeff > > > ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2006-05-25 17:08 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-05-24 15:25 hotplug works, but newly plug not Ming Zhang 2006-05-24 20:51 ` Tejun Heo 2006-05-24 21:09 ` Ming Zhang 2006-05-24 21:20 ` Ming Zhang 2006-05-24 21:25 ` Tejun Heo 2006-05-24 21:32 ` Ming Zhang 2006-05-25 15:09 ` Ming Zhang 2006-05-25 15:14 ` Jeff Garzik 2006-05-25 15:17 ` Ming Zhang 2006-05-25 16:04 ` Ming Zhang 2006-05-25 17:08 ` Ming Zhang 2006-05-25 16:15 ` Ming Zhang
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).