I work for an OEM of a tablet PC, we want to do something simalar to IBM's
'Active Protection system', where they use an acceloromitor to detect when
the tablet is dropped and shutdown the hard drive. In looking through the
DDK documantation I'm at a loss as to where to start, I though about
writing a HD filter driver and when needed sending a shutdown packet to the
hard disk driver but then how do I keep the rest of the system from bringing
it back up too soon?

Thanks,

Re: temporarly power down disk drive ASAP by Pavel

Pavel
Tue May 31 13:05:32 CDT 2005

Do IBM drives or controllers have a proprietary command for this?
--PA

"ms news" <awinner@walkabout-comp.com> wrote in message news:#QkhIqfZFHA.3032@TK2MSFTNGP10.phx.gbl...
> I work for an OEM of a tablet PC, we want to do something simalar to IBM's
> 'Active Protection system', where they use an acceloromitor to detect when
> the tablet is dropped and shutdown the hard drive. In looking through the
> DDK documantation I'm at a loss as to where to start, I though about
> writing a HD filter driver and when needed sending a shutdown packet to the
> hard disk driver but then how do I keep the rest of the system from bringing
> it back up too soon?
>
> Thanks,
>
>



Re: temporarly power down disk drive ASAP by Bill

Bill
Tue May 31 13:29:43 CDT 2005

Uhmm, this seems like something that would best be done in hardware.
Windows is non-deterministic wrt latencies, thus there is no way to
guarantee that the HD would be shut down before the tablet hit the floor.

--
Bill McKenzie


"ms news" <awinner@walkabout-comp.com> wrote in message
news:%23QkhIqfZFHA.3032@TK2MSFTNGP10.phx.gbl...
>I work for an OEM of a tablet PC, we want to do something simalar to IBM's
> 'Active Protection system', where they use an acceloromitor to detect when
> the tablet is dropped and shutdown the hard drive. In looking through the
> DDK documantation I'm at a loss as to where to start, I though about
> writing a HD filter driver and when needed sending a shutdown packet to
> the
> hard disk driver but then how do I keep the rest of the system from
> bringing
> it back up too soon?
>
> Thanks,
>
>



RE: temporarly power down disk drive ASAP by (=?Utf-8?B?QmFydCBCYXJ0ZWwgW01TRlRd?=)

(=?Utf-8?B?QmFydCBCYXJ0ZWwgW01TRlRd?=)
Tue May 31 17:11:35 CDT 2005

------=_NextPart_0001_D3215749
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

You should be able to send a SCSIOP_START_STOP_UNIT to the disk device.

cdb.START_STOP.OperationCode = SCSIOP_START_STOP_UNIT;
cdb.START_STOP.Immediate = 1;
cdb.START_STOP.Start = 0;
cdb.START_STOP.LoadEject = 0;

But you should flush the file systems before spinning down the disk.

This posting is provided "AS IS" with no warranties, and confers no rights.
------=_NextPart_0001_D3215749
Content-Type: text/x-rtf
Content-Transfer-Encoding: 7bit

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\f0\fs20 You should be able to send a SCSIOP_START_STOP_UNIT to the disk device.
\par
\par cdb.START_STOP.OperationCode = SCSIOP_START_STOP_UNIT;
\par cdb.START_STOP.Immediate = 1;
\par cdb.START_STOP.Start = 0;
\par cdb.START_STOP.LoadEject = 0;
\par
\par But you should flush the file systems before spinning down the disk.
\par
\par This posting is provided "AS IS" with no warranties, and confers no rights.
\par
\par }
------=_NextPart_0001_D3215749--


Re: temporarly power down disk drive ASAP by Gary

Gary
Tue May 31 23:05:40 CDT 2005

Which is going to suffer from 10 ms quantums. The problem is 32 feet per
second per second, and how long it takes a laptop to fall from an average
table top height (3 feet?). Do you REALLY have enough time to stop the HDD
from spinning by sending it any SCSIOP_ command when you consider that you
just burned a good percentage of your time determining the dumb schmuck just
knocked me off the table.

My best guess is that this is NOT done in the OS at all, but via hardware.

--
Gary G. Little

""Bart Bartel [MSFT]"" <bbartel@online.microsoft.com> wrote in message
news:FlnZ32iZFHA.3928@TK2MSFTNGXA01.phx.gbl...
> You should be able to send a SCSIOP_START_STOP_UNIT to the disk device.
>
> cdb.START_STOP.OperationCode = SCSIOP_START_STOP_UNIT;
> cdb.START_STOP.Immediate = 1;
> cdb.START_STOP.Start = 0;
> cdb.START_STOP.LoadEject = 0;
>
> But you should flush the file systems before spinning down the disk.
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.



