All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albert Lee <albertcc@tw.ibm.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: IDE Linux <linux-ide@vger.kernel.org>, Doug Maxey <dwm@maxeymade.com>
Subject: [PATCH 1/1] libata-dev: print out information for ATAPI devices with CDB interrupts
Date: Fri, 31 Mar 2006 13:29:04 +0800	[thread overview]
Message-ID: <442CBE20.2010602@tw.ibm.com> (raw)

print out information for ATAPI devices with CDB interrupts

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
---
Minor patch to help identify the CD-ROM drives with CDB interrupts
in dmesg. After the patch, the dmesg looks like:

pata_pdc2027x 0000:02:05.0: PLL input clock 16717 kHz
ata3: PATA max UDMA/133 cmd 0x989517C0 ctl 0x98951FDA bmdma 0x98951000 irq 10
ata4: PATA max UDMA/133 cmd 0x989515C0 ctl 0x98951DDA bmdma 0x98951008 irq 10
ata3: dev 0 cfg 49:0f00 82:0000 83:0000 84:0000 85:0000 86:0000 87:0000 88:0000
ata3: dev 0 ATAPI, max MWDMA2, CDB intr
ata3: dev 0 configured for MWDMA2
scsi2 : pata_pdc2027x
ata4: dev 0 cfg 49:2f00 82:7c6b 83:7b09 84:4003 85:7c69 86:3a01 87:4003 88:407f
ata4: dev 0 ATA-7, max UDMA/133, 160086528 sectors: LBA
ata4: dev 1 cfg 49:2f00 82:346b 83:7d01 84:5823 85:3469 86:3c01 87:4023 88:203f
ata4: dev 1 ATA-6, max UDMA/100, 156301488 sectors: LBA48
ata4: dev 0 configured for UDMA/100
ata4: dev 1 configured for UDMA/100
scsi3 : pata_pdc2027x
  Vendor: E-IDE     Model: CD-ROM 36X/AKW    Rev: U22 
  Type:   CD-ROM                             ANSI SCSI revision: 05
  Vendor: ATA       Model: Maxtor 6Y080L0    Rev: YAR4
  Type:   Direct-Access                      ANSI SCSI revision: 05
SCSI device sda: 160086528 512-byte hdwr sectors (81964 MB)

Patch against the irq-pio branch
(4f0e7c51ae392d841be395a9c6b8d26a9fbf33d2).

For your review, thanks.

Albert

--- irq-pio0/drivers/scsi/libata-core.c	2006-03-31 13:12:35.000000000 +0800
+++ cdb_printk/drivers/scsi/libata-core.c	2006-03-31 13:14:59.000000000 +0800
@@ -1305,6 +1305,8 @@ static int ata_dev_configure(struct ata_
 
 	/* ATAPI-specific feature tests */
 	else if (dev->class == ATA_DEV_ATAPI) {
+		char *cdb_intr_string = "";
+
 		rc = atapi_cdb_len(id);
 		if ((rc < 12) || (rc > ATAPI_CDB_LEN)) {
 			printk(KERN_WARNING "ata%u: unsupported CDB len\n", ap->id);
@@ -1313,13 +1315,16 @@ static int ata_dev_configure(struct ata_
 		}
 		dev->cdb_len = (unsigned int) rc;
 
-		if (ata_id_cdb_intr(dev->id))
+		if (ata_id_cdb_intr(dev->id)) {
 			dev->flags |= ATA_DFLAG_CDB_INTR;
+			cdb_intr_string = ", CDB intr";
+		}
 
 		/* print device info to dmesg */
 		if (print_info)
-			printk(KERN_INFO "ata%u: dev %u ATAPI, max %s\n",
-			       ap->id, dev->devno, ata_mode_string(xfer_mask));
+			printk(KERN_INFO "ata%u: dev %u ATAPI, max %s%s\n",
+			       ap->id, dev->devno, ata_mode_string(xfer_mask),
+			       cdb_intr_string);
 	}
 
 	ap->host->max_cmd_len = 0;


             reply	other threads:[~2006-03-31  5:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-31  5:29 Albert Lee [this message]
2006-03-31 15:07 ` [PATCH 1/1] libata-dev: print out information for ATAPI devices with CDB interrupts Jeff Garzik

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=442CBE20.2010602@tw.ibm.com \
    --to=albertcc@tw.ibm.com \
    --cc=albertl@mail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.