libata-dev: print out information for ATAPI devices with CDB interrupts
PATCH 1/1 libata-dev: print out information for ATAPI devices with CDB interrupts
print out information for ATAPI devices with CDB interrupts
---
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
drivers/scsi/libata-core.c +8 -3
@@ -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 ;
Jeff Garzik
AppliedQuoted 3 lines · Albert Lee
print out information for ATAPI devices with CDB interrupts
Signed-off-by Albert Lee <[email protected]>
applied