Re: temporarly power down disk drive ASAP by Calvin

Calvin
Wed Jun 01 01:02:14 CDT 2005

Gary, you've got me interested in playing math-:). Let's assume the laptop
is dropped vertically with initial velocity =0, we have:

/ T
|
Height = | v(t)*dt
| 0
/
where:
T is the moment the laptop hit the floor.
v(t)=g*t and g=9.8 in most part of the planet.

so we have:
/ T
|
Height = | 9.8*t*dt
| 0
/


according to Newton-Leibniz Formula, we have:

Height= F(T)-F(0) where F(t)= 0.5*9.8*t*t

or:
T=(2*Height/9.8)^0.5 <<<<< formula 1

We substitute the average height is 3 feet, or 0.9144 meters to formula 1,
we then get T=0.43199 sec. or 431.99 ms.

With that said, we concluded:
The poor laptop would have more than enough time to shutdown his HDD before
he hit the floor from a 3-feet high table top.

Not that bad, eh?


--
Calvin Guan Windows DDK MVP
Staff SW Engineer, NetXtreme MINIPORT
Enterprise Network Controller Engineering
Broadcom Corporation www.broadcom.com




"Gary G. Little" <glittle@mn.rr.com> wrote in message
news:ouane.5026$lI2.3283@tornado.rdc-kc.rr.com...
> Which is going to suffer from 10 ms quantums. The problem is 32 feet per
> second per second, and how long it takes a laptop to fall from an average
> table top height (3 feet?). Do you REALLY have enough time to stop the HDD
> from spinning by sending it any SCSIOP_ command when you consider that you
> just burned a good percentage of your time determining the dumb schmuck
> just knocked me off the table.
>
> My best guess is that this is NOT done in the OS at all, but via hardware.
>
> --
> Gary G. Little
>
> ""Bart Bartel [MSFT]"" <bbartel@online.microsoft.com> wrote in message
> news:FlnZ32iZFHA.3928@TK2MSFTNGXA01.phx.gbl...
>> You should be able to send a SCSIOP_START_STOP_UNIT to the disk device.
>>
>> cdb.START_STOP.OperationCode = SCSIOP_START_STOP_UNIT;
>> cdb.START_STOP.Immediate = 1;
>> cdb.START_STOP.Start = 0;
>> cdb.START_STOP.LoadEject = 0;
>>
>> But you should flush the file systems before spinning down the disk.
>>
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>
>



Re: temporarly power down disk drive ASAP by ms

ms
Wed Jun 01 07:27:44 CDT 2005

Pretty much our conclusion too, besides doing it in hardware is really
messy, trying to flush the buffer, keep the OS happy when you yank away the
drive,......

The only downside to the time is we don't have enough time to play a .wav
file, 'HELP me I'm falling':})

Given that this in in a filter driver as low in the stack as I can get it, I
have a few other questions:

Does the START_STOP flush the buffers, or do I need to do that first?

Should I lock the queue, during the free fall till post impact, or just self
queue any IRP that comes in, and then pass it along after I give the all
clear and turn back on the drive?

"Calvin Guan" <hguan@nospam.broadcom.com> wrote in message
news:Olwz39mZFHA.1456@TK2MSFTNGP15.phx.gbl...
> Gary, you've got me interested in playing math-:). Let's assume the laptop
> is dropped vertically with initial velocity =0, we have:
>
> / T
> |
> Height = | v(t)*dt
> | 0
> /
> where:
> T is the moment the laptop hit the floor.
> v(t)=g*t and g=9.8 in most part of the planet.
>
> so we have:
> / T
> |
> Height = | 9.8*t*dt
> | 0
> /
>
>
> according to Newton-Leibniz Formula, we have:
>
> Height= F(T)-F(0) where F(t)= 0.5*9.8*t*t
>
> or:
> T=(2*Height/9.8)^0.5 <<<<< formula 1
>
> We substitute the average height is 3 feet, or 0.9144 meters to formula 1,
> we then get T=0.43199 sec. or 431.99 ms.
>
> With that said, we concluded:
> The poor laptop would have more than enough time to shutdown his HDD
before
> he hit the floor from a 3-feet high table top.
>
> Not that bad, eh?
>
>
> --
> Calvin Guan Windows DDK MVP
> Staff SW Engineer, NetXtreme MINIPORT
> Enterprise Network Controller Engineering
> Broadcom Corporation www.broadcom.com
>
>
>
>
> "Gary G. Little" <glittle@mn.rr.com> wrote in message
> news:ouane.5026$lI2.3283@tornado.rdc-kc.rr.com...
> > Which is going to suffer from 10 ms quantums. The problem is 32 feet per
> > second per second, and how long it takes a laptop to fall from an
average
> > table top height (3 feet?). Do you REALLY have enough time to stop the
HDD
> > from spinning by sending it any SCSIOP_ command when you consider that
you
> > just burned a good percentage of your time determining the dumb schmuck
> > just knocked me off the table.
> >
> > My best guess is that this is NOT done in the OS at all, but via
hardware.
> >
> > --
> > Gary G. Little
> >
> > ""Bart Bartel [MSFT]"" <bbartel@online.microsoft.com> wrote in message
> > news:FlnZ32iZFHA.3928@TK2MSFTNGXA01.phx.gbl...
> >> You should be able to send a SCSIOP_START_STOP_UNIT to the disk device.
> >>
> >> cdb.START_STOP.OperationCode = SCSIOP_START_STOP_UNIT;
> >> cdb.START_STOP.Immediate = 1;
> >> cdb.START_STOP.Start = 0;
> >> cdb.START_STOP.LoadEject = 0;
> >>
> >> But you should flush the file systems before spinning down the disk.
> >>
> >> This posting is provided "AS IS" with no warranties, and confers no
> >> rights.
> >
> >
>
>



Re: temporarly power down disk drive ASAP by ms

ms
Wed Jun 01 08:41:31 CDT 2005

Thanks,

This should get me started, why doesn't MS put this kind of stuff in the
docs, I should know better by now....


"Bart Bartel [MSFT]" <bbartel@online.microsoft.com> wrote in message
news:FlnZ32iZFHA.3928@TK2MSFTNGXA01.phx.gbl...
> You should be able to send a SCSIOP_START_STOP_UNIT to the disk device.
>
> cdb.START_STOP.OperationCode = SCSIOP_START_STOP_UNIT;
> cdb.START_STOP.Immediate = 1;
> cdb.START_STOP.Start = 0;
> cdb.START_STOP.LoadEject = 0;
>
> But you should flush the file systems before spinning down the disk.
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.



Re: temporarly power down disk drive ASAP by Bill

Bill
Wed Jun 01 12:33:39 CDT 2005

This gets back to my original point. You probably have control in a tablet
as to what other hardware gets to play, but in general you could have other
devices which could potentially rob all of your HD shutdown time.
Particularly if you had an aggressive video adapter and you were playing
Doom 3 when you dropped the machine :) You may not have 432ms. You may not
have any time, who knows?

My point is, there is no forced limitation in Windows as to how long a
driver spends in its ISR routine. Thus your ISR could get starved out by
other interrupts. This is unlikely in general, but a hardware solution
would make this completely deterministic. I would be pretty surprised if
IBM did this sort of thing in software. Not shocked mind you, just
surprised.

--
Bill McKenzie


"Calvin Guan" <hguan@nospam.broadcom.com> wrote in message
news:Olwz39mZFHA.1456@TK2MSFTNGP15.phx.gbl...
> Gary, you've got me interested in playing math-:). Let's assume the laptop
> is dropped vertically with initial velocity =0, we have:
>
> / T
> |
> Height = | v(t)*dt
> | 0
> /
> where:
> T is the moment the laptop hit the floor.
> v(t)=g*t and g=9.8 in most part of the planet.
>
> so we have:
> / T
> |
> Height = | 9.8*t*dt
> | 0
> /
>
>
> according to Newton-Leibniz Formula, we have:
>
> Height= F(T)-F(0) where F(t)= 0.5*9.8*t*t
>
> or:
> T=(2*Height/9.8)^0.5 <<<<< formula 1
>
> We substitute the average height is 3 feet, or 0.9144 meters to formula 1,
> we then get T=0.43199 sec. or 431.99 ms.
>
> With that said, we concluded:
> The poor laptop would have more than enough time to shutdown his HDD
> before he hit the floor from a 3-feet high table top.
>
> Not that bad, eh?
>
>
> --
> Calvin Guan Windows DDK MVP
> Staff SW Engineer, NetXtreme MINIPORT
> Enterprise Network Controller Engineering
> Broadcom Corporation www.broadcom.com
>
>
>
>
> "Gary G. Little" <glittle@mn.rr.com> wrote in message
> news:ouane.5026$lI2.3283@tornado.rdc-kc.rr.com...
>> Which is going to suffer from 10 ms quantums. The problem is 32 feet per
>> second per second, and how long it takes a laptop to fall from an average
>> table top height (3 feet?). Do you REALLY have enough time to stop the
>> HDD from spinning by sending it any SCSIOP_ command when you consider
>> that you just burned a good percentage of your time determining the dumb
>> schmuck just knocked me off the table.
>>
>> My best guess is that this is NOT done in the OS at all, but via
>> hardware.
>>
>> --
>> Gary G. Little
>>
>> ""Bart Bartel [MSFT]"" <bbartel@online.microsoft.com> wrote in message
>> news:FlnZ32iZFHA.3928@TK2MSFTNGXA01.phx.gbl...
>>> You should be able to send a SCSIOP_START_STOP_UNIT to the disk device.
>>>
>>> cdb.START_STOP.OperationCode = SCSIOP_START_STOP_UNIT;
>>> cdb.START_STOP.Immediate = 1;
>>> cdb.START_STOP.Start = 0;
>>> cdb.START_STOP.LoadEject = 0;
>>>
>>> But you should flush the file systems before spinning down the disk.
>>>
>>> This posting is provided "AS IS" with no warranties, and confers no
>>> rights.
>>
>>
>
>



Re: temporarly power down disk drive ASAP by Bill

Bill
Wed Jun 01 12:37:20 CDT 2005

>Pretty much our conclusion too, besides doing it in hardware is really
>messy, trying to flush the buffer, keep the OS happy when you yank away the
>drive,......

Don't most harddrives use some sort of flash for caching/buffering nowadays
anyway? Seems a flash could buffer in the interim or some such. The OS
wouldn't even have to know the media was spun down. Or would that require
too much flash? Just curious.

--
Bill McKenzie


"ms news" <awinner@walkabout-comp.com> wrote in message
news:unJOQTqZFHA.2128@TK2MSFTNGP15.phx.gbl...
> Pretty much our conclusion too, besides doing it in hardware is really
> messy, trying to flush the buffer, keep the OS happy when you yank away
> the
> drive,......
>
> The only downside to the time is we don't have enough time to play a .wav
> file, 'HELP me I'm falling':})
>
> Given that this in in a filter driver as low in the stack as I can get it,
> I
> have a few other questions:
>
> Does the START_STOP flush the buffers, or do I need to do that first?
>
> Should I lock the queue, during the free fall till post impact, or just
> self
> queue any IRP that comes in, and then pass it along after I give the all
> clear and turn back on the drive?
>
> "Calvin Guan" <hguan@nospam.broadcom.com> wrote in message
> news:Olwz39mZFHA.1456@TK2MSFTNGP15.phx.gbl...
>> Gary, you've got me interested in playing math-:). Let's assume the
>> laptop
>> is dropped vertically with initial velocity =0, we have:
>>
>> / T
>> |
>> Height = | v(t)*dt
>> | 0
>> /
>> where:
>> T is the moment the laptop hit the floor.
>> v(t)=g*t and g=9.8 in most part of the planet.
>>
>> so we have:
>> / T
>> |
>> Height = | 9.8*t*dt
>> | 0
>> /
>>
>>
>> according to Newton-Leibniz Formula, we have:
>>
>> Height= F(T)-F(0) where F(t)= 0.5*9.8*t*t
>>
>> or:
>> T=(2*Height/9.8)^0.5 <<<<< formula 1
>>
>> We substitute the average height is 3 feet, or 0.9144 meters to formula
>> 1,
>> we then get T=0.43199 sec. or 431.99 ms.
>>
>> With that said, we concluded:
>> The poor laptop would have more than enough time to shutdown his HDD
> before
>> he hit the floor from a 3-feet high table top.
>>
>> Not that bad, eh?
>>
>>
>> --
>> Calvin Guan Windows DDK MVP
>> Staff SW Engineer, NetXtreme MINIPORT
>> Enterprise Network Controller Engineering
>> Broadcom Corporation www.broadcom.com
>>
>>
>>
>>
>> "Gary G. Little" <glittle@mn.rr.com> wrote in message
>> news:ouane.5026$lI2.3283@tornado.rdc-kc.rr.com...
>> > Which is going to suffer from 10 ms quantums. The problem is 32 feet
>> > per
>> > second per second, and how long it takes a laptop to fall from an
> average
>> > table top height (3 feet?). Do you REALLY have enough time to stop the
> HDD
>> > from spinning by sending it any SCSIOP_ command when you consider that
> you
>> > just burned a good percentage of your time determining the dumb schmuck
>> > just knocked me off the table.
>> >
>> > My best guess is that this is NOT done in the OS at all, but via
> hardware.
>> >
>> > --
>> > Gary G. Little
>> >
>> > ""Bart Bartel [MSFT]"" <bbartel@online.microsoft.com> wrote in message
>> > news:FlnZ32iZFHA.3928@TK2MSFTNGXA01.phx.gbl...
>> >> You should be able to send a SCSIOP_START_STOP_UNIT to the disk
>> >> device.
>> >>
>> >> cdb.START_STOP.OperationCode = SCSIOP_START_STOP_UNIT;
>> >> cdb.START_STOP.Immediate = 1;
>> >> cdb.START_STOP.Start = 0;
>> >> cdb.START_STOP.LoadEject = 0;
>> >>
>> >> But you should flush the file systems before spinning down the disk.
>> >>
>> >> This posting is provided "AS IS" with no warranties, and confers no
>> >> rights.
>> >
>> >
>>
>>
>
>



Re: temporarly power down disk drive ASAP by David

David
Wed Jun 01 13:56:07 CDT 2005

Flash is not fast enough and can't handle the number of erase/write cycles.
Even a million erase/write cycles would be far from sufficient for a hard
drive. Some flash is probably present to handle bad sectors and other
parameters that change very infrequently. I would expect most hard drive
caches to still be static ram, though some could be dynamic, but that
requires more circuitry and logic on the PCB.

"Bill McKenzie" <bill.mckenzie@nospam.conexant.com> wrote in message
news:uHRURCtZFHA.2412@TK2MSFTNGP10.phx.gbl...
> >Pretty much our conclusion too, besides doing it in hardware is really
>>messy, trying to flush the buffer, keep the OS happy when you yank away
>>the
>>drive,......
>
> Don't most harddrives use some sort of flash for caching/buffering
> nowadays anyway? Seems a flash could buffer in the interim or some such.
> The OS wouldn't even have to know the media was spun down. Or would that
> require too much flash? Just curious.
>
> --
> Bill McKenzie
>
>
> "ms news" <awinner@walkabout-comp.com> wrote in message
> news:unJOQTqZFHA.2128@TK2MSFTNGP15.phx.gbl...
>> Pretty much our conclusion too, besides doing it in hardware is really
>> messy, trying to flush the buffer, keep the OS happy when you yank away
>> the
>> drive,......
>>
>> The only downside to the time is we don't have enough time to play a .wav
>> file, 'HELP me I'm falling':})
>>
>> Given that this in in a filter driver as low in the stack as I can get
>> it, I
>> have a few other questions:
>>
>> Does the START_STOP flush the buffers, or do I need to do that first?
>>
>> Should I lock the queue, during the free fall till post impact, or just
>> self
>> queue any IRP that comes in, and then pass it along after I give the all
>> clear and turn back on the drive?
>>
>> "Calvin Guan" <hguan@nospam.broadcom.com> wrote in message
>> news:Olwz39mZFHA.1456@TK2MSFTNGP15.phx.gbl...
>>> Gary, you've got me interested in playing math-:). Let's assume the
>>> laptop
>>> is dropped vertically with initial velocity =0, we have:
>>>
>>> / T
>>> |
>>> Height = | v(t)*dt
>>> | 0
>>> /
>>> where:
>>> T is the moment the laptop hit the floor.
>>> v(t)=g*t and g=9.8 in most part of the planet.
>>>
>>> so we have:
>>> / T
>>> |
>>> Height = | 9.8*t*dt
>>> | 0
>>> /
>>>
>>>
>>> according to Newton-Leibniz Formula, we have:
>>>
>>> Height= F(T)-F(0) where F(t)= 0.5*9.8*t*t
>>>
>>> or:
>>> T=(2*Height/9.8)^0.5 <<<<< formula 1
>>>
>>> We substitute the average height is 3 feet, or 0.9144 meters to formula
>>> 1,
>>> we then get T=0.43199 sec. or 431.99 ms.
>>>
>>> With that said, we concluded:
>>> The poor laptop would have more than enough time to shutdown his HDD
>> before
>>> he hit the floor from a 3-feet high table top.
>>>
>>> Not that bad, eh?
>>>
>>>
>>> --
>>> Calvin Guan Windows DDK MVP
>>> Staff SW Engineer, NetXtreme MINIPORT
>>> Enterprise Network Controller Engineering
>>> Broadcom Corporation www.broadcom.com
>>>
>>>
>>>
>>>
>>> "Gary G. Little" <glittle@mn.rr.com> wrote in message
>>> news:ouane.5026$lI2.3283@tornado.rdc-kc.rr.com...
>>> > Which is going to suffer from 10 ms quantums. The problem is 32 feet
>>> > per
>>> > second per second, and how long it takes a laptop to fall from an
>> average
>>> > table top height (3 feet?). Do you REALLY have enough time to stop the
>> HDD
>>> > from spinning by sending it any SCSIOP_ command when you consider that
>> you
>>> > just burned a good percentage of your time determining the dumb
>>> > schmuck
>>> > just knocked me off the table.
>>> >
>>> > My best guess is that this is NOT done in the OS at all, but via
>> hardware.
>>> >
>>> > --
>>> > Gary G. Little
>>> >
>>> > ""Bart Bartel [MSFT]"" <bbartel@online.microsoft.com> wrote in message
>>> > news:FlnZ32iZFHA.3928@TK2MSFTNGXA01.phx.gbl...
>>> >> You should be able to send a SCSIOP_START_STOP_UNIT to the disk
>>> >> device.
>>> >>
>>> >> cdb.START_STOP.OperationCode = SCSIOP_START_STOP_UNIT;
>>> >> cdb.START_STOP.Immediate = 1;
>>> >> cdb.START_STOP.Start = 0;
>>> >> cdb.START_STOP.LoadEject = 0;
>>> >>
>>> >> But you should flush the file systems before spinning down the disk.
>>> >>
>>> >> This posting is provided "AS IS" with no warranties, and confers no
>>> >> rights.
>>> >
>>> >
>>>
>>>
>>
>>
>
>



Re: temporarly power down disk drive ASAP by David

David
Wed Jun 01 17:58:53 CDT 2005

How about a name other than 'awinner' and 'ms news'? Why would Microsoft
want to give someone an easy lawsuit victory? The SCSI specifications are
copyrighted. All you have to do is buy them or find copies of the drafts.
My only question is how you can be working on mass storage without the
necessary specs. The ATAPI specs are also for sale. Likewise for almost
all of the specs for standard hardware.

"ms news" <awinner@walkabout-comp.com> wrote in message
news:OFIPb8qZFHA.1424@TK2MSFTNGP15.phx.gbl...
> Thanks,
>
> This should get me started, why doesn't MS put this kind of stuff in the
> docs, I should know better by now....
>
>
> "Bart Bartel [MSFT]" <bbartel@online.microsoft.com> wrote in message
> news:FlnZ32iZFHA.3928@TK2MSFTNGXA01.phx.gbl...
>> You should be able to send a SCSIOP_START_STOP_UNIT to the disk device.
>>
>> cdb.START_STOP.OperationCode = SCSIOP_START_STOP_UNIT;
>> cdb.START_STOP.Immediate = 1;
>> cdb.START_STOP.Start = 0;
>> cdb.START_STOP.LoadEject = 0;
>>
>> But you should flush the file systems before spinning down the disk.
>>
>> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>



Re: temporarly power down disk drive ASAP by Gary

Gary
Wed Jun 01 18:53:42 CDT 2005

And asking how IBM does it is a non-sequetor. Those of us that know can't
say without viollating an NDA with IBM. I highly doubt that IBM has this
technique in public domain.

--
Gary G. Little

"David J. Craig" <SeniorDriversWriter@shogunyoshimuni.com.net> wrote in
message news:%23h$6$1vZFHA.3132@TK2MSFTNGP09.phx.gbl...
> How about a name other than 'awinner' and 'ms news'? Why would Microsoft
> want to give someone an easy lawsuit victory? The SCSI specifications are
> copyrighted. All you have to do is buy them or find copies of the drafts.
> My only question is how you can be working on mass storage without the
> necessary specs. The ATAPI specs are also for sale. Likewise for almost
> all of the specs for standard hardware.
>
> "ms news" <awinner@walkabout-comp.com> wrote in message
> news:OFIPb8qZFHA.1424@TK2MSFTNGP15.phx.gbl...
>> Thanks,
>>
>> This should get me started, why doesn't MS put this kind of stuff in the
>> docs, I should know better by now....
>>
>>
>> "Bart Bartel [MSFT]" <bbartel@online.microsoft.com> wrote in message
>> news:FlnZ32iZFHA.3928@TK2MSFTNGXA01.phx.gbl...
>>> You should be able to send a SCSIOP_START_STOP_UNIT to the disk device.
>>>
>>> cdb.START_STOP.OperationCode = SCSIOP_START_STOP_UNIT;
>>> cdb.START_STOP.Immediate = 1;
>>> cdb.START_STOP.Start = 0;
>>> cdb.START_STOP.LoadEject = 0;
>>>
>>> But you should flush the file systems before spinning down the disk.
>>>
>>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>>
>
>



Re: temporarly power down disk drive ASAP by Gary

Gary
Wed Jun 01 18:57:47 CDT 2005

Having worked with NT through XP now for about 10 years ... I still
wouldn't. I would say that MOST of the time you MIGHT get the disc spun down
in time. But all it takes is one time with any kind of latency and or
synchronization delay and you are looking at a Toasted laptop. All it takes
is once. Besides ... how much time does it take for the laptop to KNOW it is
falling with sufficient velocity, issue an interrupt, schedule a DPC,
trigger a worker thread to get into PASSIVE_LEVEL, and finally build the IRP
to send to the HBA, assuming you can talk to the miniport without going
through the storage stack. Are you assuming the command is sent at the TOP
of the arc? I really doubt that. How long will it take the accelerometer to
determine an "Oh ma god I'm FALLLING" event?

I'll keep my money on hardware.

--
Gary G. Little

"Calvin Guan" <hguan@nospam.broadcom.com> wrote in message
news:Olwz39mZFHA.1456@TK2MSFTNGP15.phx.gbl...
> Gary, you've got me interested in playing math-:). Let's assume the laptop
> is dropped vertically with initial velocity =0, we have:
>
> / T
> |
> Height = | v(t)*dt
> | 0
> /
> where:
> T is the moment the laptop hit the floor.
> v(t)=g*t and g=9.8 in most part of the planet.
>
> so we have:
> / T
> |
> Height = | 9.8*t*dt
> | 0
> /
>
>
> according to Newton-Leibniz Formula, we have:
>
> Height= F(T)-F(0) where F(t)= 0.5*9.8*t*t
>
> or:
> T=(2*Height/9.8)^0.5 <<<<< formula 1
>
> We substitute the average height is 3 feet, or 0.9144 meters to formula 1,
> we then get T=0.43199 sec. or 431.99 ms.
>
> With that said, we concluded:
> The poor laptop would have more than enough time to shutdown his HDD
> before he hit the floor from a 3-feet high table top.
>
> Not that bad, eh?
>
>
> --
> Calvin Guan Windows DDK MVP
> Staff SW Engineer, NetXtreme MINIPORT
> Enterprise Network Controller Engineering
> Broadcom Corporation www.broadcom.com
>
>
>
>
> "Gary G. Little" <glittle@mn.rr.com> wrote in message
> news:ouane.5026$lI2.3283@tornado.rdc-kc.rr.com...
>> Which is going to suffer from 10 ms quantums. The problem is 32 feet per
>> second per second, and how long it takes a laptop to fall from an average
>> table top height (3 feet?). Do you REALLY have enough time to stop the
>> HDD from spinning by sending it any SCSIOP_ command when you consider
>> that you just burned a good percentage of your time determining the dumb
>> schmuck just knocked me off the table.
>>
>> My best guess is that this is NOT done in the OS at all, but via
>> hardware.
>>
>> --
>> Gary G. Little
>>
>> ""Bart Bartel [MSFT]"" <bbartel@online.microsoft.com> wrote in message
>> news:FlnZ32iZFHA.3928@TK2MSFTNGXA01.phx.gbl...
>>> You should be able to send a SCSIOP_START_STOP_UNIT to the disk device.
>>>
>>> cdb.START_STOP.OperationCode = SCSIOP_START_STOP_UNIT;
>>> cdb.START_STOP.Immediate = 1;
>>> cdb.START_STOP.Start = 0;
>>> cdb.START_STOP.LoadEject = 0;
>>>
>>> But you should flush the file systems before spinning down the disk.
>>>
>>> This posting is provided "AS IS" with no warranties, and confers no
>>> rights.
>>
>>
>
>



Re: temporarly power down disk drive ASAP by David

David
Wed Jun 01 19:33:04 CDT 2005

I suspect it is in the 'public domain' as far as knowledge goes, but not
free. IBM is a patent machine and they know from their mainframe
experiences that as soon as you implement an idea in hardware (and now
software too), someone will reverse engineer it and use it for free unless
they have a patent on it. If someone really wants to know, I would search
the patent database and/or watch patents awarded to IBM during the next two
years. They have to get the patent application in before it is 'published'
or they loose the right to apply, OSIB (or so I believe, maybe wrongly).

