All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Borislav Petkov <bbpetkov@yahoo.de>
Cc: linux IDE ML <linux-ide@vger.kernel.org>,
	Jeff Garzik <jgarzik@pobox.com>
Subject: Re: [PATCH] libata-core.c: restore configuration boot messages in ata_dev_configure()
Date: Tue, 27 Jun 2006 21:25:26 +0900	[thread overview]
Message-ID: <44A123B6.20000@gmail.com> (raw)
In-Reply-To: <20060627073335.GA6237@zmei.tnic>

Borislav Petkov wrote:
> Hi Tejun, Jeff,
>    is this one like what you had in mind? I left out the ENTER/EXIT printk's
>    since they are debug level. By the way, should I convert the dbg message
>    levels to the scheme you both proposed now while not everything is converted
>    or wait first. However, i'd rather do it now since it is less work than
>    later :)?

IMHO, this should be done in the following steps.

* define ATA_MSG_* and ata_msg_* macros which map 1:1 to the current 
message levels.

* make ata_*_prink()s use ATA_MSG_* instead of KERN_* and embed 
ata_msg_enable() into ata_*_printk()s.  Convert ALL ata_*_printk()s and 
convertible DEBUG/VDEBUG()s in single sweep - it doesn't have to be a 
single patch but post them together.  These conversions touch a lot of 
places and other patches have to be regenerated afterward.

* define more ATA_MSG_* and convert.

> This restores the default libata configuration messages printed during booting.
> 
> Signed-off-by: <petkov@math.uni-muenster.de>
> 
> 
> --- libata-dev/drivers/scsi/libata-core.c.orig2	2006-06-27 09:21:44.000000000 +0200
> +++ libata-dev/drivers/scsi/libata-core.c	2006-06-27 09:23:54.000000000 +0200
> @@ -1359,11 +1359,10 @@ int ata_dev_configure(struct ata_device 
>  			       __FUNCTION__, ap->id, dev->devno);
>  
>  	/* print device capabilities */
> -	if (ata_msg_probe(ap))
> -		ata_dev_printk(dev, KERN_DEBUG,
> -			       "%s: cfg 49:%04x 82:%04x 83:%04x 84:%04x "
> +	if (ata_msg_drv(ap))
> +		ata_dev_printk(dev, KERN_INFO,
> +			       "cfg 49:%04x 82:%04x 83:%04x 84:%04x "
>  			       "85:%04x 86:%04x 87:%04x 88:%04x\n",
> -			       __FUNCTION__,
>  			       id[49], id[82], id[83], id[84],
>  			       id[85], id[86], id[87], id[88]);

This is a debug message and shouldn't be printed by default.

> @@ -1405,7 +1404,7 @@ int ata_dev_configure(struct ata_device 
>  			ata_dev_config_ncq(dev, ncq_desc, sizeof(ncq_desc));
>  
>  			/* print device info to dmesg */
> -			if (ata_msg_info(ap))
> +			if (ata_msg_drv(ap))
>  				ata_dev_printk(dev, KERN_INFO, "ATA-%d, "
>  					"max %s, %Lu sectors: %s %s\n",
>  					ata_id_major_version(id),

This should be printed by default but only when @print_info is non-zero.

> @@ -1428,7 +1427,7 @@ int ata_dev_configure(struct ata_device 
>  			}
>  
>  			/* print device info to dmesg */
> -			if (ata_msg_info(ap))
> +			if (ata_msg_drv(ap))
>  				ata_dev_printk(dev, KERN_INFO, "ATA-%d, "
>  					"max %s, %Lu sectors: CHS %u/%u/%u\n",
>  					ata_id_major_version(id),

Ditto.

> @@ -1440,7 +1439,7 @@ int ata_dev_configure(struct ata_device 
>  
>  		if (dev->id[59] & 0x100) {
>  			dev->multi_count = dev->id[59] & 0xff;
> -			if (ata_msg_info(ap))
> +			if (ata_msg_drv(ap))
>  				ata_dev_printk(dev, KERN_INFO,
>  					"ata%u: dev %u multi count %u\n",
>  					ap->id, dev->devno, dev->multi_count);

Ditto.

> @@ -1469,7 +1468,7 @@ int ata_dev_configure(struct ata_device 
>  		}
>  
>  		/* print device info to dmesg */
> -		if (ata_msg_info(ap))
> +		if (ata_msg_drv(ap))
>  			ata_dev_printk(dev, KERN_INFO, "ATAPI, max %s%s\n",
>  				       ata_mode_string(xfer_mask),
>  				       cdb_intr_string);

Ditto.

> @@ -1483,7 +1482,7 @@ int ata_dev_configure(struct ata_device 
>  
>  	/* limit bridge transfers to udma5, 200 sectors */
>  	if (ata_dev_knobble(dev)) {
> -		if (ata_msg_info(ap))
> +		if (ata_msg_drv(ap))
>  			ata_dev_printk(dev, KERN_INFO,
>  				       "applying bridge limits\n");
>  		dev->udma_mask &= ATA_UDMA5;

Ditto.

And, now we're using ata_msg_drv() which is reserved for driver loading 
messages for info messages.  See how the scheme is broken?  :-p

Thanks.

-- 
tejun

  reply	other threads:[~2006-06-27 12:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-27  7:33 [PATCH] libata-core.c: restore configuration boot messages in ata_dev_configure() Borislav Petkov
2006-06-27 12:25 ` Tejun Heo [this message]
2006-06-27 13:13   ` Borislav Petkov
2006-06-27 13:29     ` Tejun Heo
2006-06-27 13:33       ` Tejun Heo
2006-06-28  6:36         ` Borislav Petkov
2006-06-28  6:45         ` Borislav Petkov

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=44A123B6.20000@gmail.com \
    --to=htejun@gmail.com \
    --cc=bbpetkov@yahoo.de \
    --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.