Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9992268a30 | ||
|
|
9fa8a58e2d |
157
ChangeLog
157
ChangeLog
@@ -1,160 +1,3 @@
|
||||
2011-10-21 Shaun Ruffell <sruffell@digium.com>
|
||||
|
||||
* dahdi-linux 2.5.0.2 released.
|
||||
|
||||
2011-10-21 19:48 +0000 [r10253-10254] Shaun Ruffell <sruffell@digium.com>
|
||||
|
||||
* include/dahdi/kernel.h, drivers/dahdi/wctc4xxp/base.c: dahdi:
|
||||
Move WARN_ON_ONCE from wctc4xxp driver to include/dahdi/kernel.h
|
||||
I only generally test on RHEL 4 when testing against kernels
|
||||
older than 2.6.18. Apparently OpenSUSE 10.1 runs with 2.6.16 and
|
||||
doesn't have WARN_ON_ONCE backported. I took the patch Richard
|
||||
Miller originally attached to the issue and moved it to
|
||||
include/dahdi/kernel.h so it would be available for all the board
|
||||
drivers in the future. Internal-Issue-ID: DAHLIN-260 Reported-by:
|
||||
Richard Miller Signed-off-by: Shaun Ruffell <sruffell@digium.com>
|
||||
Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10252
|
||||
|
||||
* drivers/dahdi/wcb4xxp/base.c: wcb4xxp: Do not show LASVEGAS2 as
|
||||
echocan name if vpmsupport is set to 0 This fixes an issue where
|
||||
"EC: LASVEGAS2" was displayed in /proc/dahdi/x for a B410P span
|
||||
even though vpmsupport was disabled with the module parameter.
|
||||
Internal-Issue-ID: DAHLIN-247 Signed-off-by: Shaun Ruffell
|
||||
<sruffell@digium.com> Origin:
|
||||
http://svnview.digium.com/svn/dahdi?view=rev&rev=10251
|
||||
|
||||
2011-10-12 16:32 +0000 [r10221] Shaun Ruffell <sruffell@digium.com>
|
||||
|
||||
* drivers/dahdi/wct4xxp/base.c: wct4xxp: Fix condition where
|
||||
hardware echo canceler erroneously mutes DTMF. Commit r9750
|
||||
"wct4xxp: Reduce the memory footprint of the hardware
|
||||
echocanceler.", as part of reducing the non-pageable memory
|
||||
required to support the VPMOCT064 and VPMOCT128, disabled caching
|
||||
of some hardware echocan registers. This resulted in more
|
||||
physical reads to the echo canceler. These new read transactions
|
||||
exposed an existing issue where sometimes reads could be turned
|
||||
into writes which put a channel into an unintended state
|
||||
preventing Asterisk from detecting any DTMF. This issue is
|
||||
resolved by ensuring that the write signal to the Octasic part is
|
||||
explicitly cleared between when the address is presented on the
|
||||
bus and when the read and chip select signals are asserted. The
|
||||
cost is an increase in the average time to enable / disable echo
|
||||
cancellation by about 5 us on one Intel Xeon X3220 test machine
|
||||
(~250ns increase per read from the Octasic part and 20 reads to
|
||||
enable / disable a channel). This commit resolves a behavioral
|
||||
regression first introduced in 2.5.0 and 2.4.1 which could take
|
||||
many calls before revealing itself. This change only affects
|
||||
cards with a VPMOCT128 or VPMOCT064 installed. Signed-off-by:
|
||||
Shaun Ruffell <sruffell@digium.com> Acked-by: Doug Bailey
|
||||
<dbailey@digium.com> Origin:
|
||||
http://svnview.digium.com/svn/dahdi?view=rev&rev=10220
|
||||
|
||||
2011-09-30 19:23 +0000 [r10219] Shaun Ruffell <sruffell@digium.com>
|
||||
|
||||
* drivers/dahdi/wctc4xxp/base.c: wctc4xxp: Allow G723 SID frames to
|
||||
pass to the hardware decoder. The driver has, until now, dropped
|
||||
G723 SID frames even though the firmware on the TC400/TCE400 can
|
||||
handle them. Now let them on through. Reported-and-Tested-by:
|
||||
Angel Carhuas <acarhuas@colinanet.com> Signed-off-by: Shaun
|
||||
Ruffell <sruffell@digium.com> Origin:
|
||||
http://svnview.digium.com/svn/dahdi?view=rev&rev=10218
|
||||
|
||||
2011-09-27 22:10 +0000 [r10211] Shaun Ruffell <sruffell@digium.com>
|
||||
|
||||
* drivers/dahdi/wctdm24xxp/base.c: wctdm24xxp: Set
|
||||
dahdi_span.devicetype string in one place. Currently the
|
||||
devicetype string was set both when the device was first
|
||||
allocated and updated when an echocanceler was detected. For
|
||||
simplicity, combine both these steps into a single function. This
|
||||
change also replaces an improper use of strncat with strlcat.
|
||||
Additionally, on the 2.5 branch, this change actually makes
|
||||
r10206 "wctdm24xxp, wcte12xp: Advertise VPMOCT032 presence in
|
||||
dahdi_span.devicetype", work the way it was originally intended.
|
||||
That change was only functioning properly previously on trunk.
|
||||
Signed-off-by: Shaun Ruffell <sruffell@digium.com> Origin:
|
||||
http://svnview.digium.com/svn/dahdi?view=rev&rev=10210
|
||||
|
||||
2011-09-25 08:59 +0000 [r10208] Tzafrir Cohen <tzafrir.cohen@xorcom.com>
|
||||
|
||||
* drivers/dahdi/xpp/card_fxs.c: xpp: fxs: bugfix for 2fxs+6fxo
|
||||
cards * Bug sympthoms: wrong FSK VMWI sent few seconds after
|
||||
offhook. That was caused because the driver kept polling the
|
||||
(physically unconnected) digital inputs. [note: a workaround for
|
||||
drivers without this patch is to zero the
|
||||
'xpd_fxs.poll_digital_inputs' parameter.] * Also, the
|
||||
digital_inputs/digital_output masks were calculate using a
|
||||
different condition. * Now we determine number of channels,
|
||||
digital inputs and digital outputs in a single place and use this
|
||||
info later to calculate the correct masks. * We poll only if
|
||||
there are digital_inputs * We added a sanity check in
|
||||
process_digital_inputs, so we get a notice if it's called on an
|
||||
xpd without digital inputs (e.g: hypothetic firmware bug).
|
||||
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Acked-by:
|
||||
Tzafrir Cohen <tzafrir.cohen@xorcom.com>
|
||||
|
||||
2011-09-23 20:23 +0000 [r10206-10207] Shaun Ruffell <sruffell@digium.com>
|
||||
|
||||
* drivers/dahdi/dahdi-base.c: dahdi: Check for master in
|
||||
DAHDI_STARTUP / resolves MeetMe regression. There were a couple
|
||||
of reports that MeetMe conferences were not working in 2.5.0.1
|
||||
and that downgrading to 2.4.1.2 resolved the issue. This could
|
||||
occur if there were no analog spans in a system, and all the
|
||||
digital spans were out of alarm before DAHDI_STARTUP ioctl was
|
||||
called by dahdi_cfg. If the spans were *not* out of alarm, they
|
||||
would be marked master when the span changes it's alarm state.
|
||||
This would result in a condition where no spans were marked as
|
||||
the "master" and so the core timer was handling conferencing. The
|
||||
core timer runs by default at 4ms and most board drivers run at
|
||||
1ms intervals, but a channel currently only buffers up 2ms of
|
||||
data when conferenced. Therefore, 2ms of audio from a board was
|
||||
continuously dropped from the conference every 4ms by default.
|
||||
This fixes a regression first introduced in 2.5.0 which was
|
||||
specifically added in revision r9611 "dahdi: Do not locate new
|
||||
master in interrupt context." Internal-reference-ID: DAHDI-894
|
||||
Signed-off-by: Shaun Ruffell <sruffell@digium.com> Tested-by:
|
||||
Dennis Martinez <dmartinez@digium.com> Origin:
|
||||
http://svnview.digium.com/svn/dahdi?view=rev&rev=10205
|
||||
|
||||
* drivers/dahdi/wcte12xp/base.c, drivers/dahdi/wctdm24xxp/base.c:
|
||||
wctdm24xxp, wcte12xp: Advertise VPMOCT032 presence in
|
||||
dahdi_span.devicetype. A "(VPMADT032)" string is appended to the
|
||||
devicetype (as shown by dahdi_scan) for the span if one is
|
||||
installed. Now append '(VPMOCT032)' if one is installed as well.
|
||||
Also, for the wcte12xp driver append the VPM name to the device
|
||||
type after initially probing as opposed to only after the span is
|
||||
configured. (Related to issue DAHDI-890) Signed-off-by: Shaun
|
||||
Ruffell <sruffell@digium.com> Origin:
|
||||
http://svnview.digium.com/svn/dahdi?view=rev&rev=10203
|
||||
|
||||
2011-09-13 18:38 +0000 [r10201] Shaun Ruffell <sruffell@digium.com>
|
||||
|
||||
* drivers/dahdi/dahdi-base.c: dahdi: Decrease the initial coretimer
|
||||
delay to 4ms from 1 second. DAHDI currently waits a second before
|
||||
checking if a board driver is calling dahdi_receive and switching
|
||||
to internal timing. Some versions of Asterisk (I was looking at
|
||||
1.4.42 when writing this) only wait 300ms for a timer to expire
|
||||
when first starting and verifying that DAHDI is properly
|
||||
configured. This can result in a "ERROR[27673] asterisk.c:
|
||||
Asterisk has detected a problem with your DAHDI configuration and
|
||||
will shutdown for your protection. You have options:" message if
|
||||
asterisk is started soon after loading DAHDI. This change sets
|
||||
the inital polling interval to the same as that used during
|
||||
normal coretimer operation, 4ms. The interval will still be
|
||||
slowed to 1 second if a board driver starts calling
|
||||
dahdi_receive(). DAHDI-892. Signed-off-by: Shaun Ruffell
|
||||
<sruffell@digium.com> Origin:
|
||||
http://svnview.digium.com/svn/dahdi?view=rev&rev=10200
|
||||
|
||||
2011-09-05 10:29 +0000 [r10180] Tzafrir Cohen <tzafrir.cohen@xorcom.com>
|
||||
|
||||
* drivers/dahdi/xpp/firmwares/PIC_TYPE_1.hex,
|
||||
drivers/dahdi/xpp/firmwares/PIC_TYPE_2.hex,
|
||||
drivers/dahdi/xpp/firmwares/FPGA_1161.hex: xpp: firmware to
|
||||
detect the new 2+6 module New firmwares to handle the new
|
||||
2FXS/6FXO module. FPGA_1161.hex, PIC_TYPE_1.hex, PIC_TYPE_2.hex
|
||||
of internal rev. 9732 Signed-off-by: Tzafrir Cohen
|
||||
<tzafrir.cohen@xorcom.com>
|
||||
|
||||
2011-09-06 Shaun Ruffell <sruffell@digium.com>
|
||||
|
||||
* dahdi-linux 2.5.0.1 released.
|
||||
|
||||
@@ -4797,10 +4797,6 @@ static int dahdi_ioctl_startup(struct file *file, unsigned long data)
|
||||
*/
|
||||
s->chans[x]->rxhooksig = DAHDI_RXSIG_INITIAL;
|
||||
}
|
||||
|
||||
/* Now that this span is running, it might be selected as the
|
||||
* master span */
|
||||
__dahdi_find_master_span();
|
||||
}
|
||||
put_span(s);
|
||||
return 0;
|
||||
@@ -9231,12 +9227,12 @@ static void coretimer_init(void)
|
||||
init_timer(&core_timer.timer);
|
||||
core_timer.timer.function = coretimer_func;
|
||||
core_timer.start_interval = current_kernel_time();
|
||||
core_timer.timer.expires = jiffies + HZ;
|
||||
atomic_set(&core_timer.count, 0);
|
||||
atomic_set(&core_timer.shutdown, 0);
|
||||
core_timer.interval = max(msecs_to_jiffies(DAHDI_MSECS_PER_CHUNK), 1UL);
|
||||
if (core_timer.interval < (HZ/250))
|
||||
core_timer.interval = (HZ/250);
|
||||
core_timer.timer.expires = jiffies + core_timer.interval;
|
||||
add_timer(&core_timer.timer);
|
||||
}
|
||||
|
||||
|
||||
@@ -2205,7 +2205,7 @@ static const char *b4xxp_echocan_name(const struct dahdi_chan *chan)
|
||||
{
|
||||
struct b4xxp_span *bspan = container_of(chan->span, struct b4xxp_span,
|
||||
span);
|
||||
if (vpmsupport && (B410P == bspan->parent->card_type))
|
||||
if (bspan->parent->card_type == B410P)
|
||||
return "LASVEGAS2";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -766,9 +766,11 @@ static inline unsigned int __t4_raw_oct_in(struct t4 *wc, const unsigned int add
|
||||
__t4_pci_out(wc, WC_LADDR, (WC_LWRITE | WC_LALE));
|
||||
if (!pedanticpci)
|
||||
__t4_pci_in(wc, WC_VERSION);
|
||||
#ifdef PEDANTIC_OCTASIC_CHECKING
|
||||
__t4_pci_out(wc, WC_LADDR, (WC_LALE));
|
||||
if (!pedanticpci)
|
||||
__t4_pci_in(wc, WC_VERSION);
|
||||
#endif
|
||||
if (!octopt) {
|
||||
__t4_gpio_setdir(wc, 0xff, 0x00);
|
||||
__t4_gpio_set(wc, 0xff, 0x00);
|
||||
|
||||
@@ -73,6 +73,20 @@
|
||||
dev_info(&(wc)->pdev->dev, _fmt, ## _args); \
|
||||
} \
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
|
||||
#ifndef WARN_ON_ONCE
|
||||
#define WARN_ON_ONCE(__condition) do { \
|
||||
static int __once = 1; \
|
||||
if (unlikely(__condition)) { \
|
||||
if (__once) { \
|
||||
__once = 0; \
|
||||
WARN_ON(0); \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14)
|
||||
/* also added in RHEL kernels with the OpenInfiniband backport: */
|
||||
#if LINUX_VERSION_CODE != KERNEL_VERSION(2, 6, 9) || !defined(DEFINE_SPINLOCK)
|
||||
@@ -2144,13 +2158,12 @@ wctc4xxp_write(struct file *file, const char __user *frame,
|
||||
}
|
||||
|
||||
if (DAHDI_FORMAT_G723_1 == dtc->srcfmt) {
|
||||
if ((G723_5K_BYTES != count) && (G723_6K_BYTES != count) &&
|
||||
(G723_SID_BYTES != count)) {
|
||||
if ((G723_5K_BYTES != count) && (G723_6K_BYTES != count)) {
|
||||
DTE_DEBUG(DTE_DEBUG_GENERAL,
|
||||
"Trying to transcode packet into G723 format " \
|
||||
"that is %Zu bytes instead of the expected " \
|
||||
"%d/%d/%d bytes.\n", count, G723_5K_BYTES,
|
||||
G723_6K_BYTES, G723_SID_BYTES);
|
||||
"%d/%d bytes.\n", count, G723_5K_BYTES,
|
||||
G723_6K_BYTES);
|
||||
return -EINVAL;
|
||||
}
|
||||
cpvt->timestamp += G723_SAMPLES;
|
||||
|
||||
@@ -4242,6 +4242,7 @@ wctdm_init_span(struct wctdm *wc, int spanno, int chanoffset, int chancount,
|
||||
(wc->desc->flags & FLAG_EXPRESS) ? " Express" : "",
|
||||
pdev->bus->number, PCI_SLOT(pdev->devfn) + 1);
|
||||
s->span.manufacturer = "Digium";
|
||||
strncpy(s->span.devicetype, wc->desc->name, sizeof(s->span.devicetype) - 1);
|
||||
|
||||
if (wc->companding == DAHDI_LAW_DEFAULT) {
|
||||
if (wc->digi_mods || digital_span)
|
||||
@@ -4347,6 +4348,13 @@ static void wctdm_fixup_analog_span(struct wctdm *wc, int spanno)
|
||||
s->chans[y++]->sigcap = 0;
|
||||
}
|
||||
}
|
||||
|
||||
for (x = 0; x < MAX_SPANS; x++) {
|
||||
if (!wc->spans[x])
|
||||
continue;
|
||||
if (wc->vpmadt032)
|
||||
strncat(wc->spans[x]->span.devicetype, " (VPMADT032)", sizeof(wc->spans[x]->span.devicetype) - 1);
|
||||
}
|
||||
}
|
||||
|
||||
static int wctdm_initialize_vpmadt032(struct wctdm *wc)
|
||||
@@ -5260,27 +5268,6 @@ static void wctdm_allocate_irq_commands(struct wctdm *wc, unsigned int count)
|
||||
spin_unlock_irqrestore(&wc->reglock, flags);
|
||||
}
|
||||
|
||||
static void set_span_devicetype_string(struct wctdm *wc)
|
||||
{
|
||||
unsigned int x;
|
||||
|
||||
for (x = 0; x < ARRAY_SIZE(wc->spans); x++) {
|
||||
struct dahdi_span *const s = &wc->spans[x]->span;
|
||||
if (!s)
|
||||
continue;
|
||||
|
||||
strlcpy(s->devicetype, wc->desc->name, sizeof(s->devicetype));
|
||||
|
||||
if (wc->vpmadt032) {
|
||||
strlcat(s->devicetype, " (VPMADT032)",
|
||||
sizeof(s->devicetype));
|
||||
} else if (wc->vpmoct) {
|
||||
strlcat(s->devicetype, " (VPMOCT032)",
|
||||
sizeof(s->devicetype));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef USE_ASYNC_INIT
|
||||
struct async_data {
|
||||
struct pci_dev *pdev;
|
||||
@@ -5536,8 +5523,6 @@ __wctdm_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
|
||||
wctdm_initialize_vpm(wc);
|
||||
|
||||
set_span_devicetype_string(wc);
|
||||
|
||||
#ifdef USE_ASYNC_INIT
|
||||
async_synchronize_cookie(cookie);
|
||||
#endif
|
||||
|
||||
@@ -1022,13 +1022,9 @@ static void set_span_devicetype(struct t1 *wc)
|
||||
sizeof(wc->span.devicetype) - 1);
|
||||
|
||||
#if defined(VPM_SUPPORT)
|
||||
if (wc->vpmadt032) {
|
||||
if (wc->vpmadt032)
|
||||
strncat(wc->span.devicetype, " (VPMADT032)",
|
||||
sizeof(wc->span.devicetype) - 1);
|
||||
} else if (wc->vpmoct) {
|
||||
strncat(wc->span.devicetype, " (VPMOCT032)",
|
||||
sizeof(wc->span.devicetype) - 1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1664,8 +1660,6 @@ static void check_and_load_vpm(struct t1 *wc)
|
||||
|
||||
vpmoct_init(vpmoct, t1_vpm_load_complete);
|
||||
}
|
||||
|
||||
set_span_devicetype(wc);
|
||||
}
|
||||
#else
|
||||
static inline void check_and_load_vpm(const struct t1 *wc)
|
||||
|
||||
@@ -386,8 +386,6 @@ static xpd_t *FXS_card_new(xbus_t *xbus, int unit, int subunit, const xproto_tab
|
||||
int regular_channels;
|
||||
struct FXS_priv_data *priv;
|
||||
int i;
|
||||
int d_inputs = 0;
|
||||
int d_outputs = 0;
|
||||
|
||||
if(!to_phone) {
|
||||
XBUS_NOTICE(xbus,
|
||||
@@ -400,30 +398,16 @@ static xpd_t *FXS_card_new(xbus_t *xbus, int unit, int subunit, const xproto_tab
|
||||
else
|
||||
regular_channels = min(8, subunit_ports);
|
||||
channels = regular_channels;
|
||||
/* Calculate digital inputs/outputs */
|
||||
if(unit == 0 && subtype != 4) {
|
||||
if(unit == 0 && subtype != 4)
|
||||
channels += 6; /* 2 DIGITAL OUTPUTS, 4 DIGITAL INPUTS */
|
||||
d_inputs = LINES_DIGI_INP;
|
||||
d_outputs = LINES_DIGI_OUT;
|
||||
}
|
||||
xpd = xpd_alloc(xbus, unit, subunit, subtype, subunits, sizeof(struct FXS_priv_data), proto_table, channels);
|
||||
if(!xpd)
|
||||
return NULL;
|
||||
/* Initialize digital inputs/outputs */
|
||||
if (d_inputs) {
|
||||
XBUS_DBG(GENERAL, xbus, "Initialize %d digital inputs\n",
|
||||
d_inputs);
|
||||
PHONEDEV(xpd).digital_inputs =
|
||||
BITMASK(d_inputs) << (regular_channels + d_outputs);
|
||||
} else
|
||||
XBUS_DBG(GENERAL, xbus, "No digital inputs\n");
|
||||
if (d_outputs) {
|
||||
XBUS_DBG(GENERAL, xbus, "Initialize %d digital outputs\n",
|
||||
d_outputs);
|
||||
PHONEDEV(xpd).digital_outputs =
|
||||
BITMASK(d_outputs) << regular_channels;
|
||||
} else
|
||||
XBUS_DBG(GENERAL, xbus, "No digital outputs\n");
|
||||
if(unit == 0) {
|
||||
XBUS_DBG(GENERAL, xbus, "First XPD detected. Initialize digital outputs/inputs\n");
|
||||
PHONEDEV(xpd).digital_outputs = BITMASK(LINES_DIGI_OUT) << regular_channels;
|
||||
PHONEDEV(xpd).digital_inputs = BITMASK(LINES_DIGI_INP) << (regular_channels + LINES_DIGI_OUT);
|
||||
}
|
||||
PHONEDEV(xpd).direction = TO_PHONE;
|
||||
xpd->type_name = "FXS";
|
||||
if(fxs_proc_create(xbus, xpd) < 0)
|
||||
@@ -1158,7 +1142,7 @@ static int FXS_card_tick(xbus_t *xbus, xpd_t *xpd)
|
||||
priv = xpd->priv;
|
||||
BUG_ON(!priv);
|
||||
#ifdef POLL_DIGITAL_INPUTS
|
||||
if (poll_digital_inputs && PHONEDEV(xpd).digital_inputs) {
|
||||
if(poll_digital_inputs && xpd->xbus_idx == 0) {
|
||||
if((xpd->timer_count % poll_digital_inputs) == 0)
|
||||
poll_inputs(xpd);
|
||||
}
|
||||
@@ -1270,13 +1254,6 @@ static void process_digital_inputs(xpd_t *xpd, const reg_cmd_t *info)
|
||||
bool offhook = (REG_FIELD(info, data_low) & 0x1) == 0;
|
||||
xpp_line_t lines = BIT(info->portnum);
|
||||
|
||||
/* Sanity check */
|
||||
if (!PHONEDEV(xpd).digital_inputs) {
|
||||
XPD_NOTICE(xpd,
|
||||
"%s called without digital inputs. Ignored\n",
|
||||
__func__);
|
||||
return;
|
||||
}
|
||||
/* Map SLIC number into line number */
|
||||
for(i = 0; i < ARRAY_SIZE(input_channels); i++) {
|
||||
int channo = input_channels[i];
|
||||
@@ -1389,7 +1366,7 @@ static int FXS_card_register_reply(xbus_t *xbus, xpd_t *xpd, reg_cmd_t *info)
|
||||
/*
|
||||
* Process digital inputs polling results
|
||||
*/
|
||||
else if (!indirect && regnum == REG_DIGITAL_IOCTRL) {
|
||||
else if(xpd->xbus_idx == 0 && !indirect && regnum == REG_DIGITAL_IOCTRL) {
|
||||
process_digital_inputs(xpd, info);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1364,19 +1364,6 @@ static inline void list_replace(struct list_head *old, struct list_head *new)
|
||||
new->prev = old->prev;
|
||||
new->prev->next = new;
|
||||
}
|
||||
|
||||
#ifndef WARN_ON_ONCE
|
||||
#define WARN_ON_ONCE(__condition) do { \
|
||||
static int __once = 1; \
|
||||
if (unlikely(__condition)) { \
|
||||
if (__once) { \
|
||||
__once = 0; \
|
||||
WARN_ON(0); \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14)
|
||||
#define kzalloc(a, b) kcalloc(1, a, b)
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12)
|
||||
|
||||
Reference in New Issue
Block a user