linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Albert Lee <albertcc@tw.ibm.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	Doug Maxey <dwm@maxeymade.com>,
	Linux IDE <linux-ide@vger.kernel.org>
Subject: [PATCH 2/4] libata-dev-2.6: pdc2027x change comments
Date: Mon, 11 Apr 2005 18:04:38 +0800	[thread overview]
Message-ID: <425A4BB6.8090907@tw.ibm.com> (raw)
In-Reply-To: <425A49F6.3040904@tw.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 212 bytes --]

Hi Jeff,

Change:
    pdc2027x: change comments, indent, etc.

Attached please find the patch 2/4 against the libata-dev-2.6 tree for your review. Thanks.

Albert

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>

[-- Attachment #2: pdc_059.diff --]
[-- Type: text/plain, Size: 3468 bytes --]

--- libata-dev-2.6-058/drivers/scsi/pata_pdc2027x.c	2005-04-11 09:41:50.000000000 +0800
+++ libata-dev-2.6-059/drivers/scsi/pata_pdc2027x.c	2005-04-11 15:04:32.000000000 +0800
@@ -29,11 +29,11 @@
 #include <asm/io.h>
 
 #define DRV_NAME	"pata_pdc2027x"
-#define DRV_VERSION	"0.58"
+#define DRV_VERSION	"0.59"
 #undef PDC_DEBUG
 
 #ifdef PDC_DEBUG
-#define PDPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__, ## args)
+#define PDPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args)
 #else
 #define PDPRINTK(fmt, args...)
 #endif
@@ -217,8 +217,8 @@
 MODULE_DEVICE_TABLE(pci, pdc2027x_pci_tbl);
 
 /**
- * pdc_get_indexed_reg - Set pdc202xx extended register
- * @ap: Port to which the extended register is set
+ * pdc_get_indexed_reg - Get pdc202xx extended register
+ * @ap: Port to get the extended register
  * @index: index of the extended register
  */
 static u8 pdc_get_indexed_reg(struct ata_port *ap, u8 index)
@@ -232,8 +232,8 @@
 	return tmp8;
 }
 /**
- * pdc_set_indexed_reg - Read pdc202xx extended register
- * @ap: Port to which the extended register is read
+ * pdc_set_indexed_reg - Set pdc202xx extended register
+ * @ap: Port to set the extended register
  * @index: index of the extended register
  */
 static void pdc_set_indexed_reg(struct ata_port *ap, u8 index, u8 value)
@@ -322,7 +322,7 @@
 	PDPRINTK("adev->pio_mode[%X]\n", adev->pio_mode);
 
 	/* Sanity check */
-	if(pio > 4) {
+	if (pio > 4) {
 		printk(KERN_ERR DRV_NAME ": Unknown pio mode [%d] ignored\n", pio);
 		return;
 
@@ -357,7 +357,7 @@
 	u8 adj			= (drive_dn%2) ? 0x08 : 0x00;
 	u8 tmp8;
 
-	if((dma_mode >= XFER_UDMA_0) && 
+	if ((dma_mode >= XFER_UDMA_0) && 
 	   (dma_mode <= XFER_UDMA_6)) {
 		/* Set the UDMA timing registers with value table for 133MHz */
 		unsigned int udma_mode = dma_mode & 0x07;
@@ -380,7 +380,7 @@
 		
 		PDPRINTK("Set to udma mode[%u] \n", udma_mode);
 
-	} else  if((dma_mode >= XFER_MW_DMA_0) && 
+	} else  if ((dma_mode >= XFER_MW_DMA_0) && 
 		   (dma_mode <= XFER_MW_DMA_2)) {
 		/* Set the MDMA timing registers with value table for 133MHz */
 		unsigned int mdma_mode = dma_mode & 0x07;
@@ -451,7 +451,6 @@
 	if (cmd->request_bufflen % 256)
 		rc = 1;
 
-	PDPRINTK("request_bufflen %d, rc %d\n", cmd->request_bufflen, rc);
 	return rc;
 }
 
@@ -496,16 +495,16 @@
 	 * Calculate the ratio of F, R and OD
 	 * POUT = (F + 2) / (( R + 2) * NO)
 	 */
-	if (ratio < 8600L) { // 8.6x
+	if (ratio < 8600L) { /* 8.6x */
 		/* Using NO = 0x01, R = 0x0D */
 		R = 0x0d;
-	} else if (ratio < 12900L) { // 12.9x
+	} else if (ratio < 12900L) { /* 12.9x */
 		/* Using NO = 0x01, R = 0x08 */
 		R = 0x08;
-	} else if (ratio < 16100L) { // 16.1x
+	} else if (ratio < 16100L) { /* 16.1x */
 		/* Using NO = 0x01, R = 0x06 */
 		R = 0x06;
-	} else if (ratio < 64000L) { // 64x
+	} else if (ratio < 64000L) { /* 64x */
 		R = 0x00;
 	} else {
 		/* Invalid ratio */
@@ -639,7 +638,7 @@
 	 */
 	pll_clock = pdc_detect_pll_input_clock(pe);
 
-	if(pll_clock < 0) /* counter overflow? Try again. */
+	if (pll_clock < 0) /* counter overflow? Try again. */
 		pll_clock = pdc_detect_pll_input_clock(pe);
 
 	printk(KERN_INFO DRV_NAME ": PLL input clock %ld kHz\n", pll_clock/1000);
@@ -727,7 +726,7 @@
 	//pci_enable_intx(pdev);
 
 	/* initialize adapter */
-	if(pdc_hardware_init(pdev, probe_ent, board_idx) != 0)
+	if (pdc_hardware_init(pdev, probe_ent, board_idx) != 0)
 		goto err_out_free_ent;
 
 	ata_device_add(probe_ent);

  parent reply	other threads:[~2005-04-11 10:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-11  9:57 [PATCH 0/4] libata-dev-2.6: pdc2027x PLL input clock detection fix, etc Albert Lee
2005-04-11 10:02 ` [PATCH 1/4] libata-dev-2.6: pdc2027x add ata_scsi_ioctl Albert Lee
2005-05-16  2:38   ` Jeff Garzik
2005-04-11 10:04 ` Albert Lee [this message]
2005-04-11 10:06 ` [PATCH 3/4] libata-dev-2.6: pdc2027x move the PLL counter reading code Albert Lee
2005-04-11 10:11 ` [PATCH 0/4] libata-dev-2.6: pdc2027x PLL input clock detection fix, etc Albert Lee
2005-04-11 10:28 ` [PATCH 4/4] libata-dev-2.6: pdc2027x PLL input clock detection fix Albert Lee
2005-04-17  1:54 ` [PATCH 2.6.12-rc2 0/2] libata: add reporting of atapi errors Eric A. Cottrell
2005-04-19  6:08 ` [PATCH 1/1] libata-dev-2.6: pdc2027x ATAPI DMA fix Albert Lee
2005-04-27  8:55   ` Albert Lee
2005-04-29  3:19     ` [PATCH 1/1] libata-dev-2.6: pdc2027x yet another PLL fix Albert Lee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=425A4BB6.8090907@tw.ibm.com \
    --to=albertcc@tw.ibm.com \
    --cc=bzolnier@gmail.com \
    --cc=dwm@maxeymade.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).