diff options
Diffstat (limited to 'drivers/scsi/sata_sis.c')
-rw-r--r-- | drivers/scsi/sata_sis.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/scsi/sata_sis.c b/drivers/scsi/sata_sis.c index b227e51d12f4..42288be0e561 100644 --- a/drivers/scsi/sata_sis.c +++ b/drivers/scsi/sata_sis.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/blkdev.h> | 38 | #include <linux/blkdev.h> |
39 | #include <linux/delay.h> | 39 | #include <linux/delay.h> |
40 | #include <linux/interrupt.h> | 40 | #include <linux/interrupt.h> |
41 | #include <linux/device.h> | ||
41 | #include "scsi.h" | 42 | #include "scsi.h" |
42 | #include <scsi/scsi_host.h> | 43 | #include <scsi/scsi_host.h> |
43 | #include <linux/libata.h> | 44 | #include <linux/libata.h> |
@@ -102,7 +103,7 @@ static Scsi_Host_Template sis_sht = { | |||
102 | .ordered_flush = 1, | 103 | .ordered_flush = 1, |
103 | }; | 104 | }; |
104 | 105 | ||
105 | static struct ata_port_operations sis_ops = { | 106 | static const struct ata_port_operations sis_ops = { |
106 | .port_disable = ata_port_disable, | 107 | .port_disable = ata_port_disable, |
107 | .tf_load = ata_tf_load, | 108 | .tf_load = ata_tf_load, |
108 | .tf_read = ata_tf_read, | 109 | .tf_read = ata_tf_read, |
@@ -237,6 +238,7 @@ static void sis_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) | |||
237 | 238 | ||
238 | static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | 239 | static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) |
239 | { | 240 | { |
241 | static int printed_version; | ||
240 | struct ata_probe_ent *probe_ent = NULL; | 242 | struct ata_probe_ent *probe_ent = NULL; |
241 | int rc; | 243 | int rc; |
242 | u32 genctl; | 244 | u32 genctl; |
@@ -245,6 +247,9 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
245 | u8 pmr; | 247 | u8 pmr; |
246 | u8 port2_start; | 248 | u8 port2_start; |
247 | 249 | ||
250 | if (!printed_version++) | ||
251 | dev_printk(KERN_INFO, &pdev->dev, "version " DRV_VERSION "\n"); | ||
252 | |||
248 | rc = pci_enable_device(pdev); | 253 | rc = pci_enable_device(pdev); |
249 | if (rc) | 254 | if (rc) |
250 | return rc; | 255 | return rc; |
@@ -263,7 +268,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
263 | goto err_out_regions; | 268 | goto err_out_regions; |
264 | 269 | ||
265 | ppi = &sis_port_info; | 270 | ppi = &sis_port_info; |
266 | probe_ent = ata_pci_init_native_mode(pdev, &ppi); | 271 | probe_ent = ata_pci_init_native_mode(pdev, &ppi, ATA_PORT_PRIMARY | ATA_PORT_SECONDARY); |
267 | if (!probe_ent) { | 272 | if (!probe_ent) { |
268 | rc = -ENOMEM; | 273 | rc = -ENOMEM; |
269 | goto err_out_regions; | 274 | goto err_out_regions; |
@@ -288,16 +293,18 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
288 | pci_read_config_byte(pdev, SIS_PMR, &pmr); | 293 | pci_read_config_byte(pdev, SIS_PMR, &pmr); |
289 | if (ent->device != 0x182) { | 294 | if (ent->device != 0x182) { |
290 | if ((pmr & SIS_PMR_COMBINED) == 0) { | 295 | if ((pmr & SIS_PMR_COMBINED) == 0) { |
291 | printk(KERN_INFO "sata_sis: Detected SiS 180/181 chipset in SATA mode\n"); | 296 | dev_printk(KERN_INFO, &pdev->dev, |
297 | "Detected SiS 180/181 chipset in SATA mode\n"); | ||
292 | port2_start = 64; | 298 | port2_start = 64; |
293 | } | 299 | } |
294 | else { | 300 | else { |
295 | printk(KERN_INFO "sata_sis: Detected SiS 180/181 chipset in combined mode\n"); | 301 | dev_printk(KERN_INFO, &pdev->dev, |
302 | "Detected SiS 180/181 chipset in combined mode\n"); | ||
296 | port2_start=0; | 303 | port2_start=0; |
297 | } | 304 | } |
298 | } | 305 | } |
299 | else { | 306 | else { |
300 | printk(KERN_INFO "sata_sis: Detected SiS 182 chipset\n"); | 307 | dev_printk(KERN_INFO, &pdev->dev, "Detected SiS 182 chipset\n"); |
301 | port2_start = 0x20; | 308 | port2_start = 0x20; |
302 | } | 309 | } |
303 | 310 | ||