Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 152646 Details for
Bug 232410
installer can't see any ide device which attach on JMB controller
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
switch JMb controller into dual function and load generic to drive it well
jmicron-dualfn-pata.patch (text/plain), 7.19 KB, created by
Justin Tsai
on 2007-04-15 14:46:00 UTC
(
hide
)
Description:
switch JMb controller into dual function and load generic to drive it well
Filename:
MIME Type:
Creator:
Justin Tsai
Created:
2007-04-15 14:46:00 UTC
Size:
7.19 KB
patch
obsolete
>--- linux-2.6.9/include/linux/pci.h.orig 2007-03-16 06:24:40.000000000 +0800 >+++ linux-2.6.9/include/linux/pci.h 2007-03-16 06:24:40.000000000 +0800 >@@ -1018,11 +1018,17 @@ > }; > > enum pci_fixup_pass { >+ pci_fixup_early, /* Before probing BARs */ > pci_fixup_header, /* Called immediately after reading configuration header */ > pci_fixup_final, /* Final phase of device fixups */ > }; > > /* Anonymous variables would be nice... */ >+#define DECLARE_PCI_FIXUP_EARLY(vendor, device, hook) \ >+ static struct pci_fixup __pci_fixup_##vendor##device##hook __attribute_used__ \ >+ __attribute__((__section__(".pci_fixup_early"))) = { \ >+ vendor, device, hook }; >+ > #define DECLARE_PCI_FIXUP_HEADER(vendor, device, hook) \ > static struct pci_fixup __pci_fixup_##vendor##device##hook __attribute_used__ \ > __attribute__((__section__(".pci_fixup_header"))) = { \ >--- linux-2.6.9/include/asm-generic/vmlinux.lds.h.orig 2007-03-16 07:33:30.000000000 +0800 >+++ linux-2.6.9/include/asm-generic/vmlinux.lds.h 2007-03-16 08:03:32.000000000 +0800 >@@ -18,6 +18,9 @@ > \ > /* PCI quirks */ \ > .pci_fixup : AT(ADDR(.pci_fixup) - LOAD_OFFSET) { \ >+ VMLINUX_SYMBOL(__start_pci_fixups_early) = .; \ >+ *(.pci_fixup_early) \ >+ VMLINUX_SYMBOL(__end_pci_fixups_early) = .; \ > VMLINUX_SYMBOL(__start_pci_fixups_header) = .; \ > *(.pci_fixup_header) \ > VMLINUX_SYMBOL(__end_pci_fixups_header) = .; \ >--- linux-2.6.9/drivers/pci/quirks.c.orig 2007-03-16 06:14:49.000000000 +0800 >+++ linux-2.6.9/drivers/pci/quirks.c 2007-03-16 06:58:41.000000000 +0800 >@@ -1189,6 +1189,55 @@ > DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_963, quirk_sis_96x_smbus ); > DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_LPC, quirk_sis_96x_smbus ); > >+#if defined(CONFIG_ATA) || defined(CONFIG_ATA_MODULE) >+ >+/* >+ * If we are using libata we can drive this chip properly but must >+ * do this early on to make the additional device appear during >+ * the PCI scanning. >+ */ >+ >+static void quirk_jmicron_dualfn(struct pci_dev *pdev) >+{ >+ u32 conf; >+ u8 hdr; >+ >+ /* Only poke fn 0 */ >+ if (PCI_FUNC(pdev->devfn)) >+ return; >+ >+ switch(pdev->device) { >+ case PCI_DEVICE_ID_JMICRON_JMB365: >+ case PCI_DEVICE_ID_JMICRON_JMB366: >+ /* Redirect IDE second PATA port to the right spot */ >+ pci_read_config_dword(pdev, 0x80, &conf); >+ conf |= (1 << 24); >+ /* Fall through */ >+ pci_write_config_dword(pdev, 0x80, conf); >+ case PCI_DEVICE_ID_JMICRON_JMB361: >+ case PCI_DEVICE_ID_JMICRON_JMB363: >+ pci_read_config_dword(pdev, 0x40, &conf); >+ /* Enable dual function mode, AHCI on fn 0, IDE fn1 */ >+ /* Set the class codes correctly and then direct IDE 0 */ >+ conf &= ~0x000FF200; /* Clear bit 9 and 12-19 */ >+ conf |= 0x00C2A102; /* Set 1, 8, 13, 15, 17, 22, 23 */ >+ pci_write_config_dword(pdev, 0x40, conf); >+ >+ /* Reconfigure so that the PCI scanner discovers the >+ device is now multifunction */ >+ >+ pci_read_config_byte(pdev, PCI_HEADER_TYPE, &hdr); >+ pdev->hdr_type = hdr & 0x7f; >+ pdev->multifunction = !!(hdr & 0x80); >+ >+ break; >+ } >+} >+ >+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, quirk_jmicron_dualfn); >+ >+#endif >+ > #ifdef CONFIG_X86_IO_APIC > static void __init quirk_alder_ioapic(struct pci_dev *pdev) > { >@@ -1452,6 +1501,8 @@ > } > } > >+extern struct pci_fixup __start_pci_fixups_early[]; >+extern struct pci_fixup __end_pci_fixups_early[]; > extern struct pci_fixup __start_pci_fixups_header[]; > extern struct pci_fixup __end_pci_fixups_header[]; > extern struct pci_fixup __start_pci_fixups_final[]; >@@ -1462,6 +1513,11 @@ > struct pci_fixup *start, *end; > > switch(pass) { >+ case pci_fixup_early: >+ start = __start_pci_fixups_early; >+ end = __end_pci_fixups_early; >+ break; >+ > case pci_fixup_header: > start = __start_pci_fixups_header; > end = __end_pci_fixups_header; >--- linux-2.6.9/drivers/pci/probe.c.orig 2007-03-16 06:17:08.000000000 +0800 >+++ linux-2.6.9/drivers/pci/probe.c 2007-03-16 06:19:22.000000000 +0800 >@@ -492,6 +492,10 @@ > /* "Unknown power state" */ > dev->current_state = 4; > >+ /* Early fixups, before probing the BARs */ >+ pci_fixup_device(pci_fixup_early, dev); >+ class = dev->class >> 8; >+ > switch (dev->hdr_type) { /* header type */ > case PCI_HEADER_TYPE_NORMAL: /* standard header */ > if (class == PCI_CLASS_BRIDGE_PCI) >--- linux-2.6.9/drivers/ide/pci/generic.c.orig 2007-03-16 06:09:52.000000000 +0800 >+++ linux-2.6.9/drivers/ide/pci/generic.c 2007-03-16 06:31:48.000000000 +0800 >@@ -123,10 +123,18 @@ > (!(PCI_FUNC(dev->devfn) & 1))) > return -EAGAIN; > >- pci_read_config_word(dev, PCI_COMMAND, &command); >- if(!(command & PCI_COMMAND_IO)) { >- printk(KERN_INFO "Skipping disabled %s IDE controller.\n", d->name); >- return -ENODEV; >+ if (dev->vendor == PCI_VENDOR_ID_JMICRON) { >+ if (dev->device != PCI_DEVICE_ID_JMICRON_JMB368 && PCI_FUNC(dev->devfn) != 1) >+ return -ENODEV; >+ } >+ >+ >+ if (dev->vendor != PCI_VENDOR_ID_JMICRON) { >+ pci_read_config_word(dev, PCI_COMMAND, &command); >+ if(!(command & PCI_COMMAND_IO)) { >+ printk(KERN_INFO "Skipping disabled %s IDE controller.\n", d->name); >+ return -ENODEV; >+ } > } > ide_setup_pci_device(dev, d); > return 0; >@@ -153,6 +161,11 @@ > { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 11}, > { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12}, > { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13}, >+ { PCI_VENDOR_ID_JMICRON,PCI_DEVICE_ID_JMICRON_JMB361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14}, >+ { PCI_VENDOR_ID_JMICRON,PCI_DEVICE_ID_JMICRON_JMB363, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 15}, >+ { PCI_VENDOR_ID_JMICRON,PCI_DEVICE_ID_JMICRON_JMB365, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 16}, >+ { PCI_VENDOR_ID_JMICRON,PCI_DEVICE_ID_JMICRON_JMB366, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 17}, >+ { PCI_VENDOR_ID_JMICRON,PCI_DEVICE_ID_JMICRON_JMB368, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 18}, > /* Must come last. If you add entries adjust this table appropriately and the init_one code */ > { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xFFFFFF00UL, 0}, > { 0, }, >--- linux-2.6.9/drivers/ide/pci/generic.h.orig 2007-03-16 06:09:52.000000000 +0800 >+++ linux-2.6.9/drivers/ide/pci/generic.h 2007-03-16 06:31:48.000000000 +0800 >@@ -108,6 +108,41 @@ > .channels = 2, > .autodma = NOAUTODMA, > .bootable = ON_BOARD, >+ },{ /* 14 */ >+ .name = "JMB361", >+ .init_chipset = init_chipset_generic, >+ .init_hwif = init_hwif_generic, >+ .channels = 2, >+ .autodma = AUTODMA, >+ .bootable = OFF_BOARD, >+ },{ /* 15 */ >+ .name = "JMB363", >+ .init_chipset = init_chipset_generic, >+ .init_hwif = init_hwif_generic, >+ .channels = 2, >+ .autodma = AUTODMA, >+ .bootable = OFF_BOARD, >+ },{ /* 16 */ >+ .name = "JMB365", >+ .init_chipset = init_chipset_generic, >+ .init_hwif = init_hwif_generic, >+ .channels = 2, >+ .autodma = AUTODMA, >+ .bootable = OFF_BOARD, >+ },{ /* 17 */ >+ .name = "JMB366", >+ .init_chipset = init_chipset_generic, >+ .init_hwif = init_hwif_generic, >+ .channels = 2, >+ .autodma = AUTODMA, >+ .bootable = OFF_BOARD, >+ },{ /* 18 */ >+ .name = "JMB368", >+ .init_chipset = init_chipset_generic, >+ .init_hwif = init_hwif_generic, >+ .channels = 2, >+ .autodma = AUTODMA, >+ .bootable = OFF_BOARD, > } > }; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 232410
: 152646