aboutsummaryrefslogtreecommitdiff
path: root/drivers/ata/sata_sis.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-04-25 12:41:55 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-25 12:41:55 -0700
commit50be4917ee70218f59e04dec029121b97fb9cb3d (patch)
tree0261422c5130ec9f6370c0a55638c657baa00d9e /drivers/ata/sata_sis.c
parent37b05b17985ecc43a33e2a8cbdaa220115de4703 (diff)
parentf9d42491723dbb77bdc9b9dc7e096ea57d535992 (diff)
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: pata_bf54x: decrease count first. sata_mv: re-enable hotplug, update TODO list sata_mv: leave SError bits untouched in mv_err_intr sata_mv: more interrupt handling rework sata_mv: tidy host controller interrupt handling sata_mv: simplify request/response queue handling sata_mv: simplify freeze/thaw bit-shift calculations sata_mv mask all interrupt coalescing bits sata_mv more cosmetics ata_piix: add Asus Eee 701 controller to short cable list libata-eh set tf flags in NCQ EH result_tf make sata_set_spd_needed() static make sata_print_link_status() static libata-acpi.c: remove unneeded #if's sata_nv: make hardreset return -EAGAIN on success ahci: retry enabling AHCI a few times before spitting out WARN_ON() libata: make WARN_ON conditions in ata_sff_hsm_move() more strict ATA/IDE: fix platform driver hotplug/coldplug sata_sis: SCR accessors return -EINVAL when requested SCR isn't available libata: functions with definition should not be extern
Diffstat (limited to 'drivers/ata/sata_sis.c')
-rw-r--r--drivers/ata/sata_sis.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/ata/sata_sis.c b/drivers/ata/sata_sis.c
index 6b8e45ba32e..1010b3069bd 100644
--- a/drivers/ata/sata_sis.c
+++ b/drivers/ata/sata_sis.c
@@ -142,7 +142,7 @@ static u32 sis_scr_cfg_read(struct ata_port *ap, unsigned int sc_reg, u32 *val)
u8 pmr;
if (sc_reg == SCR_ERROR) /* doesn't exist in PCI cfg space */
- return 0xffffffff;
+ return -EINVAL;
pci_read_config_byte(pdev, SIS_PMR, &pmr);
@@ -158,14 +158,14 @@ static u32 sis_scr_cfg_read(struct ata_port *ap, unsigned int sc_reg, u32 *val)
return 0;
}
-static void sis_scr_cfg_write(struct ata_port *ap, unsigned int sc_reg, u32 val)
+static int sis_scr_cfg_write(struct ata_port *ap, unsigned int sc_reg, u32 val)
{
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
unsigned int cfg_addr = get_scr_cfg_addr(ap, sc_reg);
u8 pmr;
if (sc_reg == SCR_ERROR) /* doesn't exist in PCI cfg space */
- return;
+ return -EINVAL;
pci_read_config_byte(pdev, SIS_PMR, &pmr);
@@ -174,6 +174,8 @@ static void sis_scr_cfg_write(struct ata_port *ap, unsigned int sc_reg, u32 val)
if ((pdev->device == 0x0182) || (pdev->device == 0x0183) ||
(pdev->device == 0x1182) || (pmr & SIS_PMR_COMBINED))
pci_write_config_dword(pdev, cfg_addr+0x10, val);
+
+ return 0;
}
static int sis_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val)
@@ -211,14 +213,14 @@ static int sis_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val)
pci_read_config_byte(pdev, SIS_PMR, &pmr);
if (ap->flags & SIS_FLAG_CFGSCR)
- sis_scr_cfg_write(ap, sc_reg, val);
+ return 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) || (pmr & SIS_PMR_COMBINED))
iowrite32(val, ap->ioaddr.scr_addr + (sc_reg * 4)+0x10);
+ return 0;
}
- return 0;
}
static int sis_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)