pata_ns87410.c (bb648a0d22908116b4ef168935a160d7f17c4e6d) pata_ns87410.c (a0fcdc0259e98d1c16d96baea9ba8a8603e41791)
1/*
2 * pata_ns87410.c - National Semiconductor 87410 PATA for new ATA layer
3 * (C) 2006 Red Hat Inc
4 * Alan Cox <alan@redhat.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)

--- 14 unchanged lines hidden (view full) ---

23#include <linux/pci.h>
24#include <linux/init.h>
25#include <linux/blkdev.h>
26#include <linux/delay.h>
27#include <scsi/scsi_host.h>
28#include <linux/libata.h>
29
30#define DRV_NAME "pata_ns87410"
1/*
2 * pata_ns87410.c - National Semiconductor 87410 PATA for new ATA layer
3 * (C) 2006 Red Hat Inc
4 * Alan Cox <alan@redhat.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)

--- 14 unchanged lines hidden (view full) ---

23#include <linux/pci.h>
24#include <linux/init.h>
25#include <linux/blkdev.h>
26#include <linux/delay.h>
27#include <scsi/scsi_host.h>
28#include <linux/libata.h>
29
30#define DRV_NAME "pata_ns87410"
31#define DRV_VERSION "0.4.3"
31#define DRV_VERSION "0.4.6"
32
33/**
34 * ns87410_pre_reset - probe begin
35 * @ap: ATA port
36 *
32
33/**
34 * ns87410_pre_reset - probe begin
35 * @ap: ATA port
36 *
37 * Set up cable type and use generic probe init
37 * Check enabled ports
38 */
39
40static int ns87410_pre_reset(struct ata_port *ap)
41{
42 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
43 static const struct pci_bits ns87410_enable_bits[] = {
44 { 0x43, 1, 0x08, 0x08 },
45 { 0x47, 1, 0x08, 0x08 }
46 };
47
48 if (!pci_test_config_bits(pdev, &ns87410_enable_bits[ap->port_no]))
49 return -ENOENT;
38 */
39
40static int ns87410_pre_reset(struct ata_port *ap)
41{
42 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
43 static const struct pci_bits ns87410_enable_bits[] = {
44 { 0x43, 1, 0x08, 0x08 },
45 { 0x47, 1, 0x08, 0x08 }
46 };
47
48 if (!pci_test_config_bits(pdev, &ns87410_enable_bits[ap->port_no]))
49 return -ENOENT;
50 ap->cbl = ATA_CBL_PATA40;
51 return ata_std_prereset(ap);
52}
53
54/**
55 * ns87410_error_handler - probe reset
56 * @ap: ATA port
57 *
58 * Perform the ATA probe and bus reset sequence plus specific handling

--- 113 unchanged lines hidden (view full) ---

172 .check_status = ata_check_status,
173 .exec_command = ata_exec_command,
174 .dev_select = ata_std_dev_select,
175
176 .freeze = ata_bmdma_freeze,
177 .thaw = ata_bmdma_thaw,
178 .error_handler = ns87410_error_handler,
179 .post_internal_cmd = ata_bmdma_post_internal_cmd,
50 return ata_std_prereset(ap);
51}
52
53/**
54 * ns87410_error_handler - probe reset
55 * @ap: ATA port
56 *
57 * Perform the ATA probe and bus reset sequence plus specific handling

--- 113 unchanged lines hidden (view full) ---

171 .check_status = ata_check_status,
172 .exec_command = ata_exec_command,
173 .dev_select = ata_std_dev_select,
174
175 .freeze = ata_bmdma_freeze,
176 .thaw = ata_bmdma_thaw,
177 .error_handler = ns87410_error_handler,
178 .post_internal_cmd = ata_bmdma_post_internal_cmd,
179 .cable_detect = ata_cable_40wire,
180
181 .qc_prep = ata_qc_prep,
182 .qc_issue = ns87410_qc_issue_prot,
183
184 .data_xfer = ata_data_xfer,
185
186 .irq_handler = ata_interrupt,
187 .irq_clear = ata_bmdma_irq_clear,

--- 53 unchanged lines hidden ---
180
181 .qc_prep = ata_qc_prep,
182 .qc_issue = ns87410_qc_issue_prot,
183
184 .data_xfer = ata_data_xfer,
185
186 .irq_handler = ata_interrupt,
187 .irq_clear = ata_bmdma_irq_clear,

--- 53 unchanged lines hidden ---