diff options
Diffstat (limited to 'drivers/ata/sata_qstor.c')
-rw-r--r-- | drivers/ata/sata_qstor.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c index 5aef4ac37012..c8f9242e7f44 100644 --- a/drivers/ata/sata_qstor.c +++ b/drivers/ata/sata_qstor.c | |||
@@ -111,8 +111,8 @@ struct qs_port_priv { | |||
111 | qs_state_t state; | 111 | qs_state_t state; |
112 | }; | 112 | }; |
113 | 113 | ||
114 | static u32 qs_scr_read (struct ata_port *ap, unsigned int sc_reg); | 114 | static int qs_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val); |
115 | static void qs_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); | 115 | static int qs_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val); |
116 | static int qs_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); | 116 | static int qs_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); |
117 | static int qs_port_start(struct ata_port *ap); | 117 | static int qs_port_start(struct ata_port *ap); |
118 | static void qs_host_stop(struct ata_host *host); | 118 | static void qs_host_stop(struct ata_host *host); |
@@ -255,18 +255,20 @@ static void qs_eng_timeout(struct ata_port *ap) | |||
255 | ata_eng_timeout(ap); | 255 | ata_eng_timeout(ap); |
256 | } | 256 | } |
257 | 257 | ||
258 | static u32 qs_scr_read (struct ata_port *ap, unsigned int sc_reg) | 258 | static int qs_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val) |
259 | { | 259 | { |
260 | if (sc_reg > SCR_CONTROL) | 260 | if (sc_reg > SCR_CONTROL) |
261 | return ~0U; | 261 | return -EINVAL; |
262 | return readl(ap->ioaddr.scr_addr + (sc_reg * 8)); | 262 | *val = readl(ap->ioaddr.scr_addr + (sc_reg * 8)); |
263 | return 0; | ||
263 | } | 264 | } |
264 | 265 | ||
265 | static void qs_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) | 266 | static int qs_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val) |
266 | { | 267 | { |
267 | if (sc_reg > SCR_CONTROL) | 268 | if (sc_reg > SCR_CONTROL) |
268 | return; | 269 | return -EINVAL; |
269 | writel(val, ap->ioaddr.scr_addr + (sc_reg * 8)); | 270 | writel(val, ap->ioaddr.scr_addr + (sc_reg * 8)); |
271 | return 0; | ||
270 | } | 272 | } |
271 | 273 | ||
272 | static unsigned int qs_fill_sg(struct ata_queued_cmd *qc) | 274 | static unsigned int qs_fill_sg(struct ata_queued_cmd *qc) |