Re: [PATCH] Add hook for custom xfer function in PATA Platform driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[Added linux-ide back onto distribution list]

Sergei Shtylyov wrote:
> Hello.
> 
> Graeme Russ wrote:
> 
>> +    /*
>> +     * Assign custom data transfer function (if defined)
>> +     */
>> +    if (pp_info)
>> +        if (unlikely(pp_info->data_xfer))
>>   
> 
>   Could be folded into a signle *if* statement.

I thought so - I didn't exactly know what the linux coding standards are in
regards to this shortcut though.

> 
>   You should have also taught the symmetric ide-platfrom driver the same
> trick. However, IDE core's data transfer methods has a different prototype.

I did think about the other drivers (OF Platform etc) but I have no way of
testing them.

> I suggest to rather add a new flag, indicating 8-bit data I/O, and have
> the alternate sff_data_xfer() method defined inside the driver.
> 

Well actually it goes beyond simply implementing 8-bit data transfers - On
my particular board, the PATA devices (2x CF slots) are on a General
Purpose Bus with a few other peripherals. The timing requirements for the
bus when accessing the CF cards are very strict (and very slow compared to
other devices on the bus). By overriding the data transfer function I can
arbitrate access to the bus and switch the bus timings based on the
peripheral being accessed. This cannot be done be a generic data transfer
function.

Regards,

Graeme

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux