diff options
| author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2002-07-30 00:36:23 -0700 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@mandrakesoft.com> | 2002-07-30 00:36:23 -0700 |
| commit | 12949f5d3bdc349ef64903ccecce5ec0a20dbace (patch) | |
| tree | eb0e03fa861b01e566ff21d4c4f0c5e0928af265 | |
| parent | d2bc8e1f963d2963b047e5db927061bf84e3c7e0 (diff) | |
[PATCH] cs5530 IDE driver cli/sti fixes and cleanups
The CS5530 one seems unneeded looking at the databook. Try the patch
below instead, which removes the irq lock and uses the proper kernel
functions to enable MWI and master.
| -rw-r--r-- | drivers/ide/cs5530.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/ide/cs5530.c b/drivers/ide/cs5530.c index 89ee79cfcda3..86540a2709fe 100644 --- a/drivers/ide/cs5530.c +++ b/drivers/ide/cs5530.c @@ -218,6 +218,7 @@ static unsigned int __init pci_init_cs5530(struct pci_dev *dev) } } } + if (!master_0) { printk("%s: unable to locate PCI MASTER function\n", dev->name); return 0; @@ -227,15 +228,13 @@ static unsigned int __init pci_init_cs5530(struct pci_dev *dev) return 0; } - save_flags(flags); - cli(); /* all CPUs (there should only be one CPU with this chipset) */ - /* * Enable BusMaster and MemoryWriteAndInvalidate for the cs5530: * --> OR 0x14 into 16-bit PCI COMMAND reg of function 0 of the cs5530 */ - pci_read_config_word (cs5530_0, PCI_COMMAND, &pcicmd); - pci_write_config_word(cs5530_0, PCI_COMMAND, pcicmd | PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE); + + pci_set_master(cs5530_0); + pci_set_mwi(cs5530_0); /* * Set PCI CacheLineSize to 16-bytes: @@ -274,8 +273,6 @@ static unsigned int __init pci_init_cs5530(struct pci_dev *dev) pci_write_config_byte(master_0, 0x42, 0x00); pci_write_config_byte(master_0, 0x43, 0xc1); - restore_flags(flags); - return 0; } |
