Re: sata_sis driver may be broken in openSUSE 10.3
I have checked the 32 Bit Version of openSuSE 10.3 with SiS965 chipset, it works. The sata_sis driver tries to load the pata_sis driver. but SuSE 10.3 tries to load the sis5513 before. pata_sis and sis5513 are trying to serve the same hardware. may be this affects a conflict. please try boot option brokenmodules=sis5513 You can also try to boot with brokenmodules=sis5513,pata_sis,sata_sis Then you must load later the modules pata_sis and sata_sis in this order. regards Uwe Nathaniel Dube wrote: > I found your contact information in the file.. > > /usr/src/linux-2.6.18.8-0.5/drivers/ata/sata_sis.c > > And figured you might be the one to talk to. I, as well as many others have > had issus with openSUSE 10.3 not detecting SATA hard drives. I don't know if > the fault is with the kernel developers or openSUSE. But I do know the issue > is with the sata_sis driver that's being provided with 10.3. > > I'm not a programer. I wouldn't know where to begin to fix this issue. > > Here are some links of people having the same problem. > > This is one from the openSUSE mailing list. > http://lists.opensuse.org/opensuse/2007-10/msg00496.html > > This is one of the web forums. > http://www.suseforums.net/index.php?showtopic=39625 > > And here's some from Newsgroups. To many to post here. You could look for > them here. > > news://support-forums.novell.com/opensuse.org.suse-linux.support.install-configure-administration > news://support-forums.novell.com/opensuse.org.suse-linux.support.general-applications > Or on Usenet. > news:alt.os.linux.suse > > Search for "sata". > > There's also a Novell bug report here. > https://bugzilla.novell.com/show_bug.cgi?id=331610 > - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: SiS driver K2.4 for 180/182/965/966....
Franck Bourdonnec wrote: > Hello Uwe & Jeff, > > > I'm trying to follow the 'life' of this driver "sata_sis.c". > > I want to report back in Kernel 2.4.34 the additions found > since some time. I do this to extend IPCOP usage of > SATA boards and also to contribute to linux kernel if > possible. > As far as i know the kernel 2.4 is nearly frozen. > It's not easy because there is many source, that seems > like each others, but not exactly > > 1) http://driver.sis.com/linux/raid/sis18x_20060508.zip > 2) what is today in kernel 2.6.21 > The 2.6.22 supports the actual SiS hardware, in 2.6.21 not all hardware works, like the SATA SiS968 > 3) the list of patch against sata_sis.c (git) > 4) the kernel 2.4.34 "sata_sis.c" source > > After compiling all this, result is a kernel 2.4 driver > that I think, ressemble a lot to the actual 2.6 version. > > I would like you just to read the source (test it??) for advice. > > > > > Strange thing I noted is: > > Sis1180,1184: present in sis18x_20060508.zip but inexistant > The 1180 is supported in 2.6.22, see pata_sis.c , the 1184 is supported in ahci.c. The 1183 and the 0x0180 support was done by PATA. > elsewhere (particulary in K2.6). Why? > > > > in this fix > http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.22.y.git;a=commitdiff;h=29da9f6d9cc3685ae7f6c8b817f6ed8864c78a4c > > the call to "ata_pci_init_native_mode" function is a little bit changed: > &ppi becomes ppi. > libata v2 supports 2 ports with different data. This is not supported in the libata v1. A ppi array is not necessary. > probe_ent = ata_pci_init_native_mode(pdev, ppi, ATA_PORT_PRIMARY | > ATA_PORT_SECONDARY); > > just a confirmation that this match K2.4 prototype. Sometimes I don't really > follow some C notation with ** ;-) > > == > > I wasn't sure here: > > 1) > .host_flags = ATA_FLAG_SATA | ATA_FLAG_SLAVE_POSS | ATA_FLAG_SATA_RESET | > ATA_FLAG_NO_LEGACY, > 2) > .host_flags = ATA_FLAG_SATA | ATA_FLAG_SATA_RESET | > ATA_FLAG_NO_LEGACY, > 3) > .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY, > > > > Choosed 2) because > ATA_FLAG_SLAVE_POSS is positionned in the code (set to one) > > > It is ok. > = > > Thank you to have read this. > Hope it's ok. For my project (IPCop) or directly in k2.4 > if you don't see major obstacle. > > Franck > Uwe - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2.6.22-rc7-git1] sis5513: adding PCI-ID
The SiS966 has one additional PCI-ID 1180. If the chipset is using this PCI-ID, the primary channel is connected to the first PATA-port. The secondary channel is connected to SATA-ports in IDE emulation mode. The legacy IO-ports are used. the including of the PCI-ID into pata_sis is not sufficient, because the legacy driver in drivers/ide is initialized before pata_sis. Signed-off-by: Uwe Koziolek <[EMAIL PROTECTED]> --- a/include/linux/pci_ids.h 2007-07-03 19:17:44.0 +0200 +++ b/include/linux/pci_ids.h 2007-07-04 21:42:16.0 +0200 @@ -661,6 +661,7 @@ #define PCI_DEVICE_ID_SI_965 0x0965 #define PCI_DEVICE_ID_SI_966 0x0966 #define PCI_DEVICE_ID_SI_968 0x0968 +#define PCI_DEVICE_ID_SI_1180 0x1180 #define PCI_DEVICE_ID_SI_5511 0x5511 #define PCI_DEVICE_ID_SI_5513 0x5513 #define PCI_DEVICE_ID_SI_5517 0x5517 --- a/drivers/ide/pci/sis5513.c 2007-07-03 19:17:02.0 +0200 +++ b/drivers/ide/pci/sis5513.c 2007-07-04 21:34:56.0 +0200 @@ -872,6 +872,7 @@ static struct pci_device_id sis5513_pci_tbl[] = { { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5513, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5518, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_1180, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, { 0, }, }; MODULE_DEVICE_TABLE(pci, sis5513_pci_tbl); - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2.6.22-rc6+mboxjeff 3/3] sata_sis: fixed handling for IDE-emulation of ID 1183
The PCI-ID 1183 is used for SATA-ports in PATA-emulation. This mode is handled now by pata_sis. This mode is not fully compatible to SiS 5513/18, so the PCI-ID entry is not moved to pata_sis. This fixes problems with SiS968. Signed-off-by: Uwe Koziolek <[EMAIL PROTECTED]> --- a/drivers/ata/sata_sis.c2007-06-30 02:42:43.0 +0200 +++ b/drivers/ata/sata_sis.c2007-06-12 22:16:11.0 +0200 @@ -72,8 +72,8 @@ { PCI_VDEVICE(SI, 0x0181), sis_180 }, /* SiS 964/180 */ { PCI_VDEVICE(SI, 0x0182), sis_180 }, /* SiS 965/965L */ { PCI_VDEVICE(SI, 0x0183), sis_180 }, /* SiS 965/965L */ - { PCI_VDEVICE(SI, 0x1182), sis_180 }, /* SiS 966/966L */ - { PCI_VDEVICE(SI, 0x1183), sis_180 }, /* SiS 966/966L */ + { PCI_VDEVICE(SI, 0x1182), sis_180 }, /* SiS 966/680 */ + { PCI_VDEVICE(SI, 0x1183), sis_180 }, /* SiS 966/966L/968/680 */ { } /* terminate list */ }; @@ -161,7 +161,6 @@ case 0x0182: case 0x0183: case 0x1182: - case 0x1183: addr += SIS182_SATA1_OFS; break; } @@ -183,8 +182,8 @@ pci_read_config_dword(pdev, cfg_addr, &val); - if ((pdev->device == 0x0182) || (pdev->device == 0x0183) || (pdev->device == 0x1182) || - (pdev->device == 0x1183) || (pmr & SIS_PMR_COMBINED)) + if ((pdev->device == 0x0182) || (pdev->device == 0x0183) || + (pdev->device == 0x1182) || (pmr & SIS_PMR_COMBINED)) pci_read_config_dword(pdev, cfg_addr+0x10, &val2); return (val|val2) & 0xfffb; /* avoid problems with powerdowned ports */ @@ -203,8 +202,8 @@ pci_write_config_dword(pdev, cfg_addr, val); - if ((pdev->device == 0x0182) || (pdev->device == 0x0183) || (pdev->device == 0x1182) || - (pdev->device == 0x1183) || (pmr & SIS_PMR_COMBINED)) + if ((pdev->device == 0x0182) || (pdev->device == 0x0183) || + (pdev->device == 0x1182) || (pmr & SIS_PMR_COMBINED)) pci_write_config_dword(pdev, cfg_addr+0x10, val); } @@ -224,8 +223,8 @@ val = ioread32(ap->ioaddr.scr_addr + (sc_reg * 4)); - if ((pdev->device == 0x0182) || (pdev->device == 0x0183) || (pdev->device == 0x1182) || - (pdev->device == 0x1183) || (pmr & SIS_PMR_COMBINED)) + if ((pdev->device == 0x0182) || (pdev->device == 0x0183) || + (pdev->device == 0x1182) || (pmr & SIS_PMR_COMBINED)) val2 = ioread32(ap->ioaddr.scr_addr + (sc_reg * 4) + 0x10); return (val | val2) & 0xfffb; @@ -245,8 +244,8 @@ sis_scr_cfg_write(ap, sc_reg, val); else { iowrite32(val, ap->ioaddr.scr_addr + (sc_reg * 4)); - if ((pdev->device == 0x0182) || (pdev->device == 0x0183) || (pdev->device == 0x1182) || - (pdev->device == 0x1183) || (pmr & SIS_PMR_COMBINED)) + if ((pdev->device == 0x0182) || (pdev->device == 0x0183) || + (pdev->device == 0x1182) || (pmr & SIS_PMR_COMBINED)) iowrite32(val, ap->ioaddr.scr_addr + (sc_reg * 4)+0x10); } } @@ -324,14 +323,14 @@ break; case 0x1182: + dev_printk(KERN_INFO, &pdev->dev, "Detected SiS 1182/966/680 SATA controller\n"); + pi.flags |= ATA_FLAG_SLAVE_POSS; + break; + case 0x1183: - pci_read_config_dword(pdev, 0x64, &val); - if (val & 0x1000) { - dev_printk(KERN_INFO, &pdev->dev, "Detected SiS 1182/1183/966L SATA controller\n"); - } else { - dev_printk(KERN_INFO, &pdev->dev, "Detected SiS 1182/1183/966 SATA controller\n"); - pi.flags |= ATA_FLAG_SLAVE_POSS; - } + dev_printk(KERN_INFO, &pdev->dev, "Detected SiS 1183/966/966L/968/680 controller in PATA mode\n"); + ppi[0] = &sis_info133_for_sata; + ppi[1] = &sis_info133_for_sata; break; } - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2.6.22-rc6+mboxjeff 1/3] pata_sis: compilation fix
The exported symbol ata_port_info sis_info133_for_sata has not to be declared static. Signed-off-by: Uwe Koziolek <[EMAIL PROTECTED]> --- a/drivers/ata/pata_sis.c2007-06-30 02:42:43.0 +0200 +++ b/drivers/ata/pata_sis.c2007-06-30 02:52:06.0 +0200 @@ -774,7 +774,7 @@ .udma_mask = ATA_UDMA6, .port_ops = &sis_133_ops, }; -static const struct ata_port_info sis_info133_for_sata = { +const struct ata_port_info sis_info133_for_sata = { .sht= &sis_sht, .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, .pio_mask = 0x1f, /* pio0-4 */ - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2.6.22-rc6+mboxjeff 2/3] pata_sis: new PCI ID
The SiS966 has an alternate PCI-ID 1180 for an IDE compatible controller The primaty channel acts as PATA-controller, the secondary channel acts as SATA-controller in PATA-emulation. Signed-off-by: Uwe Koziolek <[EMAIL PROTECTED]> --- a/drivers/ata/pata_sis.c2007-06-30 02:52:06.0 +0200 +++ b/drivers/ata/pata_sis.c2007-06-30 02:58:30.0 +0200 @@ -1016,6 +1016,7 @@ static const struct pci_device_id sis_pci_tbl[] = { { PCI_VDEVICE(SI, 0x5513), }, /* SiS 5513 */ { PCI_VDEVICE(SI, 0x5518), }, /* SiS 5518 */ + { PCI_VDEVICE(SI, 0x1180), }, /* SiS 1180 */ { } }; - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2.6.22-rc4] libata: SiS180 pata support
Jeff Garzik wrote: >>> >> Jeff, >> Did you have added the patch you have mailed on 06.06. anywhere or is >> this patch an email only patch. And how to continue? > > It's in my mbox queue, should be in my next "run"... :) > > Jeff > I have 3 fixes that i want to add on top - a compilation fix for your fix - an additional PCI-ID - a changed handling for SATA-devices in IDE-emulation mode, this fixes issues for the SiS968 I have submitted these fixes 2 times in a single patch, but i can also split the three fixes in separate patches if wanted. Uwe - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2.6.22-rc4] libata: SiS180 pata support
Nevermind, I did it myself: > This ensures that we can easily make changes specific to the PATA port > on the newer SATA chips, and also does what I've been requesting -- use > the standard ata_bmdma_error_handler(), rather than creating custom code > that achieves the same effect. > > > diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c > index ec3ae93..0752104 100644 > --- a/drivers/ata/pata_sis.c > +++ b/drivers/ata/pata_sis.c > Jeff, Did you have added the patch you have mailed on 06.06. anywhere or is this patch an email only patch. And how to continue? Uwe - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2.6.22-rc4]: libata: PATA-mode fixes for sis_sata; resubmission
Changed PATA handler for PATA-ports used by sata_sis. This patch was originally submitted by Jeff Garzik. Added PCI-ID 1180 for SiS966 Controller in pata_sis. The 1180 mode is fully compatible to other SiS PATA-controller. The PCI-ID 1183 is SATA in PATA-emulation, but not fully compatible to SiS5513/5518. sata_sis.c is forwarding this ID to pata_sis. 1183 is not working if simply added to pata_sis. This handling fixes issues with SiS968. Signed-off-by: Uwe Koziolek <[EMAIL PROTECTED]> --- a/drivers/ata/pata_sis.c2007-06-14 22:41:34.0 +0200 +++ b/drivers/ata/pata_sis.c2007-06-12 22:15:04.0 +0200 @@ -560,6 +560,40 @@ .port_start = ata_port_start, }; +static const struct ata_port_operations sis_133_for_sata_ops = { + .port_disable = ata_port_disable, + .set_piomode= sis_133_set_piomode, + .set_dmamode= sis_133_set_dmamode, + .mode_filter= ata_pci_default_filter, + + .tf_load= ata_tf_load, + .tf_read= ata_tf_read, + .check_status = ata_check_status, + .exec_command = ata_exec_command, + .dev_select = ata_std_dev_select, + + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, + .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, + .cable_detect = sis_133_cable_detect, + + .bmdma_setup= ata_bmdma_setup, + .bmdma_start= ata_bmdma_start, + .bmdma_stop = ata_bmdma_stop, + .bmdma_status = ata_bmdma_status, + .qc_prep= ata_qc_prep, + .qc_issue = ata_qc_issue_prot, + .data_xfer = ata_data_xfer, + + .irq_handler= ata_interrupt, + .irq_clear = ata_bmdma_irq_clear, + .irq_on = ata_irq_on, + .irq_ack= ata_irq_ack, + + .port_start = ata_port_start, +}; + static const struct ata_port_operations sis_133_early_ops = { .port_disable = ata_port_disable, .set_piomode= sis_100_set_piomode, @@ -733,13 +767,20 @@ .pio_mask = 0x1f, /* pio0-4 */ .port_ops = &sis_66_ops, }; -const struct ata_port_info sis_info133 = { +static const struct ata_port_info sis_info133 = { .sht= &sis_sht, .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, .pio_mask = 0x1f, /* pio0-4 */ .udma_mask = ATA_UDMA6, .port_ops = &sis_133_ops, }; +const struct ata_port_info sis_info133_for_sata = { + .sht= &sis_sht, + .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, + .pio_mask = 0x1f, /* pio0-4 */ + .udma_mask = ATA_UDMA6, + .port_ops = &sis_133_for_sata_ops, +}; static const struct ata_port_info sis_info133_early = { .sht= &sis_sht, .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, @@ -749,7 +790,7 @@ }; /* Privately shared with the SiS180 SATA driver, not for use elsewhere */ -EXPORT_SYMBOL_GPL(sis_info133); +EXPORT_SYMBOL_GPL(sis_info133_for_sata); static void sis_fixup(struct pci_dev *pdev, struct sis_chipset *sis) { @@ -975,6 +1016,7 @@ static const struct pci_device_id sis_pci_tbl[] = { { PCI_VDEVICE(SI, 0x5513), }, /* SiS 5513 */ { PCI_VDEVICE(SI, 0x5518), }, /* SiS 5518 */ + { PCI_VDEVICE(SI, 0x1180), }, /* SiS 1180 */ { } }; --- a/drivers/ata/sata_sis.c2007-06-14 22:41:34.0 +0200 +++ b/drivers/ata/sata_sis.c2007-06-12 22:16:11.0 +0200 @@ -72,8 +72,8 @@ { PCI_VDEVICE(SI, 0x0181), sis_180 }, /* SiS 964/180 */ { PCI_VDEVICE(SI, 0x0182), sis_180 }, /* SiS 965/965L */ { PCI_VDEVICE(SI, 0x0183), sis_180 }, /* SiS 965/965L */ - { PCI_VDEVICE(SI, 0x1182), sis_180 }, /* SiS 966/966L */ - { PCI_VDEVICE(SI, 0x1183), sis_180 }, /* SiS 966/966L */ + { PCI_VDEVICE(SI, 0x1182), sis_180 }, /* SiS 966/680 */ + { PCI_VDEVICE(SI, 0x1183), sis_180 }, /* SiS 966/966L/968/680 */ { } /* terminate list */ }; @@ -161,7 +161,6 @@ case 0x0182: case 0x0183: case 0x1182: - case 0x1183: addr += SIS182_SATA1_OFS; break; } @@ -183,8 +182,8 @@ pci_read_config_dword(pdev, cfg_addr, &val); - if ((pdev->device == 0x0182) || (pdev->device == 0x0183) || (pdev->device == 0x1182) || - (pdev->device == 0x1183) || (pmr & SIS_PMR_COMBINED)) +
[PATCH 2.6.22-rc4]: libata: PATA-mode fixes for sis_sata
Changed PATA handler for PATA-ports used by sata_sis. This patch was originally submitted by Jeff Garzik. Added PCI-ID 1180 for SiS966 Controller in pata_sis. The 1180 mode is fully compatible to other SiS PATA-controller. The PCI-ID 1183 is SATA in PATA-emulation, but not fully compatible to SiS5513/5518. sata_sis.c is forwarding this ID to pata_sis. 1183 is not working if simply added to pata_sis. This handling fixes issues with SiS968. Signed-off-by: Uwe Koziolek <[EMAIL PROTECTED]> --- a/drivers/ata/pata_sis.c2007-06-14 22:41:34.0 +0200 +++ b/drivers/ata/pata_sis.c2007-06-12 22:15:04.0 +0200 @@ -560,6 +560,40 @@ .port_start = ata_port_start, }; +static const struct ata_port_operations sis_133_for_sata_ops = { + .port_disable = ata_port_disable, + .set_piomode= sis_133_set_piomode, + .set_dmamode= sis_133_set_dmamode, + .mode_filter= ata_pci_default_filter, + + .tf_load= ata_tf_load, + .tf_read= ata_tf_read, + .check_status = ata_check_status, + .exec_command = ata_exec_command, + .dev_select = ata_std_dev_select, + + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, + .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, + .cable_detect = sis_133_cable_detect, + + .bmdma_setup= ata_bmdma_setup, + .bmdma_start= ata_bmdma_start, + .bmdma_stop = ata_bmdma_stop, + .bmdma_status = ata_bmdma_status, + .qc_prep= ata_qc_prep, + .qc_issue = ata_qc_issue_prot, + .data_xfer = ata_data_xfer, + + .irq_handler= ata_interrupt, + .irq_clear = ata_bmdma_irq_clear, + .irq_on = ata_irq_on, + .irq_ack= ata_irq_ack, + + .port_start = ata_port_start, +}; + static const struct ata_port_operations sis_133_early_ops = { .port_disable = ata_port_disable, .set_piomode= sis_100_set_piomode, @@ -733,13 +767,20 @@ .pio_mask = 0x1f, /* pio0-4 */ .port_ops = &sis_66_ops, }; -const struct ata_port_info sis_info133 = { +static const struct ata_port_info sis_info133 = { .sht= &sis_sht, .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, .pio_mask = 0x1f, /* pio0-4 */ .udma_mask = ATA_UDMA6, .port_ops = &sis_133_ops, }; +const struct ata_port_info sis_info133_for_sata = { + .sht= &sis_sht, + .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, + .pio_mask = 0x1f, /* pio0-4 */ + .udma_mask = ATA_UDMA6, + .port_ops = &sis_133_for_sata_ops, +}; static const struct ata_port_info sis_info133_early = { .sht= &sis_sht, .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, @@ -749,7 +790,7 @@ }; /* Privately shared with the SiS180 SATA driver, not for use elsewhere */ -EXPORT_SYMBOL_GPL(sis_info133); +EXPORT_SYMBOL_GPL(sis_info133_for_sata); static void sis_fixup(struct pci_dev *pdev, struct sis_chipset *sis) { @@ -975,6 +1016,7 @@ static const struct pci_device_id sis_pci_tbl[] = { { PCI_VDEVICE(SI, 0x5513), }, /* SiS 5513 */ { PCI_VDEVICE(SI, 0x5518), }, /* SiS 5518 */ + { PCI_VDEVICE(SI, 0x1180), }, /* SiS 1180 */ { } }; --- a/drivers/ata/sata_sis.c2007-06-14 22:41:34.0 +0200 +++ b/drivers/ata/sata_sis.c2007-06-12 22:16:11.0 +0200 @@ -72,8 +72,8 @@ { PCI_VDEVICE(SI, 0x0181), sis_180 }, /* SiS 964/180 */ { PCI_VDEVICE(SI, 0x0182), sis_180 }, /* SiS 965/965L */ { PCI_VDEVICE(SI, 0x0183), sis_180 }, /* SiS 965/965L */ - { PCI_VDEVICE(SI, 0x1182), sis_180 }, /* SiS 966/966L */ - { PCI_VDEVICE(SI, 0x1183), sis_180 }, /* SiS 966/966L */ + { PCI_VDEVICE(SI, 0x1182), sis_180 }, /* SiS 966/680 */ + { PCI_VDEVICE(SI, 0x1183), sis_180 }, /* SiS 966/966L/968/680 */ { } /* terminate list */ }; @@ -161,7 +161,6 @@ case 0x0182: case 0x0183: case 0x1182: - case 0x1183: addr += SIS182_SATA1_OFS; break; } @@ -183,8 +182,8 @@ pci_read_config_dword(pdev, cfg_addr, &val); - if ((pdev->device == 0x0182) || (pdev->device == 0x0183) || (pdev->device == 0x1182) || - (pdev->device == 0x1183) || (pmr & SIS_PMR_COMBINED)) +
[PATCH 2.6.22-rc4] libata: SiS180 pata support
the PATA-port of SiS180 controller does not support a drive present status in the pci configspace like the other SiS PATA controllers, check skipped. Signed-off-by: Uwe Koziolek <[EMAIL PROTECTED]> --- a/drivers/ata/pata_sis.c2007-06-05 22:17:10.0 +0200 +++ b/drivers/ata/pata_sis.c2007-06-06 00:06:08.0 +0200 @@ -130,6 +130,20 @@ /** + * sis_enables_supported - Check if enable_bits are supported + * @pdev: pci device + * + * The combined PATA/SATA controller SiS180 does not support + * the enable_bits in the PCI configspace + */ + +static inline int sis_enables_supported(struct pci_dev *pdev) +{ + return ((pdev->device != 0x0180) && (pdev->device != 0x0181)); +} + + +/** * sis_pre_reset - probe begin * @ap: ATA port * @deadline: deadline jiffies for the operation @@ -146,7 +160,8 @@ struct pci_dev *pdev = to_pci_dev(ap->host->dev); - if (!pci_test_config_bits(pdev, &sis_enable_bits[ap->port_no])) + if (sis_enables_supported(pdev) && + !pci_test_config_bits(pdev, &sis_enable_bits[ap->port_no])) return -ENOENT; return ata_std_prereset(ap, deadline); - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2.6.22-rc2] libata: sata_sis fixes
How should I proceed. I can submit both patches: >> - exclude SiS180 from enable bit checking or >> - exclude MuTol ATA133 from enable bit checking with different >> error_handler. >> > > Been away but - SiS180 wants excluding anyway according to all the docs, > the MuToL does appear to be working correctly with enable bits and we've > got no failure cases in old/new IDE so leave it alone (for now anyway) > I have checked some SiS 5513 config spaces with ATA133 for the enable bits. In all cases Alans code would work. But I dont know why the necesary bits are set. May be the hardware is different to the documentation or the BIOS is setting these bits for compatibility issue. The change of the error handler for SiS180 is really needed. The change of the errorhandler for Pre ATA133 chips is not reasonable. The change of the errorhandler for SiS5513 ATA133 controller is not mandatory. My suggestion: exclude only the SiS180 from the enable bits. But i want to have an ok , or a vote for the other variant. Uwe - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: YuLin: Where can I get the newest source of sata_sis?
>>> When we used 2.6.18 and 2.6.20 on ASUS sis-671 motherboard, We have some >>> problem: cannot find the harddisk controller. >>> In BIOS, the SATA mode is 2P+2IDE. >>> >>> The official kernel 2.6.18, 2.6.20 and new 2.6.21 does not work, i get >>> some information about sata_sis 0.7.1 from you, may I get it ? >>> >>> We are so urgent, please help me. >>> >>> Thank you very much >>> >>> >> Asus is selling a P5X-MX SE motherboard with a SiS968 >> southbridge. The SiS671 Northbridge is not intresting for the SATA-support. >> Currently it is only planned to support this chipset in >> AHCI-mode. You should select the AHCI mode for the SATA-ports in the >> BIOS. The ahci driver should support your board. >> kernel 2.6.20 should be sufficient. >> If this does not work, please provide the output of >> lspci -vvxxx and the selected mode for the SATA-port. >> >> >> > new message: > SATA harddisk mode: IDE in BIOS > Port on SATA2 on motherboard failed. Dmesg said "ata2: SATA link down > (SStatus 0 SControl 0)". > Port on SATA1 on motherboard successed, found the harddisk and partitions. > > What is the difference between SATA1 port and SATA2 port on motherboard, > is it a number of SATA port or different SATA version? > > The 966/968 has a primary and a secondary controller. Both controllers are connected with 2 SATA-ports,a master and a slave port. That is different to other SATA controllers. The secondary controller on your board is not connected with SATA-ports. The problem: Slave only configurations may not work.If you are only connecting the SATA-port 2, you have a slave only configuration. The ata2 in your dmesg is the unused secondary controller. I have retested the driver with SiS966 and kernel 2.6.22-rc3. It works correctly on my board on all ports. If you want to be sure that the disks are working Please use the master device (port 1 on your board) You can also try to use the kernel version i have tested. Uwe Koziolek - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: YuLin: Where can I get the newest source of sata_sis?
> hi, > > When we used 2.6.18 and 2.6.20 on ASUS sis-671 motherboard, We have some > problem: cannot find the harddisk controller. > In BIOS, the SATA mode is 2P+2IDE. > > The official kernel 2.6.18, 2.6.20 and new 2.6.21 does not work, i get > some information about sata_sis 0.7.1 from you, may I get it ? > > We are so urgent, please help me. > > Thank you very much Asus is selling a P5X-MX SE motherboard with a SiS968 southbridge. The SiS671 Northbridge is not intresting for the SATA-support. Currently it is only planned to support this chipset in AHCI-mode. You should select the AHCI mode for the SATA-ports in the BIOS. The ahci driver should support your board. kernel 2.6.20 should be sufficient. If this does not work, please provide the output of lspci -vvxxx and the selected mode for the SATA-port. regards Uwe Koziolek - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2.6.22-rc2] libata: sata_sis fixes
> >> The sata_sis driver supports SATA and PATA ports. The broken support >> of both types in one controller is fixed. >> >> the PATA-port of SiS180 controller does not support a drive present status >> in the pci configspace like the other SiS PATA controllers, check skipped. >> >> Signed-off-by: Uwe Koziolek <[EMAIL PROTECTED]> >> > > Needs checking with SiS because they submitted code that uses those > enable bits and its been in drivers/ide for years with respect of the > MuTOL ATA133. No argument about the SATA one if you've checked the docs > and seen the bug. > > How should I proceed. I can submit both patches: - exclude SiS180 from enable bit checking or - exclude MuTol ATA133 from enable bit checking with different error_handler. Uwe - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2.6.22-rc2] libata: sata_sis fixes
The sata_sis driver supports SATA and PATA ports. The broken support of both types in one controller is fixed. the PATA-port of SiS180 controller does not support a drive present status in the pci configspace like the other SiS PATA controllers, check skipped. Signed-off-by: Uwe Koziolek <[EMAIL PROTECTED]> --- a/drivers/ata/sata_sis.c2007-05-22 11:05:38.0 +0200 +++ b/drivers/ata/sata_sis.c2007-05-23 00:24:28.0 +0200 @@ -255,7 +255,7 @@ { static int printed_version; struct ata_port_info pi = sis_port_info; - const struct ata_port_info *ppi[] = { &pi, NULL }; + const struct ata_port_info *ppi[] = { &pi, &pi }; struct ata_host *host; u32 genctl, val; u8 pmr; --- a/drivers/ata/pata_sis.c2007-05-22 11:05:38.0 +0200 +++ b/drivers/ata/pata_sis.c2007-05-25 07:50:50.0 +0200 @@ -146,7 +146,8 @@ struct pci_dev *pdev = to_pci_dev(ap->host->dev); - if (!pci_test_config_bits(pdev, &sis_enable_bits[ap->port_no])) + if ((pdev->device != 0x0180) && (pdev->device != 0x0181) && + !pci_test_config_bits(pdev, &sis_enable_bits[ap->port_no])) return -ENOENT; return ata_std_prereset(ap, deadline); - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2.6.22-rc2] libata: sata_sis fixes
The sata_sis driver supports SATA and PATA ports. The broken support of both types in one controller is fixed. the pata133 sis controllers does not support a drive present status in the pci configspace like the older sis controllers, check removed. Signed-off-by: Uwe Koziolek <[EMAIL PROTECTED]> --- a/drivers/ata/sata_sis.c2007-05-22 11:05:38.0 +0200 +++ b/drivers/ata/sata_sis.c2007-05-23 00:24:28.0 +0200 @@ -255,7 +255,7 @@ { static int printed_version; struct ata_port_info pi = sis_port_info; - const struct ata_port_info *ppi[] = { &pi, NULL }; + const struct ata_port_info *ppi[] = { &pi, &pi }; struct ata_host *host; u32 genctl, val; u8 pmr; --- a/drivers/ata/pata_sis.c2007-05-22 11:05:38.0 +0200 +++ b/drivers/ata/pata_sis.c2007-05-23 23:10:33.0 +0200 @@ -154,6 +154,19 @@ /** + * sis_133_error_handler - Probe specified port on PATA host controller + * @ap: Port to probe + * + * LOCKING: + * None (inherited from caller). + */ + +static void sis_133_error_handler(struct ata_port *ap) +{ + ata_bmdma_drive_eh(ap, ata_std_prereset, ata_std_softreset, NULL, ata_std_postreset); +} + +/** * sis_error_handler - Probe specified port on PATA host controller * @ap: Port to probe * @@ -540,7 +553,7 @@ .freeze = ata_bmdma_freeze, .thaw = ata_bmdma_thaw, - .error_handler = sis_error_handler, + .error_handler = sis_133_error_handler, .post_internal_cmd = ata_bmdma_post_internal_cmd, .cable_detect = sis_133_cable_detect, - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
new libata-code breaks functionality of sata_sis
a SiS180 controller is connected with a PATA-disk. Starting with 2.6.22-rc1 the disk is no longer working. sata_sis :01:07.0: version 0.7 ACPI: PCI Interrupt Link [APC4] enabled at IRQ 19 ACPI: PCI Interrupt :01:07.0[A] -> Link [APC4] -> GSI 19 (level, low) -> IRQ 16 sata_sis :01:07.0: Detected SiS 180/181 chipset in combined mode scsi0 : sata_sis scsi1 : sata_sis ata1: PATA max UDMA/133 cmd 0x00019000 ctl 0x00019402 bmdma 0x0001a000 irq 0 ata2: PATA max UDMA/133 cmd 0x00019800 ctl 0x00019c02 bmdma 0x0001a008 irq 0 ata1: port disabled. ignoring. ata2: port disabled. ignoring. ATA: abnormal status 0x7F on port 0x00019807 ata2 must be a SATA port. this problem can be solved by the patch. ata1 must not be disabled For this problem i have no solution. --- a/drivers/ata/sata_sis.c 2007-05-22 11:05:38.0 +0200 +++ b/drivers/ata/sata_sis.c 2007-05-23 00:24:28.0 +0200 @@ -255,7 +255,7 @@ { static int printed_version; struct ata_port_info pi = sis_port_info; - const struct ata_port_info *ppi[] = { &pi, NULL }; + const struct ata_port_info *ppi[] = { &pi, &pi }; struct ata_host *host; u32 genctl, val; u8 pmr; - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: A question to Uwe Koziolek (raid on sis180)
Hello. Could you help me with such a question. A have sis180 and raid0 on two sata disks. In windows all works: simply give it a driver and I have access to the raid like to an ordinary disk (nothing to think about). But when I try linux, I obtain two disks (sdb and sdc, for exaple) and interestingly on one disk I can "see" (I mean dmesg output) 3 partitions (sdb1, sdb2 and sdb3) and on the other - 2 (sdc1, sdc2) - in windows I partitioned the disk on 3 partitions. I tried the driver from sis.com (sis18x_20060508.zip). As I understood the sata_sis from sis.com is the same or almost the same as in kernel tree (I've tried 2.6.11). Then I looked at dmraid - it supports a lot of fakeraids, but not the sis:( I thought about software raid, but this frights me:) And now the question: is there any posibility to obtain acces to my raid0-disk in linux or would I better find different problem to solve:) Actually I have no information for the SiS software raid. But it is a good idea to support this using dmraid. I can try a support of this controller in dmraid, but it takes some time. regards, Uwe Koziolek - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: sata_sis and SIS180 in combined mode
{ 0x5596, &sis_info }, { 0x5571, &sis_info }, { 0x5517, &sis_info }, { 0x5511, &sis_info }, {0} }; static struct sis_chipset sis133_early = { 0x0, &sis_info133_early }; static struct sis_chipset sis133 = { 0x0, &sis_info133 }; static struct sis_chipset sis100_early = { 0x0, &sis_info100_early }; static struct sis_chipset sis100 = { 0x0, &sis_info100 }; if (!printed_version++) dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); /* We have to find the bridge first */ for (chipset = &sis_chipsets[0]; chipset->device; chipset++) { host = pci_get_device(PCI_VENDOR_ID_SI, chipset->device, NULL); if (host != NULL) { if (chipset->device == 0x630) { /* SIS630 */ u8 host_rev; pci_read_config_byte(host, PCI_REVISION_ID, &host_rev); if (host_rev >= 0x30) /* 630 ET */ chipset = &sis100_early; } break; } } /* Look for concealed bridges */ if (host == NULL) { /* Second check */ u32 idemisc; u16 trueid; /* Disable ID masking and register remapping then see what the real ID is */ pci_read_config_dword(pdev, 0x54, &idemisc); pci_write_config_dword(pdev, 0x54, idemisc & 0x7fff); pci_read_config_word(pdev, PCI_DEVICE_ID, &trueid); pci_write_config_dword(pdev, 0x54, idemisc); switch(trueid) { case 0x5518: /* SIS 962/963 */ chipset = &sis133; if ((idemisc & 0x4000) == 0) { pci_write_config_dword(pdev, 0x54, idemisc | 0x4000); printk(KERN_INFO "SIS5513: Switching to 5513 register mapping\n"); } break; case 0x0180: /* SIS 965/965L */ chipset = &sis133; break; case 0x1180: /* SIS 966/966L */ chipset = &sis133; break; } } /* Further check */ if (chipset == NULL) { struct pci_dev *lpc_bridge; u16 trueid; u8 prefctl; u8 idecfg; u8 sbrev; /* Try the second unmasking technique */ pci_read_config_byte(pdev, 0x4a, &idecfg); pci_write_config_byte(pdev, 0x4a, idecfg | 0x10); pci_read_config_word(pdev, PCI_DEVICE_ID, &trueid); pci_write_config_byte(pdev, 0x4a, idecfg); switch(trueid) { case 0x5517: lpc_bridge = pci_get_slot(pdev->bus, 0x10); /* Bus 0 Dev 2 Fn 0 */ if (lpc_bridge == NULL) break; pci_read_config_byte(lpc_bridge, PCI_REVISION_ID, &sbrev); pci_read_config_byte(pdev, 0x49, &prefctl); pci_dev_put(lpc_bridge); if (sbrev == 0x10 && (prefctl & 0x80)) { chipset = &sis133_early; break; } chipset = &sis100; break; } } pci_dev_put(host); /* No chipset info, no support */ if (chipset == NULL) return -ENODEV; port = chipset->info; port->private_data = chipset; sis_fixup(pdev, chipset); port_info[0] = port_info[1] = port; return ata_pci_init_one(pdev, port_info, 2); } static const struct pci_device_id sis_pci_tbl[] = { { PCI_VDEVICE(SI, 0x5513), }, /* SiS 5513 */ { PCI_VDEVICE(SI, 0x5518), }, /* SiS 5518 */ { } }; static struct pci_driver sis_pci_driver = { .name = DRV_NAME, .id_table = sis_pci_tbl, .probe = sis_init_one, .remove = ata_pci_remove_one, .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, }; static int __init sis_init(void) { return pci_register_driver(&sis_pci_driver); } static void __exit sis_exit(void) { pci_unregister_driver(&sis_pci_driver); } module_init(sis_init); module_exit(sis_exit); MODULE_AUTHOR("Alan Cox"); MODULE_DESCRIPTION("SCSI low-level driver for SiS ATA"); MODULE_LICENSE("GPL"); MODULE_DEVICE_TABLE(pci, sis_pci_tbl); MODULE_VERSION(DRV_VERSION); /* * sata_sis.c - Silicon Integrated Systems SATA * * Maintained by: Uwe Koziolek * Please ALWAYS copy linux-ide@vger.kernel.org * on emails. * * Copyright 2004 Uwe Koziolek * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * * * libata documentation is available via 'make {ps|pdf}docs', * as Documentation/DocBook/libata.* * * Hardware documentation available under NDA. * */ #include #include #include #include #include #include #include #include #include #include #define DRV_NAME "sata_sis" #define DRV_VERSION "0.7" enum { sis_180 = 0,
low performance trying pata_sis
There is a wrong order to initialize the drivers. The IDE-platform driver was initialized before pata_sis. So the generic platform driver is driving the IDE controller instead of pata_sis. kernel 2.6.19 .config # CONFIG_BLK_DEV_SIS5513 is not set CONFIG_ATA=y CONFIG_PATA_SIS=y dmesg ... libata version 2.00 loaded. ... Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2 ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx Probing IDE interface ide0... hda: SAMSUNG SP1614N, ATA DISK drive Probing IDE interface ide1... ... pata_sis :00:02.5: version 0.4.4 ata: 0x1F0 IDE port busy ata: conflict with ide0 ata: 0x170 IDE port busy ata: conflict with ide1 pata_sis: probe of :00:02.5 failed with error -16 regards Uwe Koziolek - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: sata_sis and SIS180 in combined mode
>> One port is PATA, the other port is SATA, they have the same PCI >> resources. It is possible to configure >> the controller to use both ports in SATA mode without slave. Then the >> PATA part of the controller is not >> reachable. >> > > Ok so if the pata_sis driver exports > > sis_info133 (UDMA 133 port_info structure) > > is that sufficient for you to attach the PATA port to the PATA methods > for this chipset ? > > Alan > It should be sufficient . Uwe - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: sata_sis and SIS180 in combined mode
>> Because you are only using the PATA port, you can make a private >> solution, move the PCI-ID 180 from sata_sis.c to sis5513.c or >> pata_sis.c >> dependend on the ide driver you want to use. >> >> The SiS180 has no hardware RAID functionality, It is only a BIOS based >> software raid. The SiS180 is a combined SATA/PATA controller. >> >> I will try a patch for this issue. >> > > Are both ports off the same set of PCI resources ? If not then it would > be better to put a set of entry points into pata_sis that allow sata_sis > to "plug in" pata support. I'm happy to help hack on this given enough > info. > > Alan > > One port is PATA, the other port is SATA, they have the same PCI resources. It is possible to configure the controller to use both ports in SATA mode without slave. Then the PATA part of the controller is not reachable. Uwe - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2.6.19-rc6-mm2] sata_sis: support SiS966/966L
The SiS966/966L has different PCI-IDs for native mode and AHCI mode. The SiS966 supports four SATA ports only in native mode. Added additional PCI-ID 0x0183 for SiS965/965L. this patch is based on the code from David Wang from SiS Corporation published on SiS Website. Signed-off-by: Uwe Koziolek <[EMAIL PROTECTED]> --- a/drivers/ata/sata_sis.c2006-11-26 21:45:29.0 +0100 +++ b/drivers/ata/sata_sis.c2006-12-04 00:49:01.0 +0100 @@ -42,7 +42,7 @@ #include #define DRV_NAME "sata_sis" -#define DRV_VERSION"0.6" +#define DRV_VERSION"0.7" enum { sis_180 = 0, @@ -67,9 +67,12 @@ static void sis_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); static const struct pci_device_id sis_pci_tbl[] = { - { PCI_VDEVICE(SI, 0x180), sis_180 }, - { PCI_VDEVICE(SI, 0x181), sis_180 }, - { PCI_VDEVICE(SI, 0x182), sis_180 }, + { PCI_VDEVICE(SI, 0x0180), sis_180 }, /* SiS 964/180 */ + { PCI_VDEVICE(SI, 0x0181), sis_180 }, /* SiS 964/180 */ + { PCI_VDEVICE(SI, 0x0182), sis_180 }, /* SiS 965/965L */ + { PCI_VDEVICE(SI, 0x0183), sis_180 }, /* SiS 965/965L */ + { PCI_VDEVICE(SI, 0x1182), sis_180 }, /* SiS 966/966L */ + { PCI_VDEVICE(SI, 0x1183), sis_180 }, /* SiS 966/966L */ { } /* terminate list */ }; @@ -142,24 +145,32 @@ MODULE_DEVICE_TABLE(pci, sis_pci_tbl); MODULE_VERSION(DRV_VERSION); -static unsigned int get_scr_cfg_addr(unsigned int port_no, unsigned int sc_reg, int device) +static unsigned int get_scr_cfg_addr(unsigned int port_no, unsigned int sc_reg, struct pci_dev *pdev) { unsigned int addr = SIS_SCR_BASE + (4 * sc_reg); if (port_no) { - if (device == 0x182) - addr += SIS182_SATA1_OFS; - else - addr += SIS180_SATA1_OFS; + switch (pdev->device) { + case 0x0180: + case 0x0181: + addr += SIS180_SATA1_OFS; + break; + + case 0x0182: + case 0x0183: + case 0x1182: + case 0x1183: + addr += SIS182_SATA1_OFS; + break; + } } - return addr; } static u32 sis_scr_cfg_read (struct ata_port *ap, unsigned int sc_reg) { struct pci_dev *pdev = to_pci_dev(ap->host->dev); - unsigned int cfg_addr = get_scr_cfg_addr(ap->port_no, sc_reg, pdev->device); + unsigned int cfg_addr = get_scr_cfg_addr(ap->port_no, sc_reg, pdev); u32 val, val2 = 0; u8 pmr; @@ -170,7 +181,8 @@ pci_read_config_dword(pdev, cfg_addr, &val); - if ((pdev->device == 0x182) || (pmr & SIS_PMR_COMBINED)) + if ((pdev->device == 0x0182) || (pdev->device == 0x0183) || (pdev->device == 0x1182) || + (pdev->device == 0x1183) || (pmr & SIS_PMR_COMBINED)) pci_read_config_dword(pdev, cfg_addr+0x10, &val2); return (val|val2) & 0xfffb; /* avoid problems with powerdowned ports */ @@ -179,7 +191,7 @@ static void sis_scr_cfg_write (struct ata_port *ap, unsigned int scr, u32 val) { struct pci_dev *pdev = to_pci_dev(ap->host->dev); - unsigned int cfg_addr = get_scr_cfg_addr(ap->port_no, scr, pdev->device); + unsigned int cfg_addr = get_scr_cfg_addr(ap->port_no, scr, pdev); u8 pmr; if (scr == SCR_ERROR) /* doesn't exist in PCI cfg space */ @@ -189,7 +201,8 @@ pci_write_config_dword(pdev, cfg_addr, val); - if ((pdev->device == 0x182) || (pmr & SIS_PMR_COMBINED)) + if ((pdev->device == 0x0182) || (pdev->device == 0x0183) || (pdev->device == 0x1182) || + (pdev->device == 0x1183) || (pmr & SIS_PMR_COMBINED)) pci_write_config_dword(pdev, cfg_addr+0x10, val); } @@ -209,7 +222,8 @@ val = inl(ap->ioaddr.scr_addr + (sc_reg * 4)); - if ((pdev->device == 0x182) || (pmr & SIS_PMR_COMBINED)) + if ((pdev->device == 0x0182) || (pdev->device == 0x0183) || (pdev->device == 0x1182) || + (pdev->device == 0x1183) || (pmr & SIS_PMR_COMBINED)) val2 = inl(ap->ioaddr.scr_addr + (sc_reg * 4) + 0x10); return (val | val2) & 0xfffb; @@ -229,7 +243,8 @@ sis_scr_cfg_write(ap, sc_reg, val); else { outl(val, ap->ioaddr.scr_addr + (sc_reg * 4)); - if ((pdev->device == 0x182) || (pmr & SIS_PMR_COMBINED)) + if ((pdev->device == 0x0182) || (pdev->device == 0x0183) || (pdev->device == 0x1182) || +
Re: sata_sis and SIS180 in combined mode
Hello Sven, the sata_sis does not really supports PATA-ports. The driver must be modified. A good solution would be to move the SiS180/964 support to pata_sis because the PATA code is much longer then the SATA code. Only some lines must be added to the pata_sis, to support the SATA ports. But actually it does not work. Because you are only using the PATA port, you can make a private solution, move the PCI-ID 180 from sata_sis.c to sis5513.c or pata_sis.c dependend on the ide driver you want to use. The SiS180 has no hardware RAID functionality, It is only a BIOS based software raid. The SiS180 is a combined SATA/PATA controller. I will try a patch for this issue. regards, Uwe Koziolek Sven Ladegast wrote: > Hello Uwe, > > I am having problems to access a hard drive connected to a SIS180 > SATA-RAID controller. > > The controller is located on my mainboard (Elitegroup KV2 extreme). > There is only one hard disk drive connected to the PATA port od the > controller. Both SATA ports are empty. The BIOS of the controller > recognizes the disk and while running Microsoft Windows I can access the > disk. > > I do not know the SIS180 chipset. Probably it is a fake-RAID but I do not > know if the PATA port is just a SATA-PATA birdge hardwired on the > mainboard or if it is a seperate port. > > - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [git patch] libata fixes
Hello Jeff, i have seen you have corrected a bug with a unused variable in sata_sis.c. one time. But i have seen this problem 2 times. my git data are not acually i have used. git pull rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git git checkout -f upstream may be it is already fixed. diff --git a/drivers/scsi/sata_sis.c b/drivers/scsi/sata_sis.c @@ -159,17 +161,17 @@ static u32 sis_scr_cfg_read (struct ata_ { struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); unsigned int cfg_addr = get_scr_cfg_addr(ap->port_no, sc_reg, pdev->device); - u32 val, val2; + u32 val, val2 = 0; u8 pmr; if (sc_reg == SCR_ERROR) /* doesn't exist in PCI cfg space */ return 0x; pci_read_config_byte(pdev, SIS_PMR, &pmr); - + pci_read_config_dword(pdev, cfg_addr, &val); - if ((pdev->device == 0x182) || (pmr & SIS_PMR_COMBINED)) + if ((pdev->device == 0x182) || (pmr & SIS_PMR_COMBINED)) pci_read_config_dword(pdev, cfg_addr+0x10, &val2); return val|val2; >Please pull from 'upstream' branch of >master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git > >to obtain fixes for last-minute problems noticed in current build, >following GregKH's PCI merge. > > > drivers/scsi/sata_mv.c | 16 > drivers/scsi/sata_sis.c | 20 +++- > 2 files changed, 11 insertions(+), 25 deletions(-) > > > >diff --git a/drivers/scsi/sata_sis.c b/drivers/scsi/sata_sis.c >--- a/drivers/scsi/sata_sis.c >+++ b/drivers/scsi/sata_sis.c >@@ -55,7 +55,7 @@ enum { > SIS180_SATA1_OFS= 0x10, /* offset from sata0->sata1 phy regs */ > SIS182_SATA1_OFS= 0x20, /* offset from sata0->sata1 phy regs */ > SIS_PMR = 0x90, /* port mapping register */ >- SIS_PMR_COMBINED= 0x30, >+ SIS_PMR_COMBINED= 0x30, > > /* random bits */ > SIS_FLAG_CFGSCR = (1 << 30), /* host flag: SCRs via PCI cfg */ >@@ -147,11 +147,13 @@ static unsigned int get_scr_cfg_addr(uns > { > unsigned int addr = SIS_SCR_BASE + (4 * sc_reg); > >- if (port_no) >+ if (port_no) { > if (device == 0x182) > addr += SIS182_SATA1_OFS; > else > addr += SIS180_SATA1_OFS; >+ } >+ > return addr; > } > >@@ -166,10 +168,10 @@ static u32 sis_scr_cfg_read (struct ata_ > return 0x; > > pci_read_config_byte(pdev, SIS_PMR, &pmr); >- >+ > pci_read_config_dword(pdev, cfg_addr, &val); > >- if ((pdev->device == 0x182) || (pmr & SIS_PMR_COMBINED)) >+ if ((pdev->device == 0x182) || (pmr & SIS_PMR_COMBINED)) > pci_read_config_dword(pdev, cfg_addr+0x10, &val2); > > return val|val2; >@@ -185,7 +187,7 @@ static void sis_scr_cfg_write (struct at > return; > > pci_read_config_byte(pdev, SIS_PMR, &pmr); >- >+ > pci_write_config_dword(pdev, cfg_addr, val); > > if ((pdev->device == 0x182) || (pmr & SIS_PMR_COMBINED)) >@@ -195,7 +197,7 @@ static void sis_scr_cfg_write (struct at > static u32 sis_scr_read (struct ata_port *ap, unsigned int sc_reg) > { > struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); >- u32 val,val2; >+ u32 val, val2 = 0; > u8 pmr; > > if (sc_reg > SCR_CONTROL) >@@ -209,9 +211,9 @@ static u32 sis_scr_read (struct ata_port > val = inl(ap->ioaddr.scr_addr + (sc_reg * 4)); > > if ((pdev->device == 0x182) || (pmr & SIS_PMR_COMBINED)) >- val2 = inl(ap->ioaddr.scr_addr + (sc_reg * 4)+0x10); >+ val2 = inl(ap->ioaddr.scr_addr + (sc_reg * 4) + 0x10); > >- return val|val2; >+ return val | val2; > } > > static void sis_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) >@@ -223,7 +225,7 @@ static void sis_scr_write (struct ata_po > return; > > pci_read_config_byte(pdev, SIS_PMR, &pmr); >- >+ > if (ap->flags & SIS_FLAG_CFGSCR) > sis_scr_cfg_write(ap, sc_reg, val); > else { >- > > - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Sis180 Jetway S755Max
Hello Wes, i include for you a hothack for SiS180 into the sata5513, untested and not pretty. additional i include the patch submitted by Arnaud Patard. If the last one works, it is the better solution, with chances to be included into the kernel. regards Uwe Koziolek /* * linux/drivers/ide/pci/sis5513.c Version 0.16ac+vp Jun 18, 2003 * * Copyright (C) 1999-2000 Andre Hedrick <[EMAIL PROTECTED]> * Copyright (C) 2002 Lionel Bouton <[EMAIL PROTECTED]>, Maintainer * Copyright (C) 2003 Vojtech Pavlik <[EMAIL PROTECTED]> * May be copied or modified under the terms of the GNU General Public License * * * Thanks : * * SiS Taiwan : for direct support and hardware. * Daniela Engert : for initial ATA100 advices and numerous others. * John Fremlin, Manfred Spraul, Dave Morgan, Peter Kjellerstedt : * for checking code correctness, providing patches. * * * Original tests and design on the SiS620 chipset. * ATA100 tests and design on the SiS735 chipset. * ATA16/33 support from specs * ATA133 support for SiS961/962 by L.C. Chang <[EMAIL PROTECTED]> * ATA133 961/962/963 fixes by Vojtech Pavlik <[EMAIL PROTECTED]> * * Documentation: * SiS chipset documentation available under NDA to companies only * (not to individuals). */ /* * The original SiS5513 comes from a SiS5511/55112/5513 chipset. The original * SiS5513 was also used in the SiS5596/5513 chipset. Thus if we see a SiS5511 * or SiS5596, we can assume we see the first MWDMA-16 capable SiS5513 chip. * * Later SiS chipsets integrated the 5513 functionality into the NorthBridge, * starting with SiS5571 and up to SiS745. The PCI ID didn't change, though. We * can figure out that we have a more modern and more capable 5513 by looking * for the respective NorthBridge IDs. * * Even later (96x family) SiS chipsets use the MuTIOL link and place the 5513 * into the SouthBrige. Here we cannot rely on looking up the NorthBridge PCI * ID, while the now ATA-133 capable 5513 still has the same PCI ID. * Fortunately the 5513 can be 'unmasked' by fiddling with some config space * bits, changing its device id to the true one - 5517 for 961 and 5518 for * 962/963. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "ide-timing.h" #define DISPLAY_SIS_TIMINGS /* registers layout and init values are chipset family dependant */ #define ATA_16 0x01 #define ATA_33 0x02 #define ATA_66 0x03 #define ATA_100a 0x04 // SiS730/SiS550 is ATA100 with ATA66 layout #define ATA_100 0x05 #define ATA_133a 0x06 // SiS961b with 133 support #define ATA_133 0x07 // SiS962/963 static u8 chipset_family; /* * Devices supported */ static const struct { const char *name; u16 host_id; u8 chipset_family; u8 flags; } SiSHostChipInfo[] = { { "SiS745", PCI_DEVICE_ID_SI_745, ATA_100 }, { "SiS735", PCI_DEVICE_ID_SI_735, ATA_100 }, { "SiS733", PCI_DEVICE_ID_SI_733, ATA_100 }, { "SiS635", PCI_DEVICE_ID_SI_635, ATA_100 }, { "SiS633", PCI_DEVICE_ID_SI_633, ATA_100 }, { "SiS730", PCI_DEVICE_ID_SI_730, ATA_100a }, { "SiS550", PCI_DEVICE_ID_SI_550, ATA_100a }, { "SiS640", PCI_DEVICE_ID_SI_640, ATA_66 }, { "SiS630", PCI_DEVICE_ID_SI_630, ATA_66 }, { "SiS620", PCI_DEVICE_ID_SI_620, ATA_66 }, { "SiS540", PCI_DEVICE_ID_SI_540, ATA_66 }, { "SiS530", PCI_DEVICE_ID_SI_530, ATA_66 }, { "SiS5600", PCI_DEVICE_ID_SI_5600, ATA_33 }, { "SiS5598", PCI_DEVICE_ID_SI_5598, ATA_33 }, { "SiS5597", PCI_DEVICE_ID_SI_5597, ATA_33 }, { "SiS5591/2", PCI_DEVICE_ID_SI_5591, ATA_33 }, { "SiS5582", PCI_DEVICE_ID_SI_5582, ATA_33 }, { "SiS5581", PCI_DEVICE_ID_SI_5581, ATA_33 }, { "SiS5596", PCI_DEVICE_ID_SI_5596, ATA_16 }, { "SiS5571", PCI_DEVICE_ID_SI_5571, ATA_16 }, { "SiS551x", PCI_DEVICE_ID_SI_5511, ATA_16 }, }; /* Cycle time bits and values vary across chip dma capabilities These three arrays hold the register layout and the values to set. Indexed by chipset_family and (dma_mode - XFER_UDMA_0) */ /* {0, ATA_16, ATA_33, ATA_66, ATA_100a, ATA_100, ATA_133} */ static u8 cycle_time_offset[] = {0,0,5,4,4,0,0}; static u8 cycle_time_range[] = {0,0,2,3,3,4,4}; static u8 cycle_time_value[][XFER_UDMA_6 - XFER_UDMA_0 + 1] = { {0,0,0,0,0,0,0}, /* no udma */ {0,0,0,0,0,0,0}, /* no udma */ {3,2,1,0,0,0,0}, /* ATA_33 */ {7,5,3,2,1,0,0}, /* ATA_66 */ {7,5,3,2,1,0,0}, /* ATA_100a (730 specific), differences are on cycle_time range and offset */ {11,7,5,4,2,1,0}, /* ATA_100 */ {15,10,7,5,3,2,1}, /* ATA_133a (earliest 691 southbridges) */ {15,10,7,5,3,2,1}, /* ATA_133 */ }; /* CRC Valid Setup Time vary across IDE clock setting 33/66/
Re: maintenence sata_sis
Wes Newell wrote: > I've got a Jetway S755MAX that also has a real SIS180 onboard and have > been trying to get PATA support for it without any luck for several > months now. The sata_sis driver from SIS just locks up the machine > when I attach a pata drive. With the help of a few here, I patched the > sis5513 driver, but it has lost interrupt problems. I basically gave > up on this ever working a couple of months ago. Do you think there's > any hope at all? I'm willing to try whatever some can point me > towards, but I'm not a C programmer. I can compile kernels though and > follow instructions. > The SiS180 has disabled the interrupts by default. You must enable the interrupts in the PCI-config space. You can find a function pci_enable_intx() in the sata_sis.c. regards Uwe Koziolek - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
maintenence sata_sis
Hello Jeff, currently it exists 3 variants to support the SiS182 Chipset - use SiS182 with the code from SiS180, only add the PCI-ID to the driver - the source code from OSDL - the source code from www.sis.com Actually i have no SiS board available. So i have no chance to maintain the driver. regards Uwe Koziolek Arnaud Patard wrote: >Hi, > > >I got recently a motherboard shipped with the SATA SIS 182 chipset. This >chipset is not supported by the kernel. I tried to just add the PCI IDS >in the supported chipset list as suggested on some mails in this >list but it didn't work for the hard drive connected on the second sata port. > >I found that this has been reported on >http://bugme.osdl.org/show_bug.cgi?id=4192. Unfortunately the patch >didn't apply to the recents kernel. So, I've written a new minimal patch that >add support for this chipset. > >It works well on the machine I have with a 2.6.12.5 kernel but I was not >able to test it on SIS 180/181 chipset (I don't have the hardware). > >imho having support for this chipset in the kernel could be usefull, so >any feedback/comments are welcome. > >Regards, >Arnaud Patard > > > - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html