From: Robert Hancock <hancockr@shaw.ca>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH RFC] sd: spin down disks on removal or power-down
Date: Mon, 29 Jan 2007 17:55:41 -0600 [thread overview]
Message-ID: <45BE897D.7000400@shaw.ca> (raw)
In-Reply-To: <20070129154706.dfb3edab.akpm@osdl.org>
Andrew Morton wrote:
> triviata:
>
>> --- linux-2.6.20-rc6nv/drivers/scsi/sd.c 2007-01-28 17:00:00.000000000 -0600
>> +++ linux-2.6.20-rc6nvedit/drivers/scsi/sd.c 2007-01-28 18:08:53.000000000 -0600
>> @@ -821,6 +821,39 @@ static int sd_sync_cache(struct scsi_dev
>> return res;
>> }
>>
>> +static int sd_stop_unit(struct scsi_device *sdp, struct scsi_disk* sdkp)
>
> s/* / */
>
>> +{
>> + int res;
>> + struct scsi_sense_hdr sshdr;
>> + unsigned char cmd[10] = { 0 };
>
> I don't think this initialisation-to-all-zeroes is needed, is it?
Pretty sure it is, the rest of the command needs to be set to 0. Without
it the other 9 bytes will contain uninitialized junk.
For the other cleanup changes, though:
Signed-off-by: Robert Hancock <hancockr@shaw.ca>
--
Robert Hancock Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/
next prev parent reply other threads:[~2007-01-29 23:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-29 1:47 [PATCH RFC] sd: spin down disks on removal or power-down Robert Hancock
2007-01-29 23:47 ` Andrew Morton
2007-01-29 23:55 ` Robert Hancock [this message]
2007-01-30 0:16 ` James Bottomley
2007-01-30 0:33 ` Robert Hancock
2007-01-31 20:21 ` Stefan Richter
2007-01-31 23:45 ` Robert Hancock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45BE897D.7000400@shaw.ca \
--to=hancockr@shaw.ca \
--cc=akpm@osdl.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).