Commit 2b858bd0 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  pata_sis: Fix oops on boot
parents 93cd791e f3769e9d
...@@ -878,6 +878,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -878,6 +878,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
struct ata_port_info *port; struct ata_port_info *port;
struct pci_dev *host = NULL; struct pci_dev *host = NULL;
struct sis_chipset *chipset = NULL; struct sis_chipset *chipset = NULL;
struct sis_chipset *sets;
static struct sis_chipset sis_chipsets[] = { static struct sis_chipset sis_chipsets[] = {
...@@ -932,10 +933,11 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -932,10 +933,11 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
/* We have to find the bridge first */ /* We have to find the bridge first */
for (chipset = &sis_chipsets[0]; chipset->device; chipset++) { for (sets = &sis_chipsets[0]; sets->device; sets++) {
host = pci_get_device(PCI_VENDOR_ID_SI, chipset->device, NULL); host = pci_get_device(PCI_VENDOR_ID_SI, sets->device, NULL);
if (host != NULL) { if (host != NULL) {
if (chipset->device == 0x630) { /* SIS630 */ chipset = sets; /* Match found */
if (sets->device == 0x630) { /* SIS630 */
u8 host_rev; u8 host_rev;
pci_read_config_byte(host, PCI_REVISION_ID, &host_rev); pci_read_config_byte(host, PCI_REVISION_ID, &host_rev);
if (host_rev >= 0x30) /* 630 ET */ if (host_rev >= 0x30) /* 630 ET */
...@@ -946,7 +948,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -946,7 +948,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
} }
/* Look for concealed bridges */ /* Look for concealed bridges */
if (host == NULL) { if (chipset == NULL) {
/* Second check */ /* Second check */
u32 idemisc; u32 idemisc;
u16 trueid; u16 trueid;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment