[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <481875E4.6040606@s5r6.in-berlin.de>
Date: Wed, 30 Apr 2008 15:36:36 +0200
From: Stefan Richter <stefanr@...6.in-berlin.de>
To: linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org
Subject: Re: Hack to fix not working spindown over Firewire
I wrote:
> Tino Keitel wrote:
>> @@ -1788,8 +1788,16 @@ 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 */
>> + if(!strncmp(sdp->vendor, "WDC WD32", 8)) {
>> + cmd[4] |= (1 << 4); /* power condition */
>> + }
>> + } else {
>> + if(!strncmp(sdp->vendor, "WDC WD32", 8)) {
>> + cmd[4] |= (2 << 4); /* power condition */
>> + }
>> + }
>>
>> if (!scsi_device_online(sdp))
>> return -ENODEV;
>
[...]
> The traditional way to handle things like this is:
>
> - Implement this as a workaround in sd.
>
> - Make this workaround conditional on a quirks flag in
> struct scsi_device.
>
> - Switch this flag on in a place where it can be reliably
> detected that this device needs it. There is an interface
> to do this in userspace. But in this particular case, the
> best place is the sbp2 driver (ond firewire-sbp2 driver),
> because it can detect PL-3507 firmwares by means of firmware
> identifiers.
[...]
> On the other hand, perhaps we can enable the workaround unconditional
> for all firewire disks (switch in the flag in sbp2 and firewire-sbp2
> without looking at the device) or for all RBC disks (switch on the flag
> in sd.c if sdev->type == TYPE_RBC).
PS:
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.
--
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