[U-Boot] [PATCH] net: gem: Enable CTRL+C in wait_for_bit

Michal Simek michal.simek at xilinx.com
Tue Dec 1 11:35:12 CET 2015


On 30.11.2015 21:36, Joe Hershberger wrote:
> Hi Michal,
> 
> On Thu, Nov 26, 2015 at 3:46 AM, Michal Simek <michal.simek at xilinx.com> wrote:
>> Enable to break waiting loop at any time.
>>
>> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
>> ---
>>
>>  drivers/net/zynq_gem.c | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
>> index 858093f0d7e2..ee4169107e5b 100644
>> --- a/drivers/net/zynq_gem.c
>> +++ b/drivers/net/zynq_gem.c
>> @@ -447,6 +447,11 @@ static int wait_for_bit(const char *func, u32 *reg, const u32 mask,
>>                 if (get_timer(start) > timeout)
>>                         break;
>>
>> +               if (ctrlc()) {
>> +                       puts("Abort\n");
>> +                       return -1;
> 
> Maybe this should return -EINTR?

No problem with this.

Thanks,
Michal


More information about the U-Boot mailing list