diff options
author | Bjørn Mork <bjorn@mork.no> | 2014-05-19 03:21:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-21 01:56:06 -0400 |
commit | 7d10d2610cc02d432168ca0c5d964cd9e85c1b06 (patch) | |
tree | 98f8c2cf6654dd4d1d5d5052fb2da213e243a914 /include/linux/usb | |
parent | b6052af61a9e0dee236bcf4c69843126c0d28e4f (diff) |
net: cdc_ncm: fix 64bit division build error
The upper timer_interval limit is arbitrary and much higher
than anything usable in the real world. Reducing it from 15s
to ~4s to make the timer_interval fit in an u32 does not make
much difference. The limit is still outside the practical
bounds.
This eliminates the need for a 64bit timer_interval, fixing a
build error related to 64bit division:
drivers/built-in.o: In function `cdc_ncm_get_coalesce':
ak8975.c:(.text+0x1ac994): undefined reference to `__aeabi_uldivmod'
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/usb')
-rw-r--r-- | include/linux/usb/cdc_ncm.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/usb/cdc_ncm.h b/include/linux/usb/cdc_ncm.h index 8c5e38819828..7c9b484735c5 100644 --- a/include/linux/usb/cdc_ncm.h +++ b/include/linux/usb/cdc_ncm.h | |||
@@ -78,7 +78,7 @@ | |||
78 | #define CDC_NCM_TIMER_PENDING_CNT 2 | 78 | #define CDC_NCM_TIMER_PENDING_CNT 2 |
79 | #define CDC_NCM_TIMER_INTERVAL_USEC 400UL | 79 | #define CDC_NCM_TIMER_INTERVAL_USEC 400UL |
80 | #define CDC_NCM_TIMER_INTERVAL_MIN 5UL | 80 | #define CDC_NCM_TIMER_INTERVAL_MIN 5UL |
81 | #define CDC_NCM_TIMER_INTERVAL_MAX (15UL * USEC_PER_SEC) | 81 | #define CDC_NCM_TIMER_INTERVAL_MAX (U32_MAX / NSEC_PER_USEC) |
82 | 82 | ||
83 | #define cdc_ncm_comm_intf_is_mbim(x) ((x)->desc.bInterfaceSubClass == USB_CDC_SUBCLASS_MBIM && \ | 83 | #define cdc_ncm_comm_intf_is_mbim(x) ((x)->desc.bInterfaceSubClass == USB_CDC_SUBCLASS_MBIM && \ |
84 | (x)->desc.bInterfaceProtocol == USB_CDC_PROTO_NONE) | 84 | (x)->desc.bInterfaceProtocol == USB_CDC_PROTO_NONE) |
@@ -104,7 +104,7 @@ struct cdc_ncm_ctx { | |||
104 | spinlock_t mtx; | 104 | spinlock_t mtx; |
105 | atomic_t stop; | 105 | atomic_t stop; |
106 | 106 | ||
107 | u64 timer_interval; | 107 | u32 timer_interval; |
108 | u32 max_ndp_size; | 108 | u32 max_ndp_size; |
109 | 109 | ||
110 | u32 tx_timer_pending; | 110 | u32 tx_timer_pending; |