Index: trunk/src/os2ahci/os2ahci.c
===================================================================
--- trunk/src/os2ahci/os2ahci.c	(revision 121)
+++ trunk/src/os2ahci/os2ahci.c	(revision 122)
@@ -33,15 +33,15 @@
 
 /* parse integer command line parameter */
-#define drv_parm_int(s, value, type, radix)               \
-  {                                                       \
-    char _far *_ep;                                       \
-    if ((s)[1] != ':') {                                  \
-      cprintf("missing colon (:) after /%c\n", *(s));     \
-      goto init_fail;                                     \
-    }                                                     \
-    value = (type) strtol((s) + 2,                        \
-                          (const char _far* _far*) &_ep,  \
-                          radix);                         \
-    s = _ep;                                              \
+#define drv_parm_int(s, value, type, radix)                         \
+  {                                                                 \
+    char _far *_ep;                                                 \
+    if ((s)[1] != ':') {                                            \
+      cprintf("%s: missing colon (:) after /%c\n", drv_name, *(s)); \
+      goto init_fail;                                               \
+    }                                                               \
+    value = (type) strtol((s) + 2,                                  \
+                          (const char _far* _far*) &_ep,            \
+                          radix);                                   \
+    s = _ep;                                                        \
   }
 
@@ -73,5 +73,6 @@
 int             thorough_scan = 1; /* if != 0, perform thorough PCI scan */
 int             init_reset;        /* if != 0, reset ports during init */
-int             verbosity;         /* if > 0, show some info during boot */
+int             verbosity = 1;     /* == 1 -> show sign on banner
+                                    *  > 1 -> show adapter info during boot */
 
 PFN             Device_Help = 0;   /* pointer to device helper entry point */
@@ -83,8 +84,9 @@
 USHORT          add_handle;        /* driver handle (RegisterDeviceClass) */
 UCHAR           timer_pool[TIMER_POOL_SIZE]; /* timer pool */
+char            drv_name[] = "OS2AHCI"; /* driver name as string */
 
 /* resource manager driver information structure */
 DRIVERSTRUCT rm_drvinfo = {
-  "OS2AHCI",                       /* driver name */
+  drv_name,                        /* driver name */
   "AHCI SATA Driver",              /* driver description */
   "GNU",                           /* vendor name */
@@ -112,6 +114,6 @@
 u8              track_size[MAX_AD][AHCI_MAX_PORTS];
 
-static char     init_msg[] = "OS2AHCI driver version %d.%02d\n";
-static char     exit_msg[] = "OS2AHCI driver *not* installed\n";
+static char     init_msg[] = "%s driver version %d.%02d\n";
+static char     exit_msg[] = "%s driver *not* installed\n";
 
 /* ----------------------------- start of code ----------------------------- */
@@ -179,14 +181,8 @@
   init_libc();
 
-  /* print initialization message */
-  cprintf(init_msg, VERSION / 100, VERSION % 100);
-
-#ifdef ECS_BUILD
-  cprintf("This driver is licensed for use only in conjunction with eComStation.");
-#endif
-
   /* register driver with resource manager */
   if ((rmrc = RMCreateDriver(&rm_drvinfo, &rm_drvh)) != RMRC_SUCCESS) {
-    cprintf("failed to register driver with resource manager (rc = %d)\n", rmrc);
+    cprintf("%s: failed to register driver with resource manager (rc = %d)\n",
+            drv_name, rmrc);
     goto init_fail;
   }
@@ -205,5 +201,5 @@
       case '\0':
         /* end of command line; can only happen if command line is incorrect */
-        cprintf("incomplete command line option\n");
+        cprintf("%s: incomplete command line option\n", drv_name);
         goto init_fail;
 
@@ -223,5 +219,5 @@
         drv_parm_int(s, device, u16, 16);
         if (add_pci_id(vendor, device)) {
-          cprintf("failed to add PCI ID %04x:%04x\n", vendor, device);
+          cprintf("%s: failed to add PCI ID %04x:%04x\n", drv_name, vendor, device);
           goto init_fail;
         }
@@ -243,5 +239,5 @@
         drv_parm_int(s, adapter_index, int, 10);
         if (adapter_index < 0 || adapter_index >= MAX_AD) {
-          cprintf("invalid adapter index (%d)\n", adapter_index);
+          cprintf("%s: invalid adapter index (%d)\n", drv_name, adapter_index);
           goto init_fail;
         }
@@ -252,5 +248,5 @@
         drv_parm_int(s, port_index, int, 10);
         if (port_index < 0 || port_index >= AHCI_MAX_PORTS) {
-          cprintf("invalid port index (%d)\n", port_index);
+          cprintf("%s: invalid port index (%d)\n", drv_name, port_index);
           goto init_fail;
         }
@@ -289,5 +285,5 @@
           break;
         default:
-          cprintf("invalid link parameter (%c)\n", *s);
+          cprintf("%s: invalid link parameter (%c)\n", drv_name, *s);
           goto init_fail;
         }
@@ -308,10 +304,22 @@
         break;
 
+      case 'q':
+        /* be quiet */
+        verbosity = -1000;
+        break;
+
       default:
-        cprintf("unknown option: /%c\n", *s);
+        cprintf("%s: unknown option: /%c\n", drv_name, *s);
         goto init_fail;
       }
     }
   }
+
+  /* print initialization message */
+  cvprintf(init_msg, drv_name, VERSION / 100, VERSION % 100);
+
+#ifdef ECS_BUILD
+  cvprintf("This driver is licensed for use only in conjunction with eComStation.");
+#endif
 
   if (debug) {
@@ -334,7 +342,7 @@
     mdelay_cal();
 
-    if (DevHelp_RegisterDeviceClass("OS2AHCI", (PFN) add_entry, 0, 1,
+    if (DevHelp_RegisterDeviceClass(drv_name, (PFN) add_entry, 0, 1,
                                     &add_handle)) {
-      cprintf("error: couldn't register device class\n");
+      cprintf("%s: couldn't register device class\n", drv_name);
       goto init_fail;
     }
@@ -344,5 +352,5 @@
         DevHelp_AllocateCtxHook(mk_NPFN(reset_hook), &reset_ctxhook_h) != 0 ||
         DevHelp_AllocateCtxHook(mk_NPFN(engine_hook), &engine_ctxhook_h)) {
-      cprintf("failed to allocate task-time context hooks\n");
+      cprintf("%s: failed to allocate task-time context hooks\n", drv_name);
       goto init_fail;
     }
@@ -354,5 +362,5 @@
   } else {
     /* no adapters found */
-    cprintf(" No adapters found.\n");
+    cvprintf(" No adapters found.\n");
   }
 
@@ -372,5 +380,5 @@
   }
 
-  cprintf(exit_msg);
+  cvprintf(exit_msg, drv_name);
   return(STDON | ERROR_I24_QUIET_INIT_FAIL);
 }
Index: trunk/src/os2ahci/os2ahci.h
===================================================================
--- trunk/src/os2ahci/os2ahci.h	(revision 121)
+++ trunk/src/os2ahci/os2ahci.h	(revision 122)
@@ -104,4 +104,8 @@
 #define dddprintf if (debug > 2) printf
 #define dddphex   if (debug > 2) phex
+
+/* verbosity console print macros */
+#define cvprintf  if (verbosity > 0) cprintf
+#define cvvprintf if (verbosity > 1) cprintf
 
 /* TRACE macros (for our internal ring buffer trace) */
@@ -525,4 +529,5 @@
 extern USHORT        add_handle;    /* adapter device driver handle */
 extern UCHAR         timer_pool[];  /* timer pool */
+extern char          drv_name[];    /* driver name as string ("OS2AHCI") */
 
 extern PCI_ID        pci_ids[];     /* SATA adapter PCI IDs */
Index: trunk/src/os2ahci/pci.c
===================================================================
--- trunk/src/os2ahci/pci.c	(revision 121)
+++ trunk/src/os2ahci/pci.c	(revision 122)
@@ -417,5 +417,5 @@
   memset(&parm, 0x00, sizeof(parm));
   if (oemhlp_call(OH_BIOS_INFO, &parm, &data) != OH_SUCCESS) {
-    cprintf("couldn't get PCI BIOS information\n");
+    cprintf("%s: couldn't get PCI BIOS information\n", drv_name);
     return;
   }
@@ -614,15 +614,13 @@
 
   /* found a supported AHCI device */
-  if (verbosity > 0) {
-    cprintf("found AHCI device: %s %s (%04x:%04x)\n"
+  cvvprintf("found AHCI device: %s %s (%04x:%04x)\n"
             " class:0x%06lx bus:%d devfunc:0x%02x\n",
             vendor_from_id(vendor), device_from_id(device),
             vendor, device,
             class, bus, dev_func);
-  }
 
   /* make sure we got room in the adapter information array */
   if (ad_info_cnt >= MAX_AD - 1) {
-    cprintf("error: too many AHCI devices\n");
+    cprintf("%s: too many AHCI devices\n", drv_name);
     return;
   }
@@ -665,5 +663,5 @@
   ret = RMAllocResource(rm_drvh, &ad_info->rm_irq, &resource);
   if (ret != RMRC_SUCCESS) {
-    cprintf("error: couldn't register IRQ %d (rc = %s)\n", irq, rmerr(ret));
+    cprintf("%s: couldn't register IRQ %d (rc = %s)\n", drv_name, irq, rmerr(ret));
     return;
   }
@@ -689,5 +687,5 @@
     if (i == AHCI_PCI_BAR) {
       if (resource.ResourceType != RS_TYPE_MEM) {
-        cprintf("error: BAR #5 must be an MMIO region\n");
+        cprintf("%s: BAR #5 must be an MMIO region\n", drv_name);
         goto add_pci_fail;
       }
@@ -700,5 +698,6 @@
     ret = RMAllocResource(rm_drvh, ad_info->rm_bars + i, &resource);
     if (ret != RMRC_SUCCESS) {
-      cprintf("error: couldn't register [MM]IO region (rc = %s)\n", rmerr(ret));
+      cprintf("%s: couldn't register [MM]IO region (rc = %s)\n", 
+              drv_name, rmerr(ret));
       goto add_pci_fail;
     }
@@ -707,5 +706,5 @@
 
   if (ad_info->mmio_phys == 0) {
-    cprintf("error: couldn't determine MMIO base address\n");
+    cprintf("%s: couldn't determine MMIO base address\n", drv_name);
     goto add_pci_fail;
   }
@@ -724,5 +723,5 @@
   if (DevHelp_AllocPhys((long) AHCI_PORT_PRIV_DMA_SZ * AHCI_MAX_PORTS,
                         MEMTYPE_ABOVE_1M, &ad_info->dma_buf_phys) != 0) {
-    cprintf("error: couldn't allocate DMA scratch buffers for AHCI ports\n");
+    cprintf("%s: couldn't allocate DMA scratch buffers for AHCI ports\n", drv_name);
     ad_info->dma_buf_phys = 0;
     goto add_pci_fail;
@@ -731,5 +730,5 @@
   /* allocate GDT selectors for memory-mapped I/O and DMA scratch buffers */
   if (DevHelp_AllocGDTSelector(gdt, PORT_DMA_BUF_SEGS + 1) != 0) {
-    cprintf("error: couldn't allocate GDT selectors\n");
+    cprintf("%s: couldn't allocate GDT selectors\n", drv_name);
     memset(gdt, 0x00, sizeof(gdt));
     goto add_pci_fail;
@@ -739,5 +738,5 @@
   if (DevHelp_PhysToGDTSelector(ad_info->mmio_phys,
                                 (USHORT) ad_info->mmio_size, gdt[0]) != 0) {
-    cprintf("error: couldn't map MMIO address to GDT selector\n");
+    cprintf("%s: couldn't map MMIO address to GDT selector\n", drv_name);
     goto add_pci_fail;
   }
@@ -749,5 +748,5 @@
 
     if (DevHelp_PhysToGDTSelector(addr, len, gdt[i+1]) != 0) {
-      cprintf("error: couldn't map DMA scratch buffer to GDT selector\n");
+      cprintf("%s: couldn't map DMA scratch buffer to GDT selector\n", drv_name);
       goto add_pci_fail;
     }
@@ -780,5 +779,5 @@
   ret = RMCreateAdapter(rm_drvh, &ad_info->rm_adh, &adapter, NULL, rc_list);
   if (ret != RMRC_SUCCESS) {
-    cprintf("error: couldn't register adapter (rc = %s)\n", rmerr(ret));
+    cprintf("%s: couldn't register adapter (rc = %s)\n", drv_name, rmerr(ret));
     goto add_pci_fail;
   }
@@ -827,6 +826,6 @@
   parm.read_config.size     = size;
   if ((rc = oemhlp_call(OH_READ_CONFIG, &parm, &data) != OH_SUCCESS)) {
-    cprintf("error: couldn't read config space (bus = %d, dev_func = 0x%02x, indx = 0x%02x, rc = %d)\n",
-            bus, dev_func, indx,  rc);
+    cprintf("%s: couldn't read config space (bus = %d, dev_func = 0x%02x, indx = 0x%02x, rc = %d)\n",
+            drv_name, bus, dev_func, indx,  rc);
     return(rc);
   }
@@ -854,6 +853,6 @@
 
   if ((rc = oemhlp_call(OH_WRITE_CONFIG, &parm, &data) != OH_SUCCESS)) {
-    cprintf("error: couldn't write config space (bus = %d, dev_func = 0x%02x, indx = 0x%02x, rc = %d)\n",
-            bus, dev_func, indx, rc);
+    cprintf("%s: couldn't write config space (bus = %d, dev_func = 0x%02x, indx = 0x%02x, rc = %d)\n",
+            drv_name, bus, dev_func, indx, rc);
     return(rc);
   }
@@ -877,5 +876,5 @@
         oemhlp.ProtIDCEntry == NULL ||
         oemhlp.ProtIDC_DS == 0) {
-      cprintf("couldn't attach to OEMHLP$\n");
+      cprintf("%s: couldn't attach to OEMHLP$\n", drv_name);
       return(OH_NOT_SUPPORTED);
     }
@@ -973,5 +972,5 @@
       pci_write_conf(bus, dev_func, PCI_BAR(i), sizeof(u32), bar_addr)  != OH_SUCCESS) {
 
-    cprintf("error: couldn't determine [MM]IO size\n");
+    cprintf("%s: couldn't determine [MM]IO size\n", drv_name);
     if (bar_addr != 0) {
       pci_write_conf(bus, dev_func, PCI_BAR(i), sizeof(u32), bar_addr);
Index: trunk/src/os2ahci/trace.c
===================================================================
--- trunk/src/os2ahci/trace.c	(revision 121)
+++ trunk/src/os2ahci/trace.c	(revision 122)
@@ -71,6 +71,6 @@
         /* failed, too. Give up */
         ahci_trace_buf.phys_addr = 0;
-        cprintf("OS2AHCI warning: failed to allocate %dk trace buffer\n",
-                AHCI_TRACE_BUF_SIZE / 1024);
+        cprintf("%s warning: failed to allocate %dk trace buffer\n",
+                drv_name, AHCI_TRACE_BUF_SIZE / 1024);
         return;
       }
