pata_oldpiix.c (bb648a0d22908116b4ef168935a160d7f17c4e6d) | pata_oldpiix.c (a0fcdc0259e98d1c16d96baea9ba8a8603e41791) |
---|---|
1/* 2 * pata_oldpiix.c - Intel PATA/SATA controllers 3 * 4 * (C) 2005 Red Hat <alan@redhat.com> 5 * 6 * Some parts based on ata_piix.c by Jeff Garzik and others. 7 * 8 * Early PIIX differs significantly from the later PIIX as it lacks --- 11 unchanged lines hidden (view full) --- 20#include <linux/blkdev.h> 21#include <linux/delay.h> 22#include <linux/device.h> 23#include <scsi/scsi_host.h> 24#include <linux/libata.h> 25#include <linux/ata.h> 26 27#define DRV_NAME "pata_oldpiix" | 1/* 2 * pata_oldpiix.c - Intel PATA/SATA controllers 3 * 4 * (C) 2005 Red Hat <alan@redhat.com> 5 * 6 * Some parts based on ata_piix.c by Jeff Garzik and others. 7 * 8 * Early PIIX differs significantly from the later PIIX as it lacks --- 11 unchanged lines hidden (view full) --- 20#include <linux/blkdev.h> 21#include <linux/delay.h> 22#include <linux/device.h> 23#include <scsi/scsi_host.h> 24#include <linux/libata.h> 25#include <linux/ata.h> 26 27#define DRV_NAME "pata_oldpiix" |
28#define DRV_VERSION "0.5.4" | 28#define DRV_VERSION "0.5.5" |
29 30/** 31 * oldpiix_pre_reset - probe begin 32 * @ap: ATA port 33 * 34 * Set up cable type and use generic probe init 35 */ 36 37static int oldpiix_pre_reset(struct ata_port *ap) 38{ 39 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 40 static const struct pci_bits oldpiix_enable_bits[] = { 41 { 0x41U, 1U, 0x80UL, 0x80UL }, /* port 0 */ 42 { 0x43U, 1U, 0x80UL, 0x80UL }, /* port 1 */ 43 }; 44 45 if (!pci_test_config_bits(pdev, &oldpiix_enable_bits[ap->port_no])) 46 return -ENOENT; | 29 30/** 31 * oldpiix_pre_reset - probe begin 32 * @ap: ATA port 33 * 34 * Set up cable type and use generic probe init 35 */ 36 37static int oldpiix_pre_reset(struct ata_port *ap) 38{ 39 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 40 static const struct pci_bits oldpiix_enable_bits[] = { 41 { 0x41U, 1U, 0x80UL, 0x80UL }, /* port 0 */ 42 { 0x43U, 1U, 0x80UL, 0x80UL }, /* port 1 */ 43 }; 44 45 if (!pci_test_config_bits(pdev, &oldpiix_enable_bits[ap->port_no])) 46 return -ENOENT; |
47 ap->cbl = ATA_CBL_PATA40; | |
48 return ata_std_prereset(ap); 49} 50 51/** 52 * oldpiix_pata_error_handler - Probe specified port on PATA host controller 53 * @ap: Port to probe 54 * @classes: 55 * --- 4 unchanged lines hidden (view full) --- 60static void oldpiix_pata_error_handler(struct ata_port *ap) 61{ 62 ata_bmdma_drive_eh(ap, oldpiix_pre_reset, ata_std_softreset, NULL, ata_std_postreset); 63} 64 65/** 66 * oldpiix_set_piomode - Initialize host controller PATA PIO timings 67 * @ap: Port whose timings we are configuring | 47 return ata_std_prereset(ap); 48} 49 50/** 51 * oldpiix_pata_error_handler - Probe specified port on PATA host controller 52 * @ap: Port to probe 53 * @classes: 54 * --- 4 unchanged lines hidden (view full) --- 59static void oldpiix_pata_error_handler(struct ata_port *ap) 60{ 61 ata_bmdma_drive_eh(ap, oldpiix_pre_reset, ata_std_softreset, NULL, ata_std_postreset); 62} 63 64/** 65 * oldpiix_set_piomode - Initialize host controller PATA PIO timings 66 * @ap: Port whose timings we are configuring |
68 * @adev: um | 67 * @adev: Device whose timings we are configuring |
69 * 70 * Set PIO mode for device, in host controller PCI config space. 71 * 72 * LOCKING: 73 * None (inherited from caller). 74 */ 75 76static void oldpiix_set_piomode (struct ata_port *ap, struct ata_device *adev) --- 173 unchanged lines hidden (view full) --- 250 .check_status = ata_check_status, 251 .exec_command = ata_exec_command, 252 .dev_select = ata_std_dev_select, 253 254 .freeze = ata_bmdma_freeze, 255 .thaw = ata_bmdma_thaw, 256 .error_handler = oldpiix_pata_error_handler, 257 .post_internal_cmd = ata_bmdma_post_internal_cmd, | 68 * 69 * Set PIO mode for device, in host controller PCI config space. 70 * 71 * LOCKING: 72 * None (inherited from caller). 73 */ 74 75static void oldpiix_set_piomode (struct ata_port *ap, struct ata_device *adev) --- 173 unchanged lines hidden (view full) --- 249 .check_status = ata_check_status, 250 .exec_command = ata_exec_command, 251 .dev_select = ata_std_dev_select, 252 253 .freeze = ata_bmdma_freeze, 254 .thaw = ata_bmdma_thaw, 255 .error_handler = oldpiix_pata_error_handler, 256 .post_internal_cmd = ata_bmdma_post_internal_cmd, |
257 .cable_detect = ata_cable_40wire, |
|
258 259 .bmdma_setup = ata_bmdma_setup, 260 .bmdma_start = ata_bmdma_start, 261 .bmdma_stop = ata_bmdma_stop, 262 .bmdma_status = ata_bmdma_status, 263 .qc_prep = ata_qc_prep, 264 .qc_issue = oldpiix_qc_issue_prot, 265 .data_xfer = ata_data_xfer, --- 80 unchanged lines hidden --- | 258 259 .bmdma_setup = ata_bmdma_setup, 260 .bmdma_start = ata_bmdma_start, 261 .bmdma_stop = ata_bmdma_stop, 262 .bmdma_status = ata_bmdma_status, 263 .qc_prep = ata_qc_prep, 264 .qc_issue = oldpiix_qc_issue_prot, 265 .data_xfer = ata_data_xfer, --- 80 unchanged lines hidden --- |