Commit 0f218ee2 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: pata_rdc: remove pointless comments

These comments contribute nothing to the code, and most were just cut
and pasted from another driver.

Cc: Kevin Huang  <Kevin.Huang@rdc.com.tw>
Cc: Tomy Wang <Tomy.Wang@rdc.com.tw>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0b77ca66
...@@ -617,23 +617,6 @@ static uint ATAHostAdapter_SetSecondaryUDMA(struct pci_dev *pdev, uint DeviceID, ...@@ -617,23 +617,6 @@ static uint ATAHostAdapter_SetSecondaryUDMA(struct pci_dev *pdev, uint DeviceID,
return funcresult; return funcresult;
} }
/**
* Set port up for dma.
* @ap: Port to initialize
*
* Called just after data structures for each port are
* initialized. Allocates space for PRD table if the device
* is DMA capable SFF.
Some drivers also use this entry point as a chance to allocate driverprivate
memory for ap->private_data.
*
* May be used as the port_start() entry in ata_port_operations.
*
* LOCKING:
* Inherited from caller.
*/
static int rdc_pata_port_start(struct ata_port *ap) static int rdc_pata_port_start(struct ata_port *ap)
{ {
uint Channel; uint Channel;
...@@ -657,14 +640,6 @@ static void rdc_pata_port_stop(struct ata_port *ap) ...@@ -657,14 +640,6 @@ static void rdc_pata_port_stop(struct ata_port *ap)
dev_dbg(ap->dev, "%s Channel: %u\n", __func__, Channel); dev_dbg(ap->dev, "%s Channel: %u\n", __func__, Channel);
} }
/**
* prereset for PATA host controller
* @link: Target link
* @deadline: deadline jiffies for the operation
*
* LOCKING:
* None (inherited from caller).
*/
static int rdc_pata_prereset(struct ata_link *link, unsigned long deadline) static int rdc_pata_prereset(struct ata_link *link, unsigned long deadline)
{ {
struct pci_dev *pdev; struct pci_dev *pdev;
...@@ -690,16 +665,6 @@ static int rdc_pata_prereset(struct ata_link *link, unsigned long deadline) ...@@ -690,16 +665,6 @@ static int rdc_pata_prereset(struct ata_link *link, unsigned long deadline)
} }
} }
/**
* Probe host controller cable detect info
* @ap: Port for which cable detect info is desired
*
* Read cable indicator from ATA PCI device's PCI config
* register. This register is normally set by firmware (BIOS).
*
* LOCKING:
* None (inherited from caller).
*/
static int rdc_pata_cable_detect(struct ata_port *ap) static int rdc_pata_cable_detect(struct ata_port *ap)
{ {
struct pci_dev *pdev; struct pci_dev *pdev;
...@@ -732,16 +697,6 @@ static int rdc_pata_cable_detect(struct ata_port *ap) ...@@ -732,16 +697,6 @@ static int rdc_pata_cable_detect(struct ata_port *ap)
} }
} }
/**
* Initialize host controller PATA PIO timings
* @ap: Port whose timings we are configuring
* @adev: um
*
* Set PIO mode for device, in host controller PCI config space.
*
* LOCKING:
* None (inherited from caller).
*/
static void rdc_pata_set_piomode(struct ata_port *ap, struct ata_device *adev) static void rdc_pata_set_piomode(struct ata_port *ap, struct ata_device *adev)
{ {
struct pci_dev *pdev; struct pci_dev *pdev;
...@@ -782,14 +737,14 @@ static void rdc_pata_set_piomode(struct ata_port *ap, struct ata_device *adev) ...@@ -782,14 +737,14 @@ static void rdc_pata_set_piomode(struct ata_port *ap, struct ata_device *adev)
pdev, pdev,
DeviceID, DeviceID,
PIOTimingMode, PIOTimingMode,
TRUE,/* DMAEnable, */ TRUE,
PrefetchPostingEnable PrefetchPostingEnable
); );
ATAHostAdapter_SetPrimaryUDMA( ATAHostAdapter_SetPrimaryUDMA(
pdev, pdev,
DeviceID, DeviceID,
FALSE,/* UDMAEnable, */ FALSE,
UDMA0 UDMA0
); );
} else { } else {
...@@ -797,14 +752,14 @@ static void rdc_pata_set_piomode(struct ata_port *ap, struct ata_device *adev) ...@@ -797,14 +752,14 @@ static void rdc_pata_set_piomode(struct ata_port *ap, struct ata_device *adev)
pdev, pdev,
DeviceID, DeviceID,
PIOTimingMode, PIOTimingMode,
TRUE,/* DMAEnable, */ TRUE,
PrefetchPostingEnable PrefetchPostingEnable
); );
ATAHostAdapter_SetSecondaryUDMA( ATAHostAdapter_SetSecondaryUDMA(
pdev, pdev,
DeviceID, DeviceID,
FALSE,/* UDMAEnable, */ FALSE,
UDMA0 UDMA0
); );
} }
...@@ -812,16 +767,6 @@ static void rdc_pata_set_piomode(struct ata_port *ap, struct ata_device *adev) ...@@ -812,16 +767,6 @@ static void rdc_pata_set_piomode(struct ata_port *ap, struct ata_device *adev)
__func__, Channel, DeviceID, PIOTimingMode); __func__, Channel, DeviceID, PIOTimingMode);
} }
/**
* Initialize host controller PATA DMA timings
* @ap: Port whose timings we are configuring
* @adev: um
*
* Set MW/UDMA mode for device, in host controller PCI config space.
*
* LOCKING:
* None (inherited from caller).
*/
static void rdc_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev) static void rdc_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev)
{ {
struct pci_dev *pdev; struct pci_dev *pdev;
...@@ -855,16 +800,13 @@ static void rdc_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev) ...@@ -855,16 +800,13 @@ static void rdc_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev)
UDMAEnable = TRUE; UDMAEnable = TRUE;
} }
/*if (ap->mdma_mask == 0) {
}*/
if (Channel == 0) { if (Channel == 0) {
if (DMATimingMode >= XFER_UDMA_0) { if (DMATimingMode >= XFER_UDMA_0) {
/* UDMA */ /* UDMA */
ATAHostAdapter_SetPrimaryPIO(pdev, ATAHostAdapter_SetPrimaryPIO(pdev,
DeviceID, DeviceID,
PIOTimingMode, PIOTimingMode,
TRUE,/*DMAEnable,*/ TRUE,
PrefetchPostingEnable); PrefetchPostingEnable);
ATAHostAdapter_SetPrimaryUDMA(pdev, ATAHostAdapter_SetPrimaryUDMA(pdev,
...@@ -880,12 +822,12 @@ static void rdc_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev) ...@@ -880,12 +822,12 @@ static void rdc_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev)
ATAHostAdapter_SetPrimaryPIO(pdev, ATAHostAdapter_SetPrimaryPIO(pdev,
DeviceID, DeviceID,
(DMATimingMode - XFER_MW_DMA_0) + PIO2, /* MDMA0 = PIO2 */ (DMATimingMode - XFER_MW_DMA_0) + PIO2, /* MDMA0 = PIO2 */
TRUE,/*DMAEnable,*/ TRUE,
PrefetchPostingEnable); PrefetchPostingEnable);
ATAHostAdapter_SetPrimaryUDMA(pdev, ATAHostAdapter_SetPrimaryUDMA(pdev,
DeviceID, DeviceID,
FALSE,/*UDMAEnable,*/ FALSE,
UDMA0); UDMA0);
dev_dbg(ap->dev, dev_dbg(ap->dev,
"%s: Channel: %u, DeviceID: %u, MDMA: %u\n", "%s: Channel: %u, DeviceID: %u, MDMA: %u\n",
...@@ -898,7 +840,7 @@ static void rdc_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev) ...@@ -898,7 +840,7 @@ static void rdc_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev)
ATAHostAdapter_SetSecondaryPIO(pdev, ATAHostAdapter_SetSecondaryPIO(pdev,
DeviceID, DeviceID,
PIOTimingMode, PIOTimingMode,
TRUE,/*DMAEnable,*/ TRUE,
PrefetchPostingEnable); PrefetchPostingEnable);
ATAHostAdapter_SetSecondaryUDMA(pdev, ATAHostAdapter_SetSecondaryUDMA(pdev,
...@@ -914,12 +856,12 @@ static void rdc_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev) ...@@ -914,12 +856,12 @@ static void rdc_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev)
ATAHostAdapter_SetSecondaryPIO(pdev, ATAHostAdapter_SetSecondaryPIO(pdev,
DeviceID, DeviceID,
(DMATimingMode - XFER_MW_DMA_0) + PIO2, /* MDMA0 = PIO2 */ (DMATimingMode - XFER_MW_DMA_0) + PIO2, /* MDMA0 = PIO2 */
TRUE,/*DMAEnable,*/ TRUE,
PrefetchPostingEnable); PrefetchPostingEnable);
ATAHostAdapter_SetSecondaryUDMA(pdev, ATAHostAdapter_SetSecondaryUDMA(pdev,
DeviceID, DeviceID,
FALSE,/*UDMAEnable,*/ FALSE,
UDMA0); UDMA0);
dev_dbg(ap->dev, dev_dbg(ap->dev,
"%s: Channel: %u, DeviceID: %u, MDMA: %u \n", "%s: Channel: %u, DeviceID: %u, MDMA: %u \n",
...@@ -929,7 +871,6 @@ static void rdc_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev) ...@@ -929,7 +871,6 @@ static void rdc_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev)
} }
} }
/* pata host template */
static struct scsi_host_template rdc_pata_sht = { static struct scsi_host_template rdc_pata_sht = {
ATA_BMDMA_SHT(KBUILD_MODNAME), ATA_BMDMA_SHT(KBUILD_MODNAME),
}; };
...@@ -976,20 +917,16 @@ static int __devinit rdc_init_one(struct pci_dev *pdev, ...@@ -976,20 +917,16 @@ static int __devinit rdc_init_one(struct pci_dev *pdev,
port_info[0] = rdc_pata_port_info[ent->driver_data]; port_info[0] = rdc_pata_port_info[ent->driver_data];
port_info[1] = rdc_pata_port_info[ent->driver_data]; port_info[1] = rdc_pata_port_info[ent->driver_data];
/* enable device and prepare host */
rc = pci_enable_device(pdev); rc = pci_enable_device(pdev);
if (rc) { if (rc) {
dev_dbg(&pdev->dev, "%s pci_enable_device failed\n", __func__); dev_dbg(&pdev->dev, "%s pci_enable_device failed\n", __func__);
return rc; return rc;
} }
/* enable interrupt */
pci_intx(pdev, 1); pci_intx(pdev, 1);
return ata_pci_sff_init_one(pdev, ppinfo, &rdc_pata_sht, NULL); return ata_pci_sff_init_one(pdev, ppinfo, &rdc_pata_sht, NULL);
} }
/* a pci driver */
static struct pci_driver rdc_pata_driver = { static struct pci_driver rdc_pata_driver = {
.name = KBUILD_MODNAME, .name = KBUILD_MODNAME,
.id_table = rdc_pata_id_table, .id_table = rdc_pata_id_table,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment