Commit 585a692c authored by Jeff Garzik's avatar Jeff Garzik

Merge redhat.com:/spare/repo/linux-2.5

into redhat.com:/spare/repo/libata-2.5
parents da5ca9a5 5649bb60
...@@ -1791,13 +1791,7 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id * ...@@ -1791,13 +1791,7 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *
static int __init pdc_sata_init(void) static int __init pdc_sata_init(void)
{ {
int rc; return pci_module_init(&pdc_sata_pci_driver);
rc = pci_module_init(&pdc_sata_pci_driver);
if (rc)
return rc;
return 0;
} }
......
...@@ -244,13 +244,9 @@ static void sil_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) ...@@ -244,13 +244,9 @@ static void sil_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val)
static void sil_dev_config(struct ata_port *ap, struct ata_device *dev) static void sil_dev_config(struct ata_port *ap, struct ata_device *dev)
{ {
unsigned int n, quirks = 0; unsigned int n, quirks = 0;
u32 class_rev = 0;
const char *s = &dev->product[0]; const char *s = &dev->product[0];
unsigned int len = strnlen(s, sizeof(dev->product)); unsigned int len = strnlen(s, sizeof(dev->product));
pci_read_config_dword(ap->host_set->pdev, PCI_CLASS_REVISION, &class_rev);
class_rev &= 0xff;
/* ATAPI specifies that empty space is blank-filled; remove blanks */ /* ATAPI specifies that empty space is blank-filled; remove blanks */
while ((len > 0) && (s[len - 1] == ' ')) while ((len > 0) && (s[len - 1] == ' '))
len--; len--;
...@@ -263,7 +259,7 @@ static void sil_dev_config(struct ata_port *ap, struct ata_device *dev) ...@@ -263,7 +259,7 @@ static void sil_dev_config(struct ata_port *ap, struct ata_device *dev)
} }
/* limit requests to 15 sectors */ /* limit requests to 15 sectors */
if ((class_rev <= 0x01) && (quirks & SIL_QUIRK_MOD15WRITE)) { if (quirks & SIL_QUIRK_MOD15WRITE) {
printk(KERN_INFO "ata%u(%u): applying Seagate errata fix\n", printk(KERN_INFO "ata%u(%u): applying Seagate errata fix\n",
ap->id, dev->devno); ap->id, dev->devno);
ap->host->max_sectors = 15; ap->host->max_sectors = 15;
...@@ -272,7 +268,6 @@ static void sil_dev_config(struct ata_port *ap, struct ata_device *dev) ...@@ -272,7 +268,6 @@ static void sil_dev_config(struct ata_port *ap, struct ata_device *dev)
} }
/* limit to udma5 */ /* limit to udma5 */
/* is this for (class_rev <= 0x01) only, too? */
if (quirks & SIL_QUIRK_UDMA5MAX) { if (quirks & SIL_QUIRK_UDMA5MAX) {
printk(KERN_INFO "ata%u(%u): applying Maxtor errata fix %s\n", printk(KERN_INFO "ata%u(%u): applying Maxtor errata fix %s\n",
ap->id, dev->devno, s); ap->id, dev->devno, s);
...@@ -405,13 +400,7 @@ static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -405,13 +400,7 @@ static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
static int __init sil_init(void) static int __init sil_init(void)
{ {
int rc; return pci_module_init(&sil_pci_driver);
rc = pci_module_init(&sil_pci_driver);
if (rc)
return rc;
return 0;
} }
static void __exit sil_exit(void) static void __exit sil_exit(void)
......
...@@ -375,16 +375,9 @@ static struct pci_driver k2_sata_pci_driver = { ...@@ -375,16 +375,9 @@ static struct pci_driver k2_sata_pci_driver = {
static int __init k2_sata_init(void) static int __init k2_sata_init(void)
{ {
int rc; return pci_module_init(&k2_sata_pci_driver);
rc = pci_module_init(&k2_sata_pci_driver);
if (rc)
return rc;
return 0;
} }
static void __exit k2_sata_exit(void) static void __exit k2_sata_exit(void)
{ {
pci_unregister_driver(&k2_sata_pci_driver); pci_unregister_driver(&k2_sata_pci_driver);
......
...@@ -5,25 +5,11 @@ ...@@ -5,25 +5,11 @@
* *
* Bits from Jeff Garzik, Copyright RedHat, Inc. * Bits from Jeff Garzik, Copyright RedHat, Inc.
* *
* The contents of this file are subject to the Open * This file is subject to the terms and conditions of the GNU General Public
* Software License version 1.1 that can be found at * License. See the file "COPYING" in the main directory of this archive
* http://www.opensource.org/licenses/osl-1.1.txt and is included herein * for more details.
* by reference.
*
* Alternatively, the contents of this file may be used under the terms
* of the GNU General Public License version 2 (the "GPL") as distributed
* in the kernel source COPYING file, in which case the provisions of
* the GPL are applicable instead of the above. If you wish to allow
* the use of your version of this file only under the terms of the
* GPL and not to allow others to use your version of this file under
* the OSL, indicate your decision by deleting the provisions above and
* replace them with the notice and other provisions required by the GPL.
* If you do not delete the provisions above, a recipient may use your
* version of this file under either the OSL or the GPL.
*
*/ */
#include <linux/config.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/pci.h> #include <linux/pci.h>
...@@ -232,7 +218,7 @@ static struct ata_port_operations vsc_sata_ops = { ...@@ -232,7 +218,7 @@ static struct ata_port_operations vsc_sata_ops = {
.port_stop = ata_port_stop, .port_stop = ata_port_stop,
}; };
static void vsc_sata_setup_port(struct ata_ioports *port, unsigned long base) static void __devinit vsc_sata_setup_port(struct ata_ioports *port, unsigned long base)
{ {
port->cmd_addr = base + VSC_SATA_TF_CMD_OFFSET; port->cmd_addr = base + VSC_SATA_TF_CMD_OFFSET;
port->data_addr = base + VSC_SATA_TF_DATA_OFFSET; port->data_addr = base + VSC_SATA_TF_DATA_OFFSET;
...@@ -252,7 +238,7 @@ static void vsc_sata_setup_port(struct ata_ioports *port, unsigned long base) ...@@ -252,7 +238,7 @@ static void vsc_sata_setup_port(struct ata_ioports *port, unsigned long base)
} }
static int vsc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) static int __devinit vsc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
{ {
static int printed_version; static int printed_version;
struct ata_probe_ent *probe_ent = NULL; struct ata_probe_ent *probe_ent = NULL;
...@@ -350,6 +336,11 @@ static int vsc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id * ...@@ -350,6 +336,11 @@ static int vsc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *
} }
/*
* 0x1725/0x7174 is the Vitesse VSC-7174
* 0x8086/0x3200 is the Intel 31244, which is supposed to be identical
* compatibility is untested as of yet
*/
static struct pci_device_id vsc_sata_pci_tbl[] = { static struct pci_device_id vsc_sata_pci_tbl[] = {
{ 0x1725, 0x7174, PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 }, { 0x1725, 0x7174, PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 },
{ 0x8086, 0x3200, PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 }, { 0x8086, 0x3200, PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 },
...@@ -367,13 +358,7 @@ static struct pci_driver vsc_sata_pci_driver = { ...@@ -367,13 +358,7 @@ static struct pci_driver vsc_sata_pci_driver = {
static int __init vsc_sata_init(void) static int __init vsc_sata_init(void)
{ {
int rc; return pci_module_init(&vsc_sata_pci_driver);
rc = pci_module_init(&vsc_sata_pci_driver);
if (rc)
return rc;
return 0;
} }
......
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