Vista 32/64 Bug 2 Add Hardware

Hi gurus,

This is a second BUG I have found in Vista. Again I hope it is me. This
occurs with just one SST PCI multiportserial adapter installed and note that
this can be somewhat reproduced with the ECP Printer Port as well. I will
first describe what works.

(1) I have one multiportserial Equinox SST-4P multiportserial adapter
installed that has 4 Com ports. I go to Device Manager, right-click and
Uninstall this device. The SST-4P uninstalls and its device objects or Com
ports get removed too. Since this is the only adapter and all the device
objects are removed the driver gets unloaded from memory too. Works great
and as it should.
(2) Now if I select Action / Scan for hardware changed from within Device
Manager the SST-4P gets reinstalled. Works great and as it should.

Now the BUG scenario.
(1) I do the Uninstall as in (1) above. Works great.
(2) Now the BUG. Instead of Scan for new hardware I do the following: I go
to the Control Panel and then select Classic View. Now I select Add
Hardware. Please. Please do not say I should not do this because I can and
before I fixed the driver I could get a BSOD and other BSODS for other
devices could be waiting to happen. Why because users will do this. Why
because previous versions of Windows worked doing this.
(3) Indeed the screen says this is for adding Hardware that does not support
Plug-n-Play. Well lets click Next anyway because customers will.
(4) Now select “Install the hardware that I manually select from a list
(Advanced)” then Next.
(5) Since this is a Multiportserial inf file, select Multi-port serial
adapters then Next.
(6) Select Have Disk and point to where the driver install files are.
(7) Select the SST-4P PCI adapter as I did not exclude any PCI adapters from
a manual installation. Then Next.
(8) The files get copied but you get an error occured. This is a BUG. Here
Windows is doing wrong I think and trying to install this PCI device under
the \root key note that IoGetDeviceProperty() can and does fail and an
driver that does check for this can BSOD. I did because I did not check all
failure code paths.
(9) Now the interest part as the BUG goes on. Click Finish. Now Add Hardware
will scan for plug-n-play PCI card and Install our device driver software
correctly.
(10) Go back to Device Manager and you have two SST-4P with one banged out.
Remove the banged out one.

The workaround for me is include
[ControlFlags]
ExcludeFromSelect = *

This gets rid of being able to install a PCI device under the \root because
no entries can be select but it is a cumbersome solution at best. Because
the driver gets installed when exit the Add Hardware program. You still get
a EMPTY list to select from.

Again in Windows XP it works because Windows does the PCI scan before the
non plug-n-play while Vista does the PCI scan after the non-plug-n-play.

As I promise here is the BUG scenario for the ECP printer port.
(1) Go to Device Manger and right-click Uninstall the ECP Printer Port
(LPT1).
(2) Go to Add Hardware. Click Next, “Install the hardware that I manually
select from a list (Advanced)”, Next, Ports (COM & LPT), Next, Select ECP
Printer Port, Next, Next.
(3) You get the Software for this device is now installed, but may not work
correctly. BUG.
(4) Click Finish. Now go into Device Manager you see ECP Printer Port
(LPT3 ) banged out.

Please lets get VISTA 100% with respect to Device Installation / update /
disable / remove. And 100% with repect to multiple PCI adapters with
multiple children. May I suggest using multiport serial as one parameter in
the testing. Test with multiple PCI cards. Test with 50 or more Com ports
or channels in a local system as well. VISTA must be 100% with Device
Manager nevertheless with and Enterprise Device Manager. And no reboots to
driver updates! Microsoft has a window to get Longhorn right on this.

-William Michael Jones “Mike”

This 2nd scenario is not a bug, it is by design. The Add HW wizard
creates root enumerated devices and installs drivers on them. This
works as advertised. ExcludeFromSelect = * is the correct solution for
your INF, but we can’t do it for LPT/COM ports b/c they actually can be
force installed through the add hardware wizard. Is it the right
default that you must be explicit about exluding yourself from the add
hardware wizard? Probably not, it should be something that you opt
into, but due to history (this wizard dates back to win95) and app
compat concerns, the default will most likely not change.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of William Michael
Jones
Sent: Tuesday, April 17, 2007 10:11 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Vista 32/64 Bug 2 Add Hardware

Hi gurus,

This is a second BUG I have found in Vista. Again I hope it is me.
This
occurs with just one SST PCI multiportserial adapter installed and note
that
this can be somewhat reproduced with the ECP Printer Port as well. I
will
first describe what works.

(1) I have one multiportserial Equinox SST-4P multiportserial adapter
installed that has 4 Com ports. I go to Device Manager, right-click and

Uninstall this device. The SST-4P uninstalls and its device objects or
Com
ports get removed too. Since this is the only adapter and all the
device
objects are removed the driver gets unloaded from memory too. Works
great
and as it should.
(2) Now if I select Action / Scan for hardware changed from within
Device
Manager the SST-4P gets reinstalled. Works great and as it should.

Now the BUG scenario.
(1) I do the Uninstall as in (1) above. Works great.
(2) Now the BUG. Instead of Scan for new hardware I do the following: I
go
to the Control Panel and then select Classic View. Now I select Add
Hardware. Please. Please do not say I should not do this because I can
and
before I fixed the driver I could get a BSOD and other BSODS for other
devices could be waiting to happen. Why because users will do this. Why

because previous versions of Windows worked doing this.
(3) Indeed the screen says this is for adding Hardware that does not
support
Plug-n-Play. Well lets click Next anyway because customers will.
(4) Now select “Install the hardware that I manually select from a list
(Advanced)” then Next.
(5) Since this is a Multiportserial inf file, select Multi-port serial
adapters then Next.
(6) Select Have Disk and point to where the driver install files are.
(7) Select the SST-4P PCI adapter as I did not exclude any PCI adapters
from
a manual installation. Then Next.
(8) The files get copied but you get an error occured. This is a BUG.
Here
Windows is doing wrong I think and trying to install this PCI device
under
the \root key note that IoGetDeviceProperty() can and does fail and an
driver that does check for this can BSOD. I did because I did not check
all
failure code paths.
(9) Now the interest part as the BUG goes on. Click Finish. Now Add
Hardware
will scan for plug-n-play PCI card and Install our device driver
software
correctly.
(10) Go back to Device Manager and you have two SST-4P with one banged
out.
Remove the banged out one.

The workaround for me is include
[ControlFlags]
ExcludeFromSelect = *

This gets rid of being able to install a PCI device under the \root
because
no entries can be select but it is a cumbersome solution at best.
Because
the driver gets installed when exit the Add Hardware program. You still
get
a EMPTY list to select from.

Again in Windows XP it works because Windows does the PCI scan before
the
non plug-n-play while Vista does the PCI scan after the non-plug-n-play.

As I promise here is the BUG scenario for the ECP printer port.
(1) Go to Device Manger and right-click Uninstall the ECP Printer Port
(LPT1).
(2) Go to Add Hardware. Click Next, “Install the hardware that I
manually
select from a list (Advanced)”, Next, Ports (COM & LPT), Next, Select
ECP
Printer Port, Next, Next.
(3) You get the Software for this device is now installed, but may not
work
correctly. BUG.
(4) Click Finish. Now go into Device Manager you see ECP Printer Port
(LPT3 ) banged out.

Please lets get VISTA 100% with respect to Device Installation / update
/
disable / remove. And 100% with repect to multiple PCI adapters with
multiple children. May I suggest using multiport serial as one
parameter in
the testing. Test with multiple PCI cards. Test with 50 or more Com
ports
or channels in a local system as well. VISTA must be 100% with Device
Manager nevertheless with and Enterprise Device Manager. And no reboots
to
driver updates! Microsoft has a window to get Longhorn right on this.

-William Michael Jones “Mike”


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Hi d,

But Add Hardware worked in Windows 2000, XP and 2003. In these previous
Windows OSes it would scan for Plug-n-Play devices first and reintall them
just for the case I am talking about where you uninstalled and then did the
Add Hardware Wizard. This is a regression in Vista I definitely think.

-William Michael Jones 'Mike"