Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Replacing USBSTOR.sys

Reply
Thread Tools Display Modes

Replacing USBSTOR.sys

 
 
PRANAV KANT GAUR
Guest
Posts: n/a

 
      04-12-2010
Is it possible to replace USBSTOR.sys?
How can we start developing driver to replace USBSTOR.sys?
What are the responsibilities of USBSTOR.sys that must be fulfilled to be
able to replace it?
 
Reply With Quote
 
 
 
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      04-12-2010
> Is it possible to replace USBSTOR.sys?

ImagePath registry value.

> What are the responsibilities of USBSTOR.sys that must be fulfilled to be
> able to replace it?


Conversion of SCSI CDBs to USBSTOR URBs
Enumeration of the child devnode for the storage LUN
Supporting all IOCTLs the storage port driver should

--
Maxim S. Shatskih
Windows DDK MVP

http://www.storagecraft.com

 
Reply With Quote
 
 
 
 
PRANAV KANT GAUR
Guest
Posts: n/a

 
      04-13-2010


"Maxim S. Shatskih" wrote:

> > Is it possible to replace USBSTOR.sys?

>
> ImagePath registry value.
>
> > What are the responsibilities of USBSTOR.sys that must be fulfilled to be
> > able to replace it?

>
> Conversion of SCSI CDBs to USBSTOR URBs
> Enumeration of the child devnode for the storage LUN
> Supporting all IOCTLs the storage port driver should
>
> --
> Maxim S. Shatskih
> Windows DDK MVP
>
> http://www.storagecraft.com
>
> .

But my device manager shows that i have IDE ATA/ATAPI controllers & no
SCSI controllers it means no SCSI interface,so should i perform the
transformation from USBSTOR URB'S to IDE command set queries.
 
Reply With Quote
 
PRANAV KANT GAUR
Guest
Posts: n/a

 
      04-13-2010


"matt_sykes" wrote:

> On 13 Apr, 08:07, PRANAV KANT GAUR
> <PRANAVKANTG...@discussions.microsoft.com> wrote:
> > "Maxim S. Shatskih" wrote:
> > > > Is it possible to replace USBSTOR.sys?

> >
> > > ImagePath registry value.

> >
> > > > What are the responsibilities of USBSTOR.sys that must be fulfilled to be
> > > > able to replace it?

> >
> > > Conversion of SCSI CDBs to USBSTOR URBs
> > > Enumeration of the child devnode for the storage LUN
> > > Supporting all IOCTLs the storage port driver should

> >
> > > --
> > > Maxim S. Shatskih
> > > Windows DDK MVP
> > > ma...@storagecraft.com
> > >http://www.storagecraft.com

> >
> > > .

> >
> > But my device manager shows that i have IDE ATA/ATAPI controllers & no
> > SCSI controllers it means no SCSI interface,so should i perform the
> > transformation from USBSTOR URB'S to IDE command set queries.- Hide quoted text -
> >
> > - Show quoted text -

>
> You asked. and one of the best guys on the forum answered. If I were
> you I would think carefullt about what Maxim wrote, and your questiob,
> and see if you can work out why your question is worng.
> .

Since ATA packet interface uses SCSI Command set,so even if i have IDE
ATA/ATAPI interface I need to perform USBSTOR's URB to SCSI command set
conversion.
Please correct me if i am still interpreting anything wrongly.
 
Reply With Quote
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      04-13-2010
> But my device manager shows that i have IDE ATA/ATAPI controllers & no
> SCSI controllers it means no SCSI interface,so should i perform the
> transformation from USBSTOR URB'S to IDE command set queries.


The upper edge of any storage port in Windows, USBSTOR and ATAPI included, is SCSI.

USBSTOR translates SCSI commands (used internally by Windows) to URBs.

--
Maxim S. Shatskih
Windows DDK MVP

http://www.storagecraft.com

 
Reply With Quote
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      04-13-2010
> Since ATA packet interface uses SCSI Command set,so even if i have IDE
> ATA/ATAPI interface I need to perform USBSTOR's URB to SCSI command set
> conversion.


What is your task? how is IDE related to your task?

Is it an external enclosure for IDE device, connected to the host by USB? In this case, the enclosure has a USB Storage -> IDE bridge chip, and the host knows nothing on IDE there, it thinks this is just an USB storage device.

--
Maxim S. Shatskih
Windows DDK MVP

http://www.storagecraft.com

 
Reply With Quote
 
Tim Roberts
Guest
Posts: n/a

 
      04-14-2010
PRANAV KANT GAUR <> wrote:
>
>Since ATA packet interface uses SCSI Command set,so even if i have IDE
>ATA/ATAPI interface I need to perform USBSTOR's URB to SCSI command set
>conversion.
>Please correct me if i am still interpreting anything wrongly.


The fact that you have IDE disks on your computer (or not) is completely
irrelevant. The USB Mass Storage Class specification is freely available.
You can download it (and you absolutely NEED to read it, if you plan to
continue on this pointless adventure). The commands that are sent to a USB
Mass Storage Class device are a subset of the SCSI command set. It's just
that simple.
--
Tim Roberts,
Providenza & Boekelheide, Inc.
 
Reply With Quote
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      04-14-2010
> continue on this pointless adventure). The commands that are sent to a USB
> Mass Storage Class device are a subset of the SCSI command set.


(not to Tim who knows all of this I think, but to OP and the whole forum)

Correct, and they are wrapped to special URBs moving via a special pipe.

For instance, if you have an ATA DVD drive in external USB enclosure - then the only agents who interpret the SCSI commands are a) the CD/DVD burning software, who is now usually a user-mode DLL or EXE and who forms these commands b) the drive itself.

The rest of the pipeline - CdRom.sys, storage port, USB stack and the USB-to-ATA bridge chip - do not interpret them, they only deliver them "down". These parts of the stack can only enforce the transfer size and buffer alignment requirement, but not the SCSI commands semantics.

USBSTOR is the one who does this CDB-to-URB wrapping, and also provides the generic storage port functionality (being a PnP bus driver, enumerating a LUN PDO for the storage device, assigning correct names/symlinks to it, implementing the mandatory IOCTLs).

About ATA in this picture. ATAPI (for CD/DVD drives) is just SCSI over IDE wires, so, nothing special. As about the usual ATA (hard disks) - then the USB-to-ATA bridge chip has the conversion logic for them, and thus supports only a very limited set of SCSI commands.

As about the ATA hard disk without USB - ATAPI stack is the place where conversion is done. It is also limited a lot, thus there is an ATA passthrough feature.

Too bad we have no standard-described SCSI command which should map directly to ATA vendor-specific commands. If there would be such a standard - then a) no pathetic ATA passthrough interface, powerful SCSI passthrough could be used instead and b) ability to execute vendor ATA commands on a disk in external USB/1394 enclosure.

--
Maxim S. Shatskih
Windows DDK MVP

http://www.storagecraft.com

 
Reply With Quote
 
PRANAV KANT GAUR
Guest
Posts: n/a

 
      04-18-2010


"Maxim S. Shatskih" wrote:

> > Since ATA packet interface uses SCSI Command set,so even if i have IDE
> > ATA/ATAPI interface I need to perform USBSTOR's URB to SCSI command set
> > conversion.

>
> What is your task? how is IDE related to your task?

I have a Sandisk Cruzer Micro flash drive device & i want to replace the
USBSTOR.sys which acts as function driver for it by the driver written by my
own.

> Is it an external enclosure for IDE device, connected to the host by USB? In this case, the enclosure has a USB Storage -> IDE bridge chip, and the host knows nothing on IDE there, it thinks this is just an USB storage device.
>
> --
> Maxim S. Shatskih
> Windows DDK MVP
>
> http://www.storagecraft.com
>
> .
>

 
Reply With Quote
 
Tim Roberts
Guest
Posts: n/a

 
      04-18-2010
PRANAV KANT GAUR <> wrote:
>
>I have a Sandisk Cruzer Micro flash drive device & i want to replace the
>USBSTOR.sys which acts as function driver for it by the driver written by my
>own.


Then you don't have anything to do with IDE here. You need to read the USB
Mass Storage Class spec and understand the commands in there, which are a
subset of the SCSI command set.
--
Tim Roberts,
Providenza & Boekelheide, Inc.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing elederly computer running Windows 98 David Windows Vista Performance 6 01-16-2008 11:08 PM
Replacing Hard Drive Jake1 Windows Vista Hardware 7 09-14-2007 11:51 AM
Vista OEM Activation, replacing faulty motherboard Johnny C Windows Vista Hardware 4 09-08-2007 09:28 AM
Replacing failing main drive Tom Filipi Windows Vista Performance 4 06-06-2007 04:10 PM
Replacing CPU Clayton Windows Vista Hardware 9 03-08-2007 03:09 PM