"Gary G. Little" <glittle@mn.rr.com> wrote in message
news:aUrne.18072$k43.11520@tornado.rdc-kc.rr.com...
> And asking how IBM does it is a non-sequetor. Those of us that know can't
> say without viollating an NDA with IBM. I highly doubt that IBM has this
> technique in public domain.
>
> --
> Gary G. Little
>
> "David J. Craig" <SeniorDriversWriter@shogunyoshimuni.com.net> wrote in
> message news:%23h$6$1vZFHA.3132@TK2MSFTNGP09.phx.gbl...
>> How about a name other than 'awinner' and 'ms news'? Why would Microsoft
>> want to give someone an easy lawsuit victory? The SCSI specifications
>> are copyrighted. All you have to do is buy them or find copies of the
>> drafts. My only question is how you can be working on mass storage
>> without the necessary specs. The ATAPI specs are also for sale.
>> Likewise for almost all of the specs for standard hardware.
>>
>> "ms news" <awinner@walkabout-comp.com> wrote in message
>> news:OFIPb8qZFHA.1424@TK2MSFTNGP15.phx.gbl...
>>> Thanks,
>>>
>>> This should get me started, why doesn't MS put this kind of stuff in the
>>> docs, I should know better by now....
>>>
>>>
>>> "Bart Bartel [MSFT]" <bbartel@online.microsoft.com> wrote in message
>>> news:FlnZ32iZFHA.3928@TK2MSFTNGXA01.phx.gbl...
>>>> You should be able to send a SCSIOP_START_STOP_UNIT to the disk device.
>>>>
>>>> cdb.START_STOP.OperationCode = SCSIOP_START_STOP_UNIT;
>>>> cdb.START_STOP.Immediate = 1;
>>>> cdb.START_STOP.Start = 0;
>>>> cdb.START_STOP.LoadEject = 0;
>>>>
>>>> But you should flush the file systems before spinning down the disk.
>>>>
>>>> This posting is provided "AS IS" with no warranties, and confers no
>>> rights.
>>>
>>>
>>
>>
>
>



Re: temporarly power down disk drive ASAP by Alexander

Alexander
Thu Jun 02 00:18:36 CDT 2005

Such drives (with flash buffer) were demoed by Samsung just a few weeks ago.
Also flash-only drives were announced.

"Bill McKenzie" <bill.mckenzie@nospam.conexant.com> wrote in message
news:uHRURCtZFHA.2412@TK2MSFTNGP10.phx.gbl...
> >Pretty much our conclusion too, besides doing it in hardware is really
>>messy, trying to flush the buffer, keep the OS happy when you yank away
>>the
>>drive,......
>
> Don't most harddrives use some sort of flash for caching/buffering
> nowadays anyway? Seems a flash could buffer in the interim or some such.
> The OS wouldn't even have to know the media was spun down. Or would that
> require too much flash? Just curious.
>
> --
> Bill McKenzie
>
>



Re: temporarly power down disk drive ASAP by Maxim

Maxim
Thu Jun 02 01:40:33 CDT 2005

Add a disk filter driver (lower), which will be "kinda power policy owner"
and will request the device power IRP after getting a notification about the
acceleration.
The notification is sent by the accelerometer driver. Design your way of
sending such a notification - Ex callback object or such.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com

"ms news" <awinner@walkabout-comp.com> wrote in message
news:%23QkhIqfZFHA.3032@TK2MSFTNGP10.phx.gbl...
> I work for an OEM of a tablet PC, we want to do something simalar to IBM's
> 'Active Protection system', where they use an acceloromitor to detect when
> the tablet is dropped and shutdown the hard drive. In looking through the
> DDK documantation I'm at a loss as to where to start, I though about
> writing a HD filter driver and when needed sending a shutdown packet to the
> hard disk driver but then how do I keep the rest of the system from bringing
> it back up too soon?
>
> Thanks,
>
>



Re: temporarly power down disk drive ASAP by Pavel

Pavel
Thu Jun 02 13:03:59 CDT 2005

Have you noticed that IBM uses special kind of drives with this system.
The most important here is that the head parks immediately, not
waiting for the disk to spin down. The whole process must complete in ~ 300 ms.
What I am afraid of is that the OEM wants to sell a purely software solution,
not really feasible with "economy class" noname disks.
--PA

"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message news:eLZij3zZFHA.3032@TK2MSFTNGP10.phx.gbl...
> Add a disk filter driver (lower), which will be "kinda power policy owner"
> and will request the device power IRP after getting a notification about the
> acceleration.
> The notification is sent by the accelerometer driver. Design your way of
> sending such a notification - Ex callback object or such.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com
>
> "ms news" <awinner@walkabout-comp.com> wrote in message
> news:%23QkhIqfZFHA.3032@TK2MSFTNGP10.phx.gbl...
> > I work for an OEM of a tablet PC, we want to do something simalar to IBM's
> > 'Active Protection system', where they use an acceloromitor to detect when
> > the tablet is dropped and shutdown the hard drive. In looking through the
> > DDK documantation I'm at a loss as to where to start, I though about
> > writing a HD filter driver and when needed sending a shutdown packet to the
> > hard disk driver but then how do I keep the rest of the system from bringing
> > it back up too soon?
> >
> > Thanks,
> >
> >
>
>