[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tkrat.cd9196df20bc6982@s5r6.in-berlin.de>
Date: Sat, 10 May 2008 00:02:19 +0200 (CEST)
From: Stefan Richter <stefanr@...6.in-berlin.de>
To: Tino Keitel <tino.keitel@....de>
cc: linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org
Subject: Re: Clean patch to fix not working spindown over Firewire
> On 9 May, Tino Keitel wrote:
>> On Wed, Apr 30, 2008 at 15:36:36 +0200, Stefan Richter wrote:
>>> If it works for all RBC devices (it should according to the spec...) &&
>>> your ICY Box exposes itself as RBC device (it should do so), then we
>>> don't need any changes to struct scsi_device and to sbp2/ firewire-sbp2.
>>
>> Do you mean something like in the attached (untested) patch?
>>
>> Regards,
>> Tino
>>
>> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
>> index 01cefbb..6b927f6 100644
>> --- a/drivers/scsi/sd.c
>> +++ b/drivers/scsi/sd.c
>> @@ -1787,8 +1787,13 @@ static int sd_start_stop_device(struct scsi_disk *sdkp, int start)
>> struct scsi_device *sdp = sdkp->device;
>> int res;
>>
>> - if (start)
>> + if (start) {
>> cmd[4] |= 1; /* START */
>> + /* active power condition */
>> + cmd[4] |= (sdp->type == TYPE_RBC) ? (1 << 4) : 0;
>> + } else
>> + /* standby power condition */
>> + cmd[4] |= (sdp->type == TYPE_RBC) ? (3 << 4) : 0 ;
>>
PS:
The power conditions should be supported by many more devices besides
RBC devices. Only SAT (and hence libata) and Linux' "File-backed USB
Storage Gadget" (drivers/usb/gadget/file_storage.c) have objections
against power condition.
But it's less intrusive if we enable it only for RBC for now because we
now have a good idea about how well it is supported by them.
--
Stefan Richter
-=====-==--- -=-= -=--=
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists