highpoint_ide_pci: Rework tracing.

* Rename TRACE to INFO as it is always enabled.
 * Rename TRACE_EXT to TRACE in line with other drivers.
 * Move most previously-TRACE-now-INFO message to TRACE,
   removing them from debug output.

This should get rid of the Highpoint-IDE syslog spam in every boot log.
This commit is contained in:
Augustin Cavalier
2021-09-29 15:37:56 -04:00
parent 627dc1ffed
commit 81eacf8d4f
@@ -12,13 +12,13 @@
#include <string.h>
#define TRACE(a...) dprintf("Highpoint-IDE: " a)
#define INFO(a...) dprintf("Highpoint-IDE: " a)
//#define TRACE_EXT_HIGHPOINT
#ifdef TRACE_EXT_HIGHPOINT
#define TRACE_EXT(a...) dprintf("Highpoint-IDE (ext): " a)
//#define TRACE_HIGHPOINT
#ifdef TRACE_HIGHPOINT
#define TRACE(a...) dprintf("Highpoint-IDE: " a)
#else
#define TRACE_EXT(a...)
#define TRACE(a...)
#endif
@@ -39,7 +39,7 @@ struct HPT_controller_info *HPT_info;
static void
set_channel(void *cookie, ata_channel channel)
{
TRACE_EXT("set_channel()\n");
TRACE("set_channel()\n");
sATAAdapter->set_channel((ata_adapter_channel_info *)cookie, channel);
}
@@ -49,7 +49,7 @@ static status_t
write_command_block_regs(void *channel_cookie, ata_task_file *tf,
ata_reg_mask mask)
{
TRACE_EXT("write_command_block_regs()\n");
TRACE("write_command_block_regs()\n");
return sATAAdapter->write_command_block_regs(
(ata_adapter_channel_info *)channel_cookie, tf, mask);
@@ -60,7 +60,7 @@ static status_t
read_command_block_regs(void *channel_cookie, ata_task_file *tf,
ata_reg_mask mask)
{
TRACE_EXT("read_command_block_regs()\n");
TRACE("read_command_block_regs()\n");
return sATAAdapter->read_command_block_regs(
(ata_adapter_channel_info *)channel_cookie, tf, mask);
@@ -70,7 +70,7 @@ read_command_block_regs(void *channel_cookie, ata_task_file *tf,
static uint8
get_altstatus(void *channel_cookie)
{
TRACE_EXT("get_altstatus()\n");
TRACE("get_altstatus()\n");
return sATAAdapter->get_altstatus(
(ata_adapter_channel_info *)channel_cookie);
@@ -80,7 +80,7 @@ get_altstatus(void *channel_cookie)
static status_t
write_device_control(void *channel_cookie, uint8 val)
{
TRACE_EXT("write_device_control()\n");
TRACE("write_device_control()\n");
return sATAAdapter->write_device_control(
(ata_adapter_channel_info *)channel_cookie, val);
@@ -90,7 +90,7 @@ write_device_control(void *channel_cookie, uint8 val)
static status_t
write_pio(void *channel_cookie, uint16 *data, int count, bool force_16bit)
{
TRACE_EXT("write_pio()\n");
TRACE("write_pio()\n");
return sATAAdapter->write_pio((ata_adapter_channel_info *)channel_cookie,
data, count, force_16bit);
@@ -100,7 +100,7 @@ write_pio(void *channel_cookie, uint16 *data, int count, bool force_16bit)
static status_t
read_pio(void *channel_cookie, uint16 *data, int count, bool force_16bit)
{
TRACE_EXT("read_pio()\n");
TRACE("read_pio()\n");
return sATAAdapter->read_pio((ata_adapter_channel_info *)channel_cookie,
data, count, force_16bit);
@@ -111,7 +111,7 @@ static status_t
prepare_dma(void *channel_cookie, const physical_entry *sg_list,
size_t sg_list_count, bool to_device)
{
TRACE_EXT("prepare_dma()\n");
TRACE("prepare_dma()\n");
return sATAAdapter->prepare_dma((ata_adapter_channel_info *)channel_cookie,
sg_list, sg_list_count, to_device);
@@ -121,7 +121,7 @@ prepare_dma(void *channel_cookie, const physical_entry *sg_list,
static status_t
start_dma(void *channel_cookie)
{
TRACE_EXT("start_dma()\n");
TRACE("start_dma()\n");
return sATAAdapter->start_dma((ata_adapter_channel_info *)channel_cookie);
}
@@ -130,7 +130,7 @@ start_dma(void *channel_cookie)
static status_t
finish_dma(void *channel_cookie)
{
TRACE_EXT("finish_dma()\n");
TRACE("finish_dma()\n");
return sATAAdapter->finish_dma((ata_adapter_channel_info *)channel_cookie);
}
@@ -228,7 +228,7 @@ init_controller(device_node *node, ata_adapter_controller_info **cookie)
HPT_info->revisionID = revisionID;
HPT_info->function = function;
TRACE("init_controller(): found: device: %x, revision: %x, function: %x\n",devID,revisionID,function);
INFO("found: device: %x, revision: %x, function: %x\n",devID,revisionID,function);
// setting different config options
if (devID == ATA_HPT366) {
@@ -268,7 +268,7 @@ init_controller(device_node *node, ata_adapter_controller_info **cookie)
if (HPT_info->configOption == CFG_HPT366_OLD) {
/* disable interrupt prediction */
pci->write_pci_config(pci_device, 0x51, 1, (pci->read_pci_config(pci_device, 0x51, 1) & ~0x80));
TRACE("Highpoint-ATA: old revision found.\n");
INFO("Highpoint-ATA: old revision found.\n");
} else {
/* disable interrupt prediction */
pci->write_pci_config(pci_device, 0x51, 1, (pci->read_pci_config(pci_device, 0x51, 1) & ~0x03));
@@ -373,7 +373,7 @@ supports_device(device_node *parent)
result = 0.0f;
}
}
TRACE("supports_device(): supporting device Vendor ID: %x, deviceID: %x, result %f\n", vendorID, deviceID, result);
INFO("supporting device Vendor ID: %x, deviceID: %x, result %f\n", vendorID, deviceID, result);
return result;
}