* Re: [PATCH 0/5] Firewire networking assorted fixes
From: Maxim Levitsky @ 2010-11-28 3:02 UTC (permalink / raw)
To: linux1394-devel; +Cc: netdev, Stefan Richter
In-Reply-To: <1290906936-14472-1-git-send-email-maximlevitsky@gmail.com>
On Sun, 2010-11-28 at 03:15 +0200, Maxim Levitsky wrote:
> Here is few patches to fix few annoying problems with firewire networking.
>
> I need a feedback on patch #3 from netdev folks.
>
> patch #2 implements initial version of IR/IR resume support.
Sorry for bad spelling and grammar in the changelogs and here, usually I
mange much better than that....
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
^ permalink raw reply
* Re: [PATCH] econet: Move to staging; remove from defconfig
From: David Miller @ 2010-11-28 6:38 UTC (permalink / raw)
To: ben; +Cc: gregkh, netdev, devel, linux-arm-kernel, debian-kernel
In-Reply-To: <1290909215.3292.230.camel@localhost>
From: Ben Hutchings <ben@decadent.org.uk>
Date: Sun, 28 Nov 2010 01:53:35 +0000
> On Sat, 2010-11-27 at 17:26 -0800, David Miller wrote:
>> From: Greg KH <gregkh@suse.de>
>> Date: Sat, 27 Nov 2010 16:21:35 -0800
>>
>> > And I need an ack from the networking maintainer to be able to accept
>> > this also.
>>
>> I'm not applying this, nor do I want anyone else to.
>>
>> If people think this protocol is not maintained adequately
>> right now, wait until you push it into staging.
>>
>> Furthermore, once Phil Blundell was made aware of security
>> holes in econet he fixed them within a few days. Which is
>> much better than I can say for some of the other protocols
>> and filesystems in the tree.
>
> Those bugs were present for years and would have been obvious to anyone
> who cared to read the code. While I very much appreciate Phil's quick
> response, I don't think this reactive maintenance is enough.
These same arguments could for be made for RDS. Look at all the
hellacious awful obvious crap we've discovered in that code recently.
A simple read would have caught those too, and I don't see it's
maintainer doing such things.
So, you're very much still not convincing Ben, but feel free to keep
trying.
^ permalink raw reply
* Re: [PATCH net-next-2.6] be2net: adding support for Lancer family of CNAs
From: David Miller @ 2010-11-28 6:52 UTC (permalink / raw)
To: sathya.perla; +Cc: netdev
In-Reply-To: <20101122092550.GA11076@emulex.com>
From: Sathya Perla <sathya.perla@emulex.com>
Date: Mon, 22 Nov 2010 14:55:50 +0530
> Key changes are:
> - EQ ids are not assigned consecutively in Lancer. So, fix mapping of MSIx
> vector to EQ-id.
> - BAR mapping and some req locations different for Lancer.
> - TCP,UDP,IP checksum fields must be compulsorily set in TX wrb for TSO in
> Lancer.
> - CEV_IST reg not present in Lancer; so, peek into event queue to check for
> new entries
> - cq_create and mcc_create cmd interface is different for Lancer; handle
> accordingly
>
> Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
> Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Applied, thank you.
^ permalink raw reply
* Re: [PATCN net-next-2.6] drivers/net: use vzalloc()
From: David Miller @ 2010-11-28 6:54 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
In-Reply-To: <1290420906.2811.14.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 22 Nov 2010 11:15:06 +0100
> Use vzalloc() and vzalloc_node() in net drivers
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied, thanks Eric.
^ permalink raw reply
* Re: [PATCH net-next-2.6]: rtnl: make link af-specific updates atomic
From: David Miller @ 2010-11-28 6:56 UTC (permalink / raw)
To: tgraf; +Cc: netdev
In-Reply-To: <20101122113154.GA16382@canuck.infradead.org>
From: Thomas Graf <tgraf@infradead.org>
Date: Mon, 22 Nov 2010 06:31:54 -0500
> As David pointed out correctly, updates to af-specific attributes
> are currently not atomic. If multiple changes are requested and
> one of them fails, previous updates may have been applied already
> leaving the link behind in a undefined state.
>
> This patch splits the function parse_link_af() into two functions
> validate_link_af() and set_link_at(). validate_link_af() is placed
> to validate_linkmsg() check for errors as early as possible before
> any changes to the link have been made. set_link_af() is called to
> commit the changes later.
>
> This method is not fail proof, while it is currently sufficient
> to make set_link_af() inerrable and thus 100% atomic, the
> validation function method will not be able to detect all error
> scenarios in the future, there will likely always be errors
> depending on states which are f.e. not protected by rtnl_mutex
> and thus may change between validation and setting.
>
> Also, instead of silently ignoring unknown address families and
> config blocks for address families which did not register a set
> function the errors EAFNOSUPPORT respectively EOPNOSUPPORT are
> returned to avoid comitting 4 out of 5 update requests without
> notifying the user.
>
> Signed-off-by: Thomas Graf <tgraf@infradead.org>
Applied, thanks Thomas.
^ permalink raw reply
* Re: [PATCH] netns: Don't leak others' openreq-s in proc
From: David Miller @ 2010-11-28 6:58 UTC (permalink / raw)
To: xemul; +Cc: netdev
In-Reply-To: <4CEA6F74.6010107@parallels.com>
From: Pavel Emelyanov <xemul@parallels.com>
Date: Mon, 22 Nov 2010 16:26:12 +0300
> The /proc/net/tcp leaks openreq sockets from other namespaces.
>
> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Applied to net-2.6, thanks!
^ permalink raw reply
* Re: [PATCH 5/6] forcedeth: use KERN_ facility level in printk
From: Michał Mirosław @ 2010-11-28 9:05 UTC (permalink / raw)
To: Joe Perches; +Cc: Ben Hutchings, Szymon Janc, netdev
In-Reply-To: <1290887140.22971.16.camel@Joe-Laptop>
2010/11/27 Joe Perches <joe@perches.com>:
> On Sat, 2010-11-27 at 19:04 +0000, Ben Hutchings wrote:
>> On Sat, 2010-11-27 at 19:39 +0100, Szymon Janc wrote:
>> > diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
>> > index 2f092d7..a2b6681 100644
>> > --- a/drivers/net/forcedeth.c
>> > +++ b/drivers/net/forcedeth.c
>> > @@ -958,7 +958,7 @@ static int reg_delay(struct net_device *dev, int offset, u32 mask, u32 target,
>> > delaymax -= delay;
>> > if (delaymax < 0) {
>> > if (msg)
>> > - printk("%s", msg);
>> > + printk(KERN_WARNING "%s", msg);
>> No, msg already includes a log level.
>
> True. The messages are still broken though.
> Some have trailing newlines, others not.
>
> It'd be better to move the msg after the reg_delay
> call and add the missing newlines.
>
[...]
> diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
> index 0fa1776..2d11028f 100644
> --- a/drivers/net/forcedeth.c
> +++ b/drivers/net/forcedeth.c
[...]
> @@ -1547,9 +1544,9 @@ static void nv_stop_rx(struct net_device *dev)
> else
> rx_ctrl |= NVREG_RCVCTL_RX_PATH_EN;
> writel(rx_ctrl, base + NvRegReceiverControl);
> - reg_delay(dev, NvRegReceiverStatus, NVREG_RCVSTAT_BUSY, 0,
> - NV_RXSTOP_DELAY1, NV_RXSTOP_DELAY1MAX,
> - KERN_INFO "nv_stop_rx: ReceiverStatus remained busy");
> + if (reg_delay(dev, NvRegReceiverStatus, NVREG_RCVSTAT_BUSY, 0,
> + NV_RXSTOP_DELAY1, NV_RXSTOP_DELAY1MAX))
> + printk(KERN_INFO "nv_stop_rx: ReceiverStatus remained busy\n");
You could change it to dev_info() and friends in one go.
> udelay(NV_RXSTOP_DELAY2);
> if (!np->mac_in_use)
[...]
Best Regards,
Michał Mirosław
^ permalink raw reply
* [PATCH 0/4] drivers/net: Remove unnecessary [kv][mcz]alloc casts
From: Joe Perches @ 2010-11-28 9:05 UTC (permalink / raw)
To: netdev, linux-wireless; +Cc: linux-kernel
These are the last remaining alloc casts in drivers/net...
Joe Perches (4):
netxen: remove unnecessary [kv][mcz]alloc casts
qlcnic: remove unnecessary [kv][mcz]alloc casts
vxge: remove unnecessary [kv][mcz]alloc casts
zd1211rw: remove unnecessary [kv][mcz]alloc casts
drivers/net/netxen/netxen_nic_init.c | 3 +--
drivers/net/qlcnic/qlcnic_init.c | 3 +--
drivers/net/vxge/vxge-config.c | 24 +++++++++---------------
drivers/net/vxge/vxge-main.c | 4 +---
drivers/net/wireless/zd1211rw/zd_chip.c | 3 +--
5 files changed, 13 insertions(+), 24 deletions(-)
--
1.7.3.2.245.g03276.dirty
^ permalink raw reply
* [PATCH 1/4] netxen: remove unnecessary [kv][mcz]alloc casts
From: Joe Perches @ 2010-11-28 9:05 UTC (permalink / raw)
To: Amit Kumar Salecha; +Cc: netdev, linux-kernel
In-Reply-To: <cover.1290934782.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/netxen/netxen_nic_init.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index f946de2..731077d 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -278,8 +278,7 @@ int netxen_alloc_sw_resources(struct netxen_adapter *adapter)
break;
}
- rds_ring->rx_buf_arr = (struct netxen_rx_buffer *)
- vzalloc(RCV_BUFF_RINGSIZE(rds_ring));
+ rds_ring->rx_buf_arr = vzalloc(RCV_BUFF_RINGSIZE(rds_ring));
if (rds_ring->rx_buf_arr == NULL) {
printk(KERN_ERR "%s: Failed to allocate "
"rx buffer ring %d\n",
--
1.7.3.2.245.g03276.dirty
^ permalink raw reply related
* [PATCH 4/4] zd1211rw: remove unnecessary [kv][mcz]alloc casts
From: Joe Perches @ 2010-11-28 9:05 UTC (permalink / raw)
To: Daniel Drake, Ulrich Kunitz
Cc: John W. Linville, linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <cover.1290934782.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
Signed-off-by: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
---
drivers/net/wireless/zd1211rw/zd_chip.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c
index 87a95bc..dfcebed 100644
--- a/drivers/net/wireless/zd1211rw/zd_chip.c
+++ b/drivers/net/wireless/zd1211rw/zd_chip.c
@@ -117,8 +117,7 @@ int zd_ioread32v_locked(struct zd_chip *chip, u32 *values, const zd_addr_t *addr
/* Allocate a single memory block for values and addresses. */
count16 = 2*count;
- a16 = (zd_addr_t *) kmalloc(count16 * (sizeof(zd_addr_t) + sizeof(u16)),
- GFP_KERNEL);
+ a16 = kmalloc(count16 * (sizeof(zd_addr_t) + sizeof(u16)), GFP_KERNEL);
if (!a16) {
dev_dbg_f(zd_chip_dev(chip),
"error ENOMEM in allocation of a16\n");
--
1.7.3.2.245.g03276.dirty
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH 2/4] qlcnic: remove unnecessary [kv][mcz]alloc casts
From: Joe Perches @ 2010-11-28 9:05 UTC (permalink / raw)
To: Amit Kumar Salecha, Anirban Chakraborty, linux-driver
Cc: netdev, linux-kernel
In-Reply-To: <cover.1290934782.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/qlcnic/qlcnic_init.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c
index 3f97018..c5ea2f4 100644
--- a/drivers/net/qlcnic/qlcnic_init.c
+++ b/drivers/net/qlcnic/qlcnic_init.c
@@ -274,8 +274,7 @@ int qlcnic_alloc_sw_resources(struct qlcnic_adapter *adapter)
rds_ring->dma_size + NET_IP_ALIGN;
break;
}
- rds_ring->rx_buf_arr = (struct qlcnic_rx_buffer *)
- vzalloc(RCV_BUFF_RINGSIZE(rds_ring));
+ rds_ring->rx_buf_arr = vzalloc(RCV_BUFF_RINGSIZE(rds_ring));
if (rds_ring->rx_buf_arr == NULL) {
dev_err(&netdev->dev, "Failed to allocate "
"rx buffer ring %d\n", ring);
--
1.7.3.2.245.g03276.dirty
^ permalink raw reply related
* [PATCH 3/4] vxge: remove unnecessary [kv][mcz]alloc casts
From: Joe Perches @ 2010-11-28 9:05 UTC (permalink / raw)
To: Ramkrishna Vepa, Sivakumar Subramani, Sreenivasa Honnur,
Jon Mason
Cc: netdev, linux-kernel
In-Reply-To: <cover.1290934782.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/vxge/vxge-config.c | 24 +++++++++---------------
drivers/net/vxge/vxge-main.c | 4 +---
2 files changed, 10 insertions(+), 18 deletions(-)
diff --git a/drivers/net/vxge/vxge-config.c b/drivers/net/vxge/vxge-config.c
index 44d3ddd..a0241fe 100644
--- a/drivers/net/vxge/vxge-config.c
+++ b/drivers/net/vxge/vxge-config.c
@@ -1219,8 +1219,7 @@ vxge_hw_device_initialize(
if (status != VXGE_HW_OK)
goto exit;
- hldev = (struct __vxge_hw_device *)
- vzalloc(sizeof(struct __vxge_hw_device));
+ hldev = vzalloc(sizeof(struct __vxge_hw_device));
if (hldev == NULL) {
status = VXGE_HW_ERR_OUT_OF_MEMORY;
goto exit;
@@ -2140,8 +2139,7 @@ __vxge_hw_mempool_create(
goto exit;
}
- mempool = (struct vxge_hw_mempool *)
- vzalloc(sizeof(struct vxge_hw_mempool));
+ mempool = vzalloc(sizeof(struct vxge_hw_mempool));
if (mempool == NULL) {
status = VXGE_HW_ERR_OUT_OF_MEMORY;
goto exit;
@@ -2165,7 +2163,7 @@ __vxge_hw_mempool_create(
/* allocate array of memblocks */
mempool->memblocks_arr =
- (void **) vzalloc(sizeof(void *) * mempool->memblocks_max);
+ vzalloc(sizeof(void *) * mempool->memblocks_max);
if (mempool->memblocks_arr == NULL) {
__vxge_hw_mempool_destroy(mempool);
status = VXGE_HW_ERR_OUT_OF_MEMORY;
@@ -2175,7 +2173,7 @@ __vxge_hw_mempool_create(
/* allocate array of private parts of items per memblocks */
mempool->memblocks_priv_arr =
- (void **) vzalloc(sizeof(void *) * mempool->memblocks_max);
+ vzalloc(sizeof(void *) * mempool->memblocks_max);
if (mempool->memblocks_priv_arr == NULL) {
__vxge_hw_mempool_destroy(mempool);
status = VXGE_HW_ERR_OUT_OF_MEMORY;
@@ -2184,7 +2182,7 @@ __vxge_hw_mempool_create(
}
/* allocate array of memblocks DMA objects */
- mempool->memblocks_dma_arr = (struct vxge_hw_mempool_dma *)
+ mempool->memblocks_dma_arr =
vzalloc(sizeof(struct vxge_hw_mempool_dma) *
mempool->memblocks_max);
@@ -2196,8 +2194,7 @@ __vxge_hw_mempool_create(
}
/* allocate hash array of items */
- mempool->items_arr =
- (void **) vzalloc(sizeof(void *) * mempool->items_max);
+ mempool->items_arr = vzalloc(sizeof(void *) * mempool->items_max);
if (mempool->items_arr == NULL) {
__vxge_hw_mempool_destroy(mempool);
status = VXGE_HW_ERR_OUT_OF_MEMORY;
@@ -4258,8 +4255,7 @@ vxge_hw_vpath_open(struct __vxge_hw_device *hldev,
if (status != VXGE_HW_OK)
goto vpath_open_exit1;
- vp = (struct __vxge_hw_vpath_handle *)
- vzalloc(sizeof(struct __vxge_hw_vpath_handle));
+ vp = vzalloc(sizeof(struct __vxge_hw_vpath_handle));
if (vp == NULL) {
status = VXGE_HW_ERR_OUT_OF_MEMORY;
goto vpath_open_exit2;
@@ -5065,8 +5061,7 @@ static void vxge_hw_blockpool_block_add(struct __vxge_hw_device *devh,
item);
if (entry == NULL)
- entry = (struct __vxge_hw_blockpool_entry *)
- vmalloc(sizeof(struct __vxge_hw_blockpool_entry));
+ entry = vmalloc(sizeof(struct __vxge_hw_blockpool_entry));
else
list_del(&entry->item);
@@ -5182,8 +5177,7 @@ __vxge_hw_blockpool_free(struct __vxge_hw_device *devh,
item);
if (entry == NULL)
- entry = (struct __vxge_hw_blockpool_entry *)
- vmalloc(sizeof(
+ entry = vmalloc(sizeof(
struct __vxge_hw_blockpool_entry));
else
list_del(&entry->item);
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
index 5cba4a6..a21dae1 100644
--- a/drivers/net/vxge/vxge-main.c
+++ b/drivers/net/vxge/vxge-main.c
@@ -4602,9 +4602,7 @@ vxge_probe(struct pci_dev *pdev, const struct pci_device_id *pre)
/* Copy the station mac address to the list */
for (i = 0; i < vdev->no_of_vpath; i++) {
- entry = (struct vxge_mac_addrs *)
- kzalloc(sizeof(struct vxge_mac_addrs),
- GFP_KERNEL);
+ entry = kzalloc(sizeof(struct vxge_mac_addrs), GFP_KERNEL);
if (NULL == entry) {
vxge_debug_init(VXGE_ERR,
"%s: mac_addr_list : memory allocation failed",
--
1.7.3.2.245.g03276.dirty
^ permalink raw reply related
* Re: [PATCH 5/6] forcedeth: use KERN_ facility level in printk
From: Joe Perches @ 2010-11-28 9:11 UTC (permalink / raw)
To: Michał Mirosław; +Cc: Ben Hutchings, Szymon Janc, netdev
In-Reply-To: <AANLkTi=X-4mg2SyKx870B1xN4uW+4NPuPL=Fv_cqYf--@mail.gmail.com>
On Sun, 2010-11-28 at 10:05 +0100, Michał Mirosław wrote:
> 2010/11/27 Joe Perches <joe@perches.com>:
> > On Sat, 2010-11-27 at 19:04 +0000, Ben Hutchings wrote:
> >> On Sat, 2010-11-27 at 19:39 +0100, Szymon Janc wrote:
> >> > diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
> >> > index 2f092d7..a2b6681 100644
> >> > @@ -958,7 +958,7 @@ static int reg_delay(struct net_device *dev, int offset, u32 mask, u32 target,
[]
> >> > - printk("%s", msg);
> >> > + printk(KERN_WARNING "%s", msg);
> >> No, msg already includes a log level.
> > True. The messages are still broken though.
> > Some have trailing newlines, others not.
> > It'd be better to move the msg after the reg_delay
> > call and add the missing newlines.
> [...]
> > diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
> > @@ -1547,9 +1544,9 @@ static void nv_stop_rx(struct net_device *dev)
[]
> > - reg_delay(dev, NvRegReceiverStatus, NVREG_RCVSTAT_BUSY, 0,
> > - NV_RXSTOP_DELAY1, NV_RXSTOP_DELAY1MAX,
> > - KERN_INFO "nv_stop_rx: ReceiverStatus remained busy");
> > + if (reg_delay(dev, NvRegReceiverStatus, NVREG_RCVSTAT_BUSY, 0,
> > + NV_RXSTOP_DELAY1, NV_RXSTOP_DELAY1MAX))
> > + printk(KERN_INFO "nv_stop_rx: ReceiverStatus remained busy\n");
> You could change it to dev_info() and friends in one go.
Yeah, I did that in a local tree for all logging calls,
(dprintk->netdev_dbg, printk->netdev_<level> etc) but I'll
wait until Szymon's patches are applied or nacked.
^ permalink raw reply
* Re: [PATCH 4/4] zd1211rw: remove unnecessary [kv][mcz]alloc casts
From: Johannes Berg @ 2010-11-28 9:12 UTC (permalink / raw)
To: Joe Perches
Cc: Daniel Drake, Ulrich Kunitz, John W. Linville, linux-wireless,
netdev, linux-kernel
In-Reply-To: <704bdd89d630b364043ac7a9ec0a110d311a17a2.1290934782.git.joe@perches.com>
On Sun, 2010-11-28 at 01:05 -0800, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/net/wireless/zd1211rw/zd_chip.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c
> index 87a95bc..dfcebed 100644
> --- a/drivers/net/wireless/zd1211rw/zd_chip.c
> +++ b/drivers/net/wireless/zd1211rw/zd_chip.c
> @@ -117,8 +117,7 @@ int zd_ioread32v_locked(struct zd_chip *chip, u32 *values, const zd_addr_t *addr
>
> /* Allocate a single memory block for values and addresses. */
> count16 = 2*count;
> - a16 = (zd_addr_t *) kmalloc(count16 * (sizeof(zd_addr_t) + sizeof(u16)),
> - GFP_KERNEL);
> + a16 = kmalloc(count16 * (sizeof(zd_addr_t) + sizeof(u16)), GFP_KERNEL);
I believe this is on purpose for sparse.
johannes
^ permalink raw reply
* Re: [PATCH 4/4] zd1211rw: remove unnecessary [kv][mcz]alloc casts
From: Joe Perches @ 2010-11-28 9:20 UTC (permalink / raw)
To: Johannes Berg
Cc: Daniel Drake, Ulrich Kunitz, linux-wireless, John W. Linville,
linux-kernel, netdev
In-Reply-To: <1290935566.3467.0.camel@jlt3.sipsolutions.net>
On Sun, 2010-11-28 at 10:12 +0100, Johannes Berg wrote:
> On Sun, 2010-11-28 at 01:05 -0800, Joe Perches wrote:
> > diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c
> > @@ -117,8 +117,7 @@ int zd_ioread32v_locked(struct zd_chip *chip, u32 *values, const zd_addr_t *addr
> >
> > /* Allocate a single memory block for values and addresses. */
> > count16 = 2*count;
> > - a16 = (zd_addr_t *) kmalloc(count16 * (sizeof(zd_addr_t) + sizeof(u16)),
> > - GFP_KERNEL);
> > + a16 = kmalloc(count16 * (sizeof(zd_addr_t) + sizeof(u16)), GFP_KERNEL);
> I believe this is on purpose for sparse.
Perhaps in a previous version, but not now.
$ make C=1 drivers/net/wireless/zd1211rw/zd_chip.o
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CHECK drivers/net/wireless/zd1211rw/zd_chip.c
include/trace/events/kmem.h:45:1: error: Expected ( after asm
include/trace/events/kmem.h:45:1: error: got goto
include/trace/events/kmem.h:53:1: error: Expected ( after asm
include/trace/events/kmem.h:53:1: error: got goto
include/trace/events/kmem.h:99:1: error: Expected ( after asm
include/trace/events/kmem.h:99:1: error: got goto
include/trace/events/kmem.h:108:1: error: Expected ( after asm
include/trace/events/kmem.h:108:1: error: got goto
include/trace/events/kmem.h:136:1: error: Expected ( after asm
include/trace/events/kmem.h:136:1: error: got goto
include/trace/events/kmem.h:143:1: error: Expected ( after asm
include/trace/events/kmem.h:143:1: error: got goto
include/trace/events/kmem.h:150:1: error: Expected ( after asm
include/trace/events/kmem.h:150:1: error: got goto
include/trace/events/kmem.h:172:1: error: Expected ( after asm
include/trace/events/kmem.h:172:1: error: got goto
include/trace/events/kmem.h:194:1: error: Expected ( after asm
include/trace/events/kmem.h:194:1: error: got goto
include/trace/events/kmem.h:249:1: error: Expected ( after asm
include/trace/events/kmem.h:249:1: error: got goto
include/trace/events/kmem.h:256:1: error: Expected ( after asm
include/trace/events/kmem.h:256:1: error: got goto
include/trace/events/kmem.h:267:1: error: Expected ( after asm
include/trace/events/kmem.h:267:1: error: got goto
include/trace/events/module.h:18:1: error: Expected ( after asm
include/trace/events/module.h:18:1: error: got goto
include/trace/events/module.h:37:1: error: Expected ( after asm
include/trace/events/module.h:37:1: error: got goto
include/trace/events/module.h:79:1: error: Expected ( after asm
include/trace/events/module.h:79:1: error: got goto
include/trace/events/module.h:86:1: error: Expected ( after asm
include/trace/events/module.h:86:1: error: got goto
include/trace/events/module.h:94:1: error: Expected ( after asm
include/trace/events/module.h:94:1: error: got goto
/home/joe/linux/net-next-2.6-2/arch/x86/include/asm/uaccess_32.h:197:9: error: attribute 'error': unknown attribute
include/trace/events/irq.h:37:1: error: Expected ( after asm
include/trace/events/irq.h:37:1: error: got goto
include/trace/events/irq.h:67:1: error: Expected ( after asm
include/trace/events/irq.h:67:1: error: got goto
include/trace/events/irq.h:112:1: error: Expected ( after asm
include/trace/events/irq.h:112:1: error: got goto
include/trace/events/irq.h:126:1: error: Expected ( after asm
include/trace/events/irq.h:126:1: error: got goto
include/trace/events/irq.h:140:1: error: Expected ( after asm
include/trace/events/irq.h:140:1: error: got goto
include/trace/events/kmem.h:45:1: error: need constant string for inline asm
include/trace/events/kmem.h:45:1: error: incompatible types in comparison expression (different address spaces)
include/trace/events/kmem.h:45:1: error: need constant string for inline asm
include/trace/events/kmem.h:45:1: error: incompatible types in comparison expression (different address spaces)
include/trace/events/kmem.h:45:1: error: need constant string for inline asm
include/trace/events/kmem.h:45:1: error: incompatible types in comparison expression (different address spaces)
include/trace/events/kmem.h:45:1: error: need constant string for inline asm
include/trace/events/kmem.h:45:1: error: incompatible types in comparison expression (different address spaces)
CC drivers/net/wireless/zd1211rw/zd_chip.o
$
^ permalink raw reply
* Re: [PATCH 4/4] zd1211rw: remove unnecessary [kv][mcz]alloc casts
From: Johannes Berg @ 2010-11-28 9:30 UTC (permalink / raw)
To: Joe Perches
Cc: Daniel Drake, Ulrich Kunitz, linux-wireless, John W. Linville,
linux-kernel, netdev
In-Reply-To: <1290936047.16349.13.camel@Joe-Laptop>
On Sun, 2010-11-28 at 01:20 -0800, Joe Perches wrote:
> On Sun, 2010-11-28 at 10:12 +0100, Johannes Berg wrote:
> > On Sun, 2010-11-28 at 01:05 -0800, Joe Perches wrote:
> > > diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c
> > > @@ -117,8 +117,7 @@ int zd_ioread32v_locked(struct zd_chip *chip, u32 *values, const zd_addr_t *addr
> > >
> > > /* Allocate a single memory block for values and addresses. */
> > > count16 = 2*count;
> > > - a16 = (zd_addr_t *) kmalloc(count16 * (sizeof(zd_addr_t) + sizeof(u16)),
> > > - GFP_KERNEL);
> > > + a16 = kmalloc(count16 * (sizeof(zd_addr_t) + sizeof(u16)), GFP_KERNEL);
> > I believe this is on purpose for sparse.
>
> Perhaps in a previous version, but not now.
>
> $ make C=1 drivers/net/wireless/zd1211rw/zd_chip.o
> CHK include/linux/version.h
> CHK include/generated/utsrelease.h
> CALL scripts/checksyscalls.sh
> CHECK drivers/net/wireless/zd1211rw/zd_chip.c
> include/trace/events/kmem.h:45:1: error: Expected ( after asm
> include/trace/events/kmem.h:45:1: error: got goto
How do you know? I thought sparse was pretty much not reliable after the
first error it prints.
johannes
^ permalink raw reply
* Re: [PATCH 4/4] zd1211rw: remove unnecessary [kv][mcz]alloc casts
From: Joe Perches @ 2010-11-28 9:50 UTC (permalink / raw)
To: Johannes Berg
Cc: Daniel Drake, Ulrich Kunitz,
linux-wireless-u79uwXL29TY76Z2rM5mHXA, John W. Linville,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, netdev
In-Reply-To: <1290936606.3467.2.camel-8upI4CBIZJIJvtFkdXX2HixXY32XiHfO@public.gmane.org>
On Sun, 2010-11-28 at 10:30 +0100, Johannes Berg wrote:
> On Sun, 2010-11-28 at 01:20 -0800, Joe Perches wrote:
> > On Sun, 2010-11-28 at 10:12 +0100, Johannes Berg wrote:
> > > On Sun, 2010-11-28 at 01:05 -0800, Joe Perches wrote:
> > > > diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c
> > > > @@ -117,8 +117,7 @@ int zd_ioread32v_locked(struct zd_chip *chip, u32 *values, const zd_addr_t *addr
> > > > /* Allocate a single memory block for values and addresses. */
> > > > count16 = 2*count;
> > > > - a16 = (zd_addr_t *) kmalloc(count16 * (sizeof(zd_addr_t) + sizeof(u16)),
> > > > - GFP_KERNEL);
> > > > + a16 = kmalloc(count16 * (sizeof(zd_addr_t) + sizeof(u16)), GFP_KERNEL);
> > > I believe this is on purpose for sparse.
> > Perhaps in a previous version, but not now.
> How do you know? I thought sparse was pretty much not reliable after the
> first error it prints.
Good memory you have Johannes...
http://marc.info/?l=linux-netdev&m=117113743902549&w=3
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH 4/4] zd1211rw: remove unnecessary [kv][mcz]alloc casts
From: Johannes Berg @ 2010-11-28 10:02 UTC (permalink / raw)
To: Joe Perches
Cc: Daniel Drake, Ulrich Kunitz, linux-wireless, John W. Linville,
linux-kernel, netdev
In-Reply-To: <1290937845.16349.16.camel@Joe-Laptop>
On Sun, 2010-11-28 at 01:50 -0800, Joe Perches wrote:
> On Sun, 2010-11-28 at 10:30 +0100, Johannes Berg wrote:
> > On Sun, 2010-11-28 at 01:20 -0800, Joe Perches wrote:
> > > On Sun, 2010-11-28 at 10:12 +0100, Johannes Berg wrote:
> > > > On Sun, 2010-11-28 at 01:05 -0800, Joe Perches wrote:
> > > > > diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c
> > > > > @@ -117,8 +117,7 @@ int zd_ioread32v_locked(struct zd_chip *chip, u32 *values, const zd_addr_t *addr
> > > > > /* Allocate a single memory block for values and addresses. */
> > > > > count16 = 2*count;
> > > > > - a16 = (zd_addr_t *) kmalloc(count16 * (sizeof(zd_addr_t) + sizeof(u16)),
> > > > > - GFP_KERNEL);
> > > > > + a16 = kmalloc(count16 * (sizeof(zd_addr_t) + sizeof(u16)), GFP_KERNEL);
> > > > I believe this is on purpose for sparse.
> > > Perhaps in a previous version, but not now.
> > How do you know? I thought sparse was pretty much not reliable after the
> > first error it prints.
>
> Good memory you have Johannes...
>
> http://marc.info/?l=linux-netdev&m=117113743902549&w=3
I, err, not really, all this isn't making a whole lot of sense to me
right now :-)
The only thing I remembered was that there was something weird with
zd_addr_t ...
Did sparse become more reliable in face of errors?
johannes
^ permalink raw reply
* [PATCH V2 4/4] zd1211rw: document need for kmalloc cast
From: Joe Perches @ 2010-11-28 10:02 UTC (permalink / raw)
To: Johannes Berg
Cc: Daniel Drake, Ulrich Kunitz, linux-wireless, John W. Linville,
linux-kernel, netdev
In-Reply-To: <1290936606.3467.2.camel@jlt3.sipsolutions.net>
Signed-off-by: Joe Perches <joe@perches.com>
---
V2: Just document the need for the cast
diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c
index 87a95bc..dd0bb0c 100644
--- a/drivers/net/wireless/zd1211rw/zd_chip.c
+++ b/drivers/net/wireless/zd1211rw/zd_chip.c
@@ -117,6 +117,7 @@ int zd_ioread32v_locked(struct zd_chip *chip, u32 *values, const zd_addr_t *addr
/* Allocate a single memory block for values and addresses. */
count16 = 2*count;
+ /* zd_addr_t is __nocast, so the kmalloc needs an explicit cast */
a16 = (zd_addr_t *) kmalloc(count16 * (sizeof(zd_addr_t) + sizeof(u16)),
GFP_KERNEL);
if (!a16) {
^ permalink raw reply related
* Re: [PATCH 4/4] zd1211rw: remove unnecessary [kv][mcz]alloc casts
From: Joe Perches @ 2010-11-28 10:13 UTC (permalink / raw)
To: Johannes Berg
Cc: Daniel Drake, Ulrich Kunitz, John W. Linville,
linux-wireless-u79uwXL29TY76Z2rM5mHXA, netdev, LKML
In-Reply-To: <1290938527.3467.5.camel-8upI4CBIZJIJvtFkdXX2HixXY32XiHfO@public.gmane.org>
On Sun, 2010-11-28 at 11:02 +0100, Johannes Berg wrote:
> On Sun, 2010-11-28 at 01:50 -0800, Joe Perches wrote:
> > Good memory you have Johannes...
> > http://marc.info/?l=linux-netdev&m=117113743902549&w=3
> I, err, not really, all this isn't making a whole lot of sense to me
> right now :-)
> The only thing I remembered was that there was something weird with
> zd_addr_t ...
Yes. It's marked __nocast.
> Did sparse become more reliable in face of errors?
Apparently not.
If the kmalloc cast in zd_chip is removed:
$ make C=1 drivers/net/wireless/zd1211rw/zd_chip.o
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CHECK drivers/net/wireless/zd1211rw/zd_chip.c
arch/x86/include/asm/uaccess_32.h:197:9: error: attribute 'error': unknown attribute
CC drivers/net/wireless/zd1211rw/zd_chip.o
$
If the __compiletime_<foo> uses in uaccess_32.h are removed,
and the kmalloc cast in zd_chip is also removed:
$ make C=1 drivers/net/wireless/zd1211rw/zd_chip.o
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CC arch/x86/kernel/asm-offsets.s
GEN include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CHECK drivers/net/wireless/zd1211rw/zd_chip.c
drivers/net/wireless/zd1211rw/zd_chip.c:121:22: warning: implicit cast to nocast type
CC drivers/net/wireless/zd1211rw/zd_chip.o
$
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH net-next] bnx2x: Use skb_is_gso_v6(skb) instead of accessing the skb_shinfo(skb) directly
From: Vladislav Zolotarov @ 2010-11-28 10:22 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Dave Miller, Eilon Greenstein, netdev list
In-Reply-To: <1290851625.2794.17.camel@edumazet-laptop>
>
> May I ask why ?
>
> This seems not consistent with the previous block.
>
> Either you also add a skb_is_gso_v4(skb) helper, or let the code as is,
> maybe reordering the flags ?
>
U r right. I'm respinning a patch taking your remarks and a "brackets"
patch into an account.
thanks, Eric.
^ permalink raw reply
* [PATCH net-next] bnx2x: Use helpers instead of direct access to the shinfo(skb) fields
From: Vladislav Zolotarov @ 2010-11-28 10:23 UTC (permalink / raw)
To: Dave Miller; +Cc: Eilon Greenstein, netdev list
In-Reply-To: <1290851625.2794.17.camel@edumazet-laptop>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/bnx2x/bnx2x_cmn.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c
index 94d5f59..e20b2d3 100644
--- a/drivers/net/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/bnx2x/bnx2x_cmn.c
@@ -1692,11 +1692,10 @@ static inline u32 bnx2x_xmit_type(struct bnx2x *bp, struct sk_buff *skb)
}
}
- if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV4)
- rc |= (XMIT_GSO_V4 | XMIT_CSUM_V4 | XMIT_CSUM_TCP);
-
- else if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6)
- rc |= (XMIT_GSO_V6 | XMIT_CSUM_TCP | XMIT_CSUM_V6);
+ if (skb_is_gso_v6(skb))
+ rc |= XMIT_GSO_V6 | XMIT_CSUM_TCP | XMIT_CSUM_V6;
+ else if (skb_is_gso(skb))
+ rc |= XMIT_GSO_V4 | XMIT_CSUM_V4 | XMIT_CSUM_TCP;
return rc;
}
--
1.7.0.4
^ permalink raw reply related
* [PATCH] ssb: Add sysfs attributes to ssb devices
From: Hauke Mehrtens @ 2010-11-28 11:22 UTC (permalink / raw)
To: davem; +Cc: mb, netdev, Hauke Mehrtens, Bernhard Loos
Make it possible to read out the attributes, till now only show on
dmesg, through sysfs.
This patch was some time in OpenWrt.
Signed-off-by: Bernhard Loos <bernhardloos@googlemail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
drivers/ssb/main.c | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index c68b3dc..3918d2c 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -383,6 +383,35 @@ static int ssb_device_uevent(struct device *dev, struct kobj_uevent_env *env)
ssb_dev->id.revision);
}
+#define ssb_config_attr(attrib, field, format_string) \
+static ssize_t \
+attrib##_show(struct device *dev, struct device_attribute *attr, char *buf) \
+{ \
+ return sprintf(buf, format_string, dev_to_ssb_dev(dev)->field); \
+}
+
+ssb_config_attr(core_num, core_index, "%u\n")
+ssb_config_attr(coreid, id.coreid, "0x%04x\n")
+ssb_config_attr(vendor, id.vendor, "0x%04x\n")
+ssb_config_attr(revision, id.revision, "%u\n")
+ssb_config_attr(irq, irq, "%u\n")
+static ssize_t
+name_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ return sprintf(buf, "%s\n",
+ ssb_core_name(dev_to_ssb_dev(dev)->id.coreid));
+}
+
+static struct device_attribute ssb_device_attrs[] = {
+ __ATTR_RO(name),
+ __ATTR_RO(core_num),
+ __ATTR_RO(coreid),
+ __ATTR_RO(vendor),
+ __ATTR_RO(revision),
+ __ATTR_RO(irq),
+ __ATTR_NULL,
+};
+
static struct bus_type ssb_bustype = {
.name = "ssb",
.match = ssb_bus_match,
@@ -392,6 +421,7 @@ static struct bus_type ssb_bustype = {
.suspend = ssb_device_suspend,
.resume = ssb_device_resume,
.uevent = ssb_device_uevent,
+ .dev_attrs = ssb_device_attrs,
};
static void ssb_buses_lock(void)
--
1.7.1
^ permalink raw reply related
* Re: [PATCH] econet: Move to staging; remove from defconfig
From: Ben Hutchings @ 2010-11-28 15:11 UTC (permalink / raw)
To: David Miller; +Cc: gregkh, netdev, devel, linux-arm-kernel, debian-kernel
In-Reply-To: <20101127.223845.189711153.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 1962 bytes --]
On Sat, 2010-11-27 at 22:38 -0800, David Miller wrote:
> From: Ben Hutchings <ben@decadent.org.uk>
> Date: Sun, 28 Nov 2010 01:53:35 +0000
>
> > On Sat, 2010-11-27 at 17:26 -0800, David Miller wrote:
> >> From: Greg KH <gregkh@suse.de>
> >> Date: Sat, 27 Nov 2010 16:21:35 -0800
> >>
> >> > And I need an ack from the networking maintainer to be able to accept
> >> > this also.
> >>
> >> I'm not applying this, nor do I want anyone else to.
> >>
> >> If people think this protocol is not maintained adequately
> >> right now, wait until you push it into staging.
> >>
> >> Furthermore, once Phil Blundell was made aware of security
> >> holes in econet he fixed them within a few days. Which is
> >> much better than I can say for some of the other protocols
> >> and filesystems in the tree.
> >
> > Those bugs were present for years and would have been obvious to anyone
> > who cared to read the code. While I very much appreciate Phil's quick
> > response, I don't think this reactive maintenance is enough.
>
> These same arguments could for be made for RDS. Look at all the
> hellacious awful obvious crap we've discovered in that code recently.
> A simple read would have caught those too, and I don't see it's
> maintainer doing such things.
Indeed, hence the change I made for the upcoming Debian release was:
* af_802154,decnet,econet,rds,x25: Disable auto-loading as mitigation
against local exploits. These protocol modules are not widely used
and can be explicitly loaded or aliased on systems where they are
wanted.
(While decnet may be in better shape than the others, auto-loading is
unnecessary for us as the userland support package explicitly loads
it..)
> So, you're very much still not convincing Ben, but feel free to keep
> trying.
I'm not going to try any more.
Ben.
--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply
* [PATCH net-next-2.6] xps: NUMA allocations for per cpu data
From: Eric Dumazet @ 2010-11-28 15:43 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Tom Herbert
In-Reply-To: <1290791866.2855.263.camel@edumazet-laptop>
store_xps_map() allocates maps that are used by single cpu, it makes
sense to use NUMA allocations.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Tom Herbert <therbert@google.com>
---
net/core/net-sysfs.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 68dbbfd..35f28b1 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -950,8 +950,9 @@ static ssize_t store_xps_map(struct netdev_queue *queue,
if (map_len >= alloc_len) {
alloc_len = alloc_len ?
2 * alloc_len : XPS_MIN_MAP_ALLOC;
- new_map = kzalloc(XPS_MAP_SIZE(alloc_len),
- GFP_KERNEL);
+ new_map = kzalloc_node(XPS_MAP_SIZE(alloc_len),
+ GFP_KERNEL,
+ cpu_to_node(cpu));
if (!new_map)
goto error;
new_map->alloc_len = alloc_len;
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox