Enabling Windows Update on Windows XP

Posted on 26. Feb, 2010 by in Windows

Windows 7 and Vista have Windows Update on by default, as do most recent Windows XP machines. So when a new USB device arrives, the system is able to go out to the Internet and check Microsoft’s huge library of drivers to find a match — a great plug and play experience for devices like those we make here at Plugable.

But Windows XP, when it originally shipped in 2001, didn’t have this capability. So to enable Windows Update on XP, if you don’t already have it on, just upgrade to XP Service Pack 2 or later, and follow Microsoft’s steps:

  1. Click Start, click Run, type sysdm.cpl, and then press ENTER.
  2. Click the Automatic Updates tab, and then click to select one of the following options. We recommend that you select the Automatic (recommended) Automatically download recommended updates for my computer and install them option.

Microsoft has more information in their knowledge base article at http://support.microsoft.com/kb/306525

UD-160-A automatic driver download and install via Windows Update

Posted on 21. Feb, 2010 by in Windows

Here’s the result when you connect the Plugable UD-160-A universal laptop docking station to a completely fresh Windows 7 system:

  • Windows automatically finds, downloads, and installs drivers for all the devices on the dock — the built-in USB C-Media audio, ASIX ethernet, DisplayLink graphics functions are all supported.
  • *NO* driver disks to find, no web addresses to enter, nothing – you get the latest drivers automatically.
  • This will work with the Plugable dock and any Windows 7 machine, now and in the future.

If you have Windows Update enabled on Vista and Windows XP – the story is the same (although Microsoft’s UI looks different on each OS). So go ahead, lose your driver disks — just get that off your mind. You won’t need them. Cool.

Emacs macro to ease the pain of checkpatchitis

Posted on 19. Feb, 2010 by in udlfb

In order to submit patches to the Linux kernel — as I’ve been doing lately to help improve Linux’s DisplayLink driver udlfb — the changed code has to pass a script called checkpatch.pl, which flags violations of the Linux kernel style guidelines.

Style wars (e.g. “tabs vs. spaces”) are a never-ending source of tension on projects, so I actually appreciate automation like checkpatch.pl to just lay down the law, and be done with it.

But .. having to sift through endless warnings when you run checkpatch.pl late in the development process is frustrating. And there’s no way most occasional kernel patchers will remember all the rules (especially if you strongly disagree with some of them — which I do). It’s much better if your editor can just warn you when you step off the golden path of enlightenment. I use emacs, so I looked around for solutions, but they were only incomplete, or not real-time (e.g. checkpatch.pl has an –emacs option to run in the compile window of emacs).

So here’s something a little less incomplete that I’ve added to my .emacs file to catch the majority of checkpatch.pl errors in real-time (by highlighting the offending code in red). Works only on recent emacs versions. Hopefully it’ll be useful to others pounding away on their patches.

;; *** BEGIN highlight checkpatch.pl warnings and errors ***
(add-hook 'c-mode-common-hook
    (lambda ()
      ;; this sets defaults to match many checkpatch.pl guidelines
      (c-set-style "linux")))
;; but doesn't warn us about violations these regexp catch common ones
(custom-set-faces
    '(my-warning-face ((((class color)) (:background "red"))) t))
(add-hook 'font-lock-mode-hook
    (function
        (lambda ()
            (setq font-lock-keywords
                (append font-lock-keywords
		    '(("^.\\{81\\}" (0 'my-warning-face t)))
                    '(("\\/\\/.*" (0 'my-warning-face t)))
                    '((";[_A-Za-z0-9]+" (0 'my-warning-face t)))
                    '((",[_A-Za-z0-9]+" (0 'my-warning-face t)))
                    '(("return[[:blank:]]*(.+);" (0 'my-warning-face t)))
                    '(("([_A-Za-z0-9]+[\\*]+)" (0 'my-warning-face t)))
                    '(("[[:blank:]]+\\)"(0 'my-warning-face t)))
		    '(("^[[:blank:]]+{[[:blank:]]*$" (0 'my-warning-face t)))
		    '(("[_A-Za-z0-9]+\\*[[:blank:]]" (0 'my-warning-face t)))
		)))))
;; exercise to reader - move regexps into c hook
;; *** END highlight checkpatch.pl warnings and errors ***

Any enhancements or corrections are welcome.

Page 1 of